Fossil SCM
Use count(x) instead of sizeof(x)/sizeof(*x)
Commit
cda8c14c164998c22f4964dd6093b5f8eca0d5b0
Parent
98cc8782e11f94d…
1 file changed
+2
-4
+2
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2005,11 +2005,11 @@ | ||
| 2005 | 2005 | if( zSearch ){ |
| 2006 | 2006 | blob_appendf(&desc, " matching \"%h\"", zSearch); |
| 2007 | 2007 | } |
| 2008 | 2008 | if( g.perm.Hyperlink ){ |
| 2009 | 2009 | static const char *const azMatchStyles[] = { |
| 2010 | - "exact","Exact", "glob","Glob", "like","Like", "regexp","Regexp" | |
| 2010 | + "exact", "Exact", "glob", "Glob", "like", "Like", "regexp", "Regexp" | |
| 2011 | 2011 | }; |
| 2012 | 2012 | double rDate; |
| 2013 | 2013 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 2014 | 2014 | if( (!zDate || !zDate[0]) && ( zAfter || zBefore ) ){ |
| 2015 | 2015 | zDate = mprintf("%s", (zAfter ? zAfter : zBefore)); |
| @@ -2049,13 +2049,11 @@ | ||
| 2049 | 2049 | style_submenu_entry("n","Max:",4,0); |
| 2050 | 2050 | timeline_y_submenu(disableY); |
| 2051 | 2051 | style_submenu_binary("v","With Files","Without Files", |
| 2052 | 2052 | zType[0]!='a' && zType[0]!='c'); |
| 2053 | 2053 | style_submenu_entry("t", "Tag Filter:", -8, 0); |
| 2054 | - style_submenu_multichoice("ms", | |
| 2055 | - sizeof(azMatchStyles) / sizeof(*azMatchStyles) / 2, | |
| 2056 | - azMatchStyles, 0); | |
| 2054 | + style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0); | |
| 2057 | 2055 | } |
| 2058 | 2056 | blob_zero(&cond); |
| 2059 | 2057 | } |
| 2060 | 2058 | if( PB("showsql") ){ |
| 2061 | 2059 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2062 | 2060 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2005,11 +2005,11 @@ | |
| 2005 | if( zSearch ){ |
| 2006 | blob_appendf(&desc, " matching \"%h\"", zSearch); |
| 2007 | } |
| 2008 | if( g.perm.Hyperlink ){ |
| 2009 | static const char *const azMatchStyles[] = { |
| 2010 | "exact","Exact", "glob","Glob", "like","Like", "regexp","Regexp" |
| 2011 | }; |
| 2012 | double rDate; |
| 2013 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 2014 | if( (!zDate || !zDate[0]) && ( zAfter || zBefore ) ){ |
| 2015 | zDate = mprintf("%s", (zAfter ? zAfter : zBefore)); |
| @@ -2049,13 +2049,11 @@ | |
| 2049 | style_submenu_entry("n","Max:",4,0); |
| 2050 | timeline_y_submenu(disableY); |
| 2051 | style_submenu_binary("v","With Files","Without Files", |
| 2052 | zType[0]!='a' && zType[0]!='c'); |
| 2053 | style_submenu_entry("t", "Tag Filter:", -8, 0); |
| 2054 | style_submenu_multichoice("ms", |
| 2055 | sizeof(azMatchStyles) / sizeof(*azMatchStyles) / 2, |
| 2056 | azMatchStyles, 0); |
| 2057 | } |
| 2058 | blob_zero(&cond); |
| 2059 | } |
| 2060 | if( PB("showsql") ){ |
| 2061 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2062 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2005,11 +2005,11 @@ | |
| 2005 | if( zSearch ){ |
| 2006 | blob_appendf(&desc, " matching \"%h\"", zSearch); |
| 2007 | } |
| 2008 | if( g.perm.Hyperlink ){ |
| 2009 | static const char *const azMatchStyles[] = { |
| 2010 | "exact", "Exact", "glob", "Glob", "like", "Like", "regexp", "Regexp" |
| 2011 | }; |
| 2012 | double rDate; |
| 2013 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 2014 | if( (!zDate || !zDate[0]) && ( zAfter || zBefore ) ){ |
| 2015 | zDate = mprintf("%s", (zAfter ? zAfter : zBefore)); |
| @@ -2049,13 +2049,11 @@ | |
| 2049 | style_submenu_entry("n","Max:",4,0); |
| 2050 | timeline_y_submenu(disableY); |
| 2051 | style_submenu_binary("v","With Files","Without Files", |
| 2052 | zType[0]!='a' && zType[0]!='c'); |
| 2053 | style_submenu_entry("t", "Tag Filter:", -8, 0); |
| 2054 | style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0); |
| 2055 | } |
| 2056 | blob_zero(&cond); |
| 2057 | } |
| 2058 | if( PB("showsql") ){ |
| 2059 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2060 |