Prevent collision with getline(3)

This commit is contained in:
Baptiste Daroussin 2016-05-11 20:22:07 +00:00
parent ca7f419d50
commit 00c788d997
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415027
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- src/source.c.orig 1999-04-09 23:40:26 UTC
+++ src/source.c
@@ -250,7 +250,7 @@ static const char *const errname[] = {
abort();
if (errtype >= FATALERR) {
if (gen_listing) /* copy the rest to the listing */
- while (getline())
+ while (get_line())
;
(void)exit(1);
}
@@ -287,7 +287,7 @@ interactive(void)
* otherwise it ends in a newline (whitespace) and then a null.
*/
global Bool
-getline(void)
+get_line(void)
{
if (atend && cur_source >= source) {
if (cur_source > source)

View File

@ -0,0 +1,11 @@
--- src/source.h.orig 1997-06-09 08:02:53 UTC
+++ src/source.h
@@ -8,7 +8,7 @@ extern const Byte *inptr;
extern void init_source(FILE *src, Bool gen_listing);
extern void enterfile(FILE *f);
extern Bool interactive(void);
-extern Bool getline(void);
+extern Bool get_line(void);
#ifdef RE_EDIT
extern void set_script(const char *filename);

View File

@ -0,0 +1,11 @@
--- src/yylex.c.orig 1999-04-09 12:21:08 UTC
+++ src/yylex.c
@@ -157,7 +157,7 @@ yylex(void)
inptr = start;
return ';';
}
- if (! getline())
+ if (! get_line())
return EOF;
} else if (IsDigit(c)) {
/*