Fossil SCM
Merge wideAnnotateUser and jsonWarnings into trunk.
Commit
18dd383e5e7684ecee327d3de7d3ff846069d1b2
Parent
3a44f95f40a1937…
12 files changed
+2
-2
+2
-2
+3
-6
+3
-6
-1
-1
-1
-1
+1
-2
+1
-2
-5
-5
+2
-2
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -1775,15 +1775,15 @@ | ||
| 1775 | 1775 | const char *zUuid = db_column_text(&q, 1); |
| 1776 | 1776 | const char *zDate = db_column_text(&q, 2); |
| 1777 | 1777 | const char *zUser = db_column_text(&q, 3); |
| 1778 | 1778 | if( webLabel ){ |
| 1779 | 1779 | zLabel = mprintf( |
| 1780 | - "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %9.9s", | |
| 1780 | + "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %13.13s", | |
| 1781 | 1781 | g.zTop, zUuid, zUuid, zDate, zUser |
| 1782 | 1782 | ); |
| 1783 | 1783 | }else{ |
| 1784 | - zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); | |
| 1784 | + zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser); | |
| 1785 | 1785 | } |
| 1786 | 1786 | p->nVers++; |
| 1787 | 1787 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1788 | 1788 | p->azVers[p->nVers-1] = zLabel; |
| 1789 | 1789 | content_get(pid, &step); |
| 1790 | 1790 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1775,15 +1775,15 @@ | |
| 1775 | const char *zUuid = db_column_text(&q, 1); |
| 1776 | const char *zDate = db_column_text(&q, 2); |
| 1777 | const char *zUser = db_column_text(&q, 3); |
| 1778 | if( webLabel ){ |
| 1779 | zLabel = mprintf( |
| 1780 | "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %9.9s", |
| 1781 | g.zTop, zUuid, zUuid, zDate, zUser |
| 1782 | ); |
| 1783 | }else{ |
| 1784 | zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); |
| 1785 | } |
| 1786 | p->nVers++; |
| 1787 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1788 | p->azVers[p->nVers-1] = zLabel; |
| 1789 | content_get(pid, &step); |
| 1790 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1775,15 +1775,15 @@ | |
| 1775 | const char *zUuid = db_column_text(&q, 1); |
| 1776 | const char *zDate = db_column_text(&q, 2); |
| 1777 | const char *zUser = db_column_text(&q, 3); |
| 1778 | if( webLabel ){ |
| 1779 | zLabel = mprintf( |
| 1780 | "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %13.13s", |
| 1781 | g.zTop, zUuid, zUuid, zDate, zUser |
| 1782 | ); |
| 1783 | }else{ |
| 1784 | zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser); |
| 1785 | } |
| 1786 | p->nVers++; |
| 1787 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1788 | p->azVers[p->nVers-1] = zLabel; |
| 1789 | content_get(pid, &step); |
| 1790 |
+2
-2
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -1775,15 +1775,15 @@ | ||
| 1775 | 1775 | const char *zUuid = db_column_text(&q, 1); |
| 1776 | 1776 | const char *zDate = db_column_text(&q, 2); |
| 1777 | 1777 | const char *zUser = db_column_text(&q, 3); |
| 1778 | 1778 | if( webLabel ){ |
| 1779 | 1779 | zLabel = mprintf( |
| 1780 | - "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %9.9s", | |
| 1780 | + "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %13.13s", | |
| 1781 | 1781 | g.zTop, zUuid, zUuid, zDate, zUser |
| 1782 | 1782 | ); |
| 1783 | 1783 | }else{ |
| 1784 | - zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); | |
| 1784 | + zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser); | |
| 1785 | 1785 | } |
| 1786 | 1786 | p->nVers++; |
| 1787 | 1787 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1788 | 1788 | p->azVers[p->nVers-1] = zLabel; |
| 1789 | 1789 | content_get(pid, &step); |
| 1790 | 1790 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1775,15 +1775,15 @@ | |
| 1775 | const char *zUuid = db_column_text(&q, 1); |
| 1776 | const char *zDate = db_column_text(&q, 2); |
| 1777 | const char *zUser = db_column_text(&q, 3); |
| 1778 | if( webLabel ){ |
| 1779 | zLabel = mprintf( |
| 1780 | "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %9.9s", |
| 1781 | g.zTop, zUuid, zUuid, zDate, zUser |
| 1782 | ); |
| 1783 | }else{ |
| 1784 | zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); |
| 1785 | } |
| 1786 | p->nVers++; |
| 1787 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1788 | p->azVers[p->nVers-1] = zLabel; |
| 1789 | content_get(pid, &step); |
| 1790 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1775,15 +1775,15 @@ | |
| 1775 | const char *zUuid = db_column_text(&q, 1); |
| 1776 | const char *zDate = db_column_text(&q, 2); |
| 1777 | const char *zUser = db_column_text(&q, 3); |
| 1778 | if( webLabel ){ |
| 1779 | zLabel = mprintf( |
| 1780 | "<a href='%s/info/%s' target='infowindow'>%.10s</a> %s %13.13s", |
| 1781 | g.zTop, zUuid, zUuid, zDate, zUser |
| 1782 | ); |
| 1783 | }else{ |
| 1784 | zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser); |
| 1785 | } |
| 1786 | p->nVers++; |
| 1787 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1788 | p->azVers[p->nVers-1] = zLabel; |
| 1789 | content_get(pid, &step); |
| 1790 |
+3
-6
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -84,17 +84,17 @@ | ||
| 84 | 84 | ** Print the timing results. |
| 85 | 85 | */ |
| 86 | 86 | static double endTimer(void){ |
| 87 | 87 | struct rusage sEnd; |
| 88 | 88 | getrusage(RUSAGE_SELF, &sEnd); |
| 89 | - return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) | |
| 90 | - + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); | |
| 91 | 89 | #if 0 |
| 92 | 90 | printf("CPU Time: user %f sys %f\n", |
| 93 | 91 | timeDiff(&sBegin.ru_utime, &sEnd.ru_utime), |
| 94 | 92 | timeDiff(&sBegin.ru_stime, &sEnd.ru_stime)); |
| 95 | 93 | #endif |
| 94 | + return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) | |
| 95 | + + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | #define BEGIN_TIMER beginTimer() |
| 99 | 99 | #define END_TIMER endTimer() |
| 100 | 100 | #define HAS_TIMER 1 |
| @@ -162,10 +162,11 @@ | ||
| 162 | 162 | FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; |
| 163 | 163 | getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); |
| 164 | 164 | return timeDiff(&ftUserBegin, &ftUserEnd) + |
| 165 | 165 | timeDiff(&ftKernelBegin, &ftKernelEnd); |
| 166 | 166 | } |
| 167 | + return 0.0; | |
| 167 | 168 | } |
| 168 | 169 | |
| 169 | 170 | #define BEGIN_TIMER beginTimer() |
| 170 | 171 | #define END_TIMER endTimer() |
| 171 | 172 | #define HAS_TIMER hasTimer() |
| @@ -912,11 +913,10 @@ | ||
| 912 | 913 | cson_array * target ){ |
| 913 | 914 | char const * p = zStr /* current byte */; |
| 914 | 915 | char const * head /* current start-of-token */; |
| 915 | 916 | unsigned int len = 0 /* current token's length */; |
| 916 | 917 | int rc = 0 /* return code (number of added elements)*/; |
| 917 | - char skipWs = fossil_isspace(separator) ? 0 : 1; | |
| 918 | 918 | assert( zStr && target ); |
| 919 | 919 | while( fossil_isspace(*p) ){ |
| 920 | 920 | ++p; |
| 921 | 921 | } |
| 922 | 922 | head = p; |
| @@ -1015,11 +1015,10 @@ | ||
| 1015 | 1015 | ** This must only be called once, or an assertion may be triggered. |
| 1016 | 1016 | */ |
| 1017 | 1017 | static void json_mode_bootstrap(){ |
| 1018 | 1018 | static char once = 0 /* guard against multiple runs */; |
| 1019 | 1019 | char const * zPath = P("PATH_INFO"); |
| 1020 | - cson_value * pathSplit = NULL; | |
| 1021 | 1020 | assert( (0==once) && "json_mode_bootstrap() called too many times!"); |
| 1022 | 1021 | if( once ){ |
| 1023 | 1022 | return; |
| 1024 | 1023 | }else{ |
| 1025 | 1024 | once = 1; |
| @@ -1151,11 +1150,10 @@ | ||
| 1151 | 1150 | g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/; |
| 1152 | 1151 | } |
| 1153 | 1152 | |
| 1154 | 1153 | {/* set up JSON output formatting options. */ |
| 1155 | 1154 | int indent = -1; |
| 1156 | - char const * indentStr = NULL; | |
| 1157 | 1155 | indent = json_find_option_int("indent",NULL,"I",-1); |
| 1158 | 1156 | g.json.outOpt.indentation = (0>indent) |
| 1159 | 1157 | ? (g.isHTTP ? 0 : 1) |
| 1160 | 1158 | : (unsigned char)indent; |
| 1161 | 1159 | g.json.outOpt.addNewline = g.isHTTP |
| @@ -1331,11 +1329,10 @@ | ||
| 1331 | 1329 | if(!g.json.cmd.a){ |
| 1332 | 1330 | return NULL; |
| 1333 | 1331 | }else{ |
| 1334 | 1332 | cson_value * rc = NULL; |
| 1335 | 1333 | Blob path = empty_blob; |
| 1336 | - char const * part; | |
| 1337 | 1334 | unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/ |
| 1338 | 1335 | unsigned int i = 1; |
| 1339 | 1336 | for( ; i < aLen; ++i ){ |
| 1340 | 1337 | char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i))); |
| 1341 | 1338 | if(!part){ |
| 1342 | 1339 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -84,17 +84,17 @@ | |
| 84 | ** Print the timing results. |
| 85 | */ |
| 86 | static double endTimer(void){ |
| 87 | struct rusage sEnd; |
| 88 | getrusage(RUSAGE_SELF, &sEnd); |
| 89 | return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) |
| 90 | + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); |
| 91 | #if 0 |
| 92 | printf("CPU Time: user %f sys %f\n", |
| 93 | timeDiff(&sBegin.ru_utime, &sEnd.ru_utime), |
| 94 | timeDiff(&sBegin.ru_stime, &sEnd.ru_stime)); |
| 95 | #endif |
| 96 | } |
| 97 | |
| 98 | #define BEGIN_TIMER beginTimer() |
| 99 | #define END_TIMER endTimer() |
| 100 | #define HAS_TIMER 1 |
| @@ -162,10 +162,11 @@ | |
| 162 | FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; |
| 163 | getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); |
| 164 | return timeDiff(&ftUserBegin, &ftUserEnd) + |
| 165 | timeDiff(&ftKernelBegin, &ftKernelEnd); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | #define BEGIN_TIMER beginTimer() |
| 170 | #define END_TIMER endTimer() |
| 171 | #define HAS_TIMER hasTimer() |
| @@ -912,11 +913,10 @@ | |
| 912 | cson_array * target ){ |
| 913 | char const * p = zStr /* current byte */; |
| 914 | char const * head /* current start-of-token */; |
| 915 | unsigned int len = 0 /* current token's length */; |
| 916 | int rc = 0 /* return code (number of added elements)*/; |
| 917 | char skipWs = fossil_isspace(separator) ? 0 : 1; |
| 918 | assert( zStr && target ); |
| 919 | while( fossil_isspace(*p) ){ |
| 920 | ++p; |
| 921 | } |
| 922 | head = p; |
| @@ -1015,11 +1015,10 @@ | |
| 1015 | ** This must only be called once, or an assertion may be triggered. |
| 1016 | */ |
| 1017 | static void json_mode_bootstrap(){ |
| 1018 | static char once = 0 /* guard against multiple runs */; |
| 1019 | char const * zPath = P("PATH_INFO"); |
| 1020 | cson_value * pathSplit = NULL; |
| 1021 | assert( (0==once) && "json_mode_bootstrap() called too many times!"); |
| 1022 | if( once ){ |
| 1023 | return; |
| 1024 | }else{ |
| 1025 | once = 1; |
| @@ -1151,11 +1150,10 @@ | |
| 1151 | g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/; |
| 1152 | } |
| 1153 | |
| 1154 | {/* set up JSON output formatting options. */ |
| 1155 | int indent = -1; |
| 1156 | char const * indentStr = NULL; |
| 1157 | indent = json_find_option_int("indent",NULL,"I",-1); |
| 1158 | g.json.outOpt.indentation = (0>indent) |
| 1159 | ? (g.isHTTP ? 0 : 1) |
| 1160 | : (unsigned char)indent; |
| 1161 | g.json.outOpt.addNewline = g.isHTTP |
| @@ -1331,11 +1329,10 @@ | |
| 1331 | if(!g.json.cmd.a){ |
| 1332 | return NULL; |
| 1333 | }else{ |
| 1334 | cson_value * rc = NULL; |
| 1335 | Blob path = empty_blob; |
| 1336 | char const * part; |
| 1337 | unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/ |
| 1338 | unsigned int i = 1; |
| 1339 | for( ; i < aLen; ++i ){ |
| 1340 | char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i))); |
| 1341 | if(!part){ |
| 1342 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -84,17 +84,17 @@ | |
| 84 | ** Print the timing results. |
| 85 | */ |
| 86 | static double endTimer(void){ |
| 87 | struct rusage sEnd; |
| 88 | getrusage(RUSAGE_SELF, &sEnd); |
| 89 | #if 0 |
| 90 | printf("CPU Time: user %f sys %f\n", |
| 91 | timeDiff(&sBegin.ru_utime, &sEnd.ru_utime), |
| 92 | timeDiff(&sBegin.ru_stime, &sEnd.ru_stime)); |
| 93 | #endif |
| 94 | return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) |
| 95 | + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); |
| 96 | } |
| 97 | |
| 98 | #define BEGIN_TIMER beginTimer() |
| 99 | #define END_TIMER endTimer() |
| 100 | #define HAS_TIMER 1 |
| @@ -162,10 +162,11 @@ | |
| 162 | FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; |
| 163 | getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); |
| 164 | return timeDiff(&ftUserBegin, &ftUserEnd) + |
| 165 | timeDiff(&ftKernelBegin, &ftKernelEnd); |
| 166 | } |
| 167 | return 0.0; |
| 168 | } |
| 169 | |
| 170 | #define BEGIN_TIMER beginTimer() |
| 171 | #define END_TIMER endTimer() |
| 172 | #define HAS_TIMER hasTimer() |
| @@ -912,11 +913,10 @@ | |
| 913 | cson_array * target ){ |
| 914 | char const * p = zStr /* current byte */; |
| 915 | char const * head /* current start-of-token */; |
| 916 | unsigned int len = 0 /* current token's length */; |
| 917 | int rc = 0 /* return code (number of added elements)*/; |
| 918 | assert( zStr && target ); |
| 919 | while( fossil_isspace(*p) ){ |
| 920 | ++p; |
| 921 | } |
| 922 | head = p; |
| @@ -1015,11 +1015,10 @@ | |
| 1015 | ** This must only be called once, or an assertion may be triggered. |
| 1016 | */ |
| 1017 | static void json_mode_bootstrap(){ |
| 1018 | static char once = 0 /* guard against multiple runs */; |
| 1019 | char const * zPath = P("PATH_INFO"); |
| 1020 | assert( (0==once) && "json_mode_bootstrap() called too many times!"); |
| 1021 | if( once ){ |
| 1022 | return; |
| 1023 | }else{ |
| 1024 | once = 1; |
| @@ -1151,11 +1150,10 @@ | |
| 1150 | g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/; |
| 1151 | } |
| 1152 | |
| 1153 | {/* set up JSON output formatting options. */ |
| 1154 | int indent = -1; |
| 1155 | indent = json_find_option_int("indent",NULL,"I",-1); |
| 1156 | g.json.outOpt.indentation = (0>indent) |
| 1157 | ? (g.isHTTP ? 0 : 1) |
| 1158 | : (unsigned char)indent; |
| 1159 | g.json.outOpt.addNewline = g.isHTTP |
| @@ -1331,11 +1329,10 @@ | |
| 1329 | if(!g.json.cmd.a){ |
| 1330 | return NULL; |
| 1331 | }else{ |
| 1332 | cson_value * rc = NULL; |
| 1333 | Blob path = empty_blob; |
| 1334 | unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/ |
| 1335 | unsigned int i = 1; |
| 1336 | for( ; i < aLen; ++i ){ |
| 1337 | char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i))); |
| 1338 | if(!part){ |
| 1339 |
+3
-6
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -84,17 +84,17 @@ | ||
| 84 | 84 | ** Print the timing results. |
| 85 | 85 | */ |
| 86 | 86 | static double endTimer(void){ |
| 87 | 87 | struct rusage sEnd; |
| 88 | 88 | getrusage(RUSAGE_SELF, &sEnd); |
| 89 | - return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) | |
| 90 | - + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); | |
| 91 | 89 | #if 0 |
| 92 | 90 | printf("CPU Time: user %f sys %f\n", |
| 93 | 91 | timeDiff(&sBegin.ru_utime, &sEnd.ru_utime), |
| 94 | 92 | timeDiff(&sBegin.ru_stime, &sEnd.ru_stime)); |
| 95 | 93 | #endif |
| 94 | + return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) | |
| 95 | + + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | #define BEGIN_TIMER beginTimer() |
| 99 | 99 | #define END_TIMER endTimer() |
| 100 | 100 | #define HAS_TIMER 1 |
| @@ -162,10 +162,11 @@ | ||
| 162 | 162 | FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; |
| 163 | 163 | getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); |
| 164 | 164 | return timeDiff(&ftUserBegin, &ftUserEnd) + |
| 165 | 165 | timeDiff(&ftKernelBegin, &ftKernelEnd); |
| 166 | 166 | } |
| 167 | + return 0.0; | |
| 167 | 168 | } |
| 168 | 169 | |
| 169 | 170 | #define BEGIN_TIMER beginTimer() |
| 170 | 171 | #define END_TIMER endTimer() |
| 171 | 172 | #define HAS_TIMER hasTimer() |
| @@ -912,11 +913,10 @@ | ||
| 912 | 913 | cson_array * target ){ |
| 913 | 914 | char const * p = zStr /* current byte */; |
| 914 | 915 | char const * head /* current start-of-token */; |
| 915 | 916 | unsigned int len = 0 /* current token's length */; |
| 916 | 917 | int rc = 0 /* return code (number of added elements)*/; |
| 917 | - char skipWs = fossil_isspace(separator) ? 0 : 1; | |
| 918 | 918 | assert( zStr && target ); |
| 919 | 919 | while( fossil_isspace(*p) ){ |
| 920 | 920 | ++p; |
| 921 | 921 | } |
| 922 | 922 | head = p; |
| @@ -1015,11 +1015,10 @@ | ||
| 1015 | 1015 | ** This must only be called once, or an assertion may be triggered. |
| 1016 | 1016 | */ |
| 1017 | 1017 | static void json_mode_bootstrap(){ |
| 1018 | 1018 | static char once = 0 /* guard against multiple runs */; |
| 1019 | 1019 | char const * zPath = P("PATH_INFO"); |
| 1020 | - cson_value * pathSplit = NULL; | |
| 1021 | 1020 | assert( (0==once) && "json_mode_bootstrap() called too many times!"); |
| 1022 | 1021 | if( once ){ |
| 1023 | 1022 | return; |
| 1024 | 1023 | }else{ |
| 1025 | 1024 | once = 1; |
| @@ -1151,11 +1150,10 @@ | ||
| 1151 | 1150 | g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/; |
| 1152 | 1151 | } |
| 1153 | 1152 | |
| 1154 | 1153 | {/* set up JSON output formatting options. */ |
| 1155 | 1154 | int indent = -1; |
| 1156 | - char const * indentStr = NULL; | |
| 1157 | 1155 | indent = json_find_option_int("indent",NULL,"I",-1); |
| 1158 | 1156 | g.json.outOpt.indentation = (0>indent) |
| 1159 | 1157 | ? (g.isHTTP ? 0 : 1) |
| 1160 | 1158 | : (unsigned char)indent; |
| 1161 | 1159 | g.json.outOpt.addNewline = g.isHTTP |
| @@ -1331,11 +1329,10 @@ | ||
| 1331 | 1329 | if(!g.json.cmd.a){ |
| 1332 | 1330 | return NULL; |
| 1333 | 1331 | }else{ |
| 1334 | 1332 | cson_value * rc = NULL; |
| 1335 | 1333 | Blob path = empty_blob; |
| 1336 | - char const * part; | |
| 1337 | 1334 | unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/ |
| 1338 | 1335 | unsigned int i = 1; |
| 1339 | 1336 | for( ; i < aLen; ++i ){ |
| 1340 | 1337 | char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i))); |
| 1341 | 1338 | if(!part){ |
| 1342 | 1339 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -84,17 +84,17 @@ | |
| 84 | ** Print the timing results. |
| 85 | */ |
| 86 | static double endTimer(void){ |
| 87 | struct rusage sEnd; |
| 88 | getrusage(RUSAGE_SELF, &sEnd); |
| 89 | return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) |
| 90 | + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); |
| 91 | #if 0 |
| 92 | printf("CPU Time: user %f sys %f\n", |
| 93 | timeDiff(&sBegin.ru_utime, &sEnd.ru_utime), |
| 94 | timeDiff(&sBegin.ru_stime, &sEnd.ru_stime)); |
| 95 | #endif |
| 96 | } |
| 97 | |
| 98 | #define BEGIN_TIMER beginTimer() |
| 99 | #define END_TIMER endTimer() |
| 100 | #define HAS_TIMER 1 |
| @@ -162,10 +162,11 @@ | |
| 162 | FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; |
| 163 | getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); |
| 164 | return timeDiff(&ftUserBegin, &ftUserEnd) + |
| 165 | timeDiff(&ftKernelBegin, &ftKernelEnd); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | #define BEGIN_TIMER beginTimer() |
| 170 | #define END_TIMER endTimer() |
| 171 | #define HAS_TIMER hasTimer() |
| @@ -912,11 +913,10 @@ | |
| 912 | cson_array * target ){ |
| 913 | char const * p = zStr /* current byte */; |
| 914 | char const * head /* current start-of-token */; |
| 915 | unsigned int len = 0 /* current token's length */; |
| 916 | int rc = 0 /* return code (number of added elements)*/; |
| 917 | char skipWs = fossil_isspace(separator) ? 0 : 1; |
| 918 | assert( zStr && target ); |
| 919 | while( fossil_isspace(*p) ){ |
| 920 | ++p; |
| 921 | } |
| 922 | head = p; |
| @@ -1015,11 +1015,10 @@ | |
| 1015 | ** This must only be called once, or an assertion may be triggered. |
| 1016 | */ |
| 1017 | static void json_mode_bootstrap(){ |
| 1018 | static char once = 0 /* guard against multiple runs */; |
| 1019 | char const * zPath = P("PATH_INFO"); |
| 1020 | cson_value * pathSplit = NULL; |
| 1021 | assert( (0==once) && "json_mode_bootstrap() called too many times!"); |
| 1022 | if( once ){ |
| 1023 | return; |
| 1024 | }else{ |
| 1025 | once = 1; |
| @@ -1151,11 +1150,10 @@ | |
| 1151 | g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/; |
| 1152 | } |
| 1153 | |
| 1154 | {/* set up JSON output formatting options. */ |
| 1155 | int indent = -1; |
| 1156 | char const * indentStr = NULL; |
| 1157 | indent = json_find_option_int("indent",NULL,"I",-1); |
| 1158 | g.json.outOpt.indentation = (0>indent) |
| 1159 | ? (g.isHTTP ? 0 : 1) |
| 1160 | : (unsigned char)indent; |
| 1161 | g.json.outOpt.addNewline = g.isHTTP |
| @@ -1331,11 +1329,10 @@ | |
| 1331 | if(!g.json.cmd.a){ |
| 1332 | return NULL; |
| 1333 | }else{ |
| 1334 | cson_value * rc = NULL; |
| 1335 | Blob path = empty_blob; |
| 1336 | char const * part; |
| 1337 | unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/ |
| 1338 | unsigned int i = 1; |
| 1339 | for( ; i < aLen; ++i ){ |
| 1340 | char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i))); |
| 1341 | if(!part){ |
| 1342 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -84,17 +84,17 @@ | |
| 84 | ** Print the timing results. |
| 85 | */ |
| 86 | static double endTimer(void){ |
| 87 | struct rusage sEnd; |
| 88 | getrusage(RUSAGE_SELF, &sEnd); |
| 89 | #if 0 |
| 90 | printf("CPU Time: user %f sys %f\n", |
| 91 | timeDiff(&sBegin.ru_utime, &sEnd.ru_utime), |
| 92 | timeDiff(&sBegin.ru_stime, &sEnd.ru_stime)); |
| 93 | #endif |
| 94 | return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime) |
| 95 | + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime); |
| 96 | } |
| 97 | |
| 98 | #define BEGIN_TIMER beginTimer() |
| 99 | #define END_TIMER endTimer() |
| 100 | #define HAS_TIMER 1 |
| @@ -162,10 +162,11 @@ | |
| 162 | FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; |
| 163 | getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); |
| 164 | return timeDiff(&ftUserBegin, &ftUserEnd) + |
| 165 | timeDiff(&ftKernelBegin, &ftKernelEnd); |
| 166 | } |
| 167 | return 0.0; |
| 168 | } |
| 169 | |
| 170 | #define BEGIN_TIMER beginTimer() |
| 171 | #define END_TIMER endTimer() |
| 172 | #define HAS_TIMER hasTimer() |
| @@ -912,11 +913,10 @@ | |
| 913 | cson_array * target ){ |
| 914 | char const * p = zStr /* current byte */; |
| 915 | char const * head /* current start-of-token */; |
| 916 | unsigned int len = 0 /* current token's length */; |
| 917 | int rc = 0 /* return code (number of added elements)*/; |
| 918 | assert( zStr && target ); |
| 919 | while( fossil_isspace(*p) ){ |
| 920 | ++p; |
| 921 | } |
| 922 | head = p; |
| @@ -1015,11 +1015,10 @@ | |
| 1015 | ** This must only be called once, or an assertion may be triggered. |
| 1016 | */ |
| 1017 | static void json_mode_bootstrap(){ |
| 1018 | static char once = 0 /* guard against multiple runs */; |
| 1019 | char const * zPath = P("PATH_INFO"); |
| 1020 | assert( (0==once) && "json_mode_bootstrap() called too many times!"); |
| 1021 | if( once ){ |
| 1022 | return; |
| 1023 | }else{ |
| 1024 | once = 1; |
| @@ -1151,11 +1150,10 @@ | |
| 1150 | g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/; |
| 1151 | } |
| 1152 | |
| 1153 | {/* set up JSON output formatting options. */ |
| 1154 | int indent = -1; |
| 1155 | indent = json_find_option_int("indent",NULL,"I",-1); |
| 1156 | g.json.outOpt.indentation = (0>indent) |
| 1157 | ? (g.isHTTP ? 0 : 1) |
| 1158 | : (unsigned char)indent; |
| 1159 | g.json.outOpt.addNewline = g.isHTTP |
| @@ -1331,11 +1329,10 @@ | |
| 1329 | if(!g.json.cmd.a){ |
| 1330 | return NULL; |
| 1331 | }else{ |
| 1332 | cson_value * rc = NULL; |
| 1333 | Blob path = empty_blob; |
| 1334 | unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/ |
| 1335 | unsigned int i = 1; |
| 1336 | for( ; i < aLen; ++i ){ |
| 1337 | char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i))); |
| 1338 | if(!part){ |
| 1339 |
-1
| --- src/json_artifact.c | ||
| +++ src/json_artifact.c | ||
| @@ -85,11 +85,10 @@ | ||
| 85 | 85 | ); |
| 86 | 86 | if( db_step(&q)==SQLITE_ROW ){ |
| 87 | 87 | cson_object * o; |
| 88 | 88 | cson_value * tmpV = NULL; |
| 89 | 89 | const char *zUuid = db_column_text(&q, 0); |
| 90 | - char * zTmp; | |
| 91 | 90 | const char *zUser; |
| 92 | 91 | const char *zComment; |
| 93 | 92 | char * zEUser, * zEComment; |
| 94 | 93 | int mtime, omtime; |
| 95 | 94 | v = cson_value_new_object(); |
| 96 | 95 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -85,11 +85,10 @@ | |
| 85 | ); |
| 86 | if( db_step(&q)==SQLITE_ROW ){ |
| 87 | cson_object * o; |
| 88 | cson_value * tmpV = NULL; |
| 89 | const char *zUuid = db_column_text(&q, 0); |
| 90 | char * zTmp; |
| 91 | const char *zUser; |
| 92 | const char *zComment; |
| 93 | char * zEUser, * zEComment; |
| 94 | int mtime, omtime; |
| 95 | v = cson_value_new_object(); |
| 96 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -85,11 +85,10 @@ | |
| 85 | ); |
| 86 | if( db_step(&q)==SQLITE_ROW ){ |
| 87 | cson_object * o; |
| 88 | cson_value * tmpV = NULL; |
| 89 | const char *zUuid = db_column_text(&q, 0); |
| 90 | const char *zUser; |
| 91 | const char *zComment; |
| 92 | char * zEUser, * zEComment; |
| 93 | int mtime, omtime; |
| 94 | v = cson_value_new_object(); |
| 95 |
-1
| --- src/json_artifact.c | ||
| +++ src/json_artifact.c | ||
| @@ -85,11 +85,10 @@ | ||
| 85 | 85 | ); |
| 86 | 86 | if( db_step(&q)==SQLITE_ROW ){ |
| 87 | 87 | cson_object * o; |
| 88 | 88 | cson_value * tmpV = NULL; |
| 89 | 89 | const char *zUuid = db_column_text(&q, 0); |
| 90 | - char * zTmp; | |
| 91 | 90 | const char *zUser; |
| 92 | 91 | const char *zComment; |
| 93 | 92 | char * zEUser, * zEComment; |
| 94 | 93 | int mtime, omtime; |
| 95 | 94 | v = cson_value_new_object(); |
| 96 | 95 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -85,11 +85,10 @@ | |
| 85 | ); |
| 86 | if( db_step(&q)==SQLITE_ROW ){ |
| 87 | cson_object * o; |
| 88 | cson_value * tmpV = NULL; |
| 89 | const char *zUuid = db_column_text(&q, 0); |
| 90 | char * zTmp; |
| 91 | const char *zUser; |
| 92 | const char *zComment; |
| 93 | char * zEUser, * zEComment; |
| 94 | int mtime, omtime; |
| 95 | v = cson_value_new_object(); |
| 96 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -85,11 +85,10 @@ | |
| 85 | ); |
| 86 | if( db_step(&q)==SQLITE_ROW ){ |
| 87 | cson_object * o; |
| 88 | cson_value * tmpV = NULL; |
| 89 | const char *zUuid = db_column_text(&q, 0); |
| 90 | const char *zUser; |
| 91 | const char *zComment; |
| 92 | char * zEUser, * zEComment; |
| 93 | int mtime, omtime; |
| 94 | v = cson_value_new_object(); |
| 95 |
-1
| --- src/json_diff.c | ||
| +++ src/json_diff.c | ||
| @@ -37,11 +37,10 @@ | ||
| 37 | 37 | int fromid; |
| 38 | 38 | int toid; |
| 39 | 39 | int outLen; |
| 40 | 40 | Blob from = empty_blob, to = empty_blob, out = empty_blob; |
| 41 | 41 | cson_value * rc = NULL; |
| 42 | - char const * zType = "ci"; | |
| 43 | 42 | int flags = (DIFF_CONTEXT_MASK & nContext) |
| 44 | 43 | | (fSbs ? DIFF_SIDEBYSIDE : 0); |
| 45 | 44 | fromid = name_to_typed_rid(zFrom, "*"); |
| 46 | 45 | if(fromid<=0){ |
| 47 | 46 | json_set_err(FSL_JSON_E_UNRESOLVED_UUID, |
| 48 | 47 |
| --- src/json_diff.c | |
| +++ src/json_diff.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | int fromid; |
| 38 | int toid; |
| 39 | int outLen; |
| 40 | Blob from = empty_blob, to = empty_blob, out = empty_blob; |
| 41 | cson_value * rc = NULL; |
| 42 | char const * zType = "ci"; |
| 43 | int flags = (DIFF_CONTEXT_MASK & nContext) |
| 44 | | (fSbs ? DIFF_SIDEBYSIDE : 0); |
| 45 | fromid = name_to_typed_rid(zFrom, "*"); |
| 46 | if(fromid<=0){ |
| 47 | json_set_err(FSL_JSON_E_UNRESOLVED_UUID, |
| 48 |
| --- src/json_diff.c | |
| +++ src/json_diff.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | int fromid; |
| 38 | int toid; |
| 39 | int outLen; |
| 40 | Blob from = empty_blob, to = empty_blob, out = empty_blob; |
| 41 | cson_value * rc = NULL; |
| 42 | int flags = (DIFF_CONTEXT_MASK & nContext) |
| 43 | | (fSbs ? DIFF_SIDEBYSIDE : 0); |
| 44 | fromid = name_to_typed_rid(zFrom, "*"); |
| 45 | if(fromid<=0){ |
| 46 | json_set_err(FSL_JSON_E_UNRESOLVED_UUID, |
| 47 |
-1
| --- src/json_diff.c | ||
| +++ src/json_diff.c | ||
| @@ -37,11 +37,10 @@ | ||
| 37 | 37 | int fromid; |
| 38 | 38 | int toid; |
| 39 | 39 | int outLen; |
| 40 | 40 | Blob from = empty_blob, to = empty_blob, out = empty_blob; |
| 41 | 41 | cson_value * rc = NULL; |
| 42 | - char const * zType = "ci"; | |
| 43 | 42 | int flags = (DIFF_CONTEXT_MASK & nContext) |
| 44 | 43 | | (fSbs ? DIFF_SIDEBYSIDE : 0); |
| 45 | 44 | fromid = name_to_typed_rid(zFrom, "*"); |
| 46 | 45 | if(fromid<=0){ |
| 47 | 46 | json_set_err(FSL_JSON_E_UNRESOLVED_UUID, |
| 48 | 47 |
| --- src/json_diff.c | |
| +++ src/json_diff.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | int fromid; |
| 38 | int toid; |
| 39 | int outLen; |
| 40 | Blob from = empty_blob, to = empty_blob, out = empty_blob; |
| 41 | cson_value * rc = NULL; |
| 42 | char const * zType = "ci"; |
| 43 | int flags = (DIFF_CONTEXT_MASK & nContext) |
| 44 | | (fSbs ? DIFF_SIDEBYSIDE : 0); |
| 45 | fromid = name_to_typed_rid(zFrom, "*"); |
| 46 | if(fromid<=0){ |
| 47 | json_set_err(FSL_JSON_E_UNRESOLVED_UUID, |
| 48 |
| --- src/json_diff.c | |
| +++ src/json_diff.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | int fromid; |
| 38 | int toid; |
| 39 | int outLen; |
| 40 | Blob from = empty_blob, to = empty_blob, out = empty_blob; |
| 41 | cson_value * rc = NULL; |
| 42 | int flags = (DIFF_CONTEXT_MASK & nContext) |
| 43 | | (fSbs ? DIFF_SIDEBYSIDE : 0); |
| 44 | fromid = name_to_typed_rid(zFrom, "*"); |
| 45 | if(fromid<=0){ |
| 46 | json_set_err(FSL_JSON_E_UNRESOLVED_UUID, |
| 47 |
+1
-2
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -405,11 +405,11 @@ | ||
| 405 | 405 | cson_value_free( cson_string_value(tags) ); |
| 406 | 406 | cson_value_free( cson_string_value(isLeaf) ); |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | goto end; |
| 410 | - error: | |
| 410 | + | |
| 411 | 411 | assert( 0 != g.json.resultCode ); |
| 412 | 412 | cson_value_free(pay); |
| 413 | 413 | |
| 414 | 414 | end: |
| 415 | 415 | return pay; |
| @@ -429,11 +429,10 @@ | ||
| 429 | 429 | cson_array * list = NULL; |
| 430 | 430 | int check = 0; |
| 431 | 431 | char showFiles = -1/*magic number*/; |
| 432 | 432 | Stmt q = empty_Stmt; |
| 433 | 433 | char warnRowToJsonFailed = 0; |
| 434 | - char warnStringToArrayFailed = 0; | |
| 435 | 434 | Blob sql = empty_blob; |
| 436 | 435 | if( !g.perm.Read ){ |
| 437 | 436 | /* IMO this falls more under the category of g.perm.History, but |
| 438 | 437 | i'm following the original timeline impl here. |
| 439 | 438 | */ |
| 440 | 439 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -405,11 +405,11 @@ | |
| 405 | cson_value_free( cson_string_value(tags) ); |
| 406 | cson_value_free( cson_string_value(isLeaf) ); |
| 407 | } |
| 408 | |
| 409 | goto end; |
| 410 | error: |
| 411 | assert( 0 != g.json.resultCode ); |
| 412 | cson_value_free(pay); |
| 413 | |
| 414 | end: |
| 415 | return pay; |
| @@ -429,11 +429,10 @@ | |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char showFiles = -1/*magic number*/; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | char warnStringToArrayFailed = 0; |
| 435 | Blob sql = empty_blob; |
| 436 | if( !g.perm.Read ){ |
| 437 | /* IMO this falls more under the category of g.perm.History, but |
| 438 | i'm following the original timeline impl here. |
| 439 | */ |
| 440 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -405,11 +405,11 @@ | |
| 405 | cson_value_free( cson_string_value(tags) ); |
| 406 | cson_value_free( cson_string_value(isLeaf) ); |
| 407 | } |
| 408 | |
| 409 | goto end; |
| 410 | |
| 411 | assert( 0 != g.json.resultCode ); |
| 412 | cson_value_free(pay); |
| 413 | |
| 414 | end: |
| 415 | return pay; |
| @@ -429,11 +429,10 @@ | |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char showFiles = -1/*magic number*/; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | Blob sql = empty_blob; |
| 435 | if( !g.perm.Read ){ |
| 436 | /* IMO this falls more under the category of g.perm.History, but |
| 437 | i'm following the original timeline impl here. |
| 438 | */ |
| 439 |
+1
-2
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -405,11 +405,11 @@ | ||
| 405 | 405 | cson_value_free( cson_string_value(tags) ); |
| 406 | 406 | cson_value_free( cson_string_value(isLeaf) ); |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | goto end; |
| 410 | - error: | |
| 410 | + | |
| 411 | 411 | assert( 0 != g.json.resultCode ); |
| 412 | 412 | cson_value_free(pay); |
| 413 | 413 | |
| 414 | 414 | end: |
| 415 | 415 | return pay; |
| @@ -429,11 +429,10 @@ | ||
| 429 | 429 | cson_array * list = NULL; |
| 430 | 430 | int check = 0; |
| 431 | 431 | char showFiles = -1/*magic number*/; |
| 432 | 432 | Stmt q = empty_Stmt; |
| 433 | 433 | char warnRowToJsonFailed = 0; |
| 434 | - char warnStringToArrayFailed = 0; | |
| 435 | 434 | Blob sql = empty_blob; |
| 436 | 435 | if( !g.perm.Read ){ |
| 437 | 436 | /* IMO this falls more under the category of g.perm.History, but |
| 438 | 437 | i'm following the original timeline impl here. |
| 439 | 438 | */ |
| 440 | 439 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -405,11 +405,11 @@ | |
| 405 | cson_value_free( cson_string_value(tags) ); |
| 406 | cson_value_free( cson_string_value(isLeaf) ); |
| 407 | } |
| 408 | |
| 409 | goto end; |
| 410 | error: |
| 411 | assert( 0 != g.json.resultCode ); |
| 412 | cson_value_free(pay); |
| 413 | |
| 414 | end: |
| 415 | return pay; |
| @@ -429,11 +429,10 @@ | |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char showFiles = -1/*magic number*/; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | char warnStringToArrayFailed = 0; |
| 435 | Blob sql = empty_blob; |
| 436 | if( !g.perm.Read ){ |
| 437 | /* IMO this falls more under the category of g.perm.History, but |
| 438 | i'm following the original timeline impl here. |
| 439 | */ |
| 440 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -405,11 +405,11 @@ | |
| 405 | cson_value_free( cson_string_value(tags) ); |
| 406 | cson_value_free( cson_string_value(isLeaf) ); |
| 407 | } |
| 408 | |
| 409 | goto end; |
| 410 | |
| 411 | assert( 0 != g.json.resultCode ); |
| 412 | cson_value_free(pay); |
| 413 | |
| 414 | end: |
| 415 | return pay; |
| @@ -429,11 +429,10 @@ | |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char showFiles = -1/*magic number*/; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | Blob sql = empty_blob; |
| 435 | if( !g.perm.Read ){ |
| 436 | /* IMO this falls more under the category of g.perm.History, but |
| 437 | i'm following the original timeline impl here. |
| 438 | */ |
| 439 |
-5
| --- src/json_wiki.c | ||
| +++ src/json_wiki.c | ||
| @@ -163,18 +163,13 @@ | ||
| 163 | 163 | /* |
| 164 | 164 | ** Implementation of /json/wiki/get. |
| 165 | 165 | ** |
| 166 | 166 | */ |
| 167 | 167 | static cson_value * json_wiki_get(){ |
| 168 | - int rid; | |
| 169 | - Manifest *pWiki = 0; | |
| 170 | - char const * zBody = NULL; | |
| 171 | 168 | char const * zPageName; |
| 172 | 169 | char const * zFormat = NULL; |
| 173 | - char * zUuid = NULL; | |
| 174 | 170 | char contentFormat = -1; |
| 175 | - Stmt q; | |
| 176 | 171 | if( !g.perm.RdWiki && !g.perm.Read ){ |
| 177 | 172 | json_set_err(FSL_JSON_E_DENIED, |
| 178 | 173 | "Requires 'o' or 'j' access."); |
| 179 | 174 | return NULL; |
| 180 | 175 | } |
| 181 | 176 |
| --- src/json_wiki.c | |
| +++ src/json_wiki.c | |
| @@ -163,18 +163,13 @@ | |
| 163 | /* |
| 164 | ** Implementation of /json/wiki/get. |
| 165 | ** |
| 166 | */ |
| 167 | static cson_value * json_wiki_get(){ |
| 168 | int rid; |
| 169 | Manifest *pWiki = 0; |
| 170 | char const * zBody = NULL; |
| 171 | char const * zPageName; |
| 172 | char const * zFormat = NULL; |
| 173 | char * zUuid = NULL; |
| 174 | char contentFormat = -1; |
| 175 | Stmt q; |
| 176 | if( !g.perm.RdWiki && !g.perm.Read ){ |
| 177 | json_set_err(FSL_JSON_E_DENIED, |
| 178 | "Requires 'o' or 'j' access."); |
| 179 | return NULL; |
| 180 | } |
| 181 |
| --- src/json_wiki.c | |
| +++ src/json_wiki.c | |
| @@ -163,18 +163,13 @@ | |
| 163 | /* |
| 164 | ** Implementation of /json/wiki/get. |
| 165 | ** |
| 166 | */ |
| 167 | static cson_value * json_wiki_get(){ |
| 168 | char const * zPageName; |
| 169 | char const * zFormat = NULL; |
| 170 | char contentFormat = -1; |
| 171 | if( !g.perm.RdWiki && !g.perm.Read ){ |
| 172 | json_set_err(FSL_JSON_E_DENIED, |
| 173 | "Requires 'o' or 'j' access."); |
| 174 | return NULL; |
| 175 | } |
| 176 |
-5
| --- src/json_wiki.c | ||
| +++ src/json_wiki.c | ||
| @@ -163,18 +163,13 @@ | ||
| 163 | 163 | /* |
| 164 | 164 | ** Implementation of /json/wiki/get. |
| 165 | 165 | ** |
| 166 | 166 | */ |
| 167 | 167 | static cson_value * json_wiki_get(){ |
| 168 | - int rid; | |
| 169 | - Manifest *pWiki = 0; | |
| 170 | - char const * zBody = NULL; | |
| 171 | 168 | char const * zPageName; |
| 172 | 169 | char const * zFormat = NULL; |
| 173 | - char * zUuid = NULL; | |
| 174 | 170 | char contentFormat = -1; |
| 175 | - Stmt q; | |
| 176 | 171 | if( !g.perm.RdWiki && !g.perm.Read ){ |
| 177 | 172 | json_set_err(FSL_JSON_E_DENIED, |
| 178 | 173 | "Requires 'o' or 'j' access."); |
| 179 | 174 | return NULL; |
| 180 | 175 | } |
| 181 | 176 |
| --- src/json_wiki.c | |
| +++ src/json_wiki.c | |
| @@ -163,18 +163,13 @@ | |
| 163 | /* |
| 164 | ** Implementation of /json/wiki/get. |
| 165 | ** |
| 166 | */ |
| 167 | static cson_value * json_wiki_get(){ |
| 168 | int rid; |
| 169 | Manifest *pWiki = 0; |
| 170 | char const * zBody = NULL; |
| 171 | char const * zPageName; |
| 172 | char const * zFormat = NULL; |
| 173 | char * zUuid = NULL; |
| 174 | char contentFormat = -1; |
| 175 | Stmt q; |
| 176 | if( !g.perm.RdWiki && !g.perm.Read ){ |
| 177 | json_set_err(FSL_JSON_E_DENIED, |
| 178 | "Requires 'o' or 'j' access."); |
| 179 | return NULL; |
| 180 | } |
| 181 |
| --- src/json_wiki.c | |
| +++ src/json_wiki.c | |
| @@ -163,18 +163,13 @@ | |
| 163 | /* |
| 164 | ** Implementation of /json/wiki/get. |
| 165 | ** |
| 166 | */ |
| 167 | static cson_value * json_wiki_get(){ |
| 168 | char const * zPageName; |
| 169 | char const * zFormat = NULL; |
| 170 | char contentFormat = -1; |
| 171 | if( !g.perm.RdWiki && !g.perm.Read ){ |
| 172 | json_set_err(FSL_JSON_E_DENIED, |
| 173 | "Requires 'o' or 'j' access."); |
| 174 | return NULL; |
| 175 | } |
| 176 |