1# $OpenBSD: c-lang,v 1.4 2008/05/08 01:40:57 chl Exp $ 2 3#------------------------------------------------------------------------------ 4# c-lang: file(1) magic for C programs (or REXX) 5# 6 7# XPM icons (Greg Roelofs, newt@uchicago.edu) 8# if you uncomment "/*" for C/REXX below, also uncomment this entry 9#0 string /*\ XPM\ */ X pixmap image data 10 11# this first will upset you if you're a PL/1 shop... 12# in which case rm it; ascmagic will catch real C programs 13#0 string /* C or REXX program text 14#0 string // C++ program text 15 16# From: Mikhail Teterin <mi@aldan.algebra.com> 170 string cscope cscope reference data 18>7 string x version %.2s 19# We skip the path here, because it is often long (so file will 20# truncate it) and mostly redundant. 21# The inverted index functionality was added some time betwen 22# versions 11 and 15, so look for -q if version is above 14: 23>7 string >14 24>>10 regex .+\ -q\ with inverted index 25>10 regex .+\ -c\ text (non-compressed) 26