Fossil SCM

Cleanup trailing whitespace in 'th_main.c'.

mistachkin 2014-07-24 03:14 trunk
Commit b000db4752f9145cb34c2d19921e3083426586b6
1 file changed +63 -63
+63 -63
--- src/th_main.c
+++ src/th_main.c
@@ -145,14 +145,14 @@
145145
**
146146
** Escape all characters of STRING which have special meaning in URI
147147
** components. Return a new string result.
148148
*/
149149
static int httpizeCmd(
150
- Th_Interp *interp,
151
- void *p,
152
- int argc,
153
- const char **argv,
150
+ Th_Interp *interp,
151
+ void *p,
152
+ int argc,
153
+ const char **argv,
154154
int *argl
155155
){
156156
char *zOut;
157157
if( argc!=2 ){
158158
return Th_WrongNumArgs(interp, "httpize STRING");
@@ -172,14 +172,14 @@
172172
** TH1 command: enable_output BOOLEAN
173173
**
174174
** Enable or disable the puts and hputs commands.
175175
*/
176176
static int enableOutputCmd(
177
- Th_Interp *interp,
178
- void *p,
179
- int argc,
180
- const char **argv,
177
+ Th_Interp *interp,
178
+ void *p,
179
+ int argc,
180
+ const char **argv,
181181
int *argl
182182
){
183183
int rc;
184184
if( argc<2 || argc>3 ){
185185
return Th_WrongNumArgs(interp, "enable_output [LABEL] BOOLEAN");
@@ -245,17 +245,17 @@
245245
246246
/*
247247
** TH1 command: puts STRING
248248
** TH1 command: html STRING
249249
**
250
-** Output STRING escaped for HTML (html) or unchanged (puts).
250
+** Output STRING escaped for HTML (html) or unchanged (puts).
251251
*/
252252
static int putsCmd(
253
- Th_Interp *interp,
254
- void *pConvert,
255
- int argc,
256
- const char **argv,
253
+ Th_Interp *interp,
254
+ void *pConvert,
255
+ int argc,
256
+ const char **argv,
257257
int *argl
258258
){
259259
if( argc!=2 ){
260260
return Th_WrongNumArgs(interp, "puts STRING");
261261
}
@@ -267,14 +267,14 @@
267267
** TH1 command: wiki STRING
268268
**
269269
** Render the input string as wiki.
270270
*/
271271
static int wikiCmd(
272
- Th_Interp *interp,
273
- void *p,
274
- int argc,
275
- const char **argv,
272
+ Th_Interp *interp,
273
+ void *p,
274
+ int argc,
275
+ const char **argv,
276276
int *argl
277277
){
278278
int flags = WIKI_INLINE | WIKI_NOBADLINKS | *(unsigned int*)p;
279279
if( argc!=2 ){
280280
return Th_WrongNumArgs(interp, "wiki STRING");
@@ -293,14 +293,14 @@
293293
**
294294
** Escape all characters of STRING which have special meaning in HTML.
295295
** Return a new string result.
296296
*/
297297
static int htmlizeCmd(
298
- Th_Interp *interp,
299
- void *p,
300
- int argc,
301
- const char **argv,
298
+ Th_Interp *interp,
299
+ void *p,
300
+ int argc,
301
+ const char **argv,
302302
int *argl
303303
){
304304
char *zOut;
305305
if( argc!=2 ){
306306
return Th_WrongNumArgs(interp, "htmlize STRING");
@@ -317,14 +317,14 @@
317317
** Return a string which is the current time and date. If the
318318
** -local option is used, the date appears using localtime instead
319319
** of UTC.
320320
*/
321321
static int dateCmd(
322
- Th_Interp *interp,
323
- void *p,
324
- int argc,
325
- const char **argv,
322
+ Th_Interp *interp,
323
+ void *p,
324
+ int argc,
325
+ const char **argv,
326326
int *argl
327327
){
328328
char *zOut;
329329
if( argc>=2 && argl[1]==6 && memcmp(argv[1],"-local",6)==0 ){
330330
zOut = db_text("??", "SELECT datetime('now'%s)", timeline_utc());
@@ -340,14 +340,14 @@
340340
** TH1 command: hascap STRING...
341341
**
342342
** Return true if the user has all of the capabilities listed in STRING.
343343
*/
344344
static int hascapCmd(
345
- Th_Interp *interp,
346
- void *p,
347
- int argc,
348
- const char **argv,
345
+ Th_Interp *interp,
346
+ void *p,
347
+ int argc,
348
+ const char **argv,
349349
int *argl
350350
){
351351
int rc = 0, i;
352352
if( argc<2 ){
353353
return Th_WrongNumArgs(interp, "hascap STRING ...");
@@ -377,14 +377,14 @@
377377
** "json" = FOSSIL_ENABLE_JSON
378378
** "markdown" = FOSSIL_ENABLE_MARKDOWN
379379
**
380380
*/
381381
static int hasfeatureCmd(
382
- Th_Interp *interp,
383
- void *p,
384
- int argc,
385
- const char **argv,
382
+ Th_Interp *interp,
383
+ void *p,
384
+ int argc,
385
+ const char **argv,
386386
int *argl
387387
){
388388
int rc = 0;
389389
char const * zArg;
390390
if( argc!=2 ){
@@ -475,14 +475,14 @@
475475
** TH1 command: anycap STRING
476476
**
477477
** Return true if the user has any one of the capabilities listed in STRING.
478478
*/
479479
static int anycapCmd(
480
- Th_Interp *interp,
481
- void *p,
482
- int argc,
483
- const char **argv,
480
+ Th_Interp *interp,
481
+ void *p,
482
+ int argc,
483
+ const char **argv,
484484
int *argl
485485
){
486486
int rc = 0;
487487
int i;
488488
if( argc!=2 ){
@@ -508,13 +508,13 @@
508508
** If NUMLINES is greater than one then the display is a listbox
509509
** with the number of lines given.
510510
*/
511511
static int comboboxCmd(
512512
Th_Interp *interp,
513
- void *p,
514
- int argc,
515
- const char **argv,
513
+ void *p,
514
+ int argc,
515
+ const char **argv,
516516
int *argl
517517
){
518518
if( argc!=4 ){
519519
return Th_WrongNumArgs(interp, "combobox NAME TEXT-LIST NUMLINES");
520520
}
@@ -539,11 +539,11 @@
539539
sendText(z, -1, 0);
540540
free(z);
541541
blob_reset(&name);
542542
for(i=0; i<nElem; i++){
543543
zH = htmlize((char*)azElem[i], aszElem[i]);
544
- if( zValue && aszElem[i]==nValue
544
+ if( zValue && aszElem[i]==nValue
545545
&& memcmp(zValue, azElem[i], nValue)==0 ){
546546
z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>",
547547
zH, zH);
548548
}else{
549549
z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
@@ -564,13 +564,13 @@
564564
** Return one more than the number of \n characters in STRING. But
565565
** never return less than MIN or more than MAX.
566566
*/
567567
static int linecntCmd(
568568
Th_Interp *interp,
569
- void *p,
570
- int argc,
571
- const char **argv,
569
+ void *p,
570
+ int argc,
571
+ const char **argv,
572572
int *argl
573573
){
574574
const char *z;
575575
int size, n, i;
576576
int iMin, iMax;
@@ -600,13 +600,13 @@
600600
** string if one is not currently open. Optionally, it will attempt to open
601601
** the repository if the boolean argument is non-zero.
602602
*/
603603
static int repositoryCmd(
604604
Th_Interp *interp,
605
- void *p,
606
- int argc,
607
- const char **argv,
605
+ void *p,
606
+ int argc,
607
+ const char **argv,
608608
int *argl
609609
){
610610
if( argc!=1 && argc!=2 ){
611611
return Th_WrongNumArgs(interp, "repository ?BOOLEAN?");
612612
}
@@ -855,11 +855,11 @@
855855
getrusage(RUSAGE_SELF, &s);
856856
if( piUser ){
857857
*piUser = ((sqlite3_uint64)s.ru_utime.tv_sec)*1000000 + s.ru_utime.tv_usec;
858858
}
859859
if( piKernel ){
860
- *piKernel =
860
+ *piKernel =
861861
((sqlite3_uint64)s.ru_stime.tv_sec)*1000000 + s.ru_stime.tv_usec;
862862
}
863863
#endif
864864
}
865865
@@ -869,13 +869,13 @@
869869
** Return the number of microseconds of CPU time consumed by the current
870870
** process in user space.
871871
*/
872872
static int utimeCmd(
873873
Th_Interp *interp,
874
- void *p,
875
- int argc,
876
- const char **argv,
874
+ void *p,
875
+ int argc,
876
+ const char **argv,
877877
int *argl
878878
){
879879
sqlite3_uint64 x;
880880
char zUTime[50];
881881
getCpuTimes(&x, 0);
@@ -890,13 +890,13 @@
890890
** Return the number of microseconds of CPU time consumed by the current
891891
** process in system space.
892892
*/
893893
static int stimeCmd(
894894
Th_Interp *interp,
895
- void *p,
896
- int argc,
897
- const char **argv,
895
+ void *p,
896
+ int argc,
897
+ const char **argv,
898898
int *argl
899899
){
900900
sqlite3_uint64 x;
901901
char zUTime[50];
902902
getCpuTimes(0, &x);
@@ -907,18 +907,18 @@
907907
908908
909909
/*
910910
** TH1 command: randhex N
911911
**
912
-** Return N*2 random hexadecimal digits with N<50. If N is omitted,
912
+** Return N*2 random hexadecimal digits with N<50. If N is omitted,
913913
** use a value of 10.
914914
*/
915915
static int randhexCmd(
916916
Th_Interp *interp,
917
- void *p,
918
- int argc,
919
- const char **argv,
917
+ void *p,
918
+ int argc,
919
+ const char **argv,
920920
int *argl
921921
){
922922
int n;
923923
unsigned char aRand[50];
924924
unsigned char zOut[100];
@@ -950,13 +950,13 @@
950950
** "var". Result values are stored in variables with the column name prior
951951
** to each invocation of CODE.
952952
*/
953953
static int queryCmd(
954954
Th_Interp *interp,
955
- void *p,
956
- int argc,
957
- const char **argv,
955
+ void *p,
956
+ int argc,
957
+ const char **argv,
958958
int *argl
959959
){
960960
sqlite3_stmt *pStmt;
961961
int rc;
962962
const char *zSql;
@@ -1016,11 +1016,11 @@
10161016
rc = sqlite3_finalize(pStmt);
10171017
if( rc!=SQLITE_OK ){
10181018
Th_ErrorMessage(interp, "SQL error: ", sqlite3_errmsg(g.db), -1);
10191019
return TH_ERROR;
10201020
}
1021
- }
1021
+ }
10221022
return res;
10231023
}
10241024
10251025
/*
10261026
** TH1 command: setting name
@@ -1691,11 +1691,11 @@
16911691
}
16921692
#endif
16931693
16941694
/*
16951695
** The z[] input contains text mixed with TH1 scripts.
1696
-** The TH1 scripts are contained within <th1>...</th1>.
1696
+** The TH1 scripts are contained within <th1>...</th1>.
16971697
** TH1 variables are $aaa or $<aaa>. The first form of
16981698
** variable is literal. The second is run through htmlize
16991699
** before being inserted.
17001700
**
17011701
** This routine processes the template and writes the results
17021702
--- src/th_main.c
+++ src/th_main.c
@@ -145,14 +145,14 @@
145 **
146 ** Escape all characters of STRING which have special meaning in URI
147 ** components. Return a new string result.
148 */
149 static int httpizeCmd(
150 Th_Interp *interp,
151 void *p,
152 int argc,
153 const char **argv,
154 int *argl
155 ){
156 char *zOut;
157 if( argc!=2 ){
158 return Th_WrongNumArgs(interp, "httpize STRING");
@@ -172,14 +172,14 @@
172 ** TH1 command: enable_output BOOLEAN
173 **
174 ** Enable or disable the puts and hputs commands.
175 */
176 static int enableOutputCmd(
177 Th_Interp *interp,
178 void *p,
179 int argc,
180 const char **argv,
181 int *argl
182 ){
183 int rc;
184 if( argc<2 || argc>3 ){
185 return Th_WrongNumArgs(interp, "enable_output [LABEL] BOOLEAN");
@@ -245,17 +245,17 @@
245
246 /*
247 ** TH1 command: puts STRING
248 ** TH1 command: html STRING
249 **
250 ** Output STRING escaped for HTML (html) or unchanged (puts).
251 */
252 static int putsCmd(
253 Th_Interp *interp,
254 void *pConvert,
255 int argc,
256 const char **argv,
257 int *argl
258 ){
259 if( argc!=2 ){
260 return Th_WrongNumArgs(interp, "puts STRING");
261 }
@@ -267,14 +267,14 @@
267 ** TH1 command: wiki STRING
268 **
269 ** Render the input string as wiki.
270 */
271 static int wikiCmd(
272 Th_Interp *interp,
273 void *p,
274 int argc,
275 const char **argv,
276 int *argl
277 ){
278 int flags = WIKI_INLINE | WIKI_NOBADLINKS | *(unsigned int*)p;
279 if( argc!=2 ){
280 return Th_WrongNumArgs(interp, "wiki STRING");
@@ -293,14 +293,14 @@
293 **
294 ** Escape all characters of STRING which have special meaning in HTML.
295 ** Return a new string result.
296 */
297 static int htmlizeCmd(
298 Th_Interp *interp,
299 void *p,
300 int argc,
301 const char **argv,
302 int *argl
303 ){
304 char *zOut;
305 if( argc!=2 ){
306 return Th_WrongNumArgs(interp, "htmlize STRING");
@@ -317,14 +317,14 @@
317 ** Return a string which is the current time and date. If the
318 ** -local option is used, the date appears using localtime instead
319 ** of UTC.
320 */
321 static int dateCmd(
322 Th_Interp *interp,
323 void *p,
324 int argc,
325 const char **argv,
326 int *argl
327 ){
328 char *zOut;
329 if( argc>=2 && argl[1]==6 && memcmp(argv[1],"-local",6)==0 ){
330 zOut = db_text("??", "SELECT datetime('now'%s)", timeline_utc());
@@ -340,14 +340,14 @@
340 ** TH1 command: hascap STRING...
341 **
342 ** Return true if the user has all of the capabilities listed in STRING.
343 */
344 static int hascapCmd(
345 Th_Interp *interp,
346 void *p,
347 int argc,
348 const char **argv,
349 int *argl
350 ){
351 int rc = 0, i;
352 if( argc<2 ){
353 return Th_WrongNumArgs(interp, "hascap STRING ...");
@@ -377,14 +377,14 @@
377 ** "json" = FOSSIL_ENABLE_JSON
378 ** "markdown" = FOSSIL_ENABLE_MARKDOWN
379 **
380 */
381 static int hasfeatureCmd(
382 Th_Interp *interp,
383 void *p,
384 int argc,
385 const char **argv,
386 int *argl
387 ){
388 int rc = 0;
389 char const * zArg;
390 if( argc!=2 ){
@@ -475,14 +475,14 @@
475 ** TH1 command: anycap STRING
476 **
477 ** Return true if the user has any one of the capabilities listed in STRING.
478 */
479 static int anycapCmd(
480 Th_Interp *interp,
481 void *p,
482 int argc,
483 const char **argv,
484 int *argl
485 ){
486 int rc = 0;
487 int i;
488 if( argc!=2 ){
@@ -508,13 +508,13 @@
508 ** If NUMLINES is greater than one then the display is a listbox
509 ** with the number of lines given.
510 */
511 static int comboboxCmd(
512 Th_Interp *interp,
513 void *p,
514 int argc,
515 const char **argv,
516 int *argl
517 ){
518 if( argc!=4 ){
519 return Th_WrongNumArgs(interp, "combobox NAME TEXT-LIST NUMLINES");
520 }
@@ -539,11 +539,11 @@
539 sendText(z, -1, 0);
540 free(z);
541 blob_reset(&name);
542 for(i=0; i<nElem; i++){
543 zH = htmlize((char*)azElem[i], aszElem[i]);
544 if( zValue && aszElem[i]==nValue
545 && memcmp(zValue, azElem[i], nValue)==0 ){
546 z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>",
547 zH, zH);
548 }else{
549 z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
@@ -564,13 +564,13 @@
564 ** Return one more than the number of \n characters in STRING. But
565 ** never return less than MIN or more than MAX.
566 */
567 static int linecntCmd(
568 Th_Interp *interp,
569 void *p,
570 int argc,
571 const char **argv,
572 int *argl
573 ){
574 const char *z;
575 int size, n, i;
576 int iMin, iMax;
@@ -600,13 +600,13 @@
600 ** string if one is not currently open. Optionally, it will attempt to open
601 ** the repository if the boolean argument is non-zero.
602 */
603 static int repositoryCmd(
604 Th_Interp *interp,
605 void *p,
606 int argc,
607 const char **argv,
608 int *argl
609 ){
610 if( argc!=1 && argc!=2 ){
611 return Th_WrongNumArgs(interp, "repository ?BOOLEAN?");
612 }
@@ -855,11 +855,11 @@
855 getrusage(RUSAGE_SELF, &s);
856 if( piUser ){
857 *piUser = ((sqlite3_uint64)s.ru_utime.tv_sec)*1000000 + s.ru_utime.tv_usec;
858 }
859 if( piKernel ){
860 *piKernel =
861 ((sqlite3_uint64)s.ru_stime.tv_sec)*1000000 + s.ru_stime.tv_usec;
862 }
863 #endif
864 }
865
@@ -869,13 +869,13 @@
869 ** Return the number of microseconds of CPU time consumed by the current
870 ** process in user space.
871 */
872 static int utimeCmd(
873 Th_Interp *interp,
874 void *p,
875 int argc,
876 const char **argv,
877 int *argl
878 ){
879 sqlite3_uint64 x;
880 char zUTime[50];
881 getCpuTimes(&x, 0);
@@ -890,13 +890,13 @@
890 ** Return the number of microseconds of CPU time consumed by the current
891 ** process in system space.
892 */
893 static int stimeCmd(
894 Th_Interp *interp,
895 void *p,
896 int argc,
897 const char **argv,
898 int *argl
899 ){
900 sqlite3_uint64 x;
901 char zUTime[50];
902 getCpuTimes(0, &x);
@@ -907,18 +907,18 @@
907
908
909 /*
910 ** TH1 command: randhex N
911 **
912 ** Return N*2 random hexadecimal digits with N<50. If N is omitted,
913 ** use a value of 10.
914 */
915 static int randhexCmd(
916 Th_Interp *interp,
917 void *p,
918 int argc,
919 const char **argv,
920 int *argl
921 ){
922 int n;
923 unsigned char aRand[50];
924 unsigned char zOut[100];
@@ -950,13 +950,13 @@
950 ** "var". Result values are stored in variables with the column name prior
951 ** to each invocation of CODE.
952 */
953 static int queryCmd(
954 Th_Interp *interp,
955 void *p,
956 int argc,
957 const char **argv,
958 int *argl
959 ){
960 sqlite3_stmt *pStmt;
961 int rc;
962 const char *zSql;
@@ -1016,11 +1016,11 @@
1016 rc = sqlite3_finalize(pStmt);
1017 if( rc!=SQLITE_OK ){
1018 Th_ErrorMessage(interp, "SQL error: ", sqlite3_errmsg(g.db), -1);
1019 return TH_ERROR;
1020 }
1021 }
1022 return res;
1023 }
1024
1025 /*
1026 ** TH1 command: setting name
@@ -1691,11 +1691,11 @@
1691 }
1692 #endif
1693
1694 /*
1695 ** The z[] input contains text mixed with TH1 scripts.
1696 ** The TH1 scripts are contained within <th1>...</th1>.
1697 ** TH1 variables are $aaa or $<aaa>. The first form of
1698 ** variable is literal. The second is run through htmlize
1699 ** before being inserted.
1700 **
1701 ** This routine processes the template and writes the results
1702
--- src/th_main.c
+++ src/th_main.c
@@ -145,14 +145,14 @@
145 **
146 ** Escape all characters of STRING which have special meaning in URI
147 ** components. Return a new string result.
148 */
149 static int httpizeCmd(
150 Th_Interp *interp,
151 void *p,
152 int argc,
153 const char **argv,
154 int *argl
155 ){
156 char *zOut;
157 if( argc!=2 ){
158 return Th_WrongNumArgs(interp, "httpize STRING");
@@ -172,14 +172,14 @@
172 ** TH1 command: enable_output BOOLEAN
173 **
174 ** Enable or disable the puts and hputs commands.
175 */
176 static int enableOutputCmd(
177 Th_Interp *interp,
178 void *p,
179 int argc,
180 const char **argv,
181 int *argl
182 ){
183 int rc;
184 if( argc<2 || argc>3 ){
185 return Th_WrongNumArgs(interp, "enable_output [LABEL] BOOLEAN");
@@ -245,17 +245,17 @@
245
246 /*
247 ** TH1 command: puts STRING
248 ** TH1 command: html STRING
249 **
250 ** Output STRING escaped for HTML (html) or unchanged (puts).
251 */
252 static int putsCmd(
253 Th_Interp *interp,
254 void *pConvert,
255 int argc,
256 const char **argv,
257 int *argl
258 ){
259 if( argc!=2 ){
260 return Th_WrongNumArgs(interp, "puts STRING");
261 }
@@ -267,14 +267,14 @@
267 ** TH1 command: wiki STRING
268 **
269 ** Render the input string as wiki.
270 */
271 static int wikiCmd(
272 Th_Interp *interp,
273 void *p,
274 int argc,
275 const char **argv,
276 int *argl
277 ){
278 int flags = WIKI_INLINE | WIKI_NOBADLINKS | *(unsigned int*)p;
279 if( argc!=2 ){
280 return Th_WrongNumArgs(interp, "wiki STRING");
@@ -293,14 +293,14 @@
293 **
294 ** Escape all characters of STRING which have special meaning in HTML.
295 ** Return a new string result.
296 */
297 static int htmlizeCmd(
298 Th_Interp *interp,
299 void *p,
300 int argc,
301 const char **argv,
302 int *argl
303 ){
304 char *zOut;
305 if( argc!=2 ){
306 return Th_WrongNumArgs(interp, "htmlize STRING");
@@ -317,14 +317,14 @@
317 ** Return a string which is the current time and date. If the
318 ** -local option is used, the date appears using localtime instead
319 ** of UTC.
320 */
321 static int dateCmd(
322 Th_Interp *interp,
323 void *p,
324 int argc,
325 const char **argv,
326 int *argl
327 ){
328 char *zOut;
329 if( argc>=2 && argl[1]==6 && memcmp(argv[1],"-local",6)==0 ){
330 zOut = db_text("??", "SELECT datetime('now'%s)", timeline_utc());
@@ -340,14 +340,14 @@
340 ** TH1 command: hascap STRING...
341 **
342 ** Return true if the user has all of the capabilities listed in STRING.
343 */
344 static int hascapCmd(
345 Th_Interp *interp,
346 void *p,
347 int argc,
348 const char **argv,
349 int *argl
350 ){
351 int rc = 0, i;
352 if( argc<2 ){
353 return Th_WrongNumArgs(interp, "hascap STRING ...");
@@ -377,14 +377,14 @@
377 ** "json" = FOSSIL_ENABLE_JSON
378 ** "markdown" = FOSSIL_ENABLE_MARKDOWN
379 **
380 */
381 static int hasfeatureCmd(
382 Th_Interp *interp,
383 void *p,
384 int argc,
385 const char **argv,
386 int *argl
387 ){
388 int rc = 0;
389 char const * zArg;
390 if( argc!=2 ){
@@ -475,14 +475,14 @@
475 ** TH1 command: anycap STRING
476 **
477 ** Return true if the user has any one of the capabilities listed in STRING.
478 */
479 static int anycapCmd(
480 Th_Interp *interp,
481 void *p,
482 int argc,
483 const char **argv,
484 int *argl
485 ){
486 int rc = 0;
487 int i;
488 if( argc!=2 ){
@@ -508,13 +508,13 @@
508 ** If NUMLINES is greater than one then the display is a listbox
509 ** with the number of lines given.
510 */
511 static int comboboxCmd(
512 Th_Interp *interp,
513 void *p,
514 int argc,
515 const char **argv,
516 int *argl
517 ){
518 if( argc!=4 ){
519 return Th_WrongNumArgs(interp, "combobox NAME TEXT-LIST NUMLINES");
520 }
@@ -539,11 +539,11 @@
539 sendText(z, -1, 0);
540 free(z);
541 blob_reset(&name);
542 for(i=0; i<nElem; i++){
543 zH = htmlize((char*)azElem[i], aszElem[i]);
544 if( zValue && aszElem[i]==nValue
545 && memcmp(zValue, azElem[i], nValue)==0 ){
546 z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>",
547 zH, zH);
548 }else{
549 z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
@@ -564,13 +564,13 @@
564 ** Return one more than the number of \n characters in STRING. But
565 ** never return less than MIN or more than MAX.
566 */
567 static int linecntCmd(
568 Th_Interp *interp,
569 void *p,
570 int argc,
571 const char **argv,
572 int *argl
573 ){
574 const char *z;
575 int size, n, i;
576 int iMin, iMax;
@@ -600,13 +600,13 @@
600 ** string if one is not currently open. Optionally, it will attempt to open
601 ** the repository if the boolean argument is non-zero.
602 */
603 static int repositoryCmd(
604 Th_Interp *interp,
605 void *p,
606 int argc,
607 const char **argv,
608 int *argl
609 ){
610 if( argc!=1 && argc!=2 ){
611 return Th_WrongNumArgs(interp, "repository ?BOOLEAN?");
612 }
@@ -855,11 +855,11 @@
855 getrusage(RUSAGE_SELF, &s);
856 if( piUser ){
857 *piUser = ((sqlite3_uint64)s.ru_utime.tv_sec)*1000000 + s.ru_utime.tv_usec;
858 }
859 if( piKernel ){
860 *piKernel =
861 ((sqlite3_uint64)s.ru_stime.tv_sec)*1000000 + s.ru_stime.tv_usec;
862 }
863 #endif
864 }
865
@@ -869,13 +869,13 @@
869 ** Return the number of microseconds of CPU time consumed by the current
870 ** process in user space.
871 */
872 static int utimeCmd(
873 Th_Interp *interp,
874 void *p,
875 int argc,
876 const char **argv,
877 int *argl
878 ){
879 sqlite3_uint64 x;
880 char zUTime[50];
881 getCpuTimes(&x, 0);
@@ -890,13 +890,13 @@
890 ** Return the number of microseconds of CPU time consumed by the current
891 ** process in system space.
892 */
893 static int stimeCmd(
894 Th_Interp *interp,
895 void *p,
896 int argc,
897 const char **argv,
898 int *argl
899 ){
900 sqlite3_uint64 x;
901 char zUTime[50];
902 getCpuTimes(0, &x);
@@ -907,18 +907,18 @@
907
908
909 /*
910 ** TH1 command: randhex N
911 **
912 ** Return N*2 random hexadecimal digits with N<50. If N is omitted,
913 ** use a value of 10.
914 */
915 static int randhexCmd(
916 Th_Interp *interp,
917 void *p,
918 int argc,
919 const char **argv,
920 int *argl
921 ){
922 int n;
923 unsigned char aRand[50];
924 unsigned char zOut[100];
@@ -950,13 +950,13 @@
950 ** "var". Result values are stored in variables with the column name prior
951 ** to each invocation of CODE.
952 */
953 static int queryCmd(
954 Th_Interp *interp,
955 void *p,
956 int argc,
957 const char **argv,
958 int *argl
959 ){
960 sqlite3_stmt *pStmt;
961 int rc;
962 const char *zSql;
@@ -1016,11 +1016,11 @@
1016 rc = sqlite3_finalize(pStmt);
1017 if( rc!=SQLITE_OK ){
1018 Th_ErrorMessage(interp, "SQL error: ", sqlite3_errmsg(g.db), -1);
1019 return TH_ERROR;
1020 }
1021 }
1022 return res;
1023 }
1024
1025 /*
1026 ** TH1 command: setting name
@@ -1691,11 +1691,11 @@
1691 }
1692 #endif
1693
1694 /*
1695 ** The z[] input contains text mixed with TH1 scripts.
1696 ** The TH1 scripts are contained within <th1>...</th1>.
1697 ** TH1 variables are $aaa or $<aaa>. The first form of
1698 ** variable is literal. The second is run through htmlize
1699 ** before being inserted.
1700 **
1701 ** This routine processes the template and writes the results
1702

Keyboard Shortcuts

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