summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ec0bdac)
SCCS-vsn: usr.bin/file/file.c 4.2
-static char sccsid[] = "@(#)file.c 4.1 %G%";
+static char sccsid[] = "@(#)file.c 4.1 10/1/80";
/*
* file - determine type of file
*/
/*
* file - determine type of file
*/
printf("archive\n");
goto out;
}
printf("archive\n");
goto out;
}
+ if (mbuf.st_size % 512 == 0) { /* it may be a PRESS file */
+ lseek(ifile, -512L, 2); /* last block */
+ if (read(ifile, buf, BUFSIZ) > 0
+ && *(short int *)buf == 12138) {
+ printf("PRESS file\n");
+ goto out;
+ }
+ }
i = 0;
if(ccom() == 0)goto notc;
while(buf[i] == '#'){
i = 0;
if(ccom() == 0)goto notc;
while(buf[i] == '#'){