1# To print the code correctly : a2ps --pretty-print=c-ced.ssh
2
3# Style sheet for C
4# Copyright (c) 1995-2000 Akim Demaille, Miguel Santana
5#
6
7#
8# This file is part of a2ps.
9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2, or (at your option)
13# any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program; see the file COPYING.  If not, write to
22# the Free Software Foundation, 59 Temple Place - Suite 330,
23# Boston, MA 02111-1307, USA.
24#
25
26style C is
27requires a2ps 4.13
28
29written by "Akim Demaille <akim@freefriends.org>"
30version is 1.6
31documentation is
32   "This style does not highlight the function definitions."
33   "Another style which highlights them, GNUish C, is provided (gnuc.ssh)."
34   "It works only if you respect some syntactic conventions."
35end documentation
36
37alphabets are
38   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_#$%"
39
40case sensitive
41
42ancestors are
43  cpp
44end ancestors
45
46keywords in Keyword are
47   double, enum, void, int, long, FILE, struct, char, signed, float,
48   short, unsigned
49end keywords
50
51keywords in Keyword_strong are
52   auto, "case", const, continue, do, inline, extern, for, register,
53   return, switch, union, goto, typedef, sizeof, typeof, volatile, static,
54   NULL, default, break, if, while, else
55end keywords
56
57optional operators are
58  (/(case)([ 	]+)(.+)([ 	]*:)/
59   \1 Keyword_strong, \2 Plain, \3 Label, \4 Plain)
60end operators
61
62optional operators are
63   -> \rightarrow,
64   && \wedge,
65   || \vee,
66   != \neq,
67   == \equiv,
68   # We need to protect these, so that <= is not replaced in <<=
69   <<=,
70   >>=,
71   <= \leq,
72   >= \geq,
73   ! \not
74end operators
75
76sequences are
77    "/*" Comment "*/",
78    "//" Comment
79end sequences
80
81end style
82