1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
|
int n=0;
int i;
for(;;) {
nxttok();
if(tokent==TF_CLOSE) break;
if(!Tokenf(TF_NAME) || tokenv!=OP_STRING) ParseError("String expected\n");
i=strlen(tokenstr);
if(i+n>=0x2FFD) ParseError("Help text is too long\n");
strcpy(txt+n,tokenstr);
n+=i;
}
if(!n) {
free(txt);
return 0;
}
txt[n]=0;
return realloc(txt,n+1)?:txt;
|
|
>
>
|
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
|
int n=0;
int i;
for(;;) {
nxttok();
if(tokent==TF_CLOSE) break;
if(!Tokenf(TF_NAME) || tokenv!=OP_STRING) ParseError("String expected\n");
i=strlen(tokenstr);
if(i+n>=0x2FFA) ParseError("Help text is too long\n");
strcpy(txt+n,tokenstr);
n+=i;
txt[n++]=10;
txt[n]=0;
}
if(!n) {
free(txt);
return 0;
}
txt[n]=0;
return realloc(txt,n+1)?:txt;
|