1 \lstset{basicstyle=
\ttfamily,numbers=left, numberstyle=
\tiny, stepnumber=
1, numbersep=
5pt,language=C,commentstyle=
\color{OliveGreen
},keywordstyle=
\color{blue
},stringstyle=
\color{BrickRed
}}
4 % You must prefix the +/- lines of
5 % cocci files with @+/@- respectively.
6 % This will enable the automatic coloration.
8 % Note: You need at least the following version of hevea
9 % http://hevea.inria.fr/distri/unstable/hevea-2008-12-17.tar.gz
11 \ifhevea % For HTML generation
12 \lstdefinelanguage{Cocci
}{
13 morekeywords=
{idexpression,expression,statement,identifier,type,
14 parameter,list,when,strict,any,forall,local,position,typedef
},
15 keywordstyle=
\color{OliveGreen
}\bfseries,
17 moredelim=
[is
][\color{blue
}]{@M
}{@M
},
18 moredelim=
[il
][\color{OliveGreen
}]{@+
},
19 moredelim=
[il
][\color{BrickRed
}]{@-
}}
21 \lstdefinelanguage{PatchC
}[ANSI
]{C
}{
22 stringstyle=
\color{black
},
23 moredelim=
[il
][\color{OliveGreen
}]{@+
},
24 moredelim=
[il
][\color{BrickRed
}]{@-
},
25 moredelim=
[il
][\color{Plum
}]{@M
}}
27 \else % For DVI/PS/PDF generation
28 \lstdefinelanguage{Cocci
}{
29 morekeywords=
{idexpression,expression,statement,identifier,type,
30 parameter,list,when,strict,any,forall,local,position,typedef
},
31 keywordstyle=
\color{OliveGreen
}\bfseries,
33 moredelim=*
[is
][\color{blue
}]{@M
}{@M
},
34 moredelim=
[il
][\color{OliveGreen
}]{@+
},
35 moredelim=
[il
][\color{BrickRed
}]{@-
}}
37 \lstdefinelanguage{PatchC
}[ANSI
]{C
}{
38 stringstyle=
\color{black
},
39 moredelim=
[il
][\color{OliveGreen
}]{@+
},
40 moredelim=
[il
][\color{BrickRed
}]{@-
},
41 moredelim=
[il
][\color{Plum
}]{@M
}}
44 \newif\iflanguagestyle