picolisp: Update from 16.2.11 to 16.3.1
[termux-packages] / packages / kona / getline.c.patch
CommitLineData
7eda442a
JB
1--- ../kona-Win.3.36-64/src/getline.c 2015-07-30 11:18:02.000000000 -0400
2+++ ./src/getline.c 2015-12-06 03:21:45.000000000 -0500
3@@ -29,12 +29,12 @@
4 R 0;
5 }
6
7-I getline_(S *s,size_t * __restrict__ n,FILE *f){R getdelim_(s,n,'\n',f);}
8+I new_getline_(S *s,size_t * __restrict__ n,FILE *f){R new_getdelim_(s,n,'\n',f);}
9
10-I getdelim_(S *s,size_t * __restrict__ n,I d,FILE *f)
11+I new_getdelim_(S *s,size_t * __restrict__ n,I d,FILE *f)
12 {
13 I m; S z;
14- if(getdelim(s,n,d,f)==-1){*n=0; R -1;}
15+ if(new_getdelim(s,n,d,f)==-1){*n=0; R -1;}
16 m=strlenn(*s,*n);
17 z=strdupn(*s,m);
18 free(*s);
19@@ -44,8 +44,8 @@
20
21 #if defined(__OpenBSD__) || defined(__NetBSD__) || \
22 (defined(__MACH__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
23-I getline(S *s,I*n, FILE *f){ R getdelim(s,n,'\n',f);}
24-I getdelim(S *s,I*n, I d, FILE *f)//target, current capacity, delimiter, file
25+I getline(S *s,I*n, FILE *f){ R new_getdelim(s,n,'\n',f);}
26+I new_getdelim(S *s,I*n, I d, FILE *f)//target, current capacity, delimiter, file
27 {
28 unsigned char *q;
29 I w=0;
30@@ -92,8 +92,8 @@
31 #endif
32
33 #ifdef WIN32
34-I getline(S *s,I*n, FILE *f){ R getdelim(s,n,'\n',f);}
35-I getdelim(S *s,I*n, I d, FILE *f) { //target, current capacity, delimiter, file
36+I getline(S *s,I*n, FILE *f){ R new_getdelim(s,n,'\n',f);}
37+I new_getdelim(S *s,I*n, I d, FILE *f) { //target, current capacity, delimiter, file
38 char *q; I w=0;
39 if (!s) {errno = EINVAL; goto error;}
40 if (f->_cnt <= 0) {