summaryrefslogtreecommitdiff
path: root/lang/rexx-regutil/files/patch-regfilesys.c
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-05-08 17:50:04 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-05-08 17:50:04 +0000
commit8489b4ac928e67c965c6f3113ec60870033751d5 (patch)
tree0428f7b1c0494fa6753c9516c8f3b5d7be57757c /lang/rexx-regutil/files/patch-regfilesys.c
parent- Update to 1.2.2. (diff)
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)
Diffstat (limited to 'lang/rexx-regutil/files/patch-regfilesys.c')
-rw-r--r--lang/rexx-regutil/files/patch-regfilesys.c65
1 files changed, 65 insertions, 0 deletions
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, '/');