pkgsrc/textproc/sablotron/patches/patch-aa

21 lines
573 B
Text

$NetBSD: patch-aa,v 1.4 2007/01/05 13:48:14 dmcmahill Exp $
needed to build with sun studio compilers.
Patch submitted to sab-bugs at gingerall dot com
on 2007-01-05
--- src/command/sabcmd.cpp.orig 2004-12-30 04:30:44.000000000 -0500
+++ src/command/sabcmd.cpp
@@ -211,8 +211,10 @@ void saberrn(const char *msg, int num)
int chrpos(const char *text, char c)
{
- char *p = strchr(text, c);
- return p ? (int)(p - text) : -1;
+ const char *p;
+
+ p = strchr(text, (int) c);
+ return (p != NULL) ? (int)(p - text) : -1;
}
void freefirst(char **array)