Differences From Artifact [89eec9cdb2]:
- File src/glob.c — part of check-in [5fc0f7c33a] at 2020-08-10 11:53:07 on branch trunk — /fileedit now embeds the current open leaf list and the file list for the current checkin (defaulting to the most recent leaf) in the page content, saving 2 XHR requests at startup. If passed filename= without checkin= then it tries to load the given file from the most recent leaf. (user: stephan size: 6984) [more...]
To Artifact [ecc7e3a5ce]:
- File src/glob.c — part of check-in [b878923997] at 2023-05-22 21:27:42 on branch trunk — Replaced a complicated bit of logic with something slighlty less complicated, having the same effect. The glob parser used a mix of second-clause for-loop testing and internal break and continue checks without any other internal processing inside the loop. Combining all of this into a single expression requires the line to wrap (bad for clarity) but it does make clear all of the conditions required for this loop to continue iterating. I think it's a net improvement in clarity, though the margin is admittedly small. Testing shows no regression in functionality, limiting this non-functional change to a style improvement. (user: wyoung size: 6967)
| ︙ | ︙ | |||
124 125 126 127 128 129 130 |
delimiter = z[0];
z++;
}else{
delimiter = ',';
}
p->azPattern = fossil_realloc(p->azPattern, (p->nPattern+1)*sizeof(char*) );
p->azPattern[p->nPattern++] = z;
| | | < | > | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
delimiter = z[0];
z++;
}else{
delimiter = ',';
}
p->azPattern = fossil_realloc(p->azPattern, (p->nPattern+1)*sizeof(char*) );
p->azPattern[p->nPattern++] = z;
/* Find the next delimiter (or the end of the string). */
for(i=0; z[i] && z[i]!=delimiter &&
!(delimiter==',' && fossil_isspace(z[i])); i++){
/* keep looking for the end of the glob pattern */
}
if( z[i]==0 ) break;
z[i] = 0;
z += i+1;
}
return p;
}
|
| ︙ | ︙ |