|
samba unix风格的配置文件配置信息读取C代码.(9) * * ------------------------------------------------------------------------ ** */ { int c; int i; int end; char *func = "params.c:Section() -"; i = 0; /* <i> is the offset of the next free byte in bufr[] and */ end = 0; /* <end> is the current "end of string" offset. In most */ /* cases these will be the same, but if the last */ /* character written to bufr[] is a space, then <end> */ /* will be one less than <i>. */ c = EatWhitespace( InFile ); /* We've already got the '['. Scan */ /* past initial white space. */ while( (EOF != c) && (c > 0) ) { /* Check that the buffer is big enough for the next character. */ if( i > (bSize - 2) ) { char *tb; tb = (char*)Realloc( bufr, bSize +BUFR_INC ); if( NULL == tb ) {
|