Fossil SCM

Fix a harmless compiler warning and several over-length source code lines.

drh 2015-12-24 13:28 trunk
Commit d94362b6ae9736685e11be087572958417325ee0
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -74,11 +74,10 @@
7474
** a file in a directory named on the azInclude[] list.
7575
**
7676
** if azInclude is NULL, then always include zFile.
7777
*/
7878
static int file_dir_match(FileDirList *p, const char *zFile){
79
- int i = 0;
8079
if( p==0 || strcmp(p->zName,".")==0 ) return 1;
8180
if( filenames_are_case_sensitive() ){
8281
while( p->zName ){
8382
if( strcmp(zFile, p->zName)==0
8483
|| (strncmp(zFile, p->zName, p->nName)==0
8584
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -74,11 +74,10 @@
74 ** a file in a directory named on the azInclude[] list.
75 **
76 ** if azInclude is NULL, then always include zFile.
77 */
78 static int file_dir_match(FileDirList *p, const char *zFile){
79 int i = 0;
80 if( p==0 || strcmp(p->zName,".")==0 ) return 1;
81 if( filenames_are_case_sensitive() ){
82 while( p->zName ){
83 if( strcmp(zFile, p->zName)==0
84 || (strncmp(zFile, p->zName, p->nName)==0
85
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -74,11 +74,10 @@
74 ** a file in a directory named on the azInclude[] list.
75 **
76 ** if azInclude is NULL, then always include zFile.
77 */
78 static int file_dir_match(FileDirList *p, const char *zFile){
 
79 if( p==0 || strcmp(p->zName,".")==0 ) return 1;
80 if( filenames_are_case_sensitive() ){
81 while( p->zName ){
82 if( strcmp(zFile, p->zName)==0
83 || (strncmp(zFile, p->zName, p->nName)==0
84
+4 -2
--- src/finfo.c
+++ src/finfo.c
@@ -396,11 +396,12 @@
396396
if( n>0 ){
397397
blob_appendf(&title, "First %d ancestors of file ", n);
398398
}else{
399399
blob_appendf(&title, "Ancestors of file ");
400400
}
401
- blob_appendf(&title,"<a href='%R/finfo?name=%T'>%h</a>", zFilename, zFilename);
401
+ blob_appendf(&title,"<a href='%R/finfo?name=%T'>%h</a>",
402
+ zFilename, zFilename);
402403
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
403404
blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
404405
if( fShowId ) blob_appendf(&title, " (%d)", baseCheckin);
405406
fossil_free(zUuid);
406407
}else{
@@ -469,11 +470,12 @@
469470
}
470471
memcpy(zTime, &zDate[11], 5);
471472
zTime[5] = 0;
472473
@ <tr><td class="timelineTime">
473474
@ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td>
474
- @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div></td>
475
+ @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div>
476
+ @ </td>
475477
if( zBgClr && zBgClr[0] ){
476478
@ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
477479
}else{
478480
@ <td class="timelineTableCell">
479481
}
480482
--- src/finfo.c
+++ src/finfo.c
@@ -396,11 +396,12 @@
396 if( n>0 ){
397 blob_appendf(&title, "First %d ancestors of file ", n);
398 }else{
399 blob_appendf(&title, "Ancestors of file ");
400 }
401 blob_appendf(&title,"<a href='%R/finfo?name=%T'>%h</a>", zFilename, zFilename);
 
402 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
403 blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
404 if( fShowId ) blob_appendf(&title, " (%d)", baseCheckin);
405 fossil_free(zUuid);
406 }else{
@@ -469,11 +470,12 @@
469 }
470 memcpy(zTime, &zDate[11], 5);
471 zTime[5] = 0;
472 @ <tr><td class="timelineTime">
473 @ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td>
474 @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div></td>
 
475 if( zBgClr && zBgClr[0] ){
476 @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
477 }else{
478 @ <td class="timelineTableCell">
479 }
480
--- src/finfo.c
+++ src/finfo.c
@@ -396,11 +396,12 @@
396 if( n>0 ){
397 blob_appendf(&title, "First %d ancestors of file ", n);
398 }else{
399 blob_appendf(&title, "Ancestors of file ");
400 }
401 blob_appendf(&title,"<a href='%R/finfo?name=%T'>%h</a>",
402 zFilename, zFilename);
403 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
404 blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
405 if( fShowId ) blob_appendf(&title, " (%d)", baseCheckin);
406 fossil_free(zUuid);
407 }else{
@@ -469,11 +470,12 @@
470 }
471 memcpy(zTime, &zDate[11], 5);
472 zTime[5] = 0;
473 @ <tr><td class="timelineTime">
474 @ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td>
475 @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div>
476 @ </td>
477 if( zBgClr && zBgClr[0] ){
478 @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
479 }else{
480 @ <td class="timelineTableCell">
481 }
482
+8 -6
--- src/info.c
+++ src/info.c
@@ -213,11 +213,11 @@
213213
vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
214214
if( vid ){
215215
show_common_info(vid, "checkout:", 1, 1);
216216
}
217217
fossil_print("check-ins: %d\n",
218
- db_int(-1, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"));
218
+ db_int(-1, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"));
219219
}else{
220220
int rid;
221221
rid = name_to_rid(g.argv[2]);
222222
if( rid==0 ){
223223
fossil_fatal("no such object: %s\n", g.argv[2]);
@@ -598,12 +598,14 @@
598598
}else{
599599
@ <tr><th>User:</th><td>
600600
hyperlink_to_user(zUser,zDate,"</td></tr>");
601601
}
602602
if( zEComment ){
603
- @ <tr><th>Edited&nbsp;Comment:</th><td class="infoComment">%!W(zEComment)</td></tr>
604
- @ <tr><th>Original&nbsp;Comment:</th><td class="infoComment">%!W(zComment)</td></tr>
603
+ @ <tr><th>Edited&nbsp;Comment:</th>
604
+ @ <td class="infoComment">%!W(zEComment)</td></tr>
605
+ @ <tr><th>Original&nbsp;Comment:</th>
606
+ @ <td class="infoComment">%!W(zComment)</td></tr>
605607
}else{
606608
@ <tr><th>Comment:</th><td class="infoComment">%!W(zComment)</td></tr>
607609
}
608610
if( g.perm.Admin ){
609611
db_prepare(&q2,
@@ -1626,11 +1628,11 @@
16261628
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
16271629
if( rid==0 ) fossil_redirect_home();
16281630
if( g.perm.Admin ){
16291631
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
16301632
if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1631
- style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#delshun",
1633
+ style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#delshun",
16321634
g.zTop, zUuid);
16331635
}else{
16341636
style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
16351637
g.zTop, zUuid);
16361638
}
@@ -1849,11 +1851,11 @@
18491851
/*NOTREACHED*/
18501852
}
18511853
if( g.perm.Admin ){
18521854
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
18531855
if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1854
- style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun",
1856
+ style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#accshun",
18551857
g.zTop, zUuid);
18561858
}else{
18571859
style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
18581860
g.zTop, zUuid);
18591861
}
@@ -1926,11 +1928,11 @@
19261928
wiki_render_by_mimetype(&content, zMime);
19271929
}else if( renderAsHtml ){
19281930
@ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)"
19291931
@ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
19301932
@ sandbox="allow-same-origin"
1931
- @ onload="this.height = this.contentDocument.documentElement.scrollHeight;">
1933
+ @ onload="this.height=this.contentDocument.documentElement.scrollHeight;">
19321934
@ </iframe>
19331935
}else{
19341936
style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
19351937
blob_to_utf8_no_bom(&content, 0);
19361938
zMime = mimetype_from_content(&content);
19371939
--- src/info.c
+++ src/info.c
@@ -213,11 +213,11 @@
213 vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
214 if( vid ){
215 show_common_info(vid, "checkout:", 1, 1);
216 }
217 fossil_print("check-ins: %d\n",
218 db_int(-1, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"));
219 }else{
220 int rid;
221 rid = name_to_rid(g.argv[2]);
222 if( rid==0 ){
223 fossil_fatal("no such object: %s\n", g.argv[2]);
@@ -598,12 +598,14 @@
598 }else{
599 @ <tr><th>User:</th><td>
600 hyperlink_to_user(zUser,zDate,"</td></tr>");
601 }
602 if( zEComment ){
603 @ <tr><th>Edited&nbsp;Comment:</th><td class="infoComment">%!W(zEComment)</td></tr>
604 @ <tr><th>Original&nbsp;Comment:</th><td class="infoComment">%!W(zComment)</td></tr>
 
 
605 }else{
606 @ <tr><th>Comment:</th><td class="infoComment">%!W(zComment)</td></tr>
607 }
608 if( g.perm.Admin ){
609 db_prepare(&q2,
@@ -1626,11 +1628,11 @@
1626 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1627 if( rid==0 ) fossil_redirect_home();
1628 if( g.perm.Admin ){
1629 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1630 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1631 style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#delshun",
1632 g.zTop, zUuid);
1633 }else{
1634 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1635 g.zTop, zUuid);
1636 }
@@ -1849,11 +1851,11 @@
1849 /*NOTREACHED*/
1850 }
1851 if( g.perm.Admin ){
1852 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1853 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1854 style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun",
1855 g.zTop, zUuid);
1856 }else{
1857 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1858 g.zTop, zUuid);
1859 }
@@ -1926,11 +1928,11 @@
1926 wiki_render_by_mimetype(&content, zMime);
1927 }else if( renderAsHtml ){
1928 @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)"
1929 @ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
1930 @ sandbox="allow-same-origin"
1931 @ onload="this.height = this.contentDocument.documentElement.scrollHeight;">
1932 @ </iframe>
1933 }else{
1934 style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
1935 blob_to_utf8_no_bom(&content, 0);
1936 zMime = mimetype_from_content(&content);
1937
--- src/info.c
+++ src/info.c
@@ -213,11 +213,11 @@
213 vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
214 if( vid ){
215 show_common_info(vid, "checkout:", 1, 1);
216 }
217 fossil_print("check-ins: %d\n",
218 db_int(-1, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"));
219 }else{
220 int rid;
221 rid = name_to_rid(g.argv[2]);
222 if( rid==0 ){
223 fossil_fatal("no such object: %s\n", g.argv[2]);
@@ -598,12 +598,14 @@
598 }else{
599 @ <tr><th>User:</th><td>
600 hyperlink_to_user(zUser,zDate,"</td></tr>");
601 }
602 if( zEComment ){
603 @ <tr><th>Edited&nbsp;Comment:</th>
604 @ <td class="infoComment">%!W(zEComment)</td></tr>
605 @ <tr><th>Original&nbsp;Comment:</th>
606 @ <td class="infoComment">%!W(zComment)</td></tr>
607 }else{
608 @ <tr><th>Comment:</th><td class="infoComment">%!W(zComment)</td></tr>
609 }
610 if( g.perm.Admin ){
611 db_prepare(&q2,
@@ -1626,11 +1628,11 @@
1628 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1629 if( rid==0 ) fossil_redirect_home();
1630 if( g.perm.Admin ){
1631 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1632 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1633 style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#delshun",
1634 g.zTop, zUuid);
1635 }else{
1636 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1637 g.zTop, zUuid);
1638 }
@@ -1849,11 +1851,11 @@
1851 /*NOTREACHED*/
1852 }
1853 if( g.perm.Admin ){
1854 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1855 if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){
1856 style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#accshun",
1857 g.zTop, zUuid);
1858 }else{
1859 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1860 g.zTop, zUuid);
1861 }
@@ -1926,11 +1928,11 @@
1928 wiki_render_by_mimetype(&content, zMime);
1929 }else if( renderAsHtml ){
1930 @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)"
1931 @ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
1932 @ sandbox="allow-same-origin"
1933 @ onload="this.height=this.contentDocument.documentElement.scrollHeight;">
1934 @ </iframe>
1935 }else{
1936 style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
1937 blob_to_utf8_no_bom(&content, 0);
1938 zMime = mimetype_from_content(&content);
1939

Keyboard Shortcuts

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