[comp.bugs.misc] file

matt@ncr-sd.UUCP (Matt Costello) (12/06/86)

The file program does not recognize most C programs as being
C, and instead calls them some sort of text file.  Part of
the problem is that file only looks at the first 512 bytes of
the input and since it skips comments and preprocessor lines
this conspires to prevent it from reaching actual C code.

Compounding this problem is that its table of valid C keywords
is missing "static", so the standard line
	static char SCCSid[] = "identifier string";
as the first C code at the top of a program will cause file(1)
to assume it is NOT C code.

SYSTEMS:
	BSD4.2
	SYSV.2
	(probably all)

REPEAT-BY:
	echo "static int a;" > /tmp/x.j
	file /tmp/x.j

FIX:
	Add the keyword "static" to the "c[]" table.

----
Matt Costello, matt@ncr-sd.SanDiego.NCR.COM (not registered yet)
	{sdcsvax,cbatt,dcdwest,nosc.ARPA,ihnp4}!ncr-sd!matt
-- 
Matt Costello, matt@ncr-sd.SanDiego.NCR.COM (not registered yet)
	{sdcsvax,cbatt,dcdwest,nosc.ARPA,ihnp4}!ncr-sd!matt