Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fixed corner case in --args handling for 1-byte entry with no newline. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
ee990ebb99ecfabe54125288da6bc2f2 |
| User & Date: | stephan 2013-05-25 17:48:21.483 |
Context
|
2013-05-25
| ||
| 20:41 | Improvements to file history display in the web interface. check-in: 601c15421a user: drh tags: trunk | |
| 17:48 | Fixed corner case in --args handling for 1-byte entry with no newline. check-in: ee990ebb99 user: stephan tags: trunk | |
| 17:22 | Add the ci= query parameter to the finfo webpage, to trace the direct ancestors of a file from a particular check-in. check-in: 418ec701a3 user: drh tags: trunk | |
Changes
Changes to src/main.c.
| ︙ | ︙ | |||
418 419 420 421 422 423 424 |
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 ){
| | > > > > | > > > | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
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 ){
if( n<1 ) continue
/**
** Reminder: corner-case: a line with 1 byte and no newline.
*/;
z = blob_buffer(&line);
if('\n'==z[n-1]){
z[n-1] = 0;
}
if((n>1) && ('\r'==z[n-2])){
if(n==2) continue /*empty line*/;
z[n-2] = 0;
}
if(!z[0]) continue;
newArgv[j++] = z;
if( z[0]=='-' ){
for(k=1; z[k] && !fossil_isspace(z[k]); k++){}
if( z[k] ){
z[k] = 0;
k++;
if( z[k] ) newArgv[j++] = &z[k];
|
| ︙ | ︙ |