Header file strings.h

David Langdon dml at rabbit1.UUCP
Fri Jun 20 08:12:33 AEST 1986


> 
> In article <8606171617.aa10712 at VGR.BRL.ARPA>,
> "1LT Dennis G. Rears" (FSAC) <drears at ardec.ARPA> writes:
> 
>> Paul Schauble writes:
>> 
>> >I am trying to port a program from Unix to MS-DOS.  It makes use of a
>> >header file <strings.h>.  This is not supplied with Microsoft C.  Could
>> >someone please enlighten me as to what this contains?
>> 
>>    <strings.h>  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 <strings.h> 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



More information about the Comp.lang.c mailing list