summaryrefslogtreecommitdiffstats
path: root/contrib/file/magic/Magdir/c-lang
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/magic/Magdir/c-lang')
-rw-r--r--contrib/file/magic/Magdir/c-lang14
1 files changed, 8 insertions, 6 deletions
diff --git a/contrib/file/magic/Magdir/c-lang b/contrib/file/magic/Magdir/c-lang
index 0b17611..69ae516 100644
--- a/contrib/file/magic/Magdir/c-lang
+++ b/contrib/file/magic/Magdir/c-lang
@@ -1,7 +1,8 @@
#------------------------------------------------------------------------------
-# $File: c-lang,v 1.20 2015/07/27 14:33:10 christos Exp $
+# $File: c-lang,v 1.22 2015/10/29 18:49:11 christos Exp $
# c-lang: file(1) magic for C and related languages programs
#
+# The strength is to beat standard HTML
# BCPL
0 search/8192 "libhdr" BCPL source text
@@ -11,6 +12,7 @@
# C
0 regex \^#include C source text
+!:strength +25
!:mime text/x-c
0 regex \^char[\ \t\n]+ C source text
!:mime text/x-c
@@ -30,19 +32,19 @@
# C++
# The strength of these rules is increased so they beat the C rules above
0 regex \^template[\ \t]+<.*>[\ \t\n]+ C++ source text
-!:strength + 5
+!:strength + 30
!:mime text/x-c++
0 regex \^virtual[\ \t\n]+ C++ source text
-!:strength + 5
+!:strength + 30
!:mime text/x-c++
0 regex \^class[\ \t\n]+ C++ source text
-!:strength + 5
+!:strength + 30
!:mime text/x-c++
0 regex \^public: C++ source text
-!:strength + 5
+!:strength + 30
!:mime text/x-c++
0 regex \^private: C++ source text
-!:strength + 5
+!:strength + 30
!:mime text/x-c++
# From: Mikhail Teterin <mi@aldan.algebra.com>
OpenPOWER on IntegriCloud