Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jdluhos:lsb-tests
lsb-runtime-test-official
tet3.7-lite-getline.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tet3.7-lite-getline.patch of Package lsb-runtime-test-official
--- ./tet/src/tet3/tcc/scen1.c.bug2138 2002-05-15 15:05:14.000000000 -0400 +++ ./tet/src/tet3/tcc/scen1.c 2008-06-13 08:16:30.000000000 -0400 @@ -94,7 +94,7 @@ static char srcFile[] = __FILE__; /* fil #define isattached(s) (*(s) && !isspace(*(s))) /* -** structure of the line cache stack used by getline() and ungetline() +** structure of the line cache stack used by tgetline() and ungetline() ** this is a linked list ** the lc_next and lc_last elements must be 1st and 2nd so as to ** enable the stack to be manipulated by the llist functions @@ -134,7 +134,7 @@ static struct ifstack *ifstack; /* ** pointer to the currently active input file stack element; -** that is: the element in the stack where getline() and ungetline() +** that is: the element in the stack where tgetline() and ungetline() ** fetch and store input lines ** ** normally, the currently active element is at the top of the stack; @@ -148,7 +148,7 @@ static struct ifstack *ifstp; /* static function declarations */ static int find1scen PROTOLIST((void)); -static char *getline PROTOLIST((void)); +static char *tgetline PROTOLIST((void)); static void includefile PROTOLIST((char *, char *, int)); static struct ifstack *ifsalloc PROTOLIST((void)); static void ifsfree PROTOLIST((struct ifstack *)); @@ -243,7 +243,7 @@ static int find1scen() ** the scenario processor can find it */ for (;;) { - if ((line = getline()) == (char *) 0) + if ((line = tgetline()) == (char *) 0) return(ferror(ifstp->if_fp) ? -1 : 0); if (!isspace(*line)) { /* start of new scenario */ @@ -286,7 +286,7 @@ static int proc1scen() register struct scentab *ep; /* read the scenario name - starts in column 1 */ - line = getline(); + line = tgetline(); ASSERT(line); ASSERT(!isspace(*line)); @@ -314,7 +314,7 @@ static int proc1scen() return(-1); /* process the rest of the current scenario */ - while ((line = getline()) != (char *) 0) { + while ((line = tgetline()) != (char *) 0) { if (!isspace(*line)) { /* a new scenario */ ungetline(line); @@ -1168,13 +1168,15 @@ static struct ifstack *ifspop() } /* -** getline() - get the next non-blank, non-comment line +** tgetline() - get the next non-blank, non-comment line ** from the currently active input file ** ** return a pointer to the line, or (char *) 0 on EOF or error +** +** NOTE: getline renamed tgetline to avoid conflict with new POSIX getline */ -static char *getline() +static char *tgetline() { static char buf[LBUFLEN]; struct lcache *lcp; @@ -1187,7 +1189,7 @@ static char *getline() if ((lcp = lcpop()) != (struct lcache *) 0) { (void) strcpy(buf, lcp->lc_line); lcfree(lcp); - TRACE2(tet_Tscen, 10, "getline(): line = <%s>", firstpart(buf)); + TRACE2(tet_Tscen, 10, "tgetline(): line = <%s>", firstpart(buf)); return(buf); } @@ -1218,14 +1220,14 @@ static char *getline() } else TRACE2(tet_Tscen, 10, - "getline(): encountered EOF on %s", + "tgetline(): encountered EOF on %s", ifstp->if_fname); if (ifstp->if_next) { (void) fclose(ifstp->if_fp); ifsfree(ifspop()); continue; } - TRACE1(tet_Tscen, 10, "getline(): return EOF"); + TRACE1(tet_Tscen, 10, "tgetline(): return EOF"); return((char *) 0); } @@ -1260,7 +1262,7 @@ static char *getline() /* if there is anything left, return it */ if (p >= buf) { - TRACE4(tet_Tscen, 10, "getline(): fname = %s, lineno = %s, line = <%s>", + TRACE4(tet_Tscen, 10, "tgetline(): fname = %s, lineno = %s, line = <%s>", ifstp->if_fname, tet_i2a(ifstp->if_lcount), firstpart(buf)); return(buf); @@ -1269,7 +1271,7 @@ static char *getline() } /* -** ungetline() - store a line for subsequent retrieval by getline() +** ungetline() - store a line for subsequent retrieval by tgetline() */ static void ungetline(line) --- ./tet/test_sets/SRC/common/drivers/Clocal.c.bug2138 2008-06-13 08:51:35.000000000 -0400 +++ ./tet/test_sets/SRC/common/drivers/Clocal.c 2008-06-13 08:52:17.000000000 -0400 @@ -94,7 +94,7 @@ MODIFICATIONS: #define QUOTE 7 private int getstring(); -private int getline(); +private int tgetline(); private int clinno; private int state; @@ -169,7 +169,7 @@ cfile_rpt() in_rpt("Test Code:"); state = START; do { - n = getline(fd, str); + n = tgetline(fd, str); if (str[0] != NUL) in_rpt("%2d: %s", clinno, str); clinno++; @@ -186,7 +186,7 @@ cfile_rpt() in_rpt("Test Code for file %s:", filname); state = START; do { - n = getline(fd, str); + n = tgetline(fd, str); if (str[0] != NUL) in_rpt("%2d: %s", clinno, str); clinno++; @@ -353,7 +353,7 @@ getstring(fd, str) * function to read a line of code from file descripor fd. */ private int -getline(fd, str) +tgetline(fd, str) int fd; char *str; { @@ -361,7 +361,7 @@ getline(fd, str) int leave; char c; - DBUG_ENTER("getline"); + DBUG_ENTER("tgetline"); str[0] = NUL; if (state == END) DBUG_RETURN(END);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor