This is cutils.info, produced by makeinfo version 4.8 from cutils.texi. INFO-DIR-SECTION Programming & development tools START-INFO-DIR-ENTRY * Cutils: (cutils). A collection of utilities for "C" programmers. END-INFO-DIR-ENTRY  File: cutils.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) This is the _cutils_ manual. The cutils package is a collection of utilities for "C" programmers. They are mostly parsers that convert an input file written in a particular format into another format. * Menu: * Overview:: An overview of the cutils package. * cdecl/cundecl:: Decode and encode C type declarations. * cobfusc:: Make a C source file unreadable but compilable. * chilight:: Highlight C source files. * cunloop:: Unloop C loops. * yyextract:: Extract grammar rules from Yacc grammars. * yyref:: Yacc grammar reference program. * Bug reports:: How to report a bug.  File: cutils.info, Node: Overview, Next: cdecl/cundecl, Prev: Top, Up: Top 1 Overview ********** The utilities enclosed in the _cutils_ package are usually useful in some circumstances during the development in the "C" language. _cdecl_ _cundecl_ The _cdecl_ and _cundecl_ utilities can be used to decode or encode a complex type declaration like void (*signal(int sig, void (*func)(int)))(int); or declare funcvec as array[16] of pointer to function that expects (void) returning int; _cobfusc_ The _cobfusc_ utility can be used to obfuscate (i.e. render unreadable but perfectly compilable) some code. For example: int main(int argc, char **argv) { int i; printf("program name: %s\n", argv[0]); printf("arguments:"); for (i = 1; i < argc; i++) printf(" %s", argv[i]); printf("\n"); } can be converted to: int main(int q0,char**q1){int q2;printf( "\160\162\157\147\162\141\155\40\156\141\155\145\72\40\45\163\n", q1[0]);printf("\141\162\147\165\155\145\156\164\163\72");for(q2=1; q2' is replaced by `}' `??/' is replaced by `\' `??'' is replaced by `^' `??=' is replaced by `#' `??!' is replaced by `|' `??-' is replaced by `~' The Amendment 1 to ISO C provides six new tokens that are convenient when writing source programs in restricted character sets (such as the ISO 646-1083 Invariant Code Set). The following respellings are more readable than the equivalent form using trigraphs, and they may be used wherever the customary tokens are permitted. `<:' is replaced by `[' `:>' is replaced by `]' `<%' is replaced by `{' `%>' is replaced by `}' `%:' is replaced by `#' `%:%:' is replaced by `##'  File: cutils.info, Node: cobfusc examples, Prev: Digraphs and trigraphs, Up: cobfusc 3.3 cobfusc examples ==================== If you just want to compact the whitespaces, try: cobfusc -de outputfile To remove the comments, try: cobfusc -m outputfile If you want to convent all the identifiers to meaningless computer generated ones, try: cobfusc -inumeric outputfile Or, if instead of numbers you like silly words like "foo" and "bar", try: cobfusc -iword outputfile For a heavy obfuscation, try: cobfusc -A outputfile Or for a maximum obfuscation, try: cobfusc -Abn -irandom -crandom outputfile To obfuscate a program composed by two or more source files: cobfusc -A -f .obf.c first.c second.c third.c  File: cutils.info, Node: chilight, Next: cunloop, Prev: cobfusc, Up: Top 4 chilight ********** The _chilight_ utility can be used to highlight (i.e. fontify) a C source file with color escapes or markups, depending of the selected output format (tty, ANSI, HTML or roff). * Menu: * Invoking chilight:: Command line options of chilight. * chilight examples:: Some examples of this utility.  File: cutils.info, Node: Invoking chilight, Next: chilight examples, Prev: chilight, Up: chilight 4.1 Invoking chilight ===================== The options are as follows: `-f format' Set the output format to `format'. The format can be one of `tty' (the default), `ansi_color', `ansi_bold', `html_color', `html_font' or `roff'. `-o file' Set the output destination to `file'. `-t title' Specify the page title for the generated HTML page. `-V' Print version information on standard output then exit.  File: cutils.info, Node: chilight examples, Prev: Invoking chilight, Up: chilight 4.2 chilight examples ===================== For highlighting a source file with ANSI color escapes, try: chilight -f ansi_color outputfile For unlooping a source file using `foo_' as the prefix for generating the labels, try: cunloop -p foo_ outputfile  File: cutils.info, Node: yyextract, Next: yyref, Prev: cunloop, Up: Top 6 yyextract *********** The _yyextract_ utility can be used to extract the rules from a Yacc grammar (or produce another grammar in a different format, like HTML). * Menu: * Invoking yyextract:: Command line options of yyextract. * yyextract examples:: Some examples of this utility.  File: cutils.info, Node: Invoking yyextract, Next: yyextract examples, Prev: yyextract, Up: yyextract 6.1 Invoking yyextract ====================== The options are as follows: `-b' Select the Backus-Naur Form (BNF) for the output. `-e' Select the Extended Backus-Naur Form (EBNF) for the output. `-h' Output in HTML format. `-o file' Set the output destination to `file'. `-t title' Specify the page title for the generated HTML page. `-w cols' Set the width limit of the output (this sets only the width of the `%token' header). `-y' Select the yacc format for the output. This is the default format. `-V' Print version information on standard output then exit.  File: cutils.info, Node: yyextract examples, Prev: Invoking yyextract, Up: yyextract 6.2 yyextract examples ====================== For extracting the rules from a Yacc grammar, try: yyextract outputfile For extracting the rules from a Yacc grammar in BNF format, try: yyextract -b outputfile For extracting the rules from a Yacc grammar in EBNF/HTML format, try: yyextract -eh outputfile  File: cutils.info, Node: yyref, Next: Bug reports, Prev: yyextract, Up: Top 7 yyref ******* The _yyref_ utility is a Yacc cross-reference generator. * Menu: * Invoking yyref:: Command line options of yyref. * yyref examples:: Some examples of this utility.  File: cutils.info, Node: Invoking yyref, Next: yyref examples, Prev: yyref, Up: yyref 7.1 Invoking yyref ================== The options are as follows: `-o file' Set the output destination to `file'. `-V' Print version information on standard output then exit.  File: cutils.info, Node: yyref examples, Prev: Invoking yyref, Up: yyref 7.2 yyref examples ================== For creating the cross-references from a Yacc grammar, try: yyref .  Tag Table: Node: Top242 Node: Overview1052 Node: cdecl/cundecl3169 Node: Invoking cdecl3761 Node: Invoking cundecl4061 Node: cdecl/cundecl examples4374 Node: cobfusc5123 Ref: cobfusc-Footnote-16100 Node: Invoking cobfusc6161 Node: Digraphs and trigraphs8757 Node: cobfusc examples9986 Node: chilight10829 Node: Invoking chilight11249 Node: chilight examples11792 Node: cunloop12234 Node: Invoking cunloop13071 Node: cunloop examples13436 Node: yyextract13770 Node: Invoking yyextract14155 Node: yyextract examples14880 Node: yyref15335 Node: Invoking yyref15629 Node: yyref examples15911 Node: Bug reports16112  End Tag Table