Fossil SCM

Some code formatting. No change in functionality.

jan.nijtmans 2014-08-05 10:52 trunk
Commit b9b3ce3b3907823d298816149c83b3e3f88c812b
+2 -2
--- src/browse.c
+++ src/browse.c
@@ -495,11 +495,11 @@
495495
}
496496
if( linkTrunk ){
497497
style_submenu_element("Trunk", "Trunk", "%s",
498498
url_render(&sURI, "ci", "trunk", 0, 0));
499499
}
500
- if ( linkTip ){
500
+ if( linkTip ){
501501
style_submenu_element("Tip", "Tip", "%s",
502502
url_render(&sURI, "ci", "tip", 0, 0));
503503
}
504504
if( !showDirOnly ){
505505
style_submenu_element("Flat-View", "Flat-View", "%s",
@@ -718,11 +718,11 @@
718718
int isExt = zExt && zExt!=zFilename && zExt[1];
719719
int i;
720720
for( i=1; isExt && zExt[i]; i++ ) isExt &= fossil_isalnum(zExt[i]);
721721
if( isExt ){
722722
zClass = mprintf("file file-%s", zExt+1);
723
- for ( i=5; zClass[i]; i++ ) zClass[i] = fossil_tolower(zClass[i]);
723
+ for( i=5; zClass[i]; i++ ) zClass[i] = fossil_tolower(zClass[i]);
724724
}else{
725725
zClass = mprintf("file");
726726
}
727727
return zClass;
728728
}
729729
--- src/browse.c
+++ src/browse.c
@@ -495,11 +495,11 @@
495 }
496 if( linkTrunk ){
497 style_submenu_element("Trunk", "Trunk", "%s",
498 url_render(&sURI, "ci", "trunk", 0, 0));
499 }
500 if ( linkTip ){
501 style_submenu_element("Tip", "Tip", "%s",
502 url_render(&sURI, "ci", "tip", 0, 0));
503 }
504 if( !showDirOnly ){
505 style_submenu_element("Flat-View", "Flat-View", "%s",
@@ -718,11 +718,11 @@
718 int isExt = zExt && zExt!=zFilename && zExt[1];
719 int i;
720 for( i=1; isExt && zExt[i]; i++ ) isExt &= fossil_isalnum(zExt[i]);
721 if( isExt ){
722 zClass = mprintf("file file-%s", zExt+1);
723 for ( i=5; zClass[i]; i++ ) zClass[i] = fossil_tolower(zClass[i]);
724 }else{
725 zClass = mprintf("file");
726 }
727 return zClass;
728 }
729
--- src/browse.c
+++ src/browse.c
@@ -495,11 +495,11 @@
495 }
496 if( linkTrunk ){
497 style_submenu_element("Trunk", "Trunk", "%s",
498 url_render(&sURI, "ci", "trunk", 0, 0));
499 }
500 if( linkTip ){
501 style_submenu_element("Tip", "Tip", "%s",
502 url_render(&sURI, "ci", "tip", 0, 0));
503 }
504 if( !showDirOnly ){
505 style_submenu_element("Flat-View", "Flat-View", "%s",
@@ -718,11 +718,11 @@
718 int isExt = zExt && zExt!=zFilename && zExt[1];
719 int i;
720 for( i=1; isExt && zExt[i]; i++ ) isExt &= fossil_isalnum(zExt[i]);
721 if( isExt ){
722 zClass = mprintf("file file-%s", zExt+1);
723 for( i=5; zClass[i]; i++ ) zClass[i] = fossil_tolower(zClass[i]);
724 }else{
725 zClass = mprintf("file");
726 }
727 return zClass;
728 }
729
+2 -2
--- src/cgi.c
+++ src/cgi.c
@@ -750,11 +750,11 @@
750750
else {
751751
CgiPostReadState * st = (CgiPostReadState *)state;
752752
if( st->pos >= st->len ){
753753
*n = 0;
754754
return 0;
755
- } else if( !*n || ((st->pos + *n) > st->len) ){
755
+ }else if( !*n || ((st->pos + *n) > st->len) ){
756756
return cson_rc.RangeError;
757757
}else{
758758
unsigned int rsz = (unsigned int)fread( dest, 1, *n, st->fh );
759759
if( ! rsz ){
760760
*n = rsz;
@@ -1557,11 +1557,11 @@
15571557
cgi_trace(zLine);
15581558
zToken = extract_token(zLine, &z);
15591559
if( zToken && strlen(zToken)==0 ){
15601560
/* look for path to fossil */
15611561
if( fgets(zLine, sizeof(zLine),g.httpIn)==0 ){
1562
- if ( zCmd==0 ){
1562
+ if( zCmd==0 ){
15631563
malformed_request("missing fossil command");
15641564
}else{
15651565
/* no new command so exit */
15661566
fossil_exit(0);
15671567
}
15681568
--- src/cgi.c
+++ src/cgi.c
@@ -750,11 +750,11 @@
750 else {
751 CgiPostReadState * st = (CgiPostReadState *)state;
752 if( st->pos >= st->len ){
753 *n = 0;
754 return 0;
755 } else if( !*n || ((st->pos + *n) > st->len) ){
756 return cson_rc.RangeError;
757 }else{
758 unsigned int rsz = (unsigned int)fread( dest, 1, *n, st->fh );
759 if( ! rsz ){
760 *n = rsz;
@@ -1557,11 +1557,11 @@
1557 cgi_trace(zLine);
1558 zToken = extract_token(zLine, &z);
1559 if( zToken && strlen(zToken)==0 ){
1560 /* look for path to fossil */
1561 if( fgets(zLine, sizeof(zLine),g.httpIn)==0 ){
1562 if ( zCmd==0 ){
1563 malformed_request("missing fossil command");
1564 }else{
1565 /* no new command so exit */
1566 fossil_exit(0);
1567 }
1568
--- src/cgi.c
+++ src/cgi.c
@@ -750,11 +750,11 @@
750 else {
751 CgiPostReadState * st = (CgiPostReadState *)state;
752 if( st->pos >= st->len ){
753 *n = 0;
754 return 0;
755 }else if( !*n || ((st->pos + *n) > st->len) ){
756 return cson_rc.RangeError;
757 }else{
758 unsigned int rsz = (unsigned int)fread( dest, 1, *n, st->fh );
759 if( ! rsz ){
760 *n = rsz;
@@ -1557,11 +1557,11 @@
1557 cgi_trace(zLine);
1558 zToken = extract_token(zLine, &z);
1559 if( zToken && strlen(zToken)==0 ){
1560 /* look for path to fossil */
1561 if( fgets(zLine, sizeof(zLine),g.httpIn)==0 ){
1562 if( zCmd==0 ){
1563 malformed_request("missing fossil command");
1564 }else{
1565 /* no new command so exit */
1566 fossil_exit(0);
1567 }
1568
+1 -1
--- src/name.c
+++ src/name.c
@@ -659,11 +659,11 @@
659659
const char *zName;
660660
int verboseFlag;
661661
int i;
662662
db_find_and_open_repository(0,0);
663663
verboseFlag = find_option("verbose","v",0)!=0;
664
-
664
+
665665
/* We should be done with options.. */
666666
verify_all_options();
667667
668668
if( g.argc<3 ) usage("whatis NAME ...");
669669
for(i=2; i<g.argc; i++){
670670
--- src/name.c
+++ src/name.c
@@ -659,11 +659,11 @@
659 const char *zName;
660 int verboseFlag;
661 int i;
662 db_find_and_open_repository(0,0);
663 verboseFlag = find_option("verbose","v",0)!=0;
664
665 /* We should be done with options.. */
666 verify_all_options();
667
668 if( g.argc<3 ) usage("whatis NAME ...");
669 for(i=2; i<g.argc; i++){
670
--- src/name.c
+++ src/name.c
@@ -659,11 +659,11 @@
659 const char *zName;
660 int verboseFlag;
661 int i;
662 db_find_and_open_repository(0,0);
663 verboseFlag = find_option("verbose","v",0)!=0;
664
665 /* We should be done with options.. */
666 verify_all_options();
667
668 if( g.argc<3 ) usage("whatis NAME ...");
669 for(i=2; i<g.argc; i++){
670
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -1361,11 +1361,11 @@
13611361
blob_appendf(&sql, " AND (event.user=%Q OR event.euser=%Q)",
13621362
zUser, zUser);
13631363
url_add_parameter(&url, "u", zUser);
13641364
zThisUser = zUser;
13651365
}
1366
- if ( zSearch ){
1366
+ if( zSearch ){
13671367
blob_appendf(&sql,
13681368
" AND (event.comment LIKE '%%%q%%' OR event.brief LIKE '%%%q%%')",
13691369
zSearch, zSearch);
13701370
url_add_parameter(&url, "s", zSearch);
13711371
}
@@ -1761,11 +1761,11 @@
17611761
}
17621762
db_find_and_open_repository(0, 0);
17631763
zLimit = find_option("limit","n",1);
17641764
zWidth = find_option("width","W",1);
17651765
zType = find_option("type","t",1);
1766
- if ( !zLimit ){
1766
+ if( !zLimit ){
17671767
zLimit = find_option("count",0,1);
17681768
}
17691769
if( zLimit ){
17701770
n = atoi(zLimit);
17711771
}else{
@@ -1779,11 +1779,11 @@
17791779
}else{
17801780
width = -1;
17811781
}
17821782
zOffset = find_option("offset",0,1);
17831783
iOffset = zOffset ? atoi(zOffset) : 0;
1784
-
1784
+
17851785
/* We should be done with options.. */
17861786
verify_all_options();
17871787
17881788
if( g.argc>=4 ){
17891789
k = strlen(g.argv[2]);
17901790
--- src/timeline.c
+++ src/timeline.c
@@ -1361,11 +1361,11 @@
1361 blob_appendf(&sql, " AND (event.user=%Q OR event.euser=%Q)",
1362 zUser, zUser);
1363 url_add_parameter(&url, "u", zUser);
1364 zThisUser = zUser;
1365 }
1366 if ( zSearch ){
1367 blob_appendf(&sql,
1368 " AND (event.comment LIKE '%%%q%%' OR event.brief LIKE '%%%q%%')",
1369 zSearch, zSearch);
1370 url_add_parameter(&url, "s", zSearch);
1371 }
@@ -1761,11 +1761,11 @@
1761 }
1762 db_find_and_open_repository(0, 0);
1763 zLimit = find_option("limit","n",1);
1764 zWidth = find_option("width","W",1);
1765 zType = find_option("type","t",1);
1766 if ( !zLimit ){
1767 zLimit = find_option("count",0,1);
1768 }
1769 if( zLimit ){
1770 n = atoi(zLimit);
1771 }else{
@@ -1779,11 +1779,11 @@
1779 }else{
1780 width = -1;
1781 }
1782 zOffset = find_option("offset",0,1);
1783 iOffset = zOffset ? atoi(zOffset) : 0;
1784
1785 /* We should be done with options.. */
1786 verify_all_options();
1787
1788 if( g.argc>=4 ){
1789 k = strlen(g.argv[2]);
1790
--- src/timeline.c
+++ src/timeline.c
@@ -1361,11 +1361,11 @@
1361 blob_appendf(&sql, " AND (event.user=%Q OR event.euser=%Q)",
1362 zUser, zUser);
1363 url_add_parameter(&url, "u", zUser);
1364 zThisUser = zUser;
1365 }
1366 if( zSearch ){
1367 blob_appendf(&sql,
1368 " AND (event.comment LIKE '%%%q%%' OR event.brief LIKE '%%%q%%')",
1369 zSearch, zSearch);
1370 url_add_parameter(&url, "s", zSearch);
1371 }
@@ -1761,11 +1761,11 @@
1761 }
1762 db_find_and_open_repository(0, 0);
1763 zLimit = find_option("limit","n",1);
1764 zWidth = find_option("width","W",1);
1765 zType = find_option("type","t",1);
1766 if( !zLimit ){
1767 zLimit = find_option("count",0,1);
1768 }
1769 if( zLimit ){
1770 n = atoi(zLimit);
1771 }else{
@@ -1779,11 +1779,11 @@
1779 }else{
1780 width = -1;
1781 }
1782 zOffset = find_option("offset",0,1);
1783 iOffset = zOffset ? atoi(zOffset) : 0;
1784
1785 /* We should be done with options.. */
1786 verify_all_options();
1787
1788 if( g.argc>=4 ){
1789 k = strlen(g.argv[2]);
1790
+7 -7
--- src/tkt.c
+++ src/tkt.c
@@ -1207,11 +1207,11 @@
12071207
/* we just handle history separately here, does not get out */
12081208
if( eCmd==history ){
12091209
Stmt q;
12101210
int tagid;
12111211
1212
- if ( i != g.argc ){
1212
+ if( i != g.argc ){
12131213
fossil_fatal("no other parameters expected to %s!",g.argv[2]);
12141214
}
12151215
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
12161216
zTktUuid);
12171217
if( tagid==0 ){
@@ -1299,20 +1299,20 @@
12991299
if( tktEncoding == tktFossilize ){
13001300
zFValue=mprintf("%s",zFValue);
13011301
defossilize(zFValue);
13021302
}
13031303
append = (zFName[0] == '+');
1304
- if (append){
1304
+ if( append ){
13051305
zFName++;
13061306
}
13071307
j = fieldId(zFName);
13081308
if( j == -1 ){
13091309
fossil_fatal("unknown field name '%s'!",zFName);
13101310
}else{
1311
- if (append) {
1311
+ if( append ){
13121312
aField[j].zAppend = zFValue;
1313
- } else {
1313
+ }else{
13141314
aField[j].zValue = zFValue;
13151315
}
13161316
}
13171317
}
13181318
@@ -1323,17 +1323,17 @@
13231323
/* append defined elements */
13241324
for(i=0; i<nField; i++){
13251325
char *zValue = 0;
13261326
char *zPfx;
13271327
1328
- if (aField[i].zAppend && aField[i].zAppend[0] ){
1328
+ if( aField[i].zAppend && aField[i].zAppend[0] ){
13291329
zPfx = " +";
13301330
zValue = aField[i].zAppend;
1331
- } else if( aField[i].zValue && aField[i].zValue[0] ){
1331
+ }else if( aField[i].zValue && aField[i].zValue[0] ){
13321332
zPfx = " ";
13331333
zValue = aField[i].zValue;
1334
- } else {
1334
+ }else{
13351335
continue;
13361336
}
13371337
if( memcmp(aField[i].zName, "private_", 8)==0 ){
13381338
zValue = db_conceal(zValue, strlen(zValue));
13391339
blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[i].zName, zValue);
13401340
--- src/tkt.c
+++ src/tkt.c
@@ -1207,11 +1207,11 @@
1207 /* we just handle history separately here, does not get out */
1208 if( eCmd==history ){
1209 Stmt q;
1210 int tagid;
1211
1212 if ( i != g.argc ){
1213 fossil_fatal("no other parameters expected to %s!",g.argv[2]);
1214 }
1215 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
1216 zTktUuid);
1217 if( tagid==0 ){
@@ -1299,20 +1299,20 @@
1299 if( tktEncoding == tktFossilize ){
1300 zFValue=mprintf("%s",zFValue);
1301 defossilize(zFValue);
1302 }
1303 append = (zFName[0] == '+');
1304 if (append){
1305 zFName++;
1306 }
1307 j = fieldId(zFName);
1308 if( j == -1 ){
1309 fossil_fatal("unknown field name '%s'!",zFName);
1310 }else{
1311 if (append) {
1312 aField[j].zAppend = zFValue;
1313 } else {
1314 aField[j].zValue = zFValue;
1315 }
1316 }
1317 }
1318
@@ -1323,17 +1323,17 @@
1323 /* append defined elements */
1324 for(i=0; i<nField; i++){
1325 char *zValue = 0;
1326 char *zPfx;
1327
1328 if (aField[i].zAppend && aField[i].zAppend[0] ){
1329 zPfx = " +";
1330 zValue = aField[i].zAppend;
1331 } else if( aField[i].zValue && aField[i].zValue[0] ){
1332 zPfx = " ";
1333 zValue = aField[i].zValue;
1334 } else {
1335 continue;
1336 }
1337 if( memcmp(aField[i].zName, "private_", 8)==0 ){
1338 zValue = db_conceal(zValue, strlen(zValue));
1339 blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[i].zName, zValue);
1340
--- src/tkt.c
+++ src/tkt.c
@@ -1207,11 +1207,11 @@
1207 /* we just handle history separately here, does not get out */
1208 if( eCmd==history ){
1209 Stmt q;
1210 int tagid;
1211
1212 if( i != g.argc ){
1213 fossil_fatal("no other parameters expected to %s!",g.argv[2]);
1214 }
1215 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",
1216 zTktUuid);
1217 if( tagid==0 ){
@@ -1299,20 +1299,20 @@
1299 if( tktEncoding == tktFossilize ){
1300 zFValue=mprintf("%s",zFValue);
1301 defossilize(zFValue);
1302 }
1303 append = (zFName[0] == '+');
1304 if( append ){
1305 zFName++;
1306 }
1307 j = fieldId(zFName);
1308 if( j == -1 ){
1309 fossil_fatal("unknown field name '%s'!",zFName);
1310 }else{
1311 if( append ){
1312 aField[j].zAppend = zFValue;
1313 }else{
1314 aField[j].zValue = zFValue;
1315 }
1316 }
1317 }
1318
@@ -1323,17 +1323,17 @@
1323 /* append defined elements */
1324 for(i=0; i<nField; i++){
1325 char *zValue = 0;
1326 char *zPfx;
1327
1328 if( aField[i].zAppend && aField[i].zAppend[0] ){
1329 zPfx = " +";
1330 zValue = aField[i].zAppend;
1331 }else if( aField[i].zValue && aField[i].zValue[0] ){
1332 zPfx = " ";
1333 zValue = aField[i].zValue;
1334 }else{
1335 continue;
1336 }
1337 if( memcmp(aField[i].zName, "private_", 8)==0 ){
1338 zValue = db_conceal(zValue, strlen(zValue));
1339 blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[i].zName, zValue);
1340
+2 -2
--- src/utf8.c
+++ src/utf8.c
@@ -127,11 +127,11 @@
127127
pUtf = qUtf = zUtf;
128128
while( *pUtf ) {
129129
if( *pUtf == (char)0xef ){
130130
wchar_t c = ((pUtf[1]&0x3f)<<6)|(pUtf[2]&0x3f);
131131
/* Only really convert it when the resulting char is in range. */
132
- if ( c && ((c < ' ') || wcschr(L"\"*:<>?|", c)) ){
132
+ if( c && ((c < ' ') || wcschr(L"\"*:<>?|", c)) ){
133133
*qUtf++ = c; pUtf+=3; continue;
134134
}
135135
}
136136
*qUtf++ = *pUtf++;
137137
}
@@ -241,11 +241,11 @@
241241
** characters in the Unicode private use area. This is what makes
242242
** Win32 fossil.exe work well in a Cygwin environment even when a
243243
** filename contains characters which are invalid for Win32.
244244
*/
245245
while( *wUnicode != '\0' ){
246
- if ( (*wUnicode < ' ') || wcschr(L"\"*:<>?|", *wUnicode) ){
246
+ if( (*wUnicode < ' ') || wcschr(L"\"*:<>?|", *wUnicode) ){
247247
*wUnicode |= 0xF000;
248248
}else if( *wUnicode == '/' ){
249249
*wUnicode = '\\';
250250
}
251251
++wUnicode;
252252
--- src/utf8.c
+++ src/utf8.c
@@ -127,11 +127,11 @@
127 pUtf = qUtf = zUtf;
128 while( *pUtf ) {
129 if( *pUtf == (char)0xef ){
130 wchar_t c = ((pUtf[1]&0x3f)<<6)|(pUtf[2]&0x3f);
131 /* Only really convert it when the resulting char is in range. */
132 if ( c && ((c < ' ') || wcschr(L"\"*:<>?|", c)) ){
133 *qUtf++ = c; pUtf+=3; continue;
134 }
135 }
136 *qUtf++ = *pUtf++;
137 }
@@ -241,11 +241,11 @@
241 ** characters in the Unicode private use area. This is what makes
242 ** Win32 fossil.exe work well in a Cygwin environment even when a
243 ** filename contains characters which are invalid for Win32.
244 */
245 while( *wUnicode != '\0' ){
246 if ( (*wUnicode < ' ') || wcschr(L"\"*:<>?|", *wUnicode) ){
247 *wUnicode |= 0xF000;
248 }else if( *wUnicode == '/' ){
249 *wUnicode = '\\';
250 }
251 ++wUnicode;
252
--- src/utf8.c
+++ src/utf8.c
@@ -127,11 +127,11 @@
127 pUtf = qUtf = zUtf;
128 while( *pUtf ) {
129 if( *pUtf == (char)0xef ){
130 wchar_t c = ((pUtf[1]&0x3f)<<6)|(pUtf[2]&0x3f);
131 /* Only really convert it when the resulting char is in range. */
132 if( c && ((c < ' ') || wcschr(L"\"*:<>?|", c)) ){
133 *qUtf++ = c; pUtf+=3; continue;
134 }
135 }
136 *qUtf++ = *pUtf++;
137 }
@@ -241,11 +241,11 @@
241 ** characters in the Unicode private use area. This is what makes
242 ** Win32 fossil.exe work well in a Cygwin environment even when a
243 ** filename contains characters which are invalid for Win32.
244 */
245 while( *wUnicode != '\0' ){
246 if( (*wUnicode < ' ') || wcschr(L"\"*:<>?|", *wUnicode) ){
247 *wUnicode |= 0xF000;
248 }else if( *wUnicode == '/' ){
249 *wUnicode = '\\';
250 }
251 ++wUnicode;
252

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button