Fossil SCM
Removed some unused code. minor doc touch-up.
Commit
cff9ecad0b6d0619f1bd05c1a7722f809ed65bca
Parent
9cfe61e0bfa939e…
1 file changed
+2
-18
+2
-18
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -52,21 +52,10 @@ | ||
| 52 | 52 | "resultCode" /*resultCode*/, |
| 53 | 53 | "resultText" /*resultText*/, |
| 54 | 54 | "timestamp" /*timestamp*/ |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | -/* | |
| 58 | -** Internal helpers to manipulate a byte array as a bitset. The B | |
| 59 | -** argument must be-a array at least (BIT/8+1) bytes long. | |
| 60 | -** The BIT argument is the bit number to query/set/clear/toggle. | |
| 61 | -*/ | |
| 62 | -#define BITSET_BYTEFOR(B,BIT) ((B)[ BIT / 8 ]) | |
| 63 | -#define BITSET_SET(B,BIT) ((BITSET_BYTEFOR(B,BIT) |= (0x01 << (BIT%8))),0x01) | |
| 64 | -#define BITSET_UNSET(B,BIT) ((BITSET_BYTEFOR(B,BIT) &= ~(0x01 << (BIT%8))),0x00) | |
| 65 | -#define BITSET_GET(B,BIT) ((BITSET_BYTEFOR(B,BIT) & (0x01 << (BIT%8))) ? 0x01 : 0x00) | |
| 66 | -#define BITSET_TOGGLE(B,BIT) (BITSET_GET(B,BIT) ? (BITSET_UNSET(B,BIT)) : (BITSET_SET(B,BIT))) | |
| 67 | - | |
| 68 | 57 | |
| 69 | 58 | /* Timer code taken from sqlite3's shell.c, modified slightly. |
| 70 | 59 | FIXME: move the timer into the fossil core API so that we can |
| 71 | 60 | start the timer early on in the app init phase. Right now we're |
| 72 | 61 | just timing the json ops themselves. |
| @@ -2329,11 +2318,11 @@ | ||
| 2329 | 2318 | blob_str(&cmdNames), 0); |
| 2330 | 2319 | blob_reset(&cmdNames); |
| 2331 | 2320 | } |
| 2332 | 2321 | |
| 2333 | 2322 | } |
| 2334 | -#endif /* FOSSIL_ENABLE_JSON */ | |
| 2323 | +#endif /* FOSSIL_ENABLE_JSON for mkindex */ | |
| 2335 | 2324 | |
| 2336 | 2325 | #ifdef FOSSIL_ENABLE_JSON /* dupe ifdef needed for mkindex */ |
| 2337 | 2326 | /* |
| 2338 | 2327 | ** This function dispatches json commands and is the CLI equivalent of |
| 2339 | 2328 | ** json_page_top(). |
| @@ -2425,13 +2414,8 @@ | ||
| 2425 | 2414 | blob_str(&cmdNames), 1); |
| 2426 | 2415 | blob_reset(&cmdNames); |
| 2427 | 2416 | fossil_exit(1); |
| 2428 | 2417 | } |
| 2429 | 2418 | } |
| 2430 | -#endif /* FOSSIL_ENABLE_JSON */ | |
| 2419 | +#endif /* FOSSIL_ENABLE_JSON for mkindex */ | |
| 2431 | 2420 | |
| 2432 | -#undef BITSET_BYTEFOR | |
| 2433 | -#undef BITSET_SET | |
| 2434 | -#undef BITSET_UNSET | |
| 2435 | -#undef BITSET_GET | |
| 2436 | -#undef BITSET_TOGGLE | |
| 2437 | 2421 | #endif /* FOSSIL_ENABLE_JSON */ |
| 2438 | 2422 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -52,21 +52,10 @@ | |
| 52 | "resultCode" /*resultCode*/, |
| 53 | "resultText" /*resultText*/, |
| 54 | "timestamp" /*timestamp*/ |
| 55 | }; |
| 56 | |
| 57 | /* |
| 58 | ** Internal helpers to manipulate a byte array as a bitset. The B |
| 59 | ** argument must be-a array at least (BIT/8+1) bytes long. |
| 60 | ** The BIT argument is the bit number to query/set/clear/toggle. |
| 61 | */ |
| 62 | #define BITSET_BYTEFOR(B,BIT) ((B)[ BIT / 8 ]) |
| 63 | #define BITSET_SET(B,BIT) ((BITSET_BYTEFOR(B,BIT) |= (0x01 << (BIT%8))),0x01) |
| 64 | #define BITSET_UNSET(B,BIT) ((BITSET_BYTEFOR(B,BIT) &= ~(0x01 << (BIT%8))),0x00) |
| 65 | #define BITSET_GET(B,BIT) ((BITSET_BYTEFOR(B,BIT) & (0x01 << (BIT%8))) ? 0x01 : 0x00) |
| 66 | #define BITSET_TOGGLE(B,BIT) (BITSET_GET(B,BIT) ? (BITSET_UNSET(B,BIT)) : (BITSET_SET(B,BIT))) |
| 67 | |
| 68 | |
| 69 | /* Timer code taken from sqlite3's shell.c, modified slightly. |
| 70 | FIXME: move the timer into the fossil core API so that we can |
| 71 | start the timer early on in the app init phase. Right now we're |
| 72 | just timing the json ops themselves. |
| @@ -2329,11 +2318,11 @@ | |
| 2329 | blob_str(&cmdNames), 0); |
| 2330 | blob_reset(&cmdNames); |
| 2331 | } |
| 2332 | |
| 2333 | } |
| 2334 | #endif /* FOSSIL_ENABLE_JSON */ |
| 2335 | |
| 2336 | #ifdef FOSSIL_ENABLE_JSON /* dupe ifdef needed for mkindex */ |
| 2337 | /* |
| 2338 | ** This function dispatches json commands and is the CLI equivalent of |
| 2339 | ** json_page_top(). |
| @@ -2425,13 +2414,8 @@ | |
| 2425 | blob_str(&cmdNames), 1); |
| 2426 | blob_reset(&cmdNames); |
| 2427 | fossil_exit(1); |
| 2428 | } |
| 2429 | } |
| 2430 | #endif /* FOSSIL_ENABLE_JSON */ |
| 2431 | |
| 2432 | #undef BITSET_BYTEFOR |
| 2433 | #undef BITSET_SET |
| 2434 | #undef BITSET_UNSET |
| 2435 | #undef BITSET_GET |
| 2436 | #undef BITSET_TOGGLE |
| 2437 | #endif /* FOSSIL_ENABLE_JSON */ |
| 2438 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -52,21 +52,10 @@ | |
| 52 | "resultCode" /*resultCode*/, |
| 53 | "resultText" /*resultText*/, |
| 54 | "timestamp" /*timestamp*/ |
| 55 | }; |
| 56 | |
| 57 | |
| 58 | /* Timer code taken from sqlite3's shell.c, modified slightly. |
| 59 | FIXME: move the timer into the fossil core API so that we can |
| 60 | start the timer early on in the app init phase. Right now we're |
| 61 | just timing the json ops themselves. |
| @@ -2329,11 +2318,11 @@ | |
| 2318 | blob_str(&cmdNames), 0); |
| 2319 | blob_reset(&cmdNames); |
| 2320 | } |
| 2321 | |
| 2322 | } |
| 2323 | #endif /* FOSSIL_ENABLE_JSON for mkindex */ |
| 2324 | |
| 2325 | #ifdef FOSSIL_ENABLE_JSON /* dupe ifdef needed for mkindex */ |
| 2326 | /* |
| 2327 | ** This function dispatches json commands and is the CLI equivalent of |
| 2328 | ** json_page_top(). |
| @@ -2425,13 +2414,8 @@ | |
| 2414 | blob_str(&cmdNames), 1); |
| 2415 | blob_reset(&cmdNames); |
| 2416 | fossil_exit(1); |
| 2417 | } |
| 2418 | } |
| 2419 | #endif /* FOSSIL_ENABLE_JSON for mkindex */ |
| 2420 | |
| 2421 | #endif /* FOSSIL_ENABLE_JSON */ |
| 2422 |