mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-10 13:03:41 -04:00
62 lines
2.0 KiB
Plaintext
62 lines
2.0 KiB
Plaintext
$NetBSD: patch-ac,v 1.3 2011/09/13 07:28:48 mef Exp $
|
||
|
||
Avoid to conflict with getline(3) in IEEE Std 1003.1-2008.
|
||
|
||
--- lib/cconv.c.orig 2002-10-03 09:35:28.000000000 +0000
|
||
+++ lib/cconv.c
|
||
@@ -604,6 +604,7 @@ static char *rcsid = "$Id: cconv.c,v 10.
|
||
#endif
|
||
|
||
#include <stdio.h>
|
||
+#include <stdlib.h>
|
||
#include <X11/Xlib.h>
|
||
#include <X11/keysym.h>
|
||
#include <X11/Xutil.h>
|
||
@@ -790,7 +791,7 @@ static wchar *promptsave(wchar *);
|
||
static int parseLine(uchar *, uchar **, int);
|
||
static FILE *openfile(char *);
|
||
static int doinclude(uchar *, Files *, void (*)());
|
||
-static uchar *getline(uchar *, int, Files *, void (*)());
|
||
+static uchar *get_line(uchar *, int, Files *, void (*)());
|
||
static int readRuleFile(ccRule, char *);
|
||
static int registMode(ccRule, int, uchar **);
|
||
static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *,
|
||
@@ -1035,8 +1036,8 @@ void (*efunc)();
|
||
return 0;
|
||
}
|
||
|
||
-/* getline -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */
|
||
-static uchar *getline(line, linesize, files, efunc)
|
||
+/* get_line -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */
|
||
+static uchar *get_line(line, linesize, files, efunc)
|
||
uchar *line;
|
||
int linesize;
|
||
Files *files;
|
||
@@ -1100,7 +1101,7 @@ char *file;
|
||
rule->nmode = 0;
|
||
rule->initialmode = -1;
|
||
|
||
- while (getline(line, sizeof(line), &files, efunc)) {
|
||
+ while (get_line(line, sizeof(line), &files, efunc)) {
|
||
(void)Strcpy(tmp, line);
|
||
if ((argc = parseLine(tmp, argv, 20)) == 0)
|
||
continue;
|
||
@@ -1269,7 +1270,7 @@ uchar **av;
|
||
cdbuf.cdbuf = NULL;
|
||
|
||
/* $B%k!<%k$rFI$s$G%9%H%"$9$k(B */
|
||
- while (getline(line, sizeof(line), files, efunc)) {
|
||
+ while (get_line(line, sizeof(line), files, efunc)) {
|
||
/* '#' $B$G;O$^$k9T$O%3%a%s%H(B */
|
||
if (*line == '\0' || *line == '\n' || *line == '#')
|
||
continue;
|
||
@@ -1282,7 +1283,7 @@ uchar **av;
|
||
}
|
||
|
||
/* $B%k!<%k$N%9%H%"(B */
|
||
- cdp->key = inkey;
|
||
+ cdp->key = (ulong *) inkey;
|
||
cdp->mask = modmask;
|
||
cdp->context = *context ? wstrsave(srec, wrev(context)) : 0;
|
||
cdp->result = *result ? wstrsave(srec, result) : 0;
|