Fossil SCM
More style fixes, e.g. c/char const/const char/
Commit
38421a9c998347c4d3f821ae90a94e2a21e11a73
Parent
25d6a5f2b39666b…
7 files changed
+2
-2
+1
-1
+2
-2
+2
-2
+1
-1
+1
-1
+6
-6
+2
-2
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -732,11 +732,11 @@ | ||
| 732 | 732 | ** temporary table named "fileage" that contains the file-id for each |
| 733 | 733 | ** files, the pathname, the check-in where the file was added, and the |
| 734 | 734 | ** mtime on that checkin. If zGlob and *zGlob then only files matching |
| 735 | 735 | ** the given glob are computed. |
| 736 | 736 | */ |
| 737 | -int compute_fileage(int vid, char const * zGlob){ | |
| 737 | +int compute_fileage(int vid, const char* zGlob){ | |
| 738 | 738 | Manifest *pManifest; |
| 739 | 739 | ManifestFile *pFile; |
| 740 | 740 | int nFile = 0; |
| 741 | 741 | double vmtime; |
| 742 | 742 | Stmt ins; |
| @@ -815,11 +815,11 @@ | ||
| 815 | 815 | */ |
| 816 | 816 | void fileage_page(void){ |
| 817 | 817 | int rid; |
| 818 | 818 | const char *zName; |
| 819 | 819 | char *zBaseTime; |
| 820 | - char const * zGlob; | |
| 820 | + const char *zGlob; | |
| 821 | 821 | Stmt q; |
| 822 | 822 | double baseTime; |
| 823 | 823 | int lastMid = -1; |
| 824 | 824 | login_check_credentials(); |
| 825 | 825 | if( !g.perm.Read ){ login_needed(); return; } |
| 826 | 826 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -732,11 +732,11 @@ | |
| 732 | ** temporary table named "fileage" that contains the file-id for each |
| 733 | ** files, the pathname, the check-in where the file was added, and the |
| 734 | ** mtime on that checkin. If zGlob and *zGlob then only files matching |
| 735 | ** the given glob are computed. |
| 736 | */ |
| 737 | int compute_fileage(int vid, char const * zGlob){ |
| 738 | Manifest *pManifest; |
| 739 | ManifestFile *pFile; |
| 740 | int nFile = 0; |
| 741 | double vmtime; |
| 742 | Stmt ins; |
| @@ -815,11 +815,11 @@ | |
| 815 | */ |
| 816 | void fileage_page(void){ |
| 817 | int rid; |
| 818 | const char *zName; |
| 819 | char *zBaseTime; |
| 820 | char const * zGlob; |
| 821 | Stmt q; |
| 822 | double baseTime; |
| 823 | int lastMid = -1; |
| 824 | login_check_credentials(); |
| 825 | if( !g.perm.Read ){ login_needed(); return; } |
| 826 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -732,11 +732,11 @@ | |
| 732 | ** temporary table named "fileage" that contains the file-id for each |
| 733 | ** files, the pathname, the check-in where the file was added, and the |
| 734 | ** mtime on that checkin. If zGlob and *zGlob then only files matching |
| 735 | ** the given glob are computed. |
| 736 | */ |
| 737 | int compute_fileage(int vid, const char* zGlob){ |
| 738 | Manifest *pManifest; |
| 739 | ManifestFile *pFile; |
| 740 | int nFile = 0; |
| 741 | double vmtime; |
| 742 | Stmt ins; |
| @@ -815,11 +815,11 @@ | |
| 815 | */ |
| 816 | void fileage_page(void){ |
| 817 | int rid; |
| 818 | const char *zName; |
| 819 | char *zBaseTime; |
| 820 | const char *zGlob; |
| 821 | Stmt q; |
| 822 | double baseTime; |
| 823 | int lastMid = -1; |
| 824 | login_check_credentials(); |
| 825 | if( !g.perm.Read ){ login_needed(); return; } |
| 826 |
+1
-1
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -448,11 +448,11 @@ | ||
| 448 | 448 | /* |
| 449 | 449 | ** Translate a captcha seed value into the captcha password string. |
| 450 | 450 | ** The returned string is static and overwritten on each call to |
| 451 | 451 | ** this function. |
| 452 | 452 | */ |
| 453 | -char const *captcha_decode(unsigned int seed){ | |
| 453 | +const char *captcha_decode(unsigned int seed){ | |
| 454 | 454 | const char *zSecret; |
| 455 | 455 | const char *z; |
| 456 | 456 | Blob b; |
| 457 | 457 | static char zRes[20]; |
| 458 | 458 | |
| 459 | 459 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -448,11 +448,11 @@ | |
| 448 | /* |
| 449 | ** Translate a captcha seed value into the captcha password string. |
| 450 | ** The returned string is static and overwritten on each call to |
| 451 | ** this function. |
| 452 | */ |
| 453 | char const *captcha_decode(unsigned int seed){ |
| 454 | const char *zSecret; |
| 455 | const char *z; |
| 456 | Blob b; |
| 457 | static char zRes[20]; |
| 458 | |
| 459 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -448,11 +448,11 @@ | |
| 448 | /* |
| 449 | ** Translate a captcha seed value into the captcha password string. |
| 450 | ** The returned string is static and overwritten on each call to |
| 451 | ** this function. |
| 452 | */ |
| 453 | const char *captcha_decode(unsigned int seed){ |
| 454 | const char *zSecret; |
| 455 | const char *z; |
| 456 | Blob b; |
| 457 | static char zRes[20]; |
| 458 | |
| 459 |
+2
-2
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -214,12 +214,12 @@ | ||
| 214 | 214 | |
| 215 | 215 | /* |
| 216 | 216 | ** Compare two strings for sorting. |
| 217 | 217 | */ |
| 218 | 218 | static int string_cmp(const void *pLeft, const void *pRight){ |
| 219 | - const char *zLeft = *(char const **)pLeft; | |
| 220 | - const char *zRight = *(char const **)pRight; | |
| 219 | + const char *zLeft = *(const char **)pLeft; | |
| 220 | + const char *zRight = *(const char **)pRight; | |
| 221 | 221 | return fossil_strcmp(zLeft, zRight); |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | /* Forward reference */ |
| 225 | 225 | static void import_prior_files(void); |
| 226 | 226 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -214,12 +214,12 @@ | |
| 214 | |
| 215 | /* |
| 216 | ** Compare two strings for sorting. |
| 217 | */ |
| 218 | static int string_cmp(const void *pLeft, const void *pRight){ |
| 219 | const char *zLeft = *(char const **)pLeft; |
| 220 | const char *zRight = *(char const **)pRight; |
| 221 | return fossil_strcmp(zLeft, zRight); |
| 222 | } |
| 223 | |
| 224 | /* Forward reference */ |
| 225 | static void import_prior_files(void); |
| 226 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -214,12 +214,12 @@ | |
| 214 | |
| 215 | /* |
| 216 | ** Compare two strings for sorting. |
| 217 | */ |
| 218 | static int string_cmp(const void *pLeft, const void *pRight){ |
| 219 | const char *zLeft = *(const char **)pLeft; |
| 220 | const char *zRight = *(const char **)pRight; |
| 221 | return fossil_strcmp(zLeft, zRight); |
| 222 | } |
| 223 | |
| 224 | /* Forward reference */ |
| 225 | static void import_prior_files(void); |
| 226 |
+2
-2
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1920,12 +1920,12 @@ | ||
| 1920 | 1920 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1921 | 1921 | p->zTicketUuid); |
| 1922 | 1922 | } |
| 1923 | 1923 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1924 | 1924 | char *zComment = 0; |
| 1925 | - char const isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; | |
| 1926 | - char const attachToType = fossil_is_uuid(p->zAttachTarget) | |
| 1925 | + const char isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; | |
| 1926 | + const char attachToType = fossil_is_uuid(p->zAttachTarget) | |
| 1927 | 1927 | ? 't' /* attach to ticket */ |
| 1928 | 1928 | : 'w' /* attach to wiki page */; |
| 1929 | 1929 | db_multi_exec( |
| 1930 | 1930 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1931 | 1931 | "filename, comment, user)" |
| 1932 | 1932 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1920,12 +1920,12 @@ | |
| 1920 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1921 | p->zTicketUuid); |
| 1922 | } |
| 1923 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1924 | char *zComment = 0; |
| 1925 | char const isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; |
| 1926 | char const attachToType = fossil_is_uuid(p->zAttachTarget) |
| 1927 | ? 't' /* attach to ticket */ |
| 1928 | : 'w' /* attach to wiki page */; |
| 1929 | db_multi_exec( |
| 1930 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1931 | "filename, comment, user)" |
| 1932 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1920,12 +1920,12 @@ | |
| 1920 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1921 | p->zTicketUuid); |
| 1922 | } |
| 1923 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1924 | char *zComment = 0; |
| 1925 | const char isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; |
| 1926 | const char attachToType = fossil_is_uuid(p->zAttachTarget) |
| 1927 | ? 't' /* attach to ticket */ |
| 1928 | : 'w' /* attach to wiki page */; |
| 1929 | db_multi_exec( |
| 1930 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1931 | "filename, comment, user)" |
| 1932 |
+1
-1
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -309,11 +309,11 @@ | ||
| 309 | 309 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 310 | 310 | ** negative value is returned. On success the rid is returned and |
| 311 | 311 | ** pUuid (if it is not NULL) is set to the a newly-allocated string, |
| 312 | 312 | ** the full UUID, which must eventually be free()d by the caller. |
| 313 | 313 | */ |
| 314 | -int name_to_uuid2(char const *zName, const char *zType, char **pUuid){ | |
| 314 | +int name_to_uuid2(const char *zName, const char *zType, char **pUuid){ | |
| 315 | 315 | int rid = symbolic_name_to_rid(zName, zType); |
| 316 | 316 | if((rid>0) && pUuid){ |
| 317 | 317 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 318 | 318 | } |
| 319 | 319 | return rid; |
| 320 | 320 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 310 | ** negative value is returned. On success the rid is returned and |
| 311 | ** pUuid (if it is not NULL) is set to the a newly-allocated string, |
| 312 | ** the full UUID, which must eventually be free()d by the caller. |
| 313 | */ |
| 314 | int name_to_uuid2(char const *zName, const char *zType, char **pUuid){ |
| 315 | int rid = symbolic_name_to_rid(zName, zType); |
| 316 | if((rid>0) && pUuid){ |
| 317 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 318 | } |
| 319 | return rid; |
| 320 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 310 | ** negative value is returned. On success the rid is returned and |
| 311 | ** pUuid (if it is not NULL) is set to the a newly-allocated string, |
| 312 | ** the full UUID, which must eventually be free()d by the caller. |
| 313 | */ |
| 314 | int name_to_uuid2(const char *zName, const char *zType, char **pUuid){ |
| 315 | int rid = symbolic_name_to_rid(zName, zType); |
| 316 | if((rid>0) && pUuid){ |
| 317 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 318 | } |
| 319 | return rid; |
| 320 |
+1
-1
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -191,11 +191,11 @@ | ||
| 191 | 191 | Stmt q; |
| 192 | 192 | int iBest; |
| 193 | 193 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 194 | 194 | off the end of the |
| 195 | 195 | results. */ |
| 196 | - char const * zLimit = find_option("limit","n",1); | |
| 196 | + const char *zLimit = find_option("limit","n",1); | |
| 197 | 197 | const char *zWidth = find_option("width","W",1); |
| 198 | 198 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 199 | 199 | lines/entries to list */ |
| 200 | 200 | int width; |
| 201 | 201 | if( zWidth ){ |
| 202 | 202 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -191,11 +191,11 @@ | |
| 191 | Stmt q; |
| 192 | int iBest; |
| 193 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 194 | off the end of the |
| 195 | results. */ |
| 196 | char const * zLimit = find_option("limit","n",1); |
| 197 | const char *zWidth = find_option("width","W",1); |
| 198 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 199 | lines/entries to list */ |
| 200 | int width; |
| 201 | if( zWidth ){ |
| 202 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -191,11 +191,11 @@ | |
| 191 | Stmt q; |
| 192 | int iBest; |
| 193 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 194 | off the end of the |
| 195 | results. */ |
| 196 | const char *zLimit = find_option("limit","n",1); |
| 197 | const char *zWidth = find_option("width","W",1); |
| 198 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 199 | lines/entries to list */ |
| 200 | int width; |
| 201 | if( zWidth ){ |
| 202 |
+6
-6
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -388,11 +388,11 @@ | ||
| 388 | 388 | } |
| 389 | 389 | style_ad_unit(); |
| 390 | 390 | @ <div class="content"> |
| 391 | 391 | cgi_destination(CGI_BODY); |
| 392 | 392 | |
| 393 | - if (sideboxUsed) { | |
| 393 | + if( sideboxUsed ){ | |
| 394 | 394 | /* Put the footer at the bottom of the page. |
| 395 | 395 | ** the additional clear/both is needed to extend the content |
| 396 | 396 | ** part to the end of an optional sidebox. |
| 397 | 397 | */ |
| 398 | 398 | @ <div class="endContent"></div> |
| @@ -657,13 +657,13 @@ | ||
| 657 | 657 | /* The following table contains bits of default CSS that must |
| 658 | 658 | ** be included if they are not found in the application-defined |
| 659 | 659 | ** CSS. |
| 660 | 660 | */ |
| 661 | 661 | const struct strctCssDefaults { |
| 662 | - char const * const elementClass; /* Name of element needed */ | |
| 663 | - char const * const comment; /* Comment text */ | |
| 664 | - char const * const value; /* CSS text */ | |
| 662 | + const char *elementClass; /* Name of element needed */ | |
| 663 | + const char *comment; /* Comment text */ | |
| 664 | + const char *value; /* CSS text */ | |
| 665 | 665 | } cssDefaultList[] = { |
| 666 | 666 | { "", |
| 667 | 667 | "", |
| 668 | 668 | zDefaultCSS |
| 669 | 669 | }, |
| @@ -1208,12 +1208,12 @@ | ||
| 1208 | 1208 | ** Append all of the default CSS to the CGI output. |
| 1209 | 1209 | */ |
| 1210 | 1210 | void cgi_append_default_css(void) { |
| 1211 | 1211 | int i; |
| 1212 | 1212 | |
| 1213 | - for (i=0;cssDefaultList[i].elementClass;i++){ | |
| 1214 | - if (cssDefaultList[i].elementClass[0]){ | |
| 1213 | + for( i=0; cssDefaultList[i].elementClass; i++ ){ | |
| 1214 | + if( cssDefaultList[i].elementClass[0] ){ | |
| 1215 | 1215 | cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 1216 | 1216 | cssDefaultList[i].comment, |
| 1217 | 1217 | cssDefaultList[i].elementClass, |
| 1218 | 1218 | cssDefaultList[i].value |
| 1219 | 1219 | ); |
| 1220 | 1220 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -388,11 +388,11 @@ | |
| 388 | } |
| 389 | style_ad_unit(); |
| 390 | @ <div class="content"> |
| 391 | cgi_destination(CGI_BODY); |
| 392 | |
| 393 | if (sideboxUsed) { |
| 394 | /* Put the footer at the bottom of the page. |
| 395 | ** the additional clear/both is needed to extend the content |
| 396 | ** part to the end of an optional sidebox. |
| 397 | */ |
| 398 | @ <div class="endContent"></div> |
| @@ -657,13 +657,13 @@ | |
| 657 | /* The following table contains bits of default CSS that must |
| 658 | ** be included if they are not found in the application-defined |
| 659 | ** CSS. |
| 660 | */ |
| 661 | const struct strctCssDefaults { |
| 662 | char const * const elementClass; /* Name of element needed */ |
| 663 | char const * const comment; /* Comment text */ |
| 664 | char const * const value; /* CSS text */ |
| 665 | } cssDefaultList[] = { |
| 666 | { "", |
| 667 | "", |
| 668 | zDefaultCSS |
| 669 | }, |
| @@ -1208,12 +1208,12 @@ | |
| 1208 | ** Append all of the default CSS to the CGI output. |
| 1209 | */ |
| 1210 | void cgi_append_default_css(void) { |
| 1211 | int i; |
| 1212 | |
| 1213 | for (i=0;cssDefaultList[i].elementClass;i++){ |
| 1214 | if (cssDefaultList[i].elementClass[0]){ |
| 1215 | cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 1216 | cssDefaultList[i].comment, |
| 1217 | cssDefaultList[i].elementClass, |
| 1218 | cssDefaultList[i].value |
| 1219 | ); |
| 1220 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -388,11 +388,11 @@ | |
| 388 | } |
| 389 | style_ad_unit(); |
| 390 | @ <div class="content"> |
| 391 | cgi_destination(CGI_BODY); |
| 392 | |
| 393 | if( sideboxUsed ){ |
| 394 | /* Put the footer at the bottom of the page. |
| 395 | ** the additional clear/both is needed to extend the content |
| 396 | ** part to the end of an optional sidebox. |
| 397 | */ |
| 398 | @ <div class="endContent"></div> |
| @@ -657,13 +657,13 @@ | |
| 657 | /* The following table contains bits of default CSS that must |
| 658 | ** be included if they are not found in the application-defined |
| 659 | ** CSS. |
| 660 | */ |
| 661 | const struct strctCssDefaults { |
| 662 | const char *elementClass; /* Name of element needed */ |
| 663 | const char *comment; /* Comment text */ |
| 664 | const char *value; /* CSS text */ |
| 665 | } cssDefaultList[] = { |
| 666 | { "", |
| 667 | "", |
| 668 | zDefaultCSS |
| 669 | }, |
| @@ -1208,12 +1208,12 @@ | |
| 1208 | ** Append all of the default CSS to the CGI output. |
| 1209 | */ |
| 1210 | void cgi_append_default_css(void) { |
| 1211 | int i; |
| 1212 | |
| 1213 | for( i=0; cssDefaultList[i].elementClass; i++ ){ |
| 1214 | if( cssDefaultList[i].elementClass[0] ){ |
| 1215 | cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 1216 | cssDefaultList[i].comment, |
| 1217 | cssDefaultList[i].elementClass, |
| 1218 | cssDefaultList[i].value |
| 1219 | ); |
| 1220 |