Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!cbmvax!hutch!rabbit1!dml From: dml@rabbit1.UUCP (David Langdon) Newsgroups: net.lang.c Subject: Re: Re: Header file strings.h Message-ID: <173@rabbit1.UUCP> Date: Thu, 19-Jun-86 18:12:33 EDT Article-I.D.: rabbit1.173 Posted: Thu Jun 19 18:12:33 1986 Date-Received: Sat, 21-Jun-86 11:53:14 EDT References: <1439@brl-smoke.ARPA> Organization: Rabbit Software Corp., Malvern PA Lines: 48 > > 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). > >> have to write the string functions yourself. >> >> Dennis >> > -------- > Rick Genter BBN Laboratories Inc. I am not sure what is being ported here, but some programs pulled off the net make use of a PD strings package posted a couple of months ago. This package contains a strings.h file and "could" explain the other differences being mentioned here. -- ----------------------------------------------------------- David Langdon Rabbit Software Corp. ...!ihnp4!{cbmvax,cuuxb}!hutch!dml ...!psuvax1!burdvax!hutch!dml (215) 647-0440 7 Great Valley Parkway East Malvern PA 19355