You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-mobilephone/yaps/files/yaps-0.96-getline-rename.patch

65 lines
1.6 KiB

--- a/cfg.c
+++ b/cfg.c
@@ -203,7 +203,7 @@
fcur -> fp = fp;
fcur -> up = NULL;
while (fcur) {
- while (gline = getline (fcur -> fp, True)) {
+ while (gline = my_getline (fcur -> fp, True)) {
for (line = gline; isspace (*line); ++line)
;
if ((! *line) || (*line == '#')) {
@@ -279,7 +279,7 @@
done = False;
siz = 0;
len = 0;
- while (ptr = getline (fcur -> fp, False)) {
+ while (ptr = my_getline (fcur -> fp, False)) {
if ((*ptr != '}') || *(ptr + 1)) {
plen = strlen (ptr);
if (len + plen + 2 >= siz) {
--- a/cv.c
+++ b/cv.c
@@ -151,7 +151,7 @@
MCHK (c);
if ((! c) || (! (fp = fopen (fname, "r"))))
return -1;
- while (line = getline (fp, True)) {
+ while (line = my_getline (fp, True)) {
for (sp = line; isspace (*sp); ++sp)
;
if (*sp && (*sp != '#')) {
--- a/pager.h
+++ b/pager.h
@@ -67,7 +67,7 @@
/*{{{ utility */
extern char *skip (char *str);
extern char *skipch (char *str, char ch);
-extern char *getline (FILE *fp, Bool cont);
+extern char *my_getline (FILE *fp, Bool cont);
extern int verbose_out (char *, ...);
/*}}}*/
/*{{{ string handling */
--- a/util.c
+++ b/util.c
@@ -36,7 +36,7 @@
}
char *
-getline (FILE *fp, Bool cont)
+my_getline (FILE *fp, Bool cont)
{
char *buf;
int size;
--- a/yaps.c
+++ b/yaps.c
@@ -1177,7 +1177,7 @@
fprintf (stderr, "Unable to open message file %s for reading\n", mfile);
return NULL;
}
- while (ptr = getline (fp, False)) {
+ while (ptr = my_getline (fp, False)) {
sav = skip (ptr);
if (*ptr && *sav) {
if (rcnt + 2 >= rsiz) {