514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
}else{
blob_read_from_channel(&file, zInFile, -1);
if(stdin != zInFile){
fclose(zInFile);
}
zInFile = NULL;
}
blob_strip_bom(&file, 1);
z = blob_str(&file);
for(k=0, nLine=1; z[k]; k++) if( z[k]=='\n' ) nLine++;
newArgv = fossil_malloc( sizeof(char*)*(g.argc + nLine*2) );
for(j=0; j<i; j++) newArgv[j] = g.argv[j];
blob_rewind(&file);
while( (n = blob_line(&file, &line))>0 ){
|
|
|
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
}else{
blob_read_from_channel(&file, zInFile, -1);
if(stdin != zInFile){
fclose(zInFile);
}
zInFile = NULL;
}
blob_to_utf8_no_bom(&file, 1);
z = blob_str(&file);
for(k=0, nLine=1; z[k]; k++) if( z[k]=='\n' ) nLine++;
newArgv = fossil_malloc( sizeof(char*)*(g.argc + nLine*2) );
for(j=0; j<i; j++) newArgv[j] = g.argv[j];
blob_rewind(&file);
while( (n = blob_line(&file, &line))>0 ){
|