Fossil SCM

Removed some unused code. minor doc touch-up.

stephan 2012-02-16 21:09 trunk
Commit cff9ecad0b6d0619f1bd05c1a7722f809ed65bca
1 file changed +2 -18
+2 -18
--- src/json.c
+++ src/json.c
@@ -52,21 +52,10 @@
5252
"resultCode" /*resultCode*/,
5353
"resultText" /*resultText*/,
5454
"timestamp" /*timestamp*/
5555
};
5656
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
-
6857
6958
/* Timer code taken from sqlite3's shell.c, modified slightly.
7059
FIXME: move the timer into the fossil core API so that we can
7160
start the timer early on in the app init phase. Right now we're
7261
just timing the json ops themselves.
@@ -2329,11 +2318,11 @@
23292318
blob_str(&cmdNames), 0);
23302319
blob_reset(&cmdNames);
23312320
}
23322321
23332322
}
2334
-#endif /* FOSSIL_ENABLE_JSON */
2323
+#endif /* FOSSIL_ENABLE_JSON for mkindex */
23352324
23362325
#ifdef FOSSIL_ENABLE_JSON /* dupe ifdef needed for mkindex */
23372326
/*
23382327
** This function dispatches json commands and is the CLI equivalent of
23392328
** json_page_top().
@@ -2425,13 +2414,8 @@
24252414
blob_str(&cmdNames), 1);
24262415
blob_reset(&cmdNames);
24272416
fossil_exit(1);
24282417
}
24292418
}
2430
-#endif /* FOSSIL_ENABLE_JSON */
2419
+#endif /* FOSSIL_ENABLE_JSON for mkindex */
24312420
2432
-#undef BITSET_BYTEFOR
2433
-#undef BITSET_SET
2434
-#undef BITSET_UNSET
2435
-#undef BITSET_GET
2436
-#undef BITSET_TOGGLE
24372421
#endif /* FOSSIL_ENABLE_JSON */
24382422
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button