1996-01-23 12:29:07 +00:00
|
|
|
#------------------------------------------------------------------------------
|
2012-04-13 23:30:38 +00:00
|
|
|
# $File: c-lang,v 1.16 2011/12/09 08:02:16 rrt Exp $
|
|
|
|
# c-lang: file(1) magic for C and related languages programs
|
1996-01-23 12:29:07 +00:00
|
|
|
#
|
|
|
|
|
2012-04-13 23:30:38 +00:00
|
|
|
# BCPL
|
|
|
|
0 search/8192 "libhdr" BCPL source text
|
|
|
|
!:mime text/x-bcpl
|
|
|
|
0 search/8192 "LIBHDR" BCPL source text
|
|
|
|
!:mime text/x-bcpl
|
2009-01-02 02:57:16 +00:00
|
|
|
|
2012-04-13 23:30:38 +00:00
|
|
|
# C
|
|
|
|
0 regex \^#include C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 regex \^char C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 regex \^double C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 regex \^extern C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 regex \^float C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 regex \^struct C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 regex \^union C source text
|
|
|
|
!:mime text/x-c
|
|
|
|
0 search/8192 main( C source text
|
|
|
|
!:mime text/x-c
|
1996-01-23 12:29:07 +00:00
|
|
|
|
2012-04-13 23:30:38 +00:00
|
|
|
# C++
|
|
|
|
# The strength of these rules is increased so they beat the C rules above
|
|
|
|
0 regex \^template C++ source text
|
|
|
|
!:strength + 10
|
|
|
|
!:mime text/x-c++
|
|
|
|
0 regex \^virtual C++ source text
|
|
|
|
!:strength + 10
|
|
|
|
!:mime text/x-c++
|
|
|
|
0 regex \^class C++ source text
|
|
|
|
!:strength + 10
|
|
|
|
!:mime text/x-c++
|
|
|
|
0 regex \^public: C++ source text
|
|
|
|
!:strength + 10
|
|
|
|
!:mime text/x-c++
|
|
|
|
0 regex \^private: C++ source text
|
|
|
|
!:strength + 10
|
|
|
|
!:mime text/x-c++
|
2004-08-09 08:45:41 +00:00
|
|
|
|
|
|
|
# From: Mikhail Teterin <mi@aldan.algebra.com>
|
|
|
|
0 string cscope cscope reference data
|
|
|
|
>7 string x version %.2s
|
|
|
|
# We skip the path here, because it is often long (so file will
|
|
|
|
# truncate it) and mostly redundant.
|
|
|
|
# The inverted index functionality was added some time betwen
|
|
|
|
# versions 11 and 15, so look for -q if version is above 14:
|
|
|
|
>7 string >14
|
2009-01-02 02:57:16 +00:00
|
|
|
>>10 search/100 \ -q\ with inverted index
|
|
|
|
>10 search/100 \ -c\ text (non-compressed)
|