From 8489b4ac928e67c965c6f3113ec60870033751d5 Mon Sep 17 00:00:00 2001 From: Kurt Jaeger Date: Sun, 8 May 2016 17:50:04 +0000 Subject: lang/rexx-regutil: several patches - additional MASTER_SITE (there was only one) - tidied Makefile considerably - fixed failure to build under different PREFIX - added DOC option - added EXAMPLES option, and now can have examples (there were none before) - eliminated numerous compilation warnings - REMOVED pkg-plist (only two files in it) - REMOVED pkg-message (now redundant) - ADDED new patches in files/ PR: 209379 Submitted by: bob@eager.cx (maintainer) --- lang/rexx-regutil/files/patch-regfilesys.c | 65 ++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 lang/rexx-regutil/files/patch-regfilesys.c (limited to 'lang/rexx-regutil/files/patch-regfilesys.c') diff --git a/lang/rexx-regutil/files/patch-regfilesys.c b/lang/rexx-regutil/files/patch-regfilesys.c new file mode 100644 index 000000000000..3999bb6355a9 --- /dev/null +++ b/lang/rexx-regutil/files/patch-regfilesys.c @@ -0,0 +1,65 @@ +--- regfilesys.c.orig 2003-11-03 20:24:14 UTC ++++ regfilesys.c +@@ -114,7 +114,8 @@ int unmapfile(char *buf, int size); + /* SysFileSearch(target,file,stem, [options]) */ + rxfunc(sysfilesearch) + { +- unsigned char *buf, * dptr, *bol, *eol, *eof, *filename, *options, ++ char *filename, *options; ++ unsigned char *buf, * dptr, *bol, *eol, *eof, + *lbuf = NULL; + PRXSTRING stem; + RXSTRING target; +@@ -141,7 +142,7 @@ rxfunc(sysfilesearch) + + /* map the file into memory. Note that if the OS doesn't support memory- + * mapped I/O, this allocates a buffer and reads the file into it. */ +- if (!(buf = mapfile(filename, &len))) { ++ if (!(buf = (unsigned char *) mapfile((char *) filename, &len))) { + rc = 3; + } + else { +@@ -195,7 +196,7 @@ rxfunc(sysfilesearch) + i = eol - bol; + if (i && bol[i-1] == '\r') + i--; +- if (cha_adddummy(array, bol, i)) ++ if (cha_adddummy(array, (char *) bol, i)) + rc = 2; + } + else { +@@ -203,12 +204,12 @@ rxfunc(sysfilesearch) + if (!lbuf) + rc = 2; + else { +- i = sprintf(lbuf, "%d:", lines); ++ i = sprintf((char *) lbuf, "%d:", lines); + memcpy(lbuf+i, bol, eol-bol); + i += eol - bol; + if (lbuf[i-1] == '\r') + i--; +- if (cha_addstr(array, lbuf, i)) ++ if (cha_addstr(array, (char *) lbuf, i)) + rc = 2; + } + } +@@ -222,7 +223,7 @@ rxfunc(sysfilesearch) + if (lbuf) + free(lbuf); + +- unmapfile(buf, len); ++ unmapfile((char *) buf, len); + } + + result->strlength = sprintf(result->strptr, "%d", rc); +@@ -730,8 +731,8 @@ rxfunc(sysfiletree) + rc = 2; + + else { +- /* break the list into directory & pattern, so the input can be of +- * the form /usr/home/ptjm/*.c */ ++// break the list into directory & pattern, so the input can be of ++// the form /usr/home/ptjm/*.c + + dir = pattern; + pattern = strrchr(dir, '/'); -- cgit v1.2.3