=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/file/Attic/names.h,v retrieving revision 1.7 retrieving revision 1.8 diff -c -r1.7 -r1.8 *** src/usr.bin/file/Attic/names.h 2008/05/08 01:40:56 1.7 --- src/usr.bin/file/Attic/names.h 2009/04/24 18:54:34 1.8 *************** *** 1,4 **** ! /* $OpenBSD: names.h,v 1.7 2008/05/08 01:40:56 chl Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; --- 1,4 ---- ! /* $OpenBSD: names.h,v 1.8 2009/04/24 18:54:34 chl Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; *************** *** 33,39 **** * appear at fixed offsets into the file. Don't make HOWMANY * too high unless you have a very fast CPU. * ! * $Id: names.h,v 1.7 2008/05/08 01:40:56 chl Exp $ */ /* --- 33,39 ---- * appear at fixed offsets into the file. Don't make HOWMANY * too high unless you have a very fast CPU. * ! * $Id: names.h,v 1.8 2009/04/24 18:54:34 chl Exp $ */ /* *************** *** 44,70 **** /* these types are used to index the table 'types': keep em in sync! */ #define L_C 0 /* first and foremost on UNIX */ #define L_CC 1 /* Bjarne's postincrement */ ! #define L_FORT 2 /* the oldest one */ ! #define L_MAKE 3 /* Makefiles */ ! #define L_PLI 4 /* PL/1 */ ! #define L_MACH 5 /* some kinda assembler */ ! #define L_ENG 6 /* English */ ! #define L_PAS 7 /* Pascal */ ! #define L_MAIL 8 /* Electronic mail */ ! #define L_NEWS 9 /* Usenet Netnews */ ! #define L_JAVA 10 /* Java code */ ! #define L_HTML 11 /* HTML */ ! #define L_BCPL 12 /* BCPL */ ! #define L_M4 13 /* M4 */ ! #define L_PO 14 /* PO */ static const struct { ! const char *human; ! const char *mime; } types[] = { { "C program", "text/x-c", }, { "C++ program", "text/x-c++" }, - { "FORTRAN program", "text/x-fortran" }, { "make commands", "text/x-makefile" }, { "PL/1 program", "text/x-pl1" }, { "assembler program", "text/x-asm" }, --- 44,68 ---- /* these types are used to index the table 'types': keep em in sync! */ #define L_C 0 /* first and foremost on UNIX */ #define L_CC 1 /* Bjarne's postincrement */ ! #define L_MAKE 2 /* Makefiles */ ! #define L_PLI 3 /* PL/1 */ ! #define L_MACH 4 /* some kinda assembler */ ! #define L_ENG 5 /* English */ ! #define L_PAS 6 /* Pascal */ ! #define L_MAIL 7 /* Electronic mail */ ! #define L_NEWS 8 /* Usenet Netnews */ ! #define L_JAVA 9 /* Java code */ ! #define L_HTML 10 /* HTML */ ! #define L_BCPL 11 /* BCPL */ ! #define L_M4 12 /* M4 */ ! #define L_PO 13 /* PO */ static const struct { ! char human[48]; ! char mime[16]; } types[] = { { "C program", "text/x-c", }, { "C++ program", "text/x-c++" }, { "make commands", "text/x-makefile" }, { "PL/1 program", "text/x-pl1" }, { "assembler program", "text/x-asm" }, *************** *** 77,84 **** { "BCPL program", "text/x-bcpl" }, { "M4 macro language pre-processor", "text/x-m4" }, { "PO (gettext message catalogue)", "text/x-po" }, ! { "cannot happen error on names.h/types", "error/x-error" }, ! { 0, 0} }; /* --- 75,81 ---- { "BCPL program", "text/x-bcpl" }, { "M4 macro language pre-processor", "text/x-m4" }, { "PO (gettext message catalogue)", "text/x-po" }, ! { "cannot happen error on names.h/types", "error/x-error" } }; /* *************** *** 117,124 **** * as Java, as it comes after "the" and "The". Perhaps we need a fancier * heuristic to identify Java? */ ! static struct names { ! const char *name; short type; } names[] = { /* These must be sorted by eye for optimal hit rate */ --- 114,121 ---- * as Java, as it comes after "the" and "The". Perhaps we need a fancier * heuristic to identify Java? */ ! static const struct names { ! char name[14]; short type; } names[] = { /* These must be sorted by eye for optimal hit rate */ *************** *** 148,165 **** {"LDFLAGS", L_MAKE}, {"all:", L_MAKE}, {".PRECIOUS", L_MAKE}, - /* Too many files of text have these words in them. Find another way - * to recognize Fortrash. - */ - #ifdef NOTDEF - {"subroutine", L_FORT}, - {"function", L_FORT}, - {"block", L_FORT}, - {"common", L_FORT}, - {"dimension", L_FORT}, - {"integer", L_FORT}, - {"data", L_FORT}, - #endif /*NOTDEF*/ {".ascii", L_MACH}, {".asciiz", L_MACH}, {".byte", L_MACH}, --- 145,150 ---- *************** *** 184,189 **** {"