|
samba unix风格的配置文件配置信息读取C代码.(16) c = EatWhitespace( InFile ); } else /* All others verbatim. */ { bufr[i++] = c; end = i; c = mygetc( InFile ); } } } /* Now parse the value. */ c = EatWhitespace( InFile ); /* Again, trim leading whitespace. */ while( (EOF !=c) && (c > 0) ) { if( i > (bSize - 2) ) /* Make sure there's enough room. */ { bSize += BUFR_INC; bufr = (char*)Realloc( bufr, bSize ); if( NULL == bufr ) { //DEBUG(0, ("%s Memory re-allocation failure.", func) ); return( False ); } } switch( c ) { case '\r': /* Explicitly remove '\r' because the older */ c = mygetc( InFile ); /* version called fgets_slash() which also */
|