/* Copyright (c) 1979 Regents of the University of California */
static char sccsid
[] = "@(#)subr.c 1.1 %G%";
* Does the string fp end in '.' and the character c ?
return (i
> 1 && fp
[i
- 2] == '.' && fp
[i
- 1] == c
);
* Set the time vector "tvec" to the
* modification time stamp of a file.
* Convert a "ctime" into a Pascal styple time line
* Is "fp" in the command line list of names ?
for (i
= pflstc
; i
> 0; i
--)
if (strcmp(fp
, *pfp
++) == 0)
extern char *sys_errlist
[];
register int p1
, *p2
, nbyte
;
nbyte
= (num
*size
+( ( sizeof ( int ) ) - 1 ) ) & ~( ( sizeof ( int ) ) - 1 );
if ((p1
= malloc(nbyte
)) == -1 || p1
==0)
* Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
* S1 must be large enough.
* Strlen is currently a freebie of perror
* Take the length of a string.
* Note that this does not include the trailing null!
for (i = 0; *cp != 0; cp++)
register char *to
, *from
;
* Is ch one of the characters in the string cp ?