Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | merged in trunk [4b0f813b8c]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | json-multitag-test | json |
| Files: | files | file ages | folders |
| SHA1: |
39d9f83781d1ed699107a57683a25967 |
| User & Date: | stephan 2011-10-07 02:16:58.833 |
Context
|
2011-10-07
| ||
| 02:58 | Fixed a minor denkfehler in the "bump <1ms runtime to 1ms" logic. Changed g.json.gc to an array (lower memory and better performance for what we use it for). ... (check-in: 19276984bd user: stephan tags: json-multitag-test, json) | |
| 02:16 | merged in trunk [4b0f813b8c]. ... (check-in: 39d9f83781 user: stephan tags: json-multitag-test, json) | |
| 02:14 | pulled in tonight's libcson changes, which halve the number of allocations needed for creating new JSON values. ... (check-in: 130cc65cb5 user: stephan tags: json-multitag-test, json) | |
|
2011-10-05
| ||
| 16:58 | fixed [fc825dcf52] ... (check-in: 4b0f813b8c user: ron tags: trunk) | |
Changes
Changes to src/configure.c.
| ︙ | ︙ | |||
783 784 785 786 787 788 789 790 791 792 793 794 795 796 |
void configuration_cmd(void){
int n;
const char *zMethod;
if( g.argc<3 ){
usage("export|import|merge|pull|reset ...");
}
db_find_and_open_repository(0, 0);
zMethod = g.argv[2];
n = strlen(zMethod);
if( strncmp(zMethod, "export", n)==0 ){
int mask;
const char *zSince = find_option("since",0,1);
sqlite3_int64 iStart;
if( g.argc!=5 ){
| > | 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
void configuration_cmd(void){
int n;
const char *zMethod;
if( g.argc<3 ){
usage("export|import|merge|pull|reset ...");
}
db_find_and_open_repository(0, 0);
db_open_config(0);
zMethod = g.argv[2];
n = strlen(zMethod);
if( strncmp(zMethod, "export", n)==0 ){
int mask;
const char *zSince = find_option("since",0,1);
sqlite3_int64 iStart;
if( g.argc!=5 ){
|
| ︙ | ︙ |
Changes to src/file.c.
| ︙ | ︙ | |||
32 33 34 35 36 37 38 | /* ** The file status information from the most recent stat() call. ** ** Use _stati64 rather than stat on windows, in order to handle files ** larger than 2GB. */ | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | /* ** The file status information from the most recent stat() call. ** ** Use _stati64 rather than stat on windows, in order to handle files ** larger than 2GB. */ #if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER)) # define stat _stati64 #endif /* ** On Windows S_ISLNK always returns FALSE. */ #if defined(_WIN32) # define S_ISLNK(x) (0) |
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
318 319 320 321 322 323 324 | Blob file = empty_blob; /* Content of the file */ Blob line = empty_blob; /* One line of the file */ unsigned int nLine; /* Number of lines in the file*/ unsigned int i, j, k; /* Loop counters */ int n; /* Number of bytes in one line */ char *z; /* General use string pointer */ char **newArgv; /* New expanded g.argv under construction */ | | > > > > > > > > | > > > > > > > > > | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
Blob file = empty_blob; /* Content of the file */
Blob line = empty_blob; /* One line of the file */
unsigned int nLine; /* Number of lines in the file*/
unsigned int i, j, k; /* Loop counters */
int n; /* Number of bytes in one line */
char *z; /* General use string pointer */
char **newArgv; /* New expanded g.argv under construction */
char const * zFileName; /* input file name */
FILE * zInFile; /* input FILE */
for(i=1; i<g.argc-1; i++){
z = g.argv[i];
if( z[0]!='-' ) continue;
z++;
if( z[0]=='-' ) z++;
if( z[0]==0 ) return; /* Stop searching at "--" */
if( fossil_strcmp(z, "args")==0 ) break;
}
if( i>=g.argc-1 ) return;
zFileName = g.argv[i+1];
zInFile = (0==strcmp("-",zFileName))
? stdin
: fopen(zFileName,"rb");
if(!zInFile){
fossil_panic("Cannot open -args file [%s]", zFileName);
}else{
blob_read_from_channel(&file, zInFile, -1);
if(stdin != zInFile){
fclose(zInFile);
}
zInFile = NULL;
}
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;
z = blob_buffer(&line);
z[n-1] = 0;
if((n>1) && ('\r'==z[n-2])){
if(n==2) continue /*empty line*/;
z[n-2] = 0;
}
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];
|
| ︙ | ︙ |