diff options
Diffstat (limited to 'contrib/file/Magdir/c-lang')
-rw-r--r-- | contrib/file/Magdir/c-lang | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/contrib/file/Magdir/c-lang b/contrib/file/Magdir/c-lang index 895e37f..0665627 100644 --- a/contrib/file/Magdir/c-lang +++ b/contrib/file/Magdir/c-lang @@ -1,19 +1,49 @@ #------------------------------------------------------------------------------ -# c-lang: file(1) magic for C programs (or REXX) +# $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 # -# XPM icons (Greg Roelofs, newt@uchicago.edu) -# if you uncomment "/*" for C/REXX below, also uncomment this entry -#0 string /*\ XPM\ */ X pixmap image data -#!:mime image/x-xpmi +# BCPL +0 search/8192 "libhdr" BCPL source text +!:mime text/x-bcpl +0 search/8192 "LIBHDR" BCPL source text +!:mime text/x-bcpl -# 3DS (3d Studio files) Conflicts with diff output 0x3d '=' -#16 beshort 0x3d3d image/x-3ds +# 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 -# this first will upset you if you're a PL/1 shop... -# in which case rm it; ascmagic will catch real C programs -#0 search/1 /* C or REXX program text -#0 search/1 // C++ program text +# 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++ # From: Mikhail Teterin <mi@aldan.algebra.com> 0 string cscope cscope reference data |