pkgsrc/textproc/c2html/patches/patch-ab
minskim 3935813241 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.
2007-01-29 16:40:58 +00:00

30 lines
958 B
Text

$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<Ndown; i++)
- strlcat (result, "../", reslen_max);
+ strncat (result, "../", reslen_max);
- strlcat (result, dst+baselen, reslen_max);
+ strncat (result, dst+baselen, reslen_max);
/*
printf ("result='%s'\n", result);