[Fix for doc generation with new gfs-highlight script Stephane Popinet **20080701020859] hunk ./doc/examples/classes.c 7 - static int first = 1; - if (first) { - fprintf (lang, "gfs_keyword = "); - first = 0; - } - else - fprintf (lang, ",\n"); - + fprintf (lang, "gfs_keyword = \"%s\"\n", key); hunk ./doc/examples/classes.c 10 - fprintf (lang, " '(Gfs){0,1}%s'", &(key[3])); + fprintf (lang, "gfs_keyword = \"%s\"\n", &(key[3])); hunk ./doc/examples/classes.c 22 - "\n" - "include \"cpp.lang\"\n" - "\n" - "comment start \"#\"\n" - "\n" - "redef preproc = \"C preprocessor command is not compatible with" - " the use of # as comment character in GTS\"\n" hunk ./doc/examples/classes.c 23 + hunk ./doc/examples/classes.c 27 + hunk ./doc/examples/classes.c 32 + + printf ("\n" + "include \"cpp.lang\"\n" + "\n" + "comment start \"#\"\n" + "\n" + "redef preproc = \"C preprocessor command is not compatible with" + " the use of # as comment character in GTS\"\n"); hunk ./doc/examples/gfs-highlight 1 -#!/bin/sh - -wiki="http:\/\/gfs.sf.net\/wiki\/index.php" -title="Gerris simulation" -css="darcs.css" - -path="/usr/local/share/gerris" - -usage() -{ - cat < output.html - -Syntax highlighting/hypertext linking of Gerris simulation files. - -Options: - [--title=TITLE] sets the page title - [--css=FILE] sets the CSS stylesheet filename - [--help] displays this message and exits -EOF - exit $1 -} - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --title=*) - title=$optarg - ;; - --css=*) - css=$optarg - ;; - --help) - usage 0 1>&2 - ;; - *) - usage 0 1>&2 - ;; - esac - shift -done - -cat < - -$title - - - -EOF - -file=`mktemp gfs-highlight.XXXXXX` -ln -s -f $path/gfs.lang $file - -awk 'BEGIN{ infile=0 } { - if ($2 == "Generated" && $3 == "files:") { - infile = 1; - while ($1 == "#") getline; - print $0; - } else if (infile) - print $0; - }' | \ -source-highlight --lang-def=$file --out-format=html-css | \ -sed "s/\"gfs_keyword\">\(Gfs\)\{0,1\}\([a-zA-Z0-9_]*\)<\/span>/"gfs_keyword">\1\2<\/a><\/span>/g" - -rm -f $file - -cat < - -EOF rmfile ./doc/examples/gfs-highlight hunk ./doc/examples/gfs-highlight.in 64 - } else if (infile) + } + else if (infile) hunk ./doc/examples/gfs-highlight.in 67 + else if ($5 == "GfsGEdge") { + infile = 1; + print $0; + } hunk ./test/gfs2tex 9 -import gfsclasses hunk ./test/gfs2tex 19 - example.write(gfsclasses.klass,style="tests.css") + example.write(style="tests.css")