Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!seismo!brl-adm!brl-smoke!rgenter@BBN-LABS-B.arpa From: rgenter@BBN-LABS-B.arpa (Rick Genter) Newsgroups: net.lang.c Subject: Re: Header file strings.h Message-ID: <1439@brl-smoke.ARPA> Date: Tue, 17-Jun-86 17:44:23 EDT Article-I.D.: brl-smok.1439 Posted: Tue Jun 17 17:44:23 1986 Date-Received: Sat, 21-Jun-86 09:19:02 EDT Sender: news@brl-smoke.ARPA Lines: 45 In article <8606171617.aa10712@VGR.BRL.ARPA>, "1LT Dennis G. Rears" (FSAC) writes: > Paul Schauble writes: > > >I am trying to port a program from Unix to MS-DOS. It makes use of a > >header file . This is not supplied with Microsoft C. Could > >someone please enlighten me as to what this contains? > > contains the data types for the string > operations - strcat, strncat, strtok, strcpy, etc. I have used the More precisely, it contains the external declarations of these functions. One could misinterpret the above statement to mean that contains the data types *manipulated* by the string functions (which it does not). > strings functions many times without using this header file. If > you are checking the return codes of the functions explicitly define > the functions. Example: > > char *strcat(), *strcmp(); In every implementation of strcmp() with which I am familiar, it returns (int), not (char *). Its return value is suitable for the old Fortran 3-way IF (i.e., returns < 0 if string-1 comes before string-2 in dictionary order, = 0 if they are the same, and > 0 if string-1 comes after string-2). > int strlen; This should read: int strlen (); > > I believe Microsoft C libraries contains the string functions. In > that case just explicitly define the functions. If they don't you might > have to write the string functions yourself. > > Dennis > -------- Rick Genter BBN Laboratories Inc. (617) 497-3848 10 Moulton St. 6/506 rgenter@labs-b.bbn.COM (Internet new) Cambridge, MA 02238 rgenter@bbn-labs-b.ARPA (Internet old) linus!rgenter%BBN-LABS-B.ARPA (UUCP)