1 --- a/as/link/hc08/Makefile.in
2 +++ b/as/link/hc08/Makefile.in
7 -LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
8 +LKLIBSRC = lk_readnl.c lkaomf51.c lkar.c lkdata.c lkeval.c \
9 lkhead.c lklex.c lklib.c lklibr.c lklist.c \
10 lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
19 +#include "lk_readnl.h"
27 - while (getline (relfil, sizeof (relfil), libfp) != NULL)
28 + while (lk_readnl (relfil, sizeof (relfil), libfp) != NULL)
34 D ("Searching symbol: %s\n", name);
36 - while (getline (relfil, sizeof (relfil), libfp) != NULL)
37 + while (lk_readnl (relfil, sizeof (relfil), libfp) != NULL)
44 * int fclose() c_library
45 - * char *getline() getline.c
46 + * char *lk_readnl() lk_readnl.c
47 * FILE * fopen() c_library
48 * VOID link_main() lkmain.c
49 * int strlen() c_library
50 --- a/as/link/lksdcclib.c
51 +++ b/as/link/lksdcclib.c
57 +#include "lk_readnl.h"
62 #define EQ(A,B) !strcmp((A),(B))
63 -#define MAXLINE 254 /*when using getline */
64 +#define MAXLINE 254 /*when using lk_readnl */
72 - while (getline (str, sizeof (str), libfp) != NULL)
73 + while (lk_readnl (str, sizeof (str), libfp) != NULL)
78 if (EQ (str, "<FILE>"))
80 - if (NULL != getline (str, sizeof (str), libfp) && EQ (str, ModName))
81 + if (NULL != lk_readnl (str, sizeof (str), libfp) && EQ (str, ModName))
87 pmlibrarysymbol ThisSym = NULL;
89 - while (getline (FLine, sizeof (FLine), libfp))
90 + while (lk_readnl (FLine, sizeof (FLine), libfp))
95 if (EQ (FLine, "<INDEX>"))
97 /*The next line has the size of the index */
98 - getline (FLine, sizeof (FLine), libfp);
99 + lk_readnl (FLine, sizeof (FLine), libfp);
100 IndexOffset = atol (FLine);
105 /* The next line has the name of the module and the offset
106 of the corresponding embedded file in the library */
107 - getline (FLine, sizeof (FLine), libfp);
108 + lk_readnl (FLine, sizeof (FLine), libfp);
109 sscanf (FLine, "%s %ld", ModName, &FileOffset);
116 - while (getline (str, sizeof (str), libfp) != NULL)
117 + while (lk_readnl (str, sizeof (str), libfp) != NULL)
123 long IndexOffset = 0, FileOffset;
125 - while (getline (FLine, sizeof (FLine), libfp))
126 + while (lk_readnl (FLine, sizeof (FLine), libfp))
128 char filspc[PATH_MAX];
131 if (EQ (FLine, "<INDEX>"))
133 /* The next line has the size of the index */
134 - getline (FLine, sizeof (FLine), libfp);
135 + lk_readnl (FLine, sizeof (FLine), libfp);
136 IndexOffset = atol (FLine);
141 /* The next line has the name of the module and the offset
142 of the corresponding embedded file in the library */
143 - getline (FLine, sizeof (FLine), libfp);
144 + lk_readnl (FLine, sizeof (FLine), libfp);
145 sscanf (FLine, "%s %ld", ModName, &FileOffset);
148 --- a/sim/ucsim/cmd.src/newcmdposix.cc
149 +++ b/sim/ucsim/cmd.src/newcmdposix.cc
154 - if (getline(&s, 0, in) < 0)
155 + if (lk_readln(&s, 0, in) < 0)
157 #elif defined HAVE_GETDELIM
159 --- a/as/link/lkrel.c
160 +++ b/as/link/lkrel.c
165 -#include "getline.h"
166 +#include "lk_readnl.h"
172 end = (size >= 0) ? ftell (libfp) + size : -1;
174 - while ((end < 0 || ftell (libfp) < end) && getline (str, sizeof (str), libfp) != NULL)
175 + while ((end < 0 || ftell (libfp) < end) && lk_readnl (str, sizeof (str), libfp) != NULL)
177 if (0 == strcmp (str, "</REL>"))
180 * our object file and don't go into the next one.
183 - while ((end < 0 || ftell (fp) < end) && getline (buf, sizeof (buf), fp) != NULL)
184 + while ((end < 0 || ftell (fp) < end) && lk_readnl (buf, sizeof (buf), fp) != NULL)
186 char symname[NINPUT];
188 --- a/as/link/mcs51/Makefile.in
189 +++ b/as/link/mcs51/Makefile.in
192 ASXXLIBSRC = strcmpi.c
194 -LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
195 +LKLIBSRC = lk_readnl.c lkaomf51.c lkar.c lkdata.c lkeval.c \
196 lkhead.c lklex.c lklib.c lklibr.c lklist.c \
197 lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
199 --- a/as/link/z80/Makefile.in
200 +++ b/as/link/z80/Makefile.in
205 -LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
206 +LKLIBSRC = lk_readnl.c lkaomf51.c lkar.c lkdata.c lkeval.c \
207 lkhead.c lklex.c lklib.c lklibr.c lklist.c \
208 lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c