From 68ad315b038d6db1ef98cdbfe92b0cda3ce3b55a Mon Sep 17 00:00:00 2001 From: minskim Date: Mon, 29 Jan 2007 16:40:58 +0000 Subject: Import c2html from pkgsrc-wip. Packaged by Lubomir Kundrak. c2html is a simple program which converts a C source code tree into HTML which can be easily navigated using a web browser. Features: * Colorized output * Hyperlinks between files are created for functions and, in some cases, macro definitions. * A file called .index can contain one-line comments about each file in a directory; it will be included in the HTML-ized directory listing. * HTML "header" and "footer" files can be included. href-links pointing to local files (relative to the current directory) are automatically updated. * A "web bug" can be included on each page. --- textproc/c2html/DESCR | 13 +++++++++++++ textproc/c2html/Makefile | 17 +++++++++++++++++ textproc/c2html/PLIST | 4 ++++ textproc/c2html/TODO | 0 textproc/c2html/distinfo | 8 ++++++++ textproc/c2html/patches/patch-aa | 27 +++++++++++++++++++++++++++ textproc/c2html/patches/patch-ab | 30 ++++++++++++++++++++++++++++++ textproc/c2html/patches/patch-ac | 39 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 138 insertions(+) create mode 100644 textproc/c2html/DESCR create mode 100644 textproc/c2html/Makefile create mode 100644 textproc/c2html/PLIST create mode 100644 textproc/c2html/TODO create mode 100644 textproc/c2html/distinfo create mode 100644 textproc/c2html/patches/patch-aa create mode 100644 textproc/c2html/patches/patch-ab create mode 100644 textproc/c2html/patches/patch-ac (limited to 'textproc') diff --git a/textproc/c2html/DESCR b/textproc/c2html/DESCR new file mode 100644 index 00000000000..87fb4d7c718 --- /dev/null +++ b/textproc/c2html/DESCR @@ -0,0 +1,13 @@ +c2html is a simple program which converts a C source code tree into +HTML which can be easily navigated using a web browser. + +Features: + * Colorized output + * Hyperlinks between files are created for functions and, in some cases, + macro definitions. + * A file called .index can contain one-line comments about each file in a + directory; it will be included in the HTML-ized directory listing. + * HTML "header" and "footer" files can be included. href-links pointing + to local files (relative to the current directory) are automatically + updated. + * A "web bug" can be included on each page. diff --git a/textproc/c2html/Makefile b/textproc/c2html/Makefile new file mode 100644 index 00000000000..aaff49931d0 --- /dev/null +++ b/textproc/c2html/Makefile @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $ + +DISTNAME= c2html-20070126 +CATEGORIES= textproc devel +MASTER_SITES= http://gavare.se/c2html/src/ + +MAINTAINER= lkundrak@skosi.org +HOMEPAGE= http://gavare.se/c2html/ +COMMENT= Converts a C source tree to hyperlinked and colored HTML + +INSTALLATION_DIRS= bin ${PREFIX}/share/doc/${PKGBASE} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/c2html ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${PKGBASE} + +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/c2html/PLIST b/textproc/c2html/PLIST new file mode 100644 index 00000000000..597e387e111 --- /dev/null +++ b/textproc/c2html/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $ +bin/c2html +share/doc/c2html/README +@dirrm share/doc/c2html diff --git a/textproc/c2html/TODO b/textproc/c2html/TODO new file mode 100644 index 00000000000..e69de29bb2d diff --git a/textproc/c2html/distinfo b/textproc/c2html/distinfo new file mode 100644 index 00000000000..74115b394bc --- /dev/null +++ b/textproc/c2html/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $ + +SHA1 (c2html-20070126.tar.gz) = 91e0935a6f4e4f9b2f56e29f80fdd6611178db93 +RMD160 (c2html-20070126.tar.gz) = 7667558f7fad3856bbfd257f1563b99b84681ca8 +Size (c2html-20070126.tar.gz) = 17422 bytes +SHA1 (patch-aa) = be9ed0c668fcf1915dcdd5b3f58a057a2563e203 +SHA1 (patch-ab) = 48bf7abefadcb8dfe6c6c0427183113700b73340 +SHA1 (patch-ac) = 7fc9b98073dd8b7a84b0c09a1a367ded8c0bb73e diff --git a/textproc/c2html/patches/patch-aa b/textproc/c2html/patches/patch-aa new file mode 100644 index 00000000000..acd1295432a --- /dev/null +++ b/textproc/c2html/patches/patch-aa @@ -0,0 +1,27 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $ + +Some platforms (GNU) lack strl* functions. +Anyways, here the return value is not checked, so toe only +difference is the trailing \0-padding, which has just very +minor performance implications. + +--- build_ht.c.orig 2007-01-26 18:23:32.000000000 +0100 ++++ build_ht.c +@@ -101,7 +101,7 @@ char **build_ht(char **strings, int nr_o + prevline[0] = '\0'; + + while (cur_string_no < nr_of_strings) { +- strlcpy(line, strings[cur_string_no], sizeof line); ++ strncpy(line, strings[cur_string_no], sizeof line); + + if (isdigit(line[0]) && strcmp(line, prevline) != 0) { + /* Get the hashcode from the line: */ +@@ -148,7 +148,7 @@ char **build_ht(char **strings, int nr_o + cp += strlen(line+i); + } + +- strlcpy(prevline, line, sizeof(prevline)); ++ strncpy(prevline, line, sizeof(prevline)); + cur_string_no ++; + } + diff --git a/textproc/c2html/patches/patch-ab b/textproc/c2html/patches/patch-ab new file mode 100644 index 00000000000..e96e1399e56 --- /dev/null +++ b/textproc/c2html/patches/patch-ab @@ -0,0 +1,30 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $ + +Some platforms (GNU) lack strl* functions. +Anyways, here the return value is not checked, so toe only +difference is the trailing \0-padding, which has just very +minor performance implications. + +--- relative.c.orig 2007-01-26 18:24:51.000000000 +0100 ++++ relative.c +@@ -147,7 +147,7 @@ printf ("matchlen=%i\n", matchlen); + /* Find last slash (withing the first matchlen bytes) of + the matched part: */ + +- strlcpy (result, src, reslen_max); ++ strncpy (result, src, reslen_max); + result[matchlen] = 0; + + /* printf ("result='%s'\n", result); */ +@@ -182,9 +182,9 @@ printf ("Nm=%i, Ns=%i\n", Nm, Ns); + + result[0] = 0; + for (i=0; i