Fossil SCM
Do not use strcmp() for comparison since the sort order can vary by locale. Use fossil_strcmp() instead. Ticket [3f0216560679fd41].
Commit
32ad9a1584a16f09fff78563d789b2dbc6b4bae5
Parent
5a4dc2239b5fb3f…
23 files changed
+1
-1
+20
-20
+1
-1
+1
-1
+4
-4
+2
-2
+1
-1
+2
-2
+5
-5
+3
-18
+21
+2
-2
+7
-7
+5
-5
+1
-1
+1
-1
+3
-3
+2
-2
+2
-2
+2
-2
+5
-5
+3
-3
+1
-1
~
src/bisect.c
~
src/cgi.c
~
src/configure.c
~
src/content.c
~
src/db.c
~
src/http.c
~
src/import.c
~
src/info.c
~
src/login.c
~
src/main.c
~
src/printf.c
~
src/report.c
~
src/setup.c
~
src/skins.c
~
src/tar.c
~
src/timeline.c
~
src/tkt.c
~
src/update.c
~
src/url.c
~
src/wiki.c
~
src/wikiformat.c
~
src/xfer.c
~
src/zip.c
+1
-1
| --- src/bisect.c | ||
| +++ src/bisect.c | ||
| @@ -72,11 +72,11 @@ | ||
| 72 | 72 | */ |
| 73 | 73 | int bisect_option(const char *zName){ |
| 74 | 74 | unsigned int i; |
| 75 | 75 | int r = -1; |
| 76 | 76 | for(i=0; i<sizeof(aBisectOption)/sizeof(aBisectOption[0]); i++){ |
| 77 | - if( strcmp(zName, aBisectOption[i].zName)==0 ){ | |
| 77 | + if( fossil_strcmp(zName, aBisectOption[i].zName)==0 ){ | |
| 78 | 78 | char *zLabel = mprintf("bisect-%s", zName); |
| 79 | 79 | char *z = db_lget(zLabel, (char*)aBisectOption[i].zDefault); |
| 80 | 80 | if( is_truth(z) ) r = 1; |
| 81 | 81 | if( is_false(z) ) r = 0; |
| 82 | 82 | if( r<0 ) r = is_truth(aBisectOption[i].zDefault); |
| 83 | 83 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -72,11 +72,11 @@ | |
| 72 | */ |
| 73 | int bisect_option(const char *zName){ |
| 74 | unsigned int i; |
| 75 | int r = -1; |
| 76 | for(i=0; i<sizeof(aBisectOption)/sizeof(aBisectOption[0]); i++){ |
| 77 | if( strcmp(zName, aBisectOption[i].zName)==0 ){ |
| 78 | char *zLabel = mprintf("bisect-%s", zName); |
| 79 | char *z = db_lget(zLabel, (char*)aBisectOption[i].zDefault); |
| 80 | if( is_truth(z) ) r = 1; |
| 81 | if( is_false(z) ) r = 0; |
| 82 | if( r<0 ) r = is_truth(aBisectOption[i].zDefault); |
| 83 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -72,11 +72,11 @@ | |
| 72 | */ |
| 73 | int bisect_option(const char *zName){ |
| 74 | unsigned int i; |
| 75 | int r = -1; |
| 76 | for(i=0; i<sizeof(aBisectOption)/sizeof(aBisectOption[0]); i++){ |
| 77 | if( fossil_strcmp(zName, aBisectOption[i].zName)==0 ){ |
| 78 | char *zLabel = mprintf("bisect-%s", zName); |
| 79 | char *z = db_lget(zLabel, (char*)aBisectOption[i].zDefault); |
| 80 | if( is_truth(z) ) r = 1; |
| 81 | if( is_false(z) ) r = 0; |
| 82 | if( r<0 ) r = is_truth(aBisectOption[i].zDefault); |
| 83 |
+20
-20
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -314,11 +314,11 @@ | ||
| 314 | 314 | |
| 315 | 315 | /* Content intended for logged in users should only be cached in |
| 316 | 316 | ** the browser, not some shared location. |
| 317 | 317 | */ |
| 318 | 318 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 319 | - if( strcmp(zContentType,"application/x-fossil")==0 ){ | |
| 319 | + if( fossil_strcmp(zContentType,"application/x-fossil")==0 ){ | |
| 320 | 320 | cgi_combine_header_and_body(); |
| 321 | 321 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | if( iReplyStatus != 304 ) { |
| @@ -423,11 +423,11 @@ | ||
| 423 | 423 | ** Replace a parameter with a new value. |
| 424 | 424 | */ |
| 425 | 425 | void cgi_replace_parameter(const char *zName, const char *zValue){ |
| 426 | 426 | int i; |
| 427 | 427 | for(i=0; i<nUsedQP; i++){ |
| 428 | - if( strcmp(aParamQP[i].zName,zName)==0 ){ | |
| 428 | + if( fossil_strcmp(aParamQP[i].zName,zName)==0 ){ | |
| 429 | 429 | aParamQP[i].zValue = zValue; |
| 430 | 430 | return; |
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | cgi_set_parameter_nocopy(zName, zValue); |
| @@ -685,26 +685,26 @@ | ||
| 685 | 685 | |
| 686 | 686 | len = atoi(PD("CONTENT_LENGTH", "0")); |
| 687 | 687 | g.zContentType = zType = P("CONTENT_TYPE"); |
| 688 | 688 | if( len>0 && zType ){ |
| 689 | 689 | blob_zero(&g.cgiIn); |
| 690 | - if( strcmp(zType,"application/x-www-form-urlencoded")==0 | |
| 690 | + if( fossil_strcmp(zType,"application/x-www-form-urlencoded")==0 | |
| 691 | 691 | || strncmp(zType,"multipart/form-data",19)==0 ){ |
| 692 | 692 | z = fossil_malloc( len+1 ); |
| 693 | 693 | len = fread(z, 1, len, g.httpIn); |
| 694 | 694 | z[len] = 0; |
| 695 | 695 | if( zType[0]=='a' ){ |
| 696 | 696 | add_param_list(z, '&'); |
| 697 | 697 | }else{ |
| 698 | 698 | process_multipart_form_data(z, len); |
| 699 | 699 | } |
| 700 | - }else if( strcmp(zType, "application/x-fossil")==0 ){ | |
| 700 | + }else if( fossil_strcmp(zType, "application/x-fossil")==0 ){ | |
| 701 | 701 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 702 | 702 | blob_uncompress(&g.cgiIn, &g.cgiIn); |
| 703 | - }else if( strcmp(zType, "application/x-fossil-debug")==0 ){ | |
| 703 | + }else if( fossil_strcmp(zType, "application/x-fossil-debug")==0 ){ | |
| 704 | 704 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 705 | - }else if( strcmp(zType, "application/x-fossil-uncompressed")==0 ){ | |
| 705 | + }else if( fossil_strcmp(zType, "application/x-fossil-uncompressed")==0 ){ | |
| 706 | 706 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 707 | 707 | } |
| 708 | 708 | } |
| 709 | 709 | |
| 710 | 710 | z = (char*)P("HTTP_COOKIE"); |
| @@ -720,11 +720,11 @@ | ||
| 720 | 720 | */ |
| 721 | 721 | static int qparam_compare(const void *a, const void *b){ |
| 722 | 722 | struct QParam *pA = (struct QParam*)a; |
| 723 | 723 | struct QParam *pB = (struct QParam*)b; |
| 724 | 724 | int c; |
| 725 | - c = strcmp(pA->zName, pB->zName); | |
| 725 | + c = fossil_strcmp(pA->zName, pB->zName); | |
| 726 | 726 | if( c==0 ){ |
| 727 | 727 | c = pA->seq - pB->seq; |
| 728 | 728 | } |
| 729 | 729 | return c; |
| 730 | 730 | } |
| @@ -749,11 +749,11 @@ | ||
| 749 | 749 | /* After sorting, remove duplicate parameters. The secondary sort |
| 750 | 750 | ** key is aParamQP[].seq and we keep the first entry. That means |
| 751 | 751 | ** with duplicate calls to cgi_set_parameter() the second and |
| 752 | 752 | ** subsequent calls are effectively no-ops. */ |
| 753 | 753 | for(i=j=1; i<nUsedQP; i++){ |
| 754 | - if( strcmp(aParamQP[i].zName,aParamQP[i-1].zName)==0 ){ | |
| 754 | + if( fossil_strcmp(aParamQP[i].zName,aParamQP[i-1].zName)==0 ){ | |
| 755 | 755 | continue; |
| 756 | 756 | } |
| 757 | 757 | if( j<i ){ |
| 758 | 758 | memcpy(&aParamQP[j], &aParamQP[i], sizeof(aParamQP[j])); |
| 759 | 759 | } |
| @@ -765,11 +765,11 @@ | ||
| 765 | 765 | /* Do a binary search for a matching query parameter */ |
| 766 | 766 | lo = 0; |
| 767 | 767 | hi = nUsedQP-1; |
| 768 | 768 | while( lo<=hi ){ |
| 769 | 769 | mid = (lo+hi)/2; |
| 770 | - c = strcmp(aParamQP[mid].zName, zName); | |
| 770 | + c = fossil_strcmp(aParamQP[mid].zName, zName); | |
| 771 | 771 | if( c==0 ){ |
| 772 | 772 | CGIDEBUG(("mem-match [%s] = [%s]\n", zName, aParamQP[mid].zValue)); |
| 773 | 773 | return aParamQP[mid].zValue; |
| 774 | 774 | }else if( c>0 ){ |
| 775 | 775 | hi = mid-1; |
| @@ -976,12 +976,12 @@ | ||
| 976 | 976 | } |
| 977 | 977 | zToken = extract_token(zLine, &z); |
| 978 | 978 | if( zToken==0 ){ |
| 979 | 979 | malformed_request(); |
| 980 | 980 | } |
| 981 | - if( strcmp(zToken,"GET")!=0 && strcmp(zToken,"POST")!=0 | |
| 982 | - && strcmp(zToken,"HEAD")!=0 ){ | |
| 981 | + if( fossil_strcmp(zToken,"GET")!=0 && fossil_strcmp(zToken,"POST")!=0 | |
| 982 | + && fossil_strcmp(zToken,"HEAD")!=0 ){ | |
| 983 | 983 | malformed_request(); |
| 984 | 984 | } |
| 985 | 985 | cgi_setenv("GATEWAY_INTERFACE","CGI/1.0"); |
| 986 | 986 | cgi_setenv("REQUEST_METHOD",zToken); |
| 987 | 987 | zToken = extract_token(z, &z); |
| @@ -1017,29 +1017,29 @@ | ||
| 1017 | 1017 | while( i>0 && fossil_isspace(zVal[i-1]) ){ i--; } |
| 1018 | 1018 | zVal[i] = 0; |
| 1019 | 1019 | for(i=0; zFieldName[i]; i++){ |
| 1020 | 1020 | zFieldName[i] = fossil_tolower(zFieldName[i]); |
| 1021 | 1021 | } |
| 1022 | - if( strcmp(zFieldName,"content-length:")==0 ){ | |
| 1022 | + if( fossil_strcmp(zFieldName,"content-length:")==0 ){ | |
| 1023 | 1023 | cgi_setenv("CONTENT_LENGTH", zVal); |
| 1024 | - }else if( strcmp(zFieldName,"content-type:")==0 ){ | |
| 1024 | + }else if( fossil_strcmp(zFieldName,"content-type:")==0 ){ | |
| 1025 | 1025 | cgi_setenv("CONTENT_TYPE", zVal); |
| 1026 | - }else if( strcmp(zFieldName,"cookie:")==0 ){ | |
| 1026 | + }else if( fossil_strcmp(zFieldName,"cookie:")==0 ){ | |
| 1027 | 1027 | cgi_setenv("HTTP_COOKIE", zVal); |
| 1028 | - }else if( strcmp(zFieldName,"https:")==0 ){ | |
| 1028 | + }else if( fossil_strcmp(zFieldName,"https:")==0 ){ | |
| 1029 | 1029 | cgi_setenv("HTTPS", zVal); |
| 1030 | - }else if( strcmp(zFieldName,"host:")==0 ){ | |
| 1030 | + }else if( fossil_strcmp(zFieldName,"host:")==0 ){ | |
| 1031 | 1031 | cgi_setenv("HTTP_HOST", zVal); |
| 1032 | - }else if( strcmp(zFieldName,"if-none-match:")==0 ){ | |
| 1032 | + }else if( fossil_strcmp(zFieldName,"if-none-match:")==0 ){ | |
| 1033 | 1033 | cgi_setenv("HTTP_IF_NONE_MATCH", zVal); |
| 1034 | - }else if( strcmp(zFieldName,"if-modified-since:")==0 ){ | |
| 1034 | + }else if( fossil_strcmp(zFieldName,"if-modified-since:")==0 ){ | |
| 1035 | 1035 | cgi_setenv("HTTP_IF_MODIFIED_SINCE", zVal); |
| 1036 | 1036 | } |
| 1037 | 1037 | #if 0 |
| 1038 | - else if( strcmp(zFieldName,"referer:")==0 ){ | |
| 1038 | + else if( fossil_strcmp(zFieldName,"referer:")==0 ){ | |
| 1039 | 1039 | cgi_setenv("HTTP_REFERER", zVal); |
| 1040 | - }else if( strcmp(zFieldName,"user-agent:")==0 ){ | |
| 1040 | + }else if( fossil_strcmp(zFieldName,"user-agent:")==0 ){ | |
| 1041 | 1041 | cgi_setenv("HTTP_USER_AGENT", zVal); |
| 1042 | 1042 | } |
| 1043 | 1043 | #endif |
| 1044 | 1044 | } |
| 1045 | 1045 | |
| 1046 | 1046 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -314,11 +314,11 @@ | |
| 314 | |
| 315 | /* Content intended for logged in users should only be cached in |
| 316 | ** the browser, not some shared location. |
| 317 | */ |
| 318 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 319 | if( strcmp(zContentType,"application/x-fossil")==0 ){ |
| 320 | cgi_combine_header_and_body(); |
| 321 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 322 | } |
| 323 | |
| 324 | if( iReplyStatus != 304 ) { |
| @@ -423,11 +423,11 @@ | |
| 423 | ** Replace a parameter with a new value. |
| 424 | */ |
| 425 | void cgi_replace_parameter(const char *zName, const char *zValue){ |
| 426 | int i; |
| 427 | for(i=0; i<nUsedQP; i++){ |
| 428 | if( strcmp(aParamQP[i].zName,zName)==0 ){ |
| 429 | aParamQP[i].zValue = zValue; |
| 430 | return; |
| 431 | } |
| 432 | } |
| 433 | cgi_set_parameter_nocopy(zName, zValue); |
| @@ -685,26 +685,26 @@ | |
| 685 | |
| 686 | len = atoi(PD("CONTENT_LENGTH", "0")); |
| 687 | g.zContentType = zType = P("CONTENT_TYPE"); |
| 688 | if( len>0 && zType ){ |
| 689 | blob_zero(&g.cgiIn); |
| 690 | if( strcmp(zType,"application/x-www-form-urlencoded")==0 |
| 691 | || strncmp(zType,"multipart/form-data",19)==0 ){ |
| 692 | z = fossil_malloc( len+1 ); |
| 693 | len = fread(z, 1, len, g.httpIn); |
| 694 | z[len] = 0; |
| 695 | if( zType[0]=='a' ){ |
| 696 | add_param_list(z, '&'); |
| 697 | }else{ |
| 698 | process_multipart_form_data(z, len); |
| 699 | } |
| 700 | }else if( strcmp(zType, "application/x-fossil")==0 ){ |
| 701 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 702 | blob_uncompress(&g.cgiIn, &g.cgiIn); |
| 703 | }else if( strcmp(zType, "application/x-fossil-debug")==0 ){ |
| 704 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 705 | }else if( strcmp(zType, "application/x-fossil-uncompressed")==0 ){ |
| 706 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | z = (char*)P("HTTP_COOKIE"); |
| @@ -720,11 +720,11 @@ | |
| 720 | */ |
| 721 | static int qparam_compare(const void *a, const void *b){ |
| 722 | struct QParam *pA = (struct QParam*)a; |
| 723 | struct QParam *pB = (struct QParam*)b; |
| 724 | int c; |
| 725 | c = strcmp(pA->zName, pB->zName); |
| 726 | if( c==0 ){ |
| 727 | c = pA->seq - pB->seq; |
| 728 | } |
| 729 | return c; |
| 730 | } |
| @@ -749,11 +749,11 @@ | |
| 749 | /* After sorting, remove duplicate parameters. The secondary sort |
| 750 | ** key is aParamQP[].seq and we keep the first entry. That means |
| 751 | ** with duplicate calls to cgi_set_parameter() the second and |
| 752 | ** subsequent calls are effectively no-ops. */ |
| 753 | for(i=j=1; i<nUsedQP; i++){ |
| 754 | if( strcmp(aParamQP[i].zName,aParamQP[i-1].zName)==0 ){ |
| 755 | continue; |
| 756 | } |
| 757 | if( j<i ){ |
| 758 | memcpy(&aParamQP[j], &aParamQP[i], sizeof(aParamQP[j])); |
| 759 | } |
| @@ -765,11 +765,11 @@ | |
| 765 | /* Do a binary search for a matching query parameter */ |
| 766 | lo = 0; |
| 767 | hi = nUsedQP-1; |
| 768 | while( lo<=hi ){ |
| 769 | mid = (lo+hi)/2; |
| 770 | c = strcmp(aParamQP[mid].zName, zName); |
| 771 | if( c==0 ){ |
| 772 | CGIDEBUG(("mem-match [%s] = [%s]\n", zName, aParamQP[mid].zValue)); |
| 773 | return aParamQP[mid].zValue; |
| 774 | }else if( c>0 ){ |
| 775 | hi = mid-1; |
| @@ -976,12 +976,12 @@ | |
| 976 | } |
| 977 | zToken = extract_token(zLine, &z); |
| 978 | if( zToken==0 ){ |
| 979 | malformed_request(); |
| 980 | } |
| 981 | if( strcmp(zToken,"GET")!=0 && strcmp(zToken,"POST")!=0 |
| 982 | && strcmp(zToken,"HEAD")!=0 ){ |
| 983 | malformed_request(); |
| 984 | } |
| 985 | cgi_setenv("GATEWAY_INTERFACE","CGI/1.0"); |
| 986 | cgi_setenv("REQUEST_METHOD",zToken); |
| 987 | zToken = extract_token(z, &z); |
| @@ -1017,29 +1017,29 @@ | |
| 1017 | while( i>0 && fossil_isspace(zVal[i-1]) ){ i--; } |
| 1018 | zVal[i] = 0; |
| 1019 | for(i=0; zFieldName[i]; i++){ |
| 1020 | zFieldName[i] = fossil_tolower(zFieldName[i]); |
| 1021 | } |
| 1022 | if( strcmp(zFieldName,"content-length:")==0 ){ |
| 1023 | cgi_setenv("CONTENT_LENGTH", zVal); |
| 1024 | }else if( strcmp(zFieldName,"content-type:")==0 ){ |
| 1025 | cgi_setenv("CONTENT_TYPE", zVal); |
| 1026 | }else if( strcmp(zFieldName,"cookie:")==0 ){ |
| 1027 | cgi_setenv("HTTP_COOKIE", zVal); |
| 1028 | }else if( strcmp(zFieldName,"https:")==0 ){ |
| 1029 | cgi_setenv("HTTPS", zVal); |
| 1030 | }else if( strcmp(zFieldName,"host:")==0 ){ |
| 1031 | cgi_setenv("HTTP_HOST", zVal); |
| 1032 | }else if( strcmp(zFieldName,"if-none-match:")==0 ){ |
| 1033 | cgi_setenv("HTTP_IF_NONE_MATCH", zVal); |
| 1034 | }else if( strcmp(zFieldName,"if-modified-since:")==0 ){ |
| 1035 | cgi_setenv("HTTP_IF_MODIFIED_SINCE", zVal); |
| 1036 | } |
| 1037 | #if 0 |
| 1038 | else if( strcmp(zFieldName,"referer:")==0 ){ |
| 1039 | cgi_setenv("HTTP_REFERER", zVal); |
| 1040 | }else if( strcmp(zFieldName,"user-agent:")==0 ){ |
| 1041 | cgi_setenv("HTTP_USER_AGENT", zVal); |
| 1042 | } |
| 1043 | #endif |
| 1044 | } |
| 1045 | |
| 1046 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -314,11 +314,11 @@ | |
| 314 | |
| 315 | /* Content intended for logged in users should only be cached in |
| 316 | ** the browser, not some shared location. |
| 317 | */ |
| 318 | fprintf(g.httpOut, "Content-Type: %s; charset=utf-8\r\n", zContentType); |
| 319 | if( fossil_strcmp(zContentType,"application/x-fossil")==0 ){ |
| 320 | cgi_combine_header_and_body(); |
| 321 | blob_compress(&cgiContent[0], &cgiContent[0]); |
| 322 | } |
| 323 | |
| 324 | if( iReplyStatus != 304 ) { |
| @@ -423,11 +423,11 @@ | |
| 423 | ** Replace a parameter with a new value. |
| 424 | */ |
| 425 | void cgi_replace_parameter(const char *zName, const char *zValue){ |
| 426 | int i; |
| 427 | for(i=0; i<nUsedQP; i++){ |
| 428 | if( fossil_strcmp(aParamQP[i].zName,zName)==0 ){ |
| 429 | aParamQP[i].zValue = zValue; |
| 430 | return; |
| 431 | } |
| 432 | } |
| 433 | cgi_set_parameter_nocopy(zName, zValue); |
| @@ -685,26 +685,26 @@ | |
| 685 | |
| 686 | len = atoi(PD("CONTENT_LENGTH", "0")); |
| 687 | g.zContentType = zType = P("CONTENT_TYPE"); |
| 688 | if( len>0 && zType ){ |
| 689 | blob_zero(&g.cgiIn); |
| 690 | if( fossil_strcmp(zType,"application/x-www-form-urlencoded")==0 |
| 691 | || strncmp(zType,"multipart/form-data",19)==0 ){ |
| 692 | z = fossil_malloc( len+1 ); |
| 693 | len = fread(z, 1, len, g.httpIn); |
| 694 | z[len] = 0; |
| 695 | if( zType[0]=='a' ){ |
| 696 | add_param_list(z, '&'); |
| 697 | }else{ |
| 698 | process_multipart_form_data(z, len); |
| 699 | } |
| 700 | }else if( fossil_strcmp(zType, "application/x-fossil")==0 ){ |
| 701 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 702 | blob_uncompress(&g.cgiIn, &g.cgiIn); |
| 703 | }else if( fossil_strcmp(zType, "application/x-fossil-debug")==0 ){ |
| 704 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 705 | }else if( fossil_strcmp(zType, "application/x-fossil-uncompressed")==0 ){ |
| 706 | blob_read_from_channel(&g.cgiIn, g.httpIn, len); |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | z = (char*)P("HTTP_COOKIE"); |
| @@ -720,11 +720,11 @@ | |
| 720 | */ |
| 721 | static int qparam_compare(const void *a, const void *b){ |
| 722 | struct QParam *pA = (struct QParam*)a; |
| 723 | struct QParam *pB = (struct QParam*)b; |
| 724 | int c; |
| 725 | c = fossil_strcmp(pA->zName, pB->zName); |
| 726 | if( c==0 ){ |
| 727 | c = pA->seq - pB->seq; |
| 728 | } |
| 729 | return c; |
| 730 | } |
| @@ -749,11 +749,11 @@ | |
| 749 | /* After sorting, remove duplicate parameters. The secondary sort |
| 750 | ** key is aParamQP[].seq and we keep the first entry. That means |
| 751 | ** with duplicate calls to cgi_set_parameter() the second and |
| 752 | ** subsequent calls are effectively no-ops. */ |
| 753 | for(i=j=1; i<nUsedQP; i++){ |
| 754 | if( fossil_strcmp(aParamQP[i].zName,aParamQP[i-1].zName)==0 ){ |
| 755 | continue; |
| 756 | } |
| 757 | if( j<i ){ |
| 758 | memcpy(&aParamQP[j], &aParamQP[i], sizeof(aParamQP[j])); |
| 759 | } |
| @@ -765,11 +765,11 @@ | |
| 765 | /* Do a binary search for a matching query parameter */ |
| 766 | lo = 0; |
| 767 | hi = nUsedQP-1; |
| 768 | while( lo<=hi ){ |
| 769 | mid = (lo+hi)/2; |
| 770 | c = fossil_strcmp(aParamQP[mid].zName, zName); |
| 771 | if( c==0 ){ |
| 772 | CGIDEBUG(("mem-match [%s] = [%s]\n", zName, aParamQP[mid].zValue)); |
| 773 | return aParamQP[mid].zValue; |
| 774 | }else if( c>0 ){ |
| 775 | hi = mid-1; |
| @@ -976,12 +976,12 @@ | |
| 976 | } |
| 977 | zToken = extract_token(zLine, &z); |
| 978 | if( zToken==0 ){ |
| 979 | malformed_request(); |
| 980 | } |
| 981 | if( fossil_strcmp(zToken,"GET")!=0 && fossil_strcmp(zToken,"POST")!=0 |
| 982 | && fossil_strcmp(zToken,"HEAD")!=0 ){ |
| 983 | malformed_request(); |
| 984 | } |
| 985 | cgi_setenv("GATEWAY_INTERFACE","CGI/1.0"); |
| 986 | cgi_setenv("REQUEST_METHOD",zToken); |
| 987 | zToken = extract_token(z, &z); |
| @@ -1017,29 +1017,29 @@ | |
| 1017 | while( i>0 && fossil_isspace(zVal[i-1]) ){ i--; } |
| 1018 | zVal[i] = 0; |
| 1019 | for(i=0; zFieldName[i]; i++){ |
| 1020 | zFieldName[i] = fossil_tolower(zFieldName[i]); |
| 1021 | } |
| 1022 | if( fossil_strcmp(zFieldName,"content-length:")==0 ){ |
| 1023 | cgi_setenv("CONTENT_LENGTH", zVal); |
| 1024 | }else if( fossil_strcmp(zFieldName,"content-type:")==0 ){ |
| 1025 | cgi_setenv("CONTENT_TYPE", zVal); |
| 1026 | }else if( fossil_strcmp(zFieldName,"cookie:")==0 ){ |
| 1027 | cgi_setenv("HTTP_COOKIE", zVal); |
| 1028 | }else if( fossil_strcmp(zFieldName,"https:")==0 ){ |
| 1029 | cgi_setenv("HTTPS", zVal); |
| 1030 | }else if( fossil_strcmp(zFieldName,"host:")==0 ){ |
| 1031 | cgi_setenv("HTTP_HOST", zVal); |
| 1032 | }else if( fossil_strcmp(zFieldName,"if-none-match:")==0 ){ |
| 1033 | cgi_setenv("HTTP_IF_NONE_MATCH", zVal); |
| 1034 | }else if( fossil_strcmp(zFieldName,"if-modified-since:")==0 ){ |
| 1035 | cgi_setenv("HTTP_IF_MODIFIED_SINCE", zVal); |
| 1036 | } |
| 1037 | #if 0 |
| 1038 | else if( fossil_strcmp(zFieldName,"referer:")==0 ){ |
| 1039 | cgi_setenv("HTTP_REFERER", zVal); |
| 1040 | }else if( fossil_strcmp(zFieldName,"user-agent:")==0 ){ |
| 1041 | cgi_setenv("HTTP_USER_AGENT", zVal); |
| 1042 | } |
| 1043 | #endif |
| 1044 | } |
| 1045 | |
| 1046 |
+1
-1
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -506,11 +506,11 @@ | ||
| 506 | 506 | } |
| 507 | 507 | blob_reset(&sql); |
| 508 | 508 | }else{ |
| 509 | 509 | /* Otherwise, the old format */ |
| 510 | 510 | if( (configure_is_exportable(zName) & groupMask)==0 ) return; |
| 511 | - if( strcmp(zName, "logo-image")==0 ){ | |
| 511 | + if( fossil_strcmp(zName, "logo-image")==0 ){ | |
| 512 | 512 | Stmt ins; |
| 513 | 513 | db_prepare(&ins, |
| 514 | 514 | "REPLACE INTO config(name, value, mtime) VALUES(:name, :value, now())" |
| 515 | 515 | ); |
| 516 | 516 | db_bind_text(&ins, ":name", zName); |
| 517 | 517 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -506,11 +506,11 @@ | |
| 506 | } |
| 507 | blob_reset(&sql); |
| 508 | }else{ |
| 509 | /* Otherwise, the old format */ |
| 510 | if( (configure_is_exportable(zName) & groupMask)==0 ) return; |
| 511 | if( strcmp(zName, "logo-image")==0 ){ |
| 512 | Stmt ins; |
| 513 | db_prepare(&ins, |
| 514 | "REPLACE INTO config(name, value, mtime) VALUES(:name, :value, now())" |
| 515 | ); |
| 516 | db_bind_text(&ins, ":name", zName); |
| 517 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -506,11 +506,11 @@ | |
| 506 | } |
| 507 | blob_reset(&sql); |
| 508 | }else{ |
| 509 | /* Otherwise, the old format */ |
| 510 | if( (configure_is_exportable(zName) & groupMask)==0 ) return; |
| 511 | if( fossil_strcmp(zName, "logo-image")==0 ){ |
| 512 | Stmt ins; |
| 513 | db_prepare(&ins, |
| 514 | "REPLACE INTO config(name, value, mtime) VALUES(:name, :value, now())" |
| 515 | ); |
| 516 | db_bind_text(&ins, ":name", zName); |
| 517 |
+1
-1
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -850,11 +850,11 @@ | ||
| 850 | 850 | if( blob_size(&content)!=size ){ |
| 851 | 851 | fossil_warning("size mismatch on blob rid=%d: %d vs %d", |
| 852 | 852 | rid, blob_size(&content), size); |
| 853 | 853 | } |
| 854 | 854 | sha1sum_blob(&content, &cksum); |
| 855 | - if( strcmp(blob_str(&cksum), zUuid)!=0 ){ | |
| 855 | + if( fossil_strcmp(blob_str(&cksum), zUuid)!=0 ){ | |
| 856 | 856 | fossil_fatal("checksum mismatch on blob rid=%d: %s vs %s", |
| 857 | 857 | rid, blob_str(&cksum), zUuid); |
| 858 | 858 | } |
| 859 | 859 | blob_reset(&cksum); |
| 860 | 860 | blob_reset(&content); |
| 861 | 861 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -850,11 +850,11 @@ | |
| 850 | if( blob_size(&content)!=size ){ |
| 851 | fossil_warning("size mismatch on blob rid=%d: %d vs %d", |
| 852 | rid, blob_size(&content), size); |
| 853 | } |
| 854 | sha1sum_blob(&content, &cksum); |
| 855 | if( strcmp(blob_str(&cksum), zUuid)!=0 ){ |
| 856 | fossil_fatal("checksum mismatch on blob rid=%d: %s vs %s", |
| 857 | rid, blob_str(&cksum), zUuid); |
| 858 | } |
| 859 | blob_reset(&cksum); |
| 860 | blob_reset(&content); |
| 861 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -850,11 +850,11 @@ | |
| 850 | if( blob_size(&content)!=size ){ |
| 851 | fossil_warning("size mismatch on blob rid=%d: %d vs %d", |
| 852 | rid, blob_size(&content), size); |
| 853 | } |
| 854 | sha1sum_blob(&content, &cksum); |
| 855 | if( fossil_strcmp(blob_str(&cksum), zUuid)!=0 ){ |
| 856 | fossil_fatal("checksum mismatch on blob rid=%d: %s vs %s", |
| 857 | rid, blob_str(&cksum), zUuid); |
| 858 | } |
| 859 | blob_reset(&cksum); |
| 860 | blob_reset(&content); |
| 861 |
M
src/db.c
+4
-4
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -907,14 +907,14 @@ | ||
| 907 | 907 | |
| 908 | 908 | /* |
| 909 | 909 | ** Return the name of the database "localdb", "configdb", or "repository". |
| 910 | 910 | */ |
| 911 | 911 | const char *db_name(const char *zDb){ |
| 912 | - assert( strcmp(zDb,"localdb")==0 | |
| 913 | - || strcmp(zDb,"configdb")==0 | |
| 914 | - || strcmp(zDb,"repository")==0 ); | |
| 915 | - if( strcmp(zDb, g.zMainDbType)==0 ) zDb = "main"; | |
| 912 | + assert( fossil_strcmp(zDb,"localdb")==0 | |
| 913 | + || fossil_strcmp(zDb,"configdb")==0 | |
| 914 | + || fossil_strcmp(zDb,"repository")==0 ); | |
| 915 | + if( fossil_strcmp(zDb, g.zMainDbType)==0 ) zDb = "main"; | |
| 916 | 916 | return zDb; |
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | /* |
| 920 | 920 | ** Return TRUE if the schema is out-of-date |
| 921 | 921 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -907,14 +907,14 @@ | |
| 907 | |
| 908 | /* |
| 909 | ** Return the name of the database "localdb", "configdb", or "repository". |
| 910 | */ |
| 911 | const char *db_name(const char *zDb){ |
| 912 | assert( strcmp(zDb,"localdb")==0 |
| 913 | || strcmp(zDb,"configdb")==0 |
| 914 | || strcmp(zDb,"repository")==0 ); |
| 915 | if( strcmp(zDb, g.zMainDbType)==0 ) zDb = "main"; |
| 916 | return zDb; |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 | ** Return TRUE if the schema is out-of-date |
| 921 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -907,14 +907,14 @@ | |
| 907 | |
| 908 | /* |
| 909 | ** Return the name of the database "localdb", "configdb", or "repository". |
| 910 | */ |
| 911 | const char *db_name(const char *zDb){ |
| 912 | assert( fossil_strcmp(zDb,"localdb")==0 |
| 913 | || fossil_strcmp(zDb,"configdb")==0 |
| 914 | || fossil_strcmp(zDb,"repository")==0 ); |
| 915 | if( fossil_strcmp(zDb, g.zMainDbType)==0 ) zDb = "main"; |
| 916 | return zDb; |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 | ** Return TRUE if the schema is out-of-date |
| 921 |
+2
-2
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -39,11 +39,11 @@ | ||
| 39 | 39 | const char *zPw; /* The user password */ |
| 40 | 40 | Blob pw; /* The nonce with user password appended */ |
| 41 | 41 | Blob sig; /* The signature field */ |
| 42 | 42 | |
| 43 | 43 | blob_zero(pLogin); |
| 44 | - if( g.urlUser==0 || strcmp(g.urlUser, "anonymous")==0 ){ | |
| 44 | + if( g.urlUser==0 || fossil_strcmp(g.urlUser, "anonymous")==0 ){ | |
| 45 | 45 | return; /* If no login card for users "nobody" and "anonymous" */ |
| 46 | 46 | } |
| 47 | 47 | if( g.urlIsSsh ){ |
| 48 | 48 | return; /* If no login card for SSH: */ |
| 49 | 49 | } |
| @@ -233,11 +233,11 @@ | ||
| 233 | 233 | }else if( rc==302 && fossil_strnicmp(zLine, "location:", 9)==0 ){ |
| 234 | 234 | int i, j; |
| 235 | 235 | for(i=9; zLine[i] && zLine[i]==' '; i++){} |
| 236 | 236 | if( zLine[i]==0 ) fossil_fatal("malformed redirect: %s", zLine); |
| 237 | 237 | j = strlen(zLine) - 1; |
| 238 | - while( j>4 && strcmp(&zLine[j-4],"/xfer")==0 ){ | |
| 238 | + while( j>4 && fossil_strcmp(&zLine[j-4],"/xfer")==0 ){ | |
| 239 | 239 | j -= 4; |
| 240 | 240 | zLine[j] = 0; |
| 241 | 241 | } |
| 242 | 242 | fossil_print("redirect to %s\n", &zLine[i]); |
| 243 | 243 | url_parse(&zLine[i]); |
| 244 | 244 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -39,11 +39,11 @@ | |
| 39 | const char *zPw; /* The user password */ |
| 40 | Blob pw; /* The nonce with user password appended */ |
| 41 | Blob sig; /* The signature field */ |
| 42 | |
| 43 | blob_zero(pLogin); |
| 44 | if( g.urlUser==0 || strcmp(g.urlUser, "anonymous")==0 ){ |
| 45 | return; /* If no login card for users "nobody" and "anonymous" */ |
| 46 | } |
| 47 | if( g.urlIsSsh ){ |
| 48 | return; /* If no login card for SSH: */ |
| 49 | } |
| @@ -233,11 +233,11 @@ | |
| 233 | }else if( rc==302 && fossil_strnicmp(zLine, "location:", 9)==0 ){ |
| 234 | int i, j; |
| 235 | for(i=9; zLine[i] && zLine[i]==' '; i++){} |
| 236 | if( zLine[i]==0 ) fossil_fatal("malformed redirect: %s", zLine); |
| 237 | j = strlen(zLine) - 1; |
| 238 | while( j>4 && strcmp(&zLine[j-4],"/xfer")==0 ){ |
| 239 | j -= 4; |
| 240 | zLine[j] = 0; |
| 241 | } |
| 242 | fossil_print("redirect to %s\n", &zLine[i]); |
| 243 | url_parse(&zLine[i]); |
| 244 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -39,11 +39,11 @@ | |
| 39 | const char *zPw; /* The user password */ |
| 40 | Blob pw; /* The nonce with user password appended */ |
| 41 | Blob sig; /* The signature field */ |
| 42 | |
| 43 | blob_zero(pLogin); |
| 44 | if( g.urlUser==0 || fossil_strcmp(g.urlUser, "anonymous")==0 ){ |
| 45 | return; /* If no login card for users "nobody" and "anonymous" */ |
| 46 | } |
| 47 | if( g.urlIsSsh ){ |
| 48 | return; /* If no login card for SSH: */ |
| 49 | } |
| @@ -233,11 +233,11 @@ | |
| 233 | }else if( rc==302 && fossil_strnicmp(zLine, "location:", 9)==0 ){ |
| 234 | int i, j; |
| 235 | for(i=9; zLine[i] && zLine[i]==' '; i++){} |
| 236 | if( zLine[i]==0 ) fossil_fatal("malformed redirect: %s", zLine); |
| 237 | j = strlen(zLine) - 1; |
| 238 | while( j>4 && fossil_strcmp(&zLine[j-4],"/xfer")==0 ){ |
| 239 | j -= 4; |
| 240 | zLine[j] = 0; |
| 241 | } |
| 242 | fossil_print("redirect to %s\n", &zLine[i]); |
| 243 | url_parse(&zLine[i]); |
| 244 |
+1
-1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -205,11 +205,11 @@ | ||
| 205 | 205 | ** Compare two ImportFile objects for sorting |
| 206 | 206 | */ |
| 207 | 207 | static int mfile_cmp(const void *pLeft, const void *pRight){ |
| 208 | 208 | const ImportFile *pA = (const ImportFile*)pLeft; |
| 209 | 209 | const ImportFile *pB = (const ImportFile*)pRight; |
| 210 | - return strcmp(pA->zName, pB->zName); | |
| 210 | + return fossil_strcmp(pA->zName, pB->zName); | |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | /* Forward reference */ |
| 214 | 214 | static void import_prior_files(void); |
| 215 | 215 | |
| 216 | 216 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -205,11 +205,11 @@ | |
| 205 | ** Compare two ImportFile objects for sorting |
| 206 | */ |
| 207 | static int mfile_cmp(const void *pLeft, const void *pRight){ |
| 208 | const ImportFile *pA = (const ImportFile*)pLeft; |
| 209 | const ImportFile *pB = (const ImportFile*)pRight; |
| 210 | return strcmp(pA->zName, pB->zName); |
| 211 | } |
| 212 | |
| 213 | /* Forward reference */ |
| 214 | static void import_prior_files(void); |
| 215 | |
| 216 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -205,11 +205,11 @@ | |
| 205 | ** Compare two ImportFile objects for sorting |
| 206 | */ |
| 207 | static int mfile_cmp(const void *pLeft, const void *pRight){ |
| 208 | const ImportFile *pA = (const ImportFile*)pLeft; |
| 209 | const ImportFile *pB = (const ImportFile*)pRight; |
| 210 | return fossil_strcmp(pA->zName, pB->zName); |
| 211 | } |
| 212 | |
| 213 | /* Forward reference */ |
| 214 | static void import_prior_files(void); |
| 215 | |
| 216 |
+2
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -220,11 +220,11 @@ | ||
| 220 | 220 | hyperlink_to_uuid(zOrigUuid); |
| 221 | 221 | }else{ |
| 222 | 222 | @ propagates to descendants |
| 223 | 223 | } |
| 224 | 224 | #if 0 |
| 225 | - if( zValue && strcmp(zTagname,"branch")==0 ){ | |
| 225 | + if( zValue && fossil_strcmp(zTagname,"branch")==0 ){ | |
| 226 | 226 | @ |
| 227 | 227 | @ <a href="%s(g.zTop)/timeline?r=%T(zValue)">branch timeline</a> |
| 228 | 228 | } |
| 229 | 229 | #endif |
| 230 | 230 | } |
| @@ -1619,11 +1619,11 @@ | ||
| 1619 | 1619 | blob_zero(&ctrl); |
| 1620 | 1620 | zNow = date_in_standard_format("now"); |
| 1621 | 1621 | blob_appendf(&ctrl, "D %s\n", zNow); |
| 1622 | 1622 | db_multi_exec("CREATE TEMP TABLE newtags(tag UNIQUE, prefix, value)"); |
| 1623 | 1623 | if( zNewColor[0] |
| 1624 | - && (fPropagateColor!=fNewPropagateColor || strcmp(zColor,zNewColor)!=0) | |
| 1624 | + && (fPropagateColor!=fNewPropagateColor || fossil_strcmp(zColor,zNewColor)!=0) | |
| 1625 | 1625 | ){ |
| 1626 | 1626 | char *zPrefix = "+"; |
| 1627 | 1627 | if( fNewPropagateColor ){ |
| 1628 | 1628 | zPrefix = "*"; |
| 1629 | 1629 | } |
| 1630 | 1630 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -220,11 +220,11 @@ | |
| 220 | hyperlink_to_uuid(zOrigUuid); |
| 221 | }else{ |
| 222 | @ propagates to descendants |
| 223 | } |
| 224 | #if 0 |
| 225 | if( zValue && strcmp(zTagname,"branch")==0 ){ |
| 226 | @ |
| 227 | @ <a href="%s(g.zTop)/timeline?r=%T(zValue)">branch timeline</a> |
| 228 | } |
| 229 | #endif |
| 230 | } |
| @@ -1619,11 +1619,11 @@ | |
| 1619 | blob_zero(&ctrl); |
| 1620 | zNow = date_in_standard_format("now"); |
| 1621 | blob_appendf(&ctrl, "D %s\n", zNow); |
| 1622 | db_multi_exec("CREATE TEMP TABLE newtags(tag UNIQUE, prefix, value)"); |
| 1623 | if( zNewColor[0] |
| 1624 | && (fPropagateColor!=fNewPropagateColor || strcmp(zColor,zNewColor)!=0) |
| 1625 | ){ |
| 1626 | char *zPrefix = "+"; |
| 1627 | if( fNewPropagateColor ){ |
| 1628 | zPrefix = "*"; |
| 1629 | } |
| 1630 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -220,11 +220,11 @@ | |
| 220 | hyperlink_to_uuid(zOrigUuid); |
| 221 | }else{ |
| 222 | @ propagates to descendants |
| 223 | } |
| 224 | #if 0 |
| 225 | if( zValue && fossil_strcmp(zTagname,"branch")==0 ){ |
| 226 | @ |
| 227 | @ <a href="%s(g.zTop)/timeline?r=%T(zValue)">branch timeline</a> |
| 228 | } |
| 229 | #endif |
| 230 | } |
| @@ -1619,11 +1619,11 @@ | |
| 1619 | blob_zero(&ctrl); |
| 1620 | zNow = date_in_standard_format("now"); |
| 1621 | blob_appendf(&ctrl, "D %s\n", zNow); |
| 1622 | db_multi_exec("CREATE TEMP TABLE newtags(tag UNIQUE, prefix, value)"); |
| 1623 | if( zNewColor[0] |
| 1624 | && (fPropagateColor!=fNewPropagateColor || fossil_strcmp(zColor,zNewColor)!=0) |
| 1625 | ){ |
| 1626 | char *zPrefix = "+"; |
| 1627 | if( fNewPropagateColor ){ |
| 1628 | zPrefix = "*"; |
| 1629 | } |
| 1630 |
+5
-5
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -152,11 +152,11 @@ | ||
| 152 | 152 | const char *zPw; /* The correct password shown in the captcha */ |
| 153 | 153 | int uid; /* The user ID of anonymous */ |
| 154 | 154 | |
| 155 | 155 | if( zUsername==0 ) return 0; |
| 156 | 156 | if( zPassword==0 ) return 0; |
| 157 | - if( strcmp(zUsername,"anonymous")!=0 ) return 0; | |
| 157 | + if( fossil_strcmp(zUsername,"anonymous")!=0 ) return 0; | |
| 158 | 158 | zCS = P("cs"); /* The "cs" parameter is the "captcha seed" */ |
| 159 | 159 | if( zCS==0 ) return 0; |
| 160 | 160 | zPw = captcha_decode((unsigned int)atoi(zCS)); |
| 161 | 161 | if( fossil_stricmp(zPw, zPassword)!=0 ) return 0; |
| 162 | 162 | uid = db_int(0, "SELECT uid FROM user WHERE login='anonymous'" |
| @@ -561,11 +561,11 @@ | ||
| 561 | 561 | ** |
| 562 | 562 | ** This feature allows the "fossil ui" command to give the user |
| 563 | 563 | ** full access rights without having to log in. |
| 564 | 564 | */ |
| 565 | 565 | zRemoteAddr = ipPrefix(zIpAddr = PD("REMOTE_ADDR","nil")); |
| 566 | - if( strcmp(zIpAddr, "127.0.0.1")==0 | |
| 566 | + if( fossil_strcmp(zIpAddr, "127.0.0.1")==0 | |
| 567 | 567 | && g.useLocalauth |
| 568 | 568 | && db_get_int("localauth",0)==0 |
| 569 | 569 | && P("HTTPS")==0 |
| 570 | 570 | ){ |
| 571 | 571 | uid = db_int(0, "SELECT uid FROM user WHERE cap LIKE '%%s%%'"); |
| @@ -594,11 +594,11 @@ | ||
| 594 | 594 | } |
| 595 | 595 | } |
| 596 | 596 | } |
| 597 | 597 | if( zUser==0 ){ |
| 598 | 598 | /* Invalid cookie */ |
| 599 | - }else if( strcmp(zUser, "anonymous")==0 ){ | |
| 599 | + }else if( fossil_strcmp(zUser, "anonymous")==0 ){ | |
| 600 | 600 | /* Cookies of the form "HASH/TIME/anonymous". The TIME must not be |
| 601 | 601 | ** too old and the sha1 hash of TIME/IPADDR/SECRET must match HASH. |
| 602 | 602 | ** SECRET is the "captcha-secret" value in the repository. |
| 603 | 603 | */ |
| 604 | 604 | double rTime = atof(zArg); |
| @@ -963,11 +963,11 @@ | ||
| 963 | 963 | @ </span></p> |
| 964 | 964 | }else if( strlen(zPasswd) < 6){ |
| 965 | 965 | @ <p><span class="loginError"> |
| 966 | 966 | @ Password too weak. |
| 967 | 967 | @ </span></p> |
| 968 | - }else if( strcmp(zPasswd,zConfirm)!=0 ){ | |
| 968 | + }else if( fossil_strcmp(zPasswd,zConfirm)!=0 ){ | |
| 969 | 969 | @ <p><span class="loginError"> |
| 970 | 970 | @ The two copies of your new passwords do not match. |
| 971 | 971 | @ </span></p> |
| 972 | 972 | }else if( fossil_stricmp(zPw, zCap)!=0 ){ |
| 973 | 973 | @ <p><span class="loginError"> |
| @@ -1192,11 +1192,11 @@ | ||
| 1192 | 1192 | if( zSelfLabel==0 ){ |
| 1193 | 1193 | zSelfLabel = zSelfProjCode; |
| 1194 | 1194 | } |
| 1195 | 1195 | |
| 1196 | 1196 | /* Make sure we are not trying to join ourselves */ |
| 1197 | - if( strcmp(zRepo, zSelfRepo)==0 ){ | |
| 1197 | + if( fossil_strcmp(zRepo, zSelfRepo)==0 ){ | |
| 1198 | 1198 | *pzErrMsg = mprintf("The \"other\" repository is the same as this one."); |
| 1199 | 1199 | return; |
| 1200 | 1200 | } |
| 1201 | 1201 | |
| 1202 | 1202 | /* Make sure the other repository is a valid Fossil database */ |
| 1203 | 1203 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -152,11 +152,11 @@ | |
| 152 | const char *zPw; /* The correct password shown in the captcha */ |
| 153 | int uid; /* The user ID of anonymous */ |
| 154 | |
| 155 | if( zUsername==0 ) return 0; |
| 156 | if( zPassword==0 ) return 0; |
| 157 | if( strcmp(zUsername,"anonymous")!=0 ) return 0; |
| 158 | zCS = P("cs"); /* The "cs" parameter is the "captcha seed" */ |
| 159 | if( zCS==0 ) return 0; |
| 160 | zPw = captcha_decode((unsigned int)atoi(zCS)); |
| 161 | if( fossil_stricmp(zPw, zPassword)!=0 ) return 0; |
| 162 | uid = db_int(0, "SELECT uid FROM user WHERE login='anonymous'" |
| @@ -561,11 +561,11 @@ | |
| 561 | ** |
| 562 | ** This feature allows the "fossil ui" command to give the user |
| 563 | ** full access rights without having to log in. |
| 564 | */ |
| 565 | zRemoteAddr = ipPrefix(zIpAddr = PD("REMOTE_ADDR","nil")); |
| 566 | if( strcmp(zIpAddr, "127.0.0.1")==0 |
| 567 | && g.useLocalauth |
| 568 | && db_get_int("localauth",0)==0 |
| 569 | && P("HTTPS")==0 |
| 570 | ){ |
| 571 | uid = db_int(0, "SELECT uid FROM user WHERE cap LIKE '%%s%%'"); |
| @@ -594,11 +594,11 @@ | |
| 594 | } |
| 595 | } |
| 596 | } |
| 597 | if( zUser==0 ){ |
| 598 | /* Invalid cookie */ |
| 599 | }else if( strcmp(zUser, "anonymous")==0 ){ |
| 600 | /* Cookies of the form "HASH/TIME/anonymous". The TIME must not be |
| 601 | ** too old and the sha1 hash of TIME/IPADDR/SECRET must match HASH. |
| 602 | ** SECRET is the "captcha-secret" value in the repository. |
| 603 | */ |
| 604 | double rTime = atof(zArg); |
| @@ -963,11 +963,11 @@ | |
| 963 | @ </span></p> |
| 964 | }else if( strlen(zPasswd) < 6){ |
| 965 | @ <p><span class="loginError"> |
| 966 | @ Password too weak. |
| 967 | @ </span></p> |
| 968 | }else if( strcmp(zPasswd,zConfirm)!=0 ){ |
| 969 | @ <p><span class="loginError"> |
| 970 | @ The two copies of your new passwords do not match. |
| 971 | @ </span></p> |
| 972 | }else if( fossil_stricmp(zPw, zCap)!=0 ){ |
| 973 | @ <p><span class="loginError"> |
| @@ -1192,11 +1192,11 @@ | |
| 1192 | if( zSelfLabel==0 ){ |
| 1193 | zSelfLabel = zSelfProjCode; |
| 1194 | } |
| 1195 | |
| 1196 | /* Make sure we are not trying to join ourselves */ |
| 1197 | if( strcmp(zRepo, zSelfRepo)==0 ){ |
| 1198 | *pzErrMsg = mprintf("The \"other\" repository is the same as this one."); |
| 1199 | return; |
| 1200 | } |
| 1201 | |
| 1202 | /* Make sure the other repository is a valid Fossil database */ |
| 1203 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -152,11 +152,11 @@ | |
| 152 | const char *zPw; /* The correct password shown in the captcha */ |
| 153 | int uid; /* The user ID of anonymous */ |
| 154 | |
| 155 | if( zUsername==0 ) return 0; |
| 156 | if( zPassword==0 ) return 0; |
| 157 | if( fossil_strcmp(zUsername,"anonymous")!=0 ) return 0; |
| 158 | zCS = P("cs"); /* The "cs" parameter is the "captcha seed" */ |
| 159 | if( zCS==0 ) return 0; |
| 160 | zPw = captcha_decode((unsigned int)atoi(zCS)); |
| 161 | if( fossil_stricmp(zPw, zPassword)!=0 ) return 0; |
| 162 | uid = db_int(0, "SELECT uid FROM user WHERE login='anonymous'" |
| @@ -561,11 +561,11 @@ | |
| 561 | ** |
| 562 | ** This feature allows the "fossil ui" command to give the user |
| 563 | ** full access rights without having to log in. |
| 564 | */ |
| 565 | zRemoteAddr = ipPrefix(zIpAddr = PD("REMOTE_ADDR","nil")); |
| 566 | if( fossil_strcmp(zIpAddr, "127.0.0.1")==0 |
| 567 | && g.useLocalauth |
| 568 | && db_get_int("localauth",0)==0 |
| 569 | && P("HTTPS")==0 |
| 570 | ){ |
| 571 | uid = db_int(0, "SELECT uid FROM user WHERE cap LIKE '%%s%%'"); |
| @@ -594,11 +594,11 @@ | |
| 594 | } |
| 595 | } |
| 596 | } |
| 597 | if( zUser==0 ){ |
| 598 | /* Invalid cookie */ |
| 599 | }else if( fossil_strcmp(zUser, "anonymous")==0 ){ |
| 600 | /* Cookies of the form "HASH/TIME/anonymous". The TIME must not be |
| 601 | ** too old and the sha1 hash of TIME/IPADDR/SECRET must match HASH. |
| 602 | ** SECRET is the "captcha-secret" value in the repository. |
| 603 | */ |
| 604 | double rTime = atof(zArg); |
| @@ -963,11 +963,11 @@ | |
| 963 | @ </span></p> |
| 964 | }else if( strlen(zPasswd) < 6){ |
| 965 | @ <p><span class="loginError"> |
| 966 | @ Password too weak. |
| 967 | @ </span></p> |
| 968 | }else if( fossil_strcmp(zPasswd,zConfirm)!=0 ){ |
| 969 | @ <p><span class="loginError"> |
| 970 | @ The two copies of your new passwords do not match. |
| 971 | @ </span></p> |
| 972 | }else if( fossil_stricmp(zPw, zCap)!=0 ){ |
| 973 | @ <p><span class="loginError"> |
| @@ -1192,11 +1192,11 @@ | |
| 1192 | if( zSelfLabel==0 ){ |
| 1193 | zSelfLabel = zSelfProjCode; |
| 1194 | } |
| 1195 | |
| 1196 | /* Make sure we are not trying to join ourselves */ |
| 1197 | if( fossil_strcmp(zRepo, zSelfRepo)==0 ){ |
| 1198 | *pzErrMsg = mprintf("The \"other\" repository is the same as this one."); |
| 1199 | return; |
| 1200 | } |
| 1201 | |
| 1202 | /* Make sure the other repository is a valid Fossil database */ |
| 1203 |
+3
-18
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -196,11 +196,11 @@ | ||
| 196 | 196 | lwr = 0; |
| 197 | 197 | upr = nMap-1; |
| 198 | 198 | while( lwr<=upr ){ |
| 199 | 199 | int mid, c; |
| 200 | 200 | mid = (upr+lwr)/2; |
| 201 | - c = strcmp(zName, aMap[mid].zName); | |
| 201 | + c = fossil_strcmp(zName, aMap[mid].zName); | |
| 202 | 202 | if( c==0 ){ |
| 203 | 203 | *pIndex = mid; |
| 204 | 204 | return 0; |
| 205 | 205 | }else if( c<0 ){ |
| 206 | 206 | upr = mid - 1; |
| @@ -446,25 +446,10 @@ | ||
| 446 | 446 | rc = system(zOrigCmd); |
| 447 | 447 | #endif |
| 448 | 448 | return rc; |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | -/* | |
| 452 | -** Like strcmp() except that it accepts NULL pointers. NULL sorts before | |
| 453 | -** all non-NULL string pointers. | |
| 454 | -*/ | |
| 455 | -int fossil_strcmp(const char *zA, const char *zB){ | |
| 456 | - if( zA==0 ){ | |
| 457 | - if( zB==0 ) return 0; | |
| 458 | - return -1; | |
| 459 | - }else if( zB==0 ){ | |
| 460 | - return +1; | |
| 461 | - }else{ | |
| 462 | - return strcmp(zA,zB); | |
| 463 | - } | |
| 464 | -} | |
| 465 | - | |
| 466 | 451 | /* |
| 467 | 452 | ** Turn off any NL to CRNL translation on the stream given as an |
| 468 | 453 | ** argument. This is a no-op on unix but is necessary on windows. |
| 469 | 454 | */ |
| 470 | 455 | void fossil_binary_mode(FILE *p){ |
| @@ -928,11 +913,11 @@ | ||
| 928 | 913 | } |
| 929 | 914 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 930 | 915 | |
| 931 | 916 | szFile = file_size(zRepo); |
| 932 | 917 | if( zPathInfo[i]=='/' && szFile<0 ){ |
| 933 | - assert( strcmp(&zRepo[j], ".fossil")==0 ); | |
| 918 | + assert( fossil_strcmp(&zRepo[j], ".fossil")==0 ); | |
| 934 | 919 | zRepo[j] = 0; |
| 935 | 920 | if( file_isdir(zRepo)==1 ){ |
| 936 | 921 | fossil_free(zToFree); |
| 937 | 922 | i++; |
| 938 | 923 | continue; |
| @@ -1187,11 +1172,11 @@ | ||
| 1187 | 1172 | zName = P("SCRIPT_NAME"); |
| 1188 | 1173 | if( zName && zName[0]=='/' ) zName++; |
| 1189 | 1174 | } |
| 1190 | 1175 | if( zName && validate16(zName, strlen(zName)) ){ |
| 1191 | 1176 | for(i=0; i<nRedirect; i++){ |
| 1192 | - if( strcmp(azRedirect[i*2],"*")==0 ){ | |
| 1177 | + if( fossil_strcmp(azRedirect[i*2],"*")==0 ){ | |
| 1193 | 1178 | zNotFound = azRedirect[i*2+1]; |
| 1194 | 1179 | continue; |
| 1195 | 1180 | } |
| 1196 | 1181 | db_open_repository(azRedirect[i*2]); |
| 1197 | 1182 | if( db_exists("SELECT 1 FROM blob WHERE uuid GLOB '%s*'", zName) ){ |
| 1198 | 1183 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -196,11 +196,11 @@ | |
| 196 | lwr = 0; |
| 197 | upr = nMap-1; |
| 198 | while( lwr<=upr ){ |
| 199 | int mid, c; |
| 200 | mid = (upr+lwr)/2; |
| 201 | c = strcmp(zName, aMap[mid].zName); |
| 202 | if( c==0 ){ |
| 203 | *pIndex = mid; |
| 204 | return 0; |
| 205 | }else if( c<0 ){ |
| 206 | upr = mid - 1; |
| @@ -446,25 +446,10 @@ | |
| 446 | rc = system(zOrigCmd); |
| 447 | #endif |
| 448 | return rc; |
| 449 | } |
| 450 | |
| 451 | /* |
| 452 | ** Like strcmp() except that it accepts NULL pointers. NULL sorts before |
| 453 | ** all non-NULL string pointers. |
| 454 | */ |
| 455 | int fossil_strcmp(const char *zA, const char *zB){ |
| 456 | if( zA==0 ){ |
| 457 | if( zB==0 ) return 0; |
| 458 | return -1; |
| 459 | }else if( zB==0 ){ |
| 460 | return +1; |
| 461 | }else{ |
| 462 | return strcmp(zA,zB); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | /* |
| 467 | ** Turn off any NL to CRNL translation on the stream given as an |
| 468 | ** argument. This is a no-op on unix but is necessary on windows. |
| 469 | */ |
| 470 | void fossil_binary_mode(FILE *p){ |
| @@ -928,11 +913,11 @@ | |
| 928 | } |
| 929 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 930 | |
| 931 | szFile = file_size(zRepo); |
| 932 | if( zPathInfo[i]=='/' && szFile<0 ){ |
| 933 | assert( strcmp(&zRepo[j], ".fossil")==0 ); |
| 934 | zRepo[j] = 0; |
| 935 | if( file_isdir(zRepo)==1 ){ |
| 936 | fossil_free(zToFree); |
| 937 | i++; |
| 938 | continue; |
| @@ -1187,11 +1172,11 @@ | |
| 1187 | zName = P("SCRIPT_NAME"); |
| 1188 | if( zName && zName[0]=='/' ) zName++; |
| 1189 | } |
| 1190 | if( zName && validate16(zName, strlen(zName)) ){ |
| 1191 | for(i=0; i<nRedirect; i++){ |
| 1192 | if( strcmp(azRedirect[i*2],"*")==0 ){ |
| 1193 | zNotFound = azRedirect[i*2+1]; |
| 1194 | continue; |
| 1195 | } |
| 1196 | db_open_repository(azRedirect[i*2]); |
| 1197 | if( db_exists("SELECT 1 FROM blob WHERE uuid GLOB '%s*'", zName) ){ |
| 1198 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -196,11 +196,11 @@ | |
| 196 | lwr = 0; |
| 197 | upr = nMap-1; |
| 198 | while( lwr<=upr ){ |
| 199 | int mid, c; |
| 200 | mid = (upr+lwr)/2; |
| 201 | c = fossil_strcmp(zName, aMap[mid].zName); |
| 202 | if( c==0 ){ |
| 203 | *pIndex = mid; |
| 204 | return 0; |
| 205 | }else if( c<0 ){ |
| 206 | upr = mid - 1; |
| @@ -446,25 +446,10 @@ | |
| 446 | rc = system(zOrigCmd); |
| 447 | #endif |
| 448 | return rc; |
| 449 | } |
| 450 | |
| 451 | /* |
| 452 | ** Turn off any NL to CRNL translation on the stream given as an |
| 453 | ** argument. This is a no-op on unix but is necessary on windows. |
| 454 | */ |
| 455 | void fossil_binary_mode(FILE *p){ |
| @@ -928,11 +913,11 @@ | |
| 913 | } |
| 914 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 915 | |
| 916 | szFile = file_size(zRepo); |
| 917 | if( zPathInfo[i]=='/' && szFile<0 ){ |
| 918 | assert( fossil_strcmp(&zRepo[j], ".fossil")==0 ); |
| 919 | zRepo[j] = 0; |
| 920 | if( file_isdir(zRepo)==1 ){ |
| 921 | fossil_free(zToFree); |
| 922 | i++; |
| 923 | continue; |
| @@ -1187,11 +1172,11 @@ | |
| 1172 | zName = P("SCRIPT_NAME"); |
| 1173 | if( zName && zName[0]=='/' ) zName++; |
| 1174 | } |
| 1175 | if( zName && validate16(zName, strlen(zName)) ){ |
| 1176 | for(i=0; i<nRedirect; i++){ |
| 1177 | if( fossil_strcmp(azRedirect[i*2],"*")==0 ){ |
| 1178 | zNotFound = azRedirect[i*2+1]; |
| 1179 | continue; |
| 1180 | } |
| 1181 | db_open_repository(azRedirect[i*2]); |
| 1182 | if( db_exists("SELECT 1 FROM blob WHERE uuid GLOB '%s*'", zName) ){ |
| 1183 |
+21
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -841,10 +841,31 @@ | ||
| 841 | 841 | vxprintf(&b, zFormat, ap); |
| 842 | 842 | fossil_puts(blob_str(&b), 0); |
| 843 | 843 | blob_reset(&b); |
| 844 | 844 | } |
| 845 | 845 | } |
| 846 | + | |
| 847 | +/* | |
| 848 | +** Like strcmp() except that it accepts NULL pointers. NULL sorts before | |
| 849 | +** all non-NULL string pointers. Also, this strcmp() is a binary comparison | |
| 850 | +** that does not consider locale. | |
| 851 | +*/ | |
| 852 | +int fossil_strcmp(const char *zA, const char *zB){ | |
| 853 | + if( zA==0 ){ | |
| 854 | + if( zB==0 ) return 0; | |
| 855 | + return -1; | |
| 856 | + }else if( zB==0 ){ | |
| 857 | + return +1; | |
| 858 | + }else{ | |
| 859 | + int a, b; | |
| 860 | + do{ | |
| 861 | + a = *zA++; | |
| 862 | + b = *zB++; | |
| 863 | + }while( a==b && a!=0 ); | |
| 864 | + return a - b; | |
| 865 | + } | |
| 866 | +} | |
| 846 | 867 | |
| 847 | 868 | /* |
| 848 | 869 | ** Case insensitive string comparison. |
| 849 | 870 | */ |
| 850 | 871 | int fossil_strnicmp(const char *zA, const char *zB, int nByte){ |
| 851 | 872 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -841,10 +841,31 @@ | |
| 841 | vxprintf(&b, zFormat, ap); |
| 842 | fossil_puts(blob_str(&b), 0); |
| 843 | blob_reset(&b); |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | /* |
| 848 | ** Case insensitive string comparison. |
| 849 | */ |
| 850 | int fossil_strnicmp(const char *zA, const char *zB, int nByte){ |
| 851 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -841,10 +841,31 @@ | |
| 841 | vxprintf(&b, zFormat, ap); |
| 842 | fossil_puts(blob_str(&b), 0); |
| 843 | blob_reset(&b); |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | /* |
| 848 | ** Like strcmp() except that it accepts NULL pointers. NULL sorts before |
| 849 | ** all non-NULL string pointers. Also, this strcmp() is a binary comparison |
| 850 | ** that does not consider locale. |
| 851 | */ |
| 852 | int fossil_strcmp(const char *zA, const char *zB){ |
| 853 | if( zA==0 ){ |
| 854 | if( zB==0 ) return 0; |
| 855 | return -1; |
| 856 | }else if( zB==0 ){ |
| 857 | return +1; |
| 858 | }else{ |
| 859 | int a, b; |
| 860 | do{ |
| 861 | a = *zA++; |
| 862 | b = *zB++; |
| 863 | }while( a==b && a!=0 ); |
| 864 | return a - b; |
| 865 | } |
| 866 | } |
| 867 | |
| 868 | /* |
| 869 | ** Case insensitive string comparison. |
| 870 | */ |
| 871 | int fossil_strnicmp(const char *zA, const char *zB, int nByte){ |
| 872 |
+2
-2
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -644,11 +644,11 @@ | ||
| 644 | 644 | pState->nCol = 0; |
| 645 | 645 | pState->isMultirow = 0; |
| 646 | 646 | pState->iNewRow = -1; |
| 647 | 647 | pState->iBg = -1; |
| 648 | 648 | for(i=0; i<nArg; i++){ |
| 649 | - if( azName[i][0]=='b' && strcmp(azName[i],"bgcolor")==0 ){ | |
| 649 | + if( azName[i][0]=='b' && fossil_strcmp(azName[i],"bgcolor")==0 ){ | |
| 650 | 650 | pState->iBg = i; |
| 651 | 651 | continue; |
| 652 | 652 | } |
| 653 | 653 | if( g.okWrite && azName[i][0]=='#' ){ |
| 654 | 654 | pState->nCol++; |
| @@ -947,11 +947,11 @@ | ||
| 947 | 947 | |
| 948 | 948 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 949 | 949 | style_submenu_element("Raw", "Raw", |
| 950 | 950 | "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 951 | 951 | if( g.okAdmin |
| 952 | - || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){ | |
| 952 | + || (g.okTktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ | |
| 953 | 953 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 954 | 954 | } |
| 955 | 955 | if( g.okTktFmt ){ |
| 956 | 956 | style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn); |
| 957 | 957 | } |
| 958 | 958 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -644,11 +644,11 @@ | |
| 644 | pState->nCol = 0; |
| 645 | pState->isMultirow = 0; |
| 646 | pState->iNewRow = -1; |
| 647 | pState->iBg = -1; |
| 648 | for(i=0; i<nArg; i++){ |
| 649 | if( azName[i][0]=='b' && strcmp(azName[i],"bgcolor")==0 ){ |
| 650 | pState->iBg = i; |
| 651 | continue; |
| 652 | } |
| 653 | if( g.okWrite && azName[i][0]=='#' ){ |
| 654 | pState->nCol++; |
| @@ -947,11 +947,11 @@ | |
| 947 | |
| 948 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 949 | style_submenu_element("Raw", "Raw", |
| 950 | "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 951 | if( g.okAdmin |
| 952 | || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){ |
| 953 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 954 | } |
| 955 | if( g.okTktFmt ){ |
| 956 | style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn); |
| 957 | } |
| 958 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -644,11 +644,11 @@ | |
| 644 | pState->nCol = 0; |
| 645 | pState->isMultirow = 0; |
| 646 | pState->iNewRow = -1; |
| 647 | pState->iBg = -1; |
| 648 | for(i=0; i<nArg; i++){ |
| 649 | if( azName[i][0]=='b' && fossil_strcmp(azName[i],"bgcolor")==0 ){ |
| 650 | pState->iBg = i; |
| 651 | continue; |
| 652 | } |
| 653 | if( g.okWrite && azName[i][0]=='#' ){ |
| 654 | pState->nCol++; |
| @@ -947,11 +947,11 @@ | |
| 947 | |
| 948 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 949 | style_submenu_element("Raw", "Raw", |
| 950 | "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 951 | if( g.okAdmin |
| 952 | || (g.okTktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ |
| 953 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 954 | } |
| 955 | if( g.okTktFmt ){ |
| 956 | style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn); |
| 957 | } |
| 958 |
+7
-7
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -436,38 +436,38 @@ | ||
| 436 | 436 | if( strchr(zCap, 'z') ) oaz = " checked=\"checked\""; |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | /* figure out inherited permissions */ |
| 440 | 440 | memset(inherit, 0, sizeof(inherit)); |
| 441 | - if( strcmp(zLogin, "developer") ){ | |
| 441 | + if( fossil_strcmp(zLogin, "developer") ){ | |
| 442 | 442 | char *z1, *z2; |
| 443 | 443 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'"); |
| 444 | 444 | while( z1 && *z1 ){ |
| 445 | 445 | inherit[0x7f & *(z1++)] = |
| 446 | 446 | "<span class=\"ueditInheritDeveloper\">•</span>"; |
| 447 | 447 | } |
| 448 | 448 | free(z2); |
| 449 | 449 | } |
| 450 | - if( strcmp(zLogin, "reader") ){ | |
| 450 | + if( fossil_strcmp(zLogin, "reader") ){ | |
| 451 | 451 | char *z1, *z2; |
| 452 | 452 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'"); |
| 453 | 453 | while( z1 && *z1 ){ |
| 454 | 454 | inherit[0x7f & *(z1++)] = |
| 455 | 455 | "<span class=\"ueditInheritReader\">•</span>"; |
| 456 | 456 | } |
| 457 | 457 | free(z2); |
| 458 | 458 | } |
| 459 | - if( strcmp(zLogin, "anonymous") ){ | |
| 459 | + if( fossil_strcmp(zLogin, "anonymous") ){ | |
| 460 | 460 | char *z1, *z2; |
| 461 | 461 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'"); |
| 462 | 462 | while( z1 && *z1 ){ |
| 463 | 463 | inherit[0x7f & *(z1++)] = |
| 464 | 464 | "<span class=\"ueditInheritAnonymous\">•</span>"; |
| 465 | 465 | } |
| 466 | 466 | free(z2); |
| 467 | 467 | } |
| 468 | - if( strcmp(zLogin, "nobody") ){ | |
| 468 | + if( fossil_strcmp(zLogin, "nobody") ){ | |
| 469 | 469 | char *z1, *z2; |
| 470 | 470 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'"); |
| 471 | 471 | while( z1 && *z1 ){ |
| 472 | 472 | inherit[0x7f & *(z1++)] = |
| 473 | 473 | "<span class=\"ueditInheritNobody\">•</span>"; |
| @@ -741,11 +741,11 @@ | ||
| 741 | 741 | int iVal = db_get_boolean(zVar, dfltVal); |
| 742 | 742 | if( zQ==0 && P("submit") ){ |
| 743 | 743 | zQ = "off"; |
| 744 | 744 | } |
| 745 | 745 | if( zQ ){ |
| 746 | - int iQ = strcmp(zQ,"on")==0 || atoi(zQ); | |
| 746 | + int iQ = fossil_strcmp(zQ,"on")==0 || atoi(zQ); | |
| 747 | 747 | if( iQ!=iVal ){ |
| 748 | 748 | login_verify_csrf_secret(); |
| 749 | 749 | db_set(zVar, iQ ? "1" : "0", 0); |
| 750 | 750 | iVal = iQ; |
| 751 | 751 | } |
| @@ -768,11 +768,11 @@ | ||
| 768 | 768 | const char *zQParm, /* The query parameter */ |
| 769 | 769 | char *zDflt /* Default value if VAR table entry does not exist */ |
| 770 | 770 | ){ |
| 771 | 771 | const char *zVal = db_get(zVar, zDflt); |
| 772 | 772 | const char *zQ = P(zQParm); |
| 773 | - if( zQ && strcmp(zQ,zVal)!=0 ){ | |
| 773 | + if( zQ && fossil_strcmp(zQ,zVal)!=0 ){ | |
| 774 | 774 | login_verify_csrf_secret(); |
| 775 | 775 | db_set(zVar, zQ, 0); |
| 776 | 776 | zVal = zQ; |
| 777 | 777 | } |
| 778 | 778 | @ <input type="text" name="%s(zQParm)" value="%h(zVal)" size="%d(width)" /> |
| @@ -790,11 +790,11 @@ | ||
| 790 | 790 | const char *zQP, /* The query parameter */ |
| 791 | 791 | const char *zDflt /* Default value if VAR table entry does not exist */ |
| 792 | 792 | ){ |
| 793 | 793 | const char *z = db_get(zVar, (char*)zDflt); |
| 794 | 794 | const char *zQ = P(zQP); |
| 795 | - if( zQ && strcmp(zQ,z)!=0 ){ | |
| 795 | + if( zQ && fossil_strcmp(zQ,z)!=0 ){ | |
| 796 | 796 | login_verify_csrf_secret(); |
| 797 | 797 | db_set(zVar, zQ, 0); |
| 798 | 798 | z = zQ; |
| 799 | 799 | } |
| 800 | 800 | if( rows>0 && cols>0 ){ |
| 801 | 801 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -436,38 +436,38 @@ | |
| 436 | if( strchr(zCap, 'z') ) oaz = " checked=\"checked\""; |
| 437 | } |
| 438 | |
| 439 | /* figure out inherited permissions */ |
| 440 | memset(inherit, 0, sizeof(inherit)); |
| 441 | if( strcmp(zLogin, "developer") ){ |
| 442 | char *z1, *z2; |
| 443 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'"); |
| 444 | while( z1 && *z1 ){ |
| 445 | inherit[0x7f & *(z1++)] = |
| 446 | "<span class=\"ueditInheritDeveloper\">•</span>"; |
| 447 | } |
| 448 | free(z2); |
| 449 | } |
| 450 | if( strcmp(zLogin, "reader") ){ |
| 451 | char *z1, *z2; |
| 452 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'"); |
| 453 | while( z1 && *z1 ){ |
| 454 | inherit[0x7f & *(z1++)] = |
| 455 | "<span class=\"ueditInheritReader\">•</span>"; |
| 456 | } |
| 457 | free(z2); |
| 458 | } |
| 459 | if( strcmp(zLogin, "anonymous") ){ |
| 460 | char *z1, *z2; |
| 461 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'"); |
| 462 | while( z1 && *z1 ){ |
| 463 | inherit[0x7f & *(z1++)] = |
| 464 | "<span class=\"ueditInheritAnonymous\">•</span>"; |
| 465 | } |
| 466 | free(z2); |
| 467 | } |
| 468 | if( strcmp(zLogin, "nobody") ){ |
| 469 | char *z1, *z2; |
| 470 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'"); |
| 471 | while( z1 && *z1 ){ |
| 472 | inherit[0x7f & *(z1++)] = |
| 473 | "<span class=\"ueditInheritNobody\">•</span>"; |
| @@ -741,11 +741,11 @@ | |
| 741 | int iVal = db_get_boolean(zVar, dfltVal); |
| 742 | if( zQ==0 && P("submit") ){ |
| 743 | zQ = "off"; |
| 744 | } |
| 745 | if( zQ ){ |
| 746 | int iQ = strcmp(zQ,"on")==0 || atoi(zQ); |
| 747 | if( iQ!=iVal ){ |
| 748 | login_verify_csrf_secret(); |
| 749 | db_set(zVar, iQ ? "1" : "0", 0); |
| 750 | iVal = iQ; |
| 751 | } |
| @@ -768,11 +768,11 @@ | |
| 768 | const char *zQParm, /* The query parameter */ |
| 769 | char *zDflt /* Default value if VAR table entry does not exist */ |
| 770 | ){ |
| 771 | const char *zVal = db_get(zVar, zDflt); |
| 772 | const char *zQ = P(zQParm); |
| 773 | if( zQ && strcmp(zQ,zVal)!=0 ){ |
| 774 | login_verify_csrf_secret(); |
| 775 | db_set(zVar, zQ, 0); |
| 776 | zVal = zQ; |
| 777 | } |
| 778 | @ <input type="text" name="%s(zQParm)" value="%h(zVal)" size="%d(width)" /> |
| @@ -790,11 +790,11 @@ | |
| 790 | const char *zQP, /* The query parameter */ |
| 791 | const char *zDflt /* Default value if VAR table entry does not exist */ |
| 792 | ){ |
| 793 | const char *z = db_get(zVar, (char*)zDflt); |
| 794 | const char *zQ = P(zQP); |
| 795 | if( zQ && strcmp(zQ,z)!=0 ){ |
| 796 | login_verify_csrf_secret(); |
| 797 | db_set(zVar, zQ, 0); |
| 798 | z = zQ; |
| 799 | } |
| 800 | if( rows>0 && cols>0 ){ |
| 801 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -436,38 +436,38 @@ | |
| 436 | if( strchr(zCap, 'z') ) oaz = " checked=\"checked\""; |
| 437 | } |
| 438 | |
| 439 | /* figure out inherited permissions */ |
| 440 | memset(inherit, 0, sizeof(inherit)); |
| 441 | if( fossil_strcmp(zLogin, "developer") ){ |
| 442 | char *z1, *z2; |
| 443 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'"); |
| 444 | while( z1 && *z1 ){ |
| 445 | inherit[0x7f & *(z1++)] = |
| 446 | "<span class=\"ueditInheritDeveloper\">•</span>"; |
| 447 | } |
| 448 | free(z2); |
| 449 | } |
| 450 | if( fossil_strcmp(zLogin, "reader") ){ |
| 451 | char *z1, *z2; |
| 452 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'"); |
| 453 | while( z1 && *z1 ){ |
| 454 | inherit[0x7f & *(z1++)] = |
| 455 | "<span class=\"ueditInheritReader\">•</span>"; |
| 456 | } |
| 457 | free(z2); |
| 458 | } |
| 459 | if( fossil_strcmp(zLogin, "anonymous") ){ |
| 460 | char *z1, *z2; |
| 461 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'"); |
| 462 | while( z1 && *z1 ){ |
| 463 | inherit[0x7f & *(z1++)] = |
| 464 | "<span class=\"ueditInheritAnonymous\">•</span>"; |
| 465 | } |
| 466 | free(z2); |
| 467 | } |
| 468 | if( fossil_strcmp(zLogin, "nobody") ){ |
| 469 | char *z1, *z2; |
| 470 | z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'"); |
| 471 | while( z1 && *z1 ){ |
| 472 | inherit[0x7f & *(z1++)] = |
| 473 | "<span class=\"ueditInheritNobody\">•</span>"; |
| @@ -741,11 +741,11 @@ | |
| 741 | int iVal = db_get_boolean(zVar, dfltVal); |
| 742 | if( zQ==0 && P("submit") ){ |
| 743 | zQ = "off"; |
| 744 | } |
| 745 | if( zQ ){ |
| 746 | int iQ = fossil_strcmp(zQ,"on")==0 || atoi(zQ); |
| 747 | if( iQ!=iVal ){ |
| 748 | login_verify_csrf_secret(); |
| 749 | db_set(zVar, iQ ? "1" : "0", 0); |
| 750 | iVal = iQ; |
| 751 | } |
| @@ -768,11 +768,11 @@ | |
| 768 | const char *zQParm, /* The query parameter */ |
| 769 | char *zDflt /* Default value if VAR table entry does not exist */ |
| 770 | ){ |
| 771 | const char *zVal = db_get(zVar, zDflt); |
| 772 | const char *zQ = P(zQParm); |
| 773 | if( zQ && fossil_strcmp(zQ,zVal)!=0 ){ |
| 774 | login_verify_csrf_secret(); |
| 775 | db_set(zVar, zQ, 0); |
| 776 | zVal = zQ; |
| 777 | } |
| 778 | @ <input type="text" name="%s(zQParm)" value="%h(zVal)" size="%d(width)" /> |
| @@ -790,11 +790,11 @@ | |
| 790 | const char *zQP, /* The query parameter */ |
| 791 | const char *zDflt /* Default value if VAR table entry does not exist */ |
| 792 | ){ |
| 793 | const char *z = db_get(zVar, (char*)zDflt); |
| 794 | const char *zQ = P(zQP); |
| 795 | if( zQ && fossil_strcmp(zQ,z)!=0 ){ |
| 796 | login_verify_csrf_secret(); |
| 797 | db_set(zVar, zQ, 0); |
| 798 | z = zQ; |
| 799 | } |
| 800 | if( rows>0 && cols>0 ){ |
| 801 |
+5
-5
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -1053,11 +1053,11 @@ | ||
| 1053 | 1053 | setDefaultSkin(); |
| 1054 | 1054 | zCurrent = getSkin(0); |
| 1055 | 1055 | |
| 1056 | 1056 | if( P("save")!=0 && (zName = skinVarName(P("save"),0))!=0 ){ |
| 1057 | 1057 | if( db_exists("SELECT 1 FROM config WHERE name=%Q", zName) |
| 1058 | - || strcmp(zName, "Default")==0 ){ | |
| 1058 | + || fossil_strcmp(zName, "Default")==0 ){ | |
| 1059 | 1059 | zErr = mprintf("Skin name \"%h\" already exists. " |
| 1060 | 1060 | "Choose a different name.", P("sn")); |
| 1061 | 1061 | }else{ |
| 1062 | 1062 | db_multi_exec("INSERT INTO config(name,value,mtime) VALUES(%Q,%Q,now())", |
| 1063 | 1063 | zName, zCurrent |
| @@ -1067,11 +1067,11 @@ | ||
| 1067 | 1067 | |
| 1068 | 1068 | /* The user pressed the "Use This Skin" button. */ |
| 1069 | 1069 | if( P("load") && (z = P("sn"))!=0 && z[0] ){ |
| 1070 | 1070 | int seen = 0; |
| 1071 | 1071 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1072 | - if( strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ | |
| 1072 | + if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ | |
| 1073 | 1073 | seen = 1; |
| 1074 | 1074 | break; |
| 1075 | 1075 | } |
| 1076 | 1076 | } |
| 1077 | 1077 | if( !seen ){ |
| @@ -1085,11 +1085,11 @@ | ||
| 1085 | 1085 | " %Q,now())", zCurrent |
| 1086 | 1086 | ); |
| 1087 | 1087 | } |
| 1088 | 1088 | seen = 0; |
| 1089 | 1089 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1090 | - if( strcmp(aBuiltinSkin[i].zName, z)==0 ){ | |
| 1090 | + if( fossil_strcmp(aBuiltinSkin[i].zName, z)==0 ){ | |
| 1091 | 1091 | seen = 1; |
| 1092 | 1092 | zCurrent = aBuiltinSkin[i].zValue; |
| 1093 | 1093 | db_multi_exec("%s", zCurrent); |
| 1094 | 1094 | break; |
| 1095 | 1095 | } |
| @@ -1111,11 +1111,11 @@ | ||
| 1111 | 1111 | @ |
| 1112 | 1112 | @ <h2>Available Skins:</h2> |
| 1113 | 1113 | @ <ol> |
| 1114 | 1114 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1115 | 1115 | z = aBuiltinSkin[i].zName; |
| 1116 | - if( strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ | |
| 1116 | + if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ | |
| 1117 | 1117 | @ <li><p>%h(z). <b>Currently In Use</b></p> |
| 1118 | 1118 | }else{ |
| 1119 | 1119 | @ <li><form action="%s(g.zTop)/setup_skin" method="post"><div> |
| 1120 | 1120 | @ %h(z). |
| 1121 | 1121 | @ <input type="hidden" name="sn" value="%h(z)" /> |
| @@ -1129,11 +1129,11 @@ | ||
| 1129 | 1129 | " ORDER BY name" |
| 1130 | 1130 | ); |
| 1131 | 1131 | while( db_step(&q)==SQLITE_ROW ){ |
| 1132 | 1132 | const char *zN = db_column_text(&q, 0); |
| 1133 | 1133 | const char *zV = db_column_text(&q, 1); |
| 1134 | - if( strcmp(zV, zCurrent)==0 ){ | |
| 1134 | + if( fossil_strcmp(zV, zCurrent)==0 ){ | |
| 1135 | 1135 | @ <li><p>%h(zN). <b>Currently In Use</b></p> |
| 1136 | 1136 | }else{ |
| 1137 | 1137 | @ <li><form action="%s(g.zTop)/setup_skin" method="post"> |
| 1138 | 1138 | @ %h(zN). |
| 1139 | 1139 | @ <input type="hidden" name="sn" value="%h(zN)"> |
| 1140 | 1140 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -1053,11 +1053,11 @@ | |
| 1053 | setDefaultSkin(); |
| 1054 | zCurrent = getSkin(0); |
| 1055 | |
| 1056 | if( P("save")!=0 && (zName = skinVarName(P("save"),0))!=0 ){ |
| 1057 | if( db_exists("SELECT 1 FROM config WHERE name=%Q", zName) |
| 1058 | || strcmp(zName, "Default")==0 ){ |
| 1059 | zErr = mprintf("Skin name \"%h\" already exists. " |
| 1060 | "Choose a different name.", P("sn")); |
| 1061 | }else{ |
| 1062 | db_multi_exec("INSERT INTO config(name,value,mtime) VALUES(%Q,%Q,now())", |
| 1063 | zName, zCurrent |
| @@ -1067,11 +1067,11 @@ | |
| 1067 | |
| 1068 | /* The user pressed the "Use This Skin" button. */ |
| 1069 | if( P("load") && (z = P("sn"))!=0 && z[0] ){ |
| 1070 | int seen = 0; |
| 1071 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1072 | if( strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ |
| 1073 | seen = 1; |
| 1074 | break; |
| 1075 | } |
| 1076 | } |
| 1077 | if( !seen ){ |
| @@ -1085,11 +1085,11 @@ | |
| 1085 | " %Q,now())", zCurrent |
| 1086 | ); |
| 1087 | } |
| 1088 | seen = 0; |
| 1089 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1090 | if( strcmp(aBuiltinSkin[i].zName, z)==0 ){ |
| 1091 | seen = 1; |
| 1092 | zCurrent = aBuiltinSkin[i].zValue; |
| 1093 | db_multi_exec("%s", zCurrent); |
| 1094 | break; |
| 1095 | } |
| @@ -1111,11 +1111,11 @@ | |
| 1111 | @ |
| 1112 | @ <h2>Available Skins:</h2> |
| 1113 | @ <ol> |
| 1114 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1115 | z = aBuiltinSkin[i].zName; |
| 1116 | if( strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ |
| 1117 | @ <li><p>%h(z). <b>Currently In Use</b></p> |
| 1118 | }else{ |
| 1119 | @ <li><form action="%s(g.zTop)/setup_skin" method="post"><div> |
| 1120 | @ %h(z). |
| 1121 | @ <input type="hidden" name="sn" value="%h(z)" /> |
| @@ -1129,11 +1129,11 @@ | |
| 1129 | " ORDER BY name" |
| 1130 | ); |
| 1131 | while( db_step(&q)==SQLITE_ROW ){ |
| 1132 | const char *zN = db_column_text(&q, 0); |
| 1133 | const char *zV = db_column_text(&q, 1); |
| 1134 | if( strcmp(zV, zCurrent)==0 ){ |
| 1135 | @ <li><p>%h(zN). <b>Currently In Use</b></p> |
| 1136 | }else{ |
| 1137 | @ <li><form action="%s(g.zTop)/setup_skin" method="post"> |
| 1138 | @ %h(zN). |
| 1139 | @ <input type="hidden" name="sn" value="%h(zN)"> |
| 1140 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -1053,11 +1053,11 @@ | |
| 1053 | setDefaultSkin(); |
| 1054 | zCurrent = getSkin(0); |
| 1055 | |
| 1056 | if( P("save")!=0 && (zName = skinVarName(P("save"),0))!=0 ){ |
| 1057 | if( db_exists("SELECT 1 FROM config WHERE name=%Q", zName) |
| 1058 | || fossil_strcmp(zName, "Default")==0 ){ |
| 1059 | zErr = mprintf("Skin name \"%h\" already exists. " |
| 1060 | "Choose a different name.", P("sn")); |
| 1061 | }else{ |
| 1062 | db_multi_exec("INSERT INTO config(name,value,mtime) VALUES(%Q,%Q,now())", |
| 1063 | zName, zCurrent |
| @@ -1067,11 +1067,11 @@ | |
| 1067 | |
| 1068 | /* The user pressed the "Use This Skin" button. */ |
| 1069 | if( P("load") && (z = P("sn"))!=0 && z[0] ){ |
| 1070 | int seen = 0; |
| 1071 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1072 | if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ |
| 1073 | seen = 1; |
| 1074 | break; |
| 1075 | } |
| 1076 | } |
| 1077 | if( !seen ){ |
| @@ -1085,11 +1085,11 @@ | |
| 1085 | " %Q,now())", zCurrent |
| 1086 | ); |
| 1087 | } |
| 1088 | seen = 0; |
| 1089 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1090 | if( fossil_strcmp(aBuiltinSkin[i].zName, z)==0 ){ |
| 1091 | seen = 1; |
| 1092 | zCurrent = aBuiltinSkin[i].zValue; |
| 1093 | db_multi_exec("%s", zCurrent); |
| 1094 | break; |
| 1095 | } |
| @@ -1111,11 +1111,11 @@ | |
| 1111 | @ |
| 1112 | @ <h2>Available Skins:</h2> |
| 1113 | @ <ol> |
| 1114 | for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){ |
| 1115 | z = aBuiltinSkin[i].zName; |
| 1116 | if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){ |
| 1117 | @ <li><p>%h(z). <b>Currently In Use</b></p> |
| 1118 | }else{ |
| 1119 | @ <li><form action="%s(g.zTop)/setup_skin" method="post"><div> |
| 1120 | @ %h(z). |
| 1121 | @ <input type="hidden" name="sn" value="%h(z)" /> |
| @@ -1129,11 +1129,11 @@ | |
| 1129 | " ORDER BY name" |
| 1130 | ); |
| 1131 | while( db_step(&q)==SQLITE_ROW ){ |
| 1132 | const char *zN = db_column_text(&q, 0); |
| 1133 | const char *zV = db_column_text(&q, 1); |
| 1134 | if( fossil_strcmp(zV, zCurrent)==0 ){ |
| 1135 | @ <li><p>%h(zN). <b>Currently In Use</b></p> |
| 1136 | }else{ |
| 1137 | @ <li><form action="%s(g.zTop)/setup_skin" method="post"> |
| 1138 | @ %h(zN). |
| 1139 | @ <input type="hidden" name="sn" value="%h(zN)"> |
| 1140 |
+1
-1
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -309,11 +309,11 @@ | ||
| 309 | 309 | if( !g.okZip ){ login_needed(); return; } |
| 310 | 310 | zName = mprintf("%s", PD("name","")); |
| 311 | 311 | nName = strlen(zName); |
| 312 | 312 | zRid = mprintf("%s", PD("uuid","")); |
| 313 | 313 | nRid = strlen(zRid); |
| 314 | - if( nName>7 && strcmp(&zName[nName-7], ".tar.gz")==0 ){ | |
| 314 | + if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ | |
| 315 | 315 | /* Special case: Remove the ".tar.gz" suffix. */ |
| 316 | 316 | nName -= 7; |
| 317 | 317 | zName[nName] = 0; |
| 318 | 318 | }else{ |
| 319 | 319 | /* If the file suffix is not ".tar.gz" then just remove the |
| 320 | 320 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | if( !g.okZip ){ login_needed(); return; } |
| 310 | zName = mprintf("%s", PD("name","")); |
| 311 | nName = strlen(zName); |
| 312 | zRid = mprintf("%s", PD("uuid","")); |
| 313 | nRid = strlen(zRid); |
| 314 | if( nName>7 && strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 315 | /* Special case: Remove the ".tar.gz" suffix. */ |
| 316 | nName -= 7; |
| 317 | zName[nName] = 0; |
| 318 | }else{ |
| 319 | /* If the file suffix is not ".tar.gz" then just remove the |
| 320 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | if( !g.okZip ){ login_needed(); return; } |
| 310 | zName = mprintf("%s", PD("name","")); |
| 311 | nName = strlen(zName); |
| 312 | zRid = mprintf("%s", PD("uuid","")); |
| 313 | nRid = strlen(zRid); |
| 314 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 315 | /* Special case: Remove the ".tar.gz" suffix. */ |
| 316 | nName -= 7; |
| 317 | zName[nName] = 0; |
| 318 | }else{ |
| 319 | /* If the file suffix is not ".tar.gz" then just remove the |
| 320 |
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1350,11 +1350,11 @@ | ||
| 1350 | 1350 | zOrigin = "now"; |
| 1351 | 1351 | } |
| 1352 | 1352 | k = strlen(zOrigin); |
| 1353 | 1353 | blob_zero(&uuid); |
| 1354 | 1354 | blob_append(&uuid, zOrigin, -1); |
| 1355 | - if( strcmp(zOrigin, "now")==0 ){ | |
| 1355 | + if( fossil_strcmp(zOrigin, "now")==0 ){ | |
| 1356 | 1356 | if( mode==3 || mode==4 ){ |
| 1357 | 1357 | fossil_fatal("cannot compute descendants or ancestors of a date"); |
| 1358 | 1358 | } |
| 1359 | 1359 | zDate = mprintf("(SELECT datetime('now'))"); |
| 1360 | 1360 | }else if( strncmp(zOrigin, "current", k)==0 ){ |
| 1361 | 1361 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1350,11 +1350,11 @@ | |
| 1350 | zOrigin = "now"; |
| 1351 | } |
| 1352 | k = strlen(zOrigin); |
| 1353 | blob_zero(&uuid); |
| 1354 | blob_append(&uuid, zOrigin, -1); |
| 1355 | if( strcmp(zOrigin, "now")==0 ){ |
| 1356 | if( mode==3 || mode==4 ){ |
| 1357 | fossil_fatal("cannot compute descendants or ancestors of a date"); |
| 1358 | } |
| 1359 | zDate = mprintf("(SELECT datetime('now'))"); |
| 1360 | }else if( strncmp(zOrigin, "current", k)==0 ){ |
| 1361 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1350,11 +1350,11 @@ | |
| 1350 | zOrigin = "now"; |
| 1351 | } |
| 1352 | k = strlen(zOrigin); |
| 1353 | blob_zero(&uuid); |
| 1354 | blob_append(&uuid, zOrigin, -1); |
| 1355 | if( fossil_strcmp(zOrigin, "now")==0 ){ |
| 1356 | if( mode==3 || mode==4 ){ |
| 1357 | fossil_fatal("cannot compute descendants or ancestors of a date"); |
| 1358 | } |
| 1359 | zDate = mprintf("(SELECT datetime('now'))"); |
| 1360 | }else if( strncmp(zOrigin, "current", k)==0 ){ |
| 1361 |
+3
-3
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -34,11 +34,11 @@ | ||
| 34 | 34 | |
| 35 | 35 | /* |
| 36 | 36 | ** Compare two entries in azField for sorting purposes |
| 37 | 37 | */ |
| 38 | 38 | static int nameCmpr(const void *a, const void *b){ |
| 39 | - return strcmp(*(char**)a, *(char**)b); | |
| 39 | + return fossil_strcmp(*(char**)a, *(char**)b); | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /* |
| 43 | 43 | ** Obtain a list of all fields of the TICKET table. Put them |
| 44 | 44 | ** in sorted order in azField[]. |
| @@ -75,11 +75,11 @@ | ||
| 75 | 75 | ** Return -1 if zField is not in azField[]. |
| 76 | 76 | */ |
| 77 | 77 | static int fieldId(const char *zField){ |
| 78 | 78 | int i; |
| 79 | 79 | for(i=0; i<nField; i++){ |
| 80 | - if( strcmp(azField[i], zField)==0 ) return i; | |
| 80 | + if( fossil_strcmp(azField[i], zField)==0 ) return i; | |
| 81 | 81 | } |
| 82 | 82 | return -1; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /* |
| @@ -115,11 +115,11 @@ | ||
| 115 | 115 | zVal = ""; |
| 116 | 116 | }else if( strncmp(zName, "private_", 8)==0 ){ |
| 117 | 117 | zVal = zRevealed = db_reveal(zVal); |
| 118 | 118 | } |
| 119 | 119 | for(j=0; j<nField; j++){ |
| 120 | - if( strcmp(azField[j],zName)==0 ){ | |
| 120 | + if( fossil_strcmp(azField[j],zName)==0 ){ | |
| 121 | 121 | azValue[j] = mprintf("%s", zVal); |
| 122 | 122 | break; |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | if( Th_Fetch(zName, &size)==0 ){ |
| 126 | 126 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -34,11 +34,11 @@ | |
| 34 | |
| 35 | /* |
| 36 | ** Compare two entries in azField for sorting purposes |
| 37 | */ |
| 38 | static int nameCmpr(const void *a, const void *b){ |
| 39 | return strcmp(*(char**)a, *(char**)b); |
| 40 | } |
| 41 | |
| 42 | /* |
| 43 | ** Obtain a list of all fields of the TICKET table. Put them |
| 44 | ** in sorted order in azField[]. |
| @@ -75,11 +75,11 @@ | |
| 75 | ** Return -1 if zField is not in azField[]. |
| 76 | */ |
| 77 | static int fieldId(const char *zField){ |
| 78 | int i; |
| 79 | for(i=0; i<nField; i++){ |
| 80 | if( strcmp(azField[i], zField)==0 ) return i; |
| 81 | } |
| 82 | return -1; |
| 83 | } |
| 84 | |
| 85 | /* |
| @@ -115,11 +115,11 @@ | |
| 115 | zVal = ""; |
| 116 | }else if( strncmp(zName, "private_", 8)==0 ){ |
| 117 | zVal = zRevealed = db_reveal(zVal); |
| 118 | } |
| 119 | for(j=0; j<nField; j++){ |
| 120 | if( strcmp(azField[j],zName)==0 ){ |
| 121 | azValue[j] = mprintf("%s", zVal); |
| 122 | break; |
| 123 | } |
| 124 | } |
| 125 | if( Th_Fetch(zName, &size)==0 ){ |
| 126 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -34,11 +34,11 @@ | |
| 34 | |
| 35 | /* |
| 36 | ** Compare two entries in azField for sorting purposes |
| 37 | */ |
| 38 | static int nameCmpr(const void *a, const void *b){ |
| 39 | return fossil_strcmp(*(char**)a, *(char**)b); |
| 40 | } |
| 41 | |
| 42 | /* |
| 43 | ** Obtain a list of all fields of the TICKET table. Put them |
| 44 | ** in sorted order in azField[]. |
| @@ -75,11 +75,11 @@ | |
| 75 | ** Return -1 if zField is not in azField[]. |
| 76 | */ |
| 77 | static int fieldId(const char *zField){ |
| 78 | int i; |
| 79 | for(i=0; i<nField; i++){ |
| 80 | if( fossil_strcmp(azField[i], zField)==0 ) return i; |
| 81 | } |
| 82 | return -1; |
| 83 | } |
| 84 | |
| 85 | /* |
| @@ -115,11 +115,11 @@ | |
| 115 | zVal = ""; |
| 116 | }else if( strncmp(zName, "private_", 8)==0 ){ |
| 117 | zVal = zRevealed = db_reveal(zVal); |
| 118 | } |
| 119 | for(j=0; j<nField; j++){ |
| 120 | if( fossil_strcmp(azField[j],zName)==0 ){ |
| 121 | azValue[j] = mprintf("%s", zVal); |
| 122 | break; |
| 123 | } |
| 124 | } |
| 125 | if( Th_Fetch(zName, &size)==0 ){ |
| 126 |
+2
-2
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -119,14 +119,14 @@ | ||
| 119 | 119 | if( !nochangeFlag && !internalUpdate ) autosync(AUTOSYNC_PULL); |
| 120 | 120 | |
| 121 | 121 | if( internalUpdate ){ |
| 122 | 122 | tid = internalUpdate; |
| 123 | 123 | }else if( g.argc>=3 ){ |
| 124 | - if( strcmp(g.argv[2], "current")==0 ){ | |
| 124 | + if( fossil_strcmp(g.argv[2], "current")==0 ){ | |
| 125 | 125 | /* If VERSION is "current", then use the same algorithm to find the |
| 126 | 126 | ** target as if VERSION were omitted. */ |
| 127 | - }else if( strcmp(g.argv[2], "latest")==0 ){ | |
| 127 | + }else if( fossil_strcmp(g.argv[2], "latest")==0 ){ | |
| 128 | 128 | /* If VERSION is "latest", then use the same algorithm to find the |
| 129 | 129 | ** target as if VERSION were omitted and the --latest flag is present. |
| 130 | 130 | */ |
| 131 | 131 | latestFlag = 1; |
| 132 | 132 | }else{ |
| 133 | 133 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -119,14 +119,14 @@ | |
| 119 | if( !nochangeFlag && !internalUpdate ) autosync(AUTOSYNC_PULL); |
| 120 | |
| 121 | if( internalUpdate ){ |
| 122 | tid = internalUpdate; |
| 123 | }else if( g.argc>=3 ){ |
| 124 | if( strcmp(g.argv[2], "current")==0 ){ |
| 125 | /* If VERSION is "current", then use the same algorithm to find the |
| 126 | ** target as if VERSION were omitted. */ |
| 127 | }else if( strcmp(g.argv[2], "latest")==0 ){ |
| 128 | /* If VERSION is "latest", then use the same algorithm to find the |
| 129 | ** target as if VERSION were omitted and the --latest flag is present. |
| 130 | */ |
| 131 | latestFlag = 1; |
| 132 | }else{ |
| 133 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -119,14 +119,14 @@ | |
| 119 | if( !nochangeFlag && !internalUpdate ) autosync(AUTOSYNC_PULL); |
| 120 | |
| 121 | if( internalUpdate ){ |
| 122 | tid = internalUpdate; |
| 123 | }else if( g.argc>=3 ){ |
| 124 | if( fossil_strcmp(g.argv[2], "current")==0 ){ |
| 125 | /* If VERSION is "current", then use the same algorithm to find the |
| 126 | ** target as if VERSION were omitted. */ |
| 127 | }else if( fossil_strcmp(g.argv[2], "latest")==0 ){ |
| 128 | /* If VERSION is "latest", then use the same algorithm to find the |
| 129 | ** target as if VERSION were omitted and the --latest flag is present. |
| 130 | */ |
| 131 | latestFlag = 1; |
| 132 | }else{ |
| 133 |
+2
-2
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -340,16 +340,16 @@ | ||
| 340 | 340 | |
| 341 | 341 | blob_reset(&p->url); |
| 342 | 342 | blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase); |
| 343 | 343 | for(i=0; i<p->nParam; i++){ |
| 344 | 344 | const char *z = p->azValue[i]; |
| 345 | - if( zName1 && strcmp(zName1,p->azName[i])==0 ){ | |
| 345 | + if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){ | |
| 346 | 346 | zName1 = 0; |
| 347 | 347 | z = zValue1; |
| 348 | 348 | if( z==0 ) continue; |
| 349 | 349 | } |
| 350 | - if( zName2 && strcmp(zName2,p->azName[i])==0 ){ | |
| 350 | + if( zName2 && fossil_strcmp(zName2,p->azName[i])==0 ){ | |
| 351 | 351 | zName2 = 0; |
| 352 | 352 | z = zValue2; |
| 353 | 353 | if( z==0 ) continue; |
| 354 | 354 | } |
| 355 | 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | 356 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -340,16 +340,16 @@ | |
| 340 | |
| 341 | blob_reset(&p->url); |
| 342 | blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase); |
| 343 | for(i=0; i<p->nParam; i++){ |
| 344 | const char *z = p->azValue[i]; |
| 345 | if( zName1 && strcmp(zName1,p->azName[i])==0 ){ |
| 346 | zName1 = 0; |
| 347 | z = zValue1; |
| 348 | if( z==0 ) continue; |
| 349 | } |
| 350 | if( zName2 && strcmp(zName2,p->azName[i])==0 ){ |
| 351 | zName2 = 0; |
| 352 | z = zValue2; |
| 353 | if( z==0 ) continue; |
| 354 | } |
| 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -340,16 +340,16 @@ | |
| 340 | |
| 341 | blob_reset(&p->url); |
| 342 | blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase); |
| 343 | for(i=0; i<p->nParam; i++){ |
| 344 | const char *z = p->azValue[i]; |
| 345 | if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){ |
| 346 | zName1 = 0; |
| 347 | z = zValue1; |
| 348 | if( z==0 ) continue; |
| 349 | } |
| 350 | if( zName2 && fossil_strcmp(zName2,p->azName[i])==0 ){ |
| 351 | zName2 = 0; |
| 352 | z = zValue2; |
| 353 | if( z==0 ) continue; |
| 354 | } |
| 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 |
+2
-2
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -85,11 +85,11 @@ | ||
| 85 | 85 | login_check_credentials(); |
| 86 | 86 | if( zIndexPage ){ |
| 87 | 87 | const char *zPathInfo = P("PATH_INFO"); |
| 88 | 88 | while( zIndexPage[0]=='/' ) zIndexPage++; |
| 89 | 89 | while( zPathInfo[0]=='/' ) zPathInfo++; |
| 90 | - if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0; | |
| 90 | + if( fossil_strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0; | |
| 91 | 91 | } |
| 92 | 92 | if( zIndexPage ){ |
| 93 | 93 | cgi_redirectf("%s/%s", g.zTop, zIndexPage); |
| 94 | 94 | } |
| 95 | 95 | if( !g.okRdWiki ){ |
| @@ -415,11 +415,11 @@ | ||
| 415 | 415 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 416 | 416 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 417 | 417 | zId, zDate, g.zLogin); |
| 418 | 418 | free(zDate); |
| 419 | 419 | zUser = PD("u",g.zLogin); |
| 420 | - if( zUser[0] && strcmp(zUser,g.zLogin) ){ | |
| 420 | + if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 421 | 421 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 422 | 422 | } |
| 423 | 423 | zRemark = PD("r",""); |
| 424 | 424 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 425 | 425 | } |
| 426 | 426 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -85,11 +85,11 @@ | |
| 85 | login_check_credentials(); |
| 86 | if( zIndexPage ){ |
| 87 | const char *zPathInfo = P("PATH_INFO"); |
| 88 | while( zIndexPage[0]=='/' ) zIndexPage++; |
| 89 | while( zPathInfo[0]=='/' ) zPathInfo++; |
| 90 | if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0; |
| 91 | } |
| 92 | if( zIndexPage ){ |
| 93 | cgi_redirectf("%s/%s", g.zTop, zIndexPage); |
| 94 | } |
| 95 | if( !g.okRdWiki ){ |
| @@ -415,11 +415,11 @@ | |
| 415 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 416 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 417 | zId, zDate, g.zLogin); |
| 418 | free(zDate); |
| 419 | zUser = PD("u",g.zLogin); |
| 420 | if( zUser[0] && strcmp(zUser,g.zLogin) ){ |
| 421 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 422 | } |
| 423 | zRemark = PD("r",""); |
| 424 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 425 | } |
| 426 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -85,11 +85,11 @@ | |
| 85 | login_check_credentials(); |
| 86 | if( zIndexPage ){ |
| 87 | const char *zPathInfo = P("PATH_INFO"); |
| 88 | while( zIndexPage[0]=='/' ) zIndexPage++; |
| 89 | while( zPathInfo[0]=='/' ) zPathInfo++; |
| 90 | if( fossil_strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0; |
| 91 | } |
| 92 | if( zIndexPage ){ |
| 93 | cgi_redirectf("%s/%s", g.zTop, zIndexPage); |
| 94 | } |
| 95 | if( !g.okRdWiki ){ |
| @@ -415,11 +415,11 @@ | |
| 415 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 416 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 417 | zId, zDate, g.zLogin); |
| 418 | free(zDate); |
| 419 | zUser = PD("u",g.zLogin); |
| 420 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 421 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 422 | } |
| 423 | zRemark = PD("r",""); |
| 424 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 425 | } |
| 426 |
+5
-5
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -131,11 +131,11 @@ | ||
| 131 | 131 | int i, c, first, last; |
| 132 | 132 | first = 1; |
| 133 | 133 | last = sizeof(aAttribute)/sizeof(aAttribute[0]) - 1; |
| 134 | 134 | while( first<=last ){ |
| 135 | 135 | i = (first+last)/2; |
| 136 | - c = strcmp(aAttribute[i].zName, z); | |
| 136 | + c = fossil_strcmp(aAttribute[i].zName, z); | |
| 137 | 137 | if( c==0 ){ |
| 138 | 138 | return i; |
| 139 | 139 | }else if( c<0 ){ |
| 140 | 140 | first = i+1; |
| 141 | 141 | }else{ |
| @@ -330,11 +330,11 @@ | ||
| 330 | 330 | int i, c, first, last; |
| 331 | 331 | first = 1; |
| 332 | 332 | last = sizeof(aMarkup)/sizeof(aMarkup[0]) - 1; |
| 333 | 333 | while( first<=last ){ |
| 334 | 334 | i = (first+last)/2; |
| 335 | - c = strcmp(aMarkup[i].zName, z); | |
| 335 | + c = fossil_strcmp(aMarkup[i].zName, z); | |
| 336 | 336 | if( c==0 ){ |
| 337 | 337 | assert( aMarkup[i].iCode==i ); |
| 338 | 338 | return i; |
| 339 | 339 | }else if( c<0 ){ |
| 340 | 340 | first = i+1; |
| @@ -880,11 +880,11 @@ | ||
| 880 | 880 | int i; |
| 881 | 881 | assert( zId!=0 ); |
| 882 | 882 | for(i=p->nStack-1; i>=0; i--){ |
| 883 | 883 | if( p->aStack[i].iCode!=iTag ) continue; |
| 884 | 884 | if( p->aStack[i].zId==0 ) continue; |
| 885 | - if( strcmp(zId, p->aStack[i].zId)!=0 ) continue; | |
| 885 | + if( fossil_strcmp(zId, p->aStack[i].zId)!=0 ) continue; | |
| 886 | 886 | break; |
| 887 | 887 | } |
| 888 | 888 | return i; |
| 889 | 889 | } |
| 890 | 890 | |
| @@ -1118,11 +1118,11 @@ | ||
| 1118 | 1118 | if( pMarkup->iCode!=MARKUP_VERBATIM ) return 0; |
| 1119 | 1119 | if( !pMarkup->endTag ) return 0; |
| 1120 | 1120 | if( p->zVerbatimId==0 ) return 1; |
| 1121 | 1121 | if( pMarkup->nAttr!=1 ) return 0; |
| 1122 | 1122 | z = pMarkup->aAttr[0].zValue; |
| 1123 | - return strcmp(z, p->zVerbatimId)==0; | |
| 1123 | + return fossil_strcmp(z, p->zVerbatimId)==0; | |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | 1126 | /* |
| 1127 | 1127 | ** Return the MUTYPE for the top of the stack. |
| 1128 | 1128 | */ |
| @@ -1144,11 +1144,11 @@ | ||
| 1144 | 1144 | int inlineOnly = (p->state & INLINE_MARKUP_ONLY)!=0; |
| 1145 | 1145 | int wikiUseHtml = (p->state & WIKI_USE_HTML)!=0; |
| 1146 | 1146 | |
| 1147 | 1147 | /* Make sure the attribute constants and names still align |
| 1148 | 1148 | ** following changes in the attribute list. */ |
| 1149 | - assert( strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 ); | |
| 1149 | + assert( fossil_strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 ); | |
| 1150 | 1150 | |
| 1151 | 1151 | while( z[0] ){ |
| 1152 | 1152 | if( wikiUseHtml ){ |
| 1153 | 1153 | n = nextRawToken(z, p, &tokenType); |
| 1154 | 1154 | }else{ |
| 1155 | 1155 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -131,11 +131,11 @@ | |
| 131 | int i, c, first, last; |
| 132 | first = 1; |
| 133 | last = sizeof(aAttribute)/sizeof(aAttribute[0]) - 1; |
| 134 | while( first<=last ){ |
| 135 | i = (first+last)/2; |
| 136 | c = strcmp(aAttribute[i].zName, z); |
| 137 | if( c==0 ){ |
| 138 | return i; |
| 139 | }else if( c<0 ){ |
| 140 | first = i+1; |
| 141 | }else{ |
| @@ -330,11 +330,11 @@ | |
| 330 | int i, c, first, last; |
| 331 | first = 1; |
| 332 | last = sizeof(aMarkup)/sizeof(aMarkup[0]) - 1; |
| 333 | while( first<=last ){ |
| 334 | i = (first+last)/2; |
| 335 | c = strcmp(aMarkup[i].zName, z); |
| 336 | if( c==0 ){ |
| 337 | assert( aMarkup[i].iCode==i ); |
| 338 | return i; |
| 339 | }else if( c<0 ){ |
| 340 | first = i+1; |
| @@ -880,11 +880,11 @@ | |
| 880 | int i; |
| 881 | assert( zId!=0 ); |
| 882 | for(i=p->nStack-1; i>=0; i--){ |
| 883 | if( p->aStack[i].iCode!=iTag ) continue; |
| 884 | if( p->aStack[i].zId==0 ) continue; |
| 885 | if( strcmp(zId, p->aStack[i].zId)!=0 ) continue; |
| 886 | break; |
| 887 | } |
| 888 | return i; |
| 889 | } |
| 890 | |
| @@ -1118,11 +1118,11 @@ | |
| 1118 | if( pMarkup->iCode!=MARKUP_VERBATIM ) return 0; |
| 1119 | if( !pMarkup->endTag ) return 0; |
| 1120 | if( p->zVerbatimId==0 ) return 1; |
| 1121 | if( pMarkup->nAttr!=1 ) return 0; |
| 1122 | z = pMarkup->aAttr[0].zValue; |
| 1123 | return strcmp(z, p->zVerbatimId)==0; |
| 1124 | } |
| 1125 | |
| 1126 | /* |
| 1127 | ** Return the MUTYPE for the top of the stack. |
| 1128 | */ |
| @@ -1144,11 +1144,11 @@ | |
| 1144 | int inlineOnly = (p->state & INLINE_MARKUP_ONLY)!=0; |
| 1145 | int wikiUseHtml = (p->state & WIKI_USE_HTML)!=0; |
| 1146 | |
| 1147 | /* Make sure the attribute constants and names still align |
| 1148 | ** following changes in the attribute list. */ |
| 1149 | assert( strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 ); |
| 1150 | |
| 1151 | while( z[0] ){ |
| 1152 | if( wikiUseHtml ){ |
| 1153 | n = nextRawToken(z, p, &tokenType); |
| 1154 | }else{ |
| 1155 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -131,11 +131,11 @@ | |
| 131 | int i, c, first, last; |
| 132 | first = 1; |
| 133 | last = sizeof(aAttribute)/sizeof(aAttribute[0]) - 1; |
| 134 | while( first<=last ){ |
| 135 | i = (first+last)/2; |
| 136 | c = fossil_strcmp(aAttribute[i].zName, z); |
| 137 | if( c==0 ){ |
| 138 | return i; |
| 139 | }else if( c<0 ){ |
| 140 | first = i+1; |
| 141 | }else{ |
| @@ -330,11 +330,11 @@ | |
| 330 | int i, c, first, last; |
| 331 | first = 1; |
| 332 | last = sizeof(aMarkup)/sizeof(aMarkup[0]) - 1; |
| 333 | while( first<=last ){ |
| 334 | i = (first+last)/2; |
| 335 | c = fossil_strcmp(aMarkup[i].zName, z); |
| 336 | if( c==0 ){ |
| 337 | assert( aMarkup[i].iCode==i ); |
| 338 | return i; |
| 339 | }else if( c<0 ){ |
| 340 | first = i+1; |
| @@ -880,11 +880,11 @@ | |
| 880 | int i; |
| 881 | assert( zId!=0 ); |
| 882 | for(i=p->nStack-1; i>=0; i--){ |
| 883 | if( p->aStack[i].iCode!=iTag ) continue; |
| 884 | if( p->aStack[i].zId==0 ) continue; |
| 885 | if( fossil_strcmp(zId, p->aStack[i].zId)!=0 ) continue; |
| 886 | break; |
| 887 | } |
| 888 | return i; |
| 889 | } |
| 890 | |
| @@ -1118,11 +1118,11 @@ | |
| 1118 | if( pMarkup->iCode!=MARKUP_VERBATIM ) return 0; |
| 1119 | if( !pMarkup->endTag ) return 0; |
| 1120 | if( p->zVerbatimId==0 ) return 1; |
| 1121 | if( pMarkup->nAttr!=1 ) return 0; |
| 1122 | z = pMarkup->aAttr[0].zValue; |
| 1123 | return fossil_strcmp(z, p->zVerbatimId)==0; |
| 1124 | } |
| 1125 | |
| 1126 | /* |
| 1127 | ** Return the MUTYPE for the top of the stack. |
| 1128 | */ |
| @@ -1144,11 +1144,11 @@ | |
| 1144 | int inlineOnly = (p->state & INLINE_MARKUP_ONLY)!=0; |
| 1145 | int wikiUseHtml = (p->state & WIKI_USE_HTML)!=0; |
| 1146 | |
| 1147 | /* Make sure the attribute constants and names still align |
| 1148 | ** following changes in the attribute list. */ |
| 1149 | assert( fossil_strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 ); |
| 1150 | |
| 1151 | while( z[0] ){ |
| 1152 | if( wikiUseHtml ){ |
| 1153 | n = nextRawToken(z, p, &tokenType); |
| 1154 | }else{ |
| 1155 |
+3
-3
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -549,11 +549,11 @@ | ||
| 549 | 549 | Stmt q; |
| 550 | 550 | int rc = -1; |
| 551 | 551 | char *zLogin = blob_terminate(pLogin); |
| 552 | 552 | defossilize(zLogin); |
| 553 | 553 | |
| 554 | - if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ | |
| 554 | + if( fossil_strcmp(zLogin, "nobody")==0 || fossil_strcmp(zLogin,"anonymous")==0 ){ | |
| 555 | 555 | return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ |
| 556 | 556 | } |
| 557 | 557 | if( fossil_strcmp(P("REMOTE_USER"), zLogin)==0 ){ |
| 558 | 558 | return 0; /* Accept Basic Authorization */ |
| 559 | 559 | } |
| @@ -807,11 +807,11 @@ | ||
| 807 | 807 | int nGimme = 0; |
| 808 | 808 | int size; |
| 809 | 809 | int recvConfig = 0; |
| 810 | 810 | char *zNow; |
| 811 | 811 | |
| 812 | - if( strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ | |
| 812 | + if( fossil_strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ | |
| 813 | 813 | fossil_redirect_home(); |
| 814 | 814 | } |
| 815 | 815 | g.zLogin = "anonymous"; |
| 816 | 816 | login_set_anon_nobody_capabilities(); |
| 817 | 817 | login_check_credentials(); |
| @@ -1632,11 +1632,11 @@ | ||
| 1632 | 1632 | */ |
| 1633 | 1633 | if( blob_eq(&xfer.aToken[0],"error") && xfer.nToken==2 ){ |
| 1634 | 1634 | if( !cloneFlag || nCycle>0 ){ |
| 1635 | 1635 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1636 | 1636 | defossilize(zMsg); |
| 1637 | - if( strcmp(zMsg, "login failed")==0 ){ | |
| 1637 | + if( fossil_strcmp(zMsg, "login failed")==0 ){ | |
| 1638 | 1638 | if( nCycle<2 ){ |
| 1639 | 1639 | if( !g.dontKeepUrl ) db_unset("last-sync-pw", 0); |
| 1640 | 1640 | go = 1; |
| 1641 | 1641 | } |
| 1642 | 1642 | }else{ |
| 1643 | 1643 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -549,11 +549,11 @@ | |
| 549 | Stmt q; |
| 550 | int rc = -1; |
| 551 | char *zLogin = blob_terminate(pLogin); |
| 552 | defossilize(zLogin); |
| 553 | |
| 554 | if( strcmp(zLogin, "nobody")==0 || strcmp(zLogin,"anonymous")==0 ){ |
| 555 | return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ |
| 556 | } |
| 557 | if( fossil_strcmp(P("REMOTE_USER"), zLogin)==0 ){ |
| 558 | return 0; /* Accept Basic Authorization */ |
| 559 | } |
| @@ -807,11 +807,11 @@ | |
| 807 | int nGimme = 0; |
| 808 | int size; |
| 809 | int recvConfig = 0; |
| 810 | char *zNow; |
| 811 | |
| 812 | if( strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ |
| 813 | fossil_redirect_home(); |
| 814 | } |
| 815 | g.zLogin = "anonymous"; |
| 816 | login_set_anon_nobody_capabilities(); |
| 817 | login_check_credentials(); |
| @@ -1632,11 +1632,11 @@ | |
| 1632 | */ |
| 1633 | if( blob_eq(&xfer.aToken[0],"error") && xfer.nToken==2 ){ |
| 1634 | if( !cloneFlag || nCycle>0 ){ |
| 1635 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1636 | defossilize(zMsg); |
| 1637 | if( strcmp(zMsg, "login failed")==0 ){ |
| 1638 | if( nCycle<2 ){ |
| 1639 | if( !g.dontKeepUrl ) db_unset("last-sync-pw", 0); |
| 1640 | go = 1; |
| 1641 | } |
| 1642 | }else{ |
| 1643 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -549,11 +549,11 @@ | |
| 549 | Stmt q; |
| 550 | int rc = -1; |
| 551 | char *zLogin = blob_terminate(pLogin); |
| 552 | defossilize(zLogin); |
| 553 | |
| 554 | if( fossil_strcmp(zLogin, "nobody")==0 || fossil_strcmp(zLogin,"anonymous")==0 ){ |
| 555 | return 0; /* Anybody is allowed to sync as "nobody" or "anonymous" */ |
| 556 | } |
| 557 | if( fossil_strcmp(P("REMOTE_USER"), zLogin)==0 ){ |
| 558 | return 0; /* Accept Basic Authorization */ |
| 559 | } |
| @@ -807,11 +807,11 @@ | |
| 807 | int nGimme = 0; |
| 808 | int size; |
| 809 | int recvConfig = 0; |
| 810 | char *zNow; |
| 811 | |
| 812 | if( fossil_strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ |
| 813 | fossil_redirect_home(); |
| 814 | } |
| 815 | g.zLogin = "anonymous"; |
| 816 | login_set_anon_nobody_capabilities(); |
| 817 | login_check_credentials(); |
| @@ -1632,11 +1632,11 @@ | |
| 1632 | */ |
| 1633 | if( blob_eq(&xfer.aToken[0],"error") && xfer.nToken==2 ){ |
| 1634 | if( !cloneFlag || nCycle>0 ){ |
| 1635 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1636 | defossilize(zMsg); |
| 1637 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1638 | if( nCycle<2 ){ |
| 1639 | if( !g.dontKeepUrl ) db_unset("last-sync-pw", 0); |
| 1640 | go = 1; |
| 1641 | } |
| 1642 | }else{ |
| 1643 |
+1
-1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -98,11 +98,11 @@ | ||
| 98 | 98 | for(i=0; zName[i]; i++){ |
| 99 | 99 | if( zName[i]=='/' ){ |
| 100 | 100 | c = zName[i+1]; |
| 101 | 101 | zName[i+1] = 0; |
| 102 | 102 | for(j=0; j<nDir; j++){ |
| 103 | - if( strcmp(zName, azDir[j])==0 ) break; | |
| 103 | + if( fossil_strcmp(zName, azDir[j])==0 ) break; | |
| 104 | 104 | } |
| 105 | 105 | if( j>=nDir ){ |
| 106 | 106 | nDir++; |
| 107 | 107 | azDir = fossil_realloc(azDir, sizeof(azDir[0])*nDir); |
| 108 | 108 | azDir[j] = mprintf("%s", zName); |
| 109 | 109 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -98,11 +98,11 @@ | |
| 98 | for(i=0; zName[i]; i++){ |
| 99 | if( zName[i]=='/' ){ |
| 100 | c = zName[i+1]; |
| 101 | zName[i+1] = 0; |
| 102 | for(j=0; j<nDir; j++){ |
| 103 | if( strcmp(zName, azDir[j])==0 ) break; |
| 104 | } |
| 105 | if( j>=nDir ){ |
| 106 | nDir++; |
| 107 | azDir = fossil_realloc(azDir, sizeof(azDir[0])*nDir); |
| 108 | azDir[j] = mprintf("%s", zName); |
| 109 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -98,11 +98,11 @@ | |
| 98 | for(i=0; zName[i]; i++){ |
| 99 | if( zName[i]=='/' ){ |
| 100 | c = zName[i+1]; |
| 101 | zName[i+1] = 0; |
| 102 | for(j=0; j<nDir; j++){ |
| 103 | if( fossil_strcmp(zName, azDir[j])==0 ) break; |
| 104 | } |
| 105 | if( j>=nDir ){ |
| 106 | nDir++; |
| 107 | azDir = fossil_realloc(azDir, sizeof(azDir[0])*nDir); |
| 108 | azDir[j] = mprintf("%s", zName); |
| 109 |