Lines Matching refs:lineBuf
722 way. When a line is found, fill "lineBuf" with the data.
728 readLine(FILE *fp, char **lineBuf, int *lineNumber)
735 *lineBuf = (char *)allocMem(lineBufSize);
736 if (!*lineBuf)
739 result = fgets(*lineBuf, LINEALLOCUNIT, fp);
749 newBuf = reAllocMem(*lineBuf, lineBufSize, newBufSize);
752 freeMem(*lineBuf);
753 *lineBuf = NULL;
757 *lineBuf = newBuf;
763 freeMem(*lineBuf);
764 *lineBuf = NULL;
776 accumulateComment(*lineBuf, *lineNumber);
778 freeMem(*lineBuf);
779 return(readLine(fp, lineBuf, lineNumber));
792 readPair: Starting at character position "charPos" in "lineBuf",
805 readPair(char *lineBuf, char *nameBuf, char *valBuf, int *charPos)
807 char *ptr = lineBuf + *charPos;
814 *charPos = (int)(ptr - lineBuf);
835 *charPos = (int)(ptr - lineBuf);
870 *charPos = (int)(ptr - lineBuf);
888 char *lineBuf = NULL;
914 while (readLine(fp, &lineBuf, &lineNumber) != EOF) {
917 valBuf = allocMem(strlen(lineBuf)+1);
919 freeMem(lineBuf);
926 while ((result = readPair(lineBuf, nameBuf, valBuf,
951 if (lineBuf)
952 freeMem(lineBuf);
962 (void)fprintf(stderr,"%s\n",lineBuf);
976 if (lineBuf[charPos] == ';') {
981 if (lineBuf) {
982 freeMem(lineBuf);
983 lineBuf = NULL;
994 if (lineBuf)
995 freeMem(lineBuf);