64
64
#include "c_string_buffer/include/stringbuffer.h"
65
65
#include "c_stringfn/include/stringfn.h"
66
66
#include "c_timer/include/c_timer.h"
67
- #include "c_vector/include /vector.h"
67
+ #include "c_vector/vector /vector.h"
68
68
#include "c_workqueue/include/workqueue.h"
69
69
#include "cansid/cansid.h"
70
70
#include "cansid/minunit.h"
116
116
#include "incbin/incbin.h"
117
117
#include "int/int.h"
118
118
#include "is_number.c/is_number.h"
119
- #include "jinja2-cli/jinja2-cli.h"
120
119
#include "kgflags/kgflags.h"
121
120
#include "kitty/kitty.h"
122
121
#include "layout/layout.h"
@@ -299,7 +298,7 @@ void handle_request(struct http_request_s *request) {
299
298
http_string_t url = http_request_target (request );
300
299
301
300
{
302
- dbg (url .buf , % s );
301
+ dbg (url .buf , %s );
303
302
char * U = stringfn_substring (url .buf , 0 , url .len );
304
303
struct StringFNStrings lines = stringfn_split_lines_and_trim (url .buf );
305
304
char * req_data = lines .strings [lines .count - 1 ];
@@ -315,7 +314,7 @@ void handle_request(struct http_request_s *request) {
315
314
}
316
315
}
317
316
char * normalized_url = stringbuffer_to_string (url_sb );
318
- dbg (normalized_url , % s );
317
+ dbg (normalized_url , %s );
319
318
struct StringFNStrings normalized_url_strings = stringfn_split (normalized_url , '/' );
320
319
321
320
int p ;
@@ -324,7 +323,7 @@ void handle_request(struct http_request_s *request) {
324
323
char * parts [3 ];
325
324
char * url_string ;
326
325
asprintf (& url_string , "http://localhost:%d%s?%s" , HTTPSERVER_LISTEN_PORT , normalized_url , req_data );
327
- dbg (url_string , % s );
326
+ dbg (url_string , %s );
328
327
329
328
if (-1 == yuarel_parse (& yurl , url_string )) {
330
329
fprintf (stderr , "Could not parse url!\n" );
@@ -335,10 +334,10 @@ void handle_request(struct http_request_s *request) {
335
334
printf ("scheme:\t%s\n" , yurl .scheme );
336
335
printf ("host:\t%s\n" , yurl .host );
337
336
}
338
- dbg (params_strings .count , % d );
339
- dbg (req_data , % s );
340
- dbg (lines .count , % d );
341
- dbg (normalized_url_strings .count , % d );
337
+ dbg (params_strings .count , %d );
338
+ dbg (req_data , %s );
339
+ dbg (lines .count , %d );
340
+ dbg (normalized_url_strings .count , %d );
342
341
printf ("port:\t%d\n" , yurl .port );
343
342
printf ("path:\t%s\n" , yurl .path );
344
343
printf ("query:\t%s\n" , yurl .query );
@@ -367,8 +366,8 @@ void handle_request(struct http_request_s *request) {
367
366
char * u ;
368
367
asprintf (& u , "\n\turl:%s\n\tlen:%d\n" , url .buf , url .len );
369
368
if (false) {
370
- dbg (uri_decoded , % s );
371
- dbg (uri_encoded , % s );
369
+ dbg (uri_decoded , %s );
370
+ dbg (uri_encoded , %s );
372
371
printf ("%s" , u );
373
372
}
374
373
}
@@ -773,7 +772,7 @@ void demo_ansi_qrcode(){
773
772
}
774
773
775
774
void do_forever_my_program (void * context ){
776
- dbg ("t_forever_my_program" , % s );
775
+ dbg ("t_forever_my_program" , %s );
777
776
if (context != NULL ) {
778
777
// do something with the context
779
778
}
@@ -786,12 +785,12 @@ int do_forever_callback(void *context, const unsigned char started, int stat_loc
786
785
if (context != NULL ) {
787
786
// do something with the context
788
787
}
789
- dbg (stat_loc , % d );
790
- dbg (started , % c );
788
+ dbg (stat_loc , %d );
789
+ dbg (started , %c );
791
790
if (stat_loc == 0 || !started ) {
792
791
return (-1 ); // no more retries
793
792
}
794
- dbg ("do_forever_callback" , % s );
793
+ dbg ("do_forever_callback" , %s );
795
794
return (500 ); // wait 500 millies before next invocation, 0 for no wait.
796
795
}
797
796
@@ -1028,12 +1027,12 @@ TEST t_libbeaufort(void){
1028
1027
groove = beaufort_encrypt (groove_s , "groove" , NULL );
1029
1028
assert (groove );
1030
1029
assert (0 == strcmp (groove , "3n1Cs lg y7l 9ko!F :b" ));
1031
- dbg (monkey , % s );
1032
- dbg (monkey_s , % s );
1033
- dbg (goodman , % s );
1034
- dbg (goodman_s , % s );
1035
- dbg (groove , % s );
1036
- dbg (groove_s , % s );
1030
+ dbg (monkey , %s );
1031
+ dbg (monkey_s , %s );
1032
+ dbg (goodman , %s );
1033
+ dbg (goodman_s , %s );
1034
+ dbg (groove , %s );
1035
+ dbg (groove_s , %s );
1037
1036
1038
1037
// BENCHMARK_SUMMARY(benchmark_name);
1039
1038
PASS ();
@@ -1044,8 +1043,8 @@ TEST t_murmurhash(void){
1044
1043
const char * key = "kinkajou" ;
1045
1044
uint32_t hash = murmurhash (key , (uint32_t )strlen (key ), seed );
1046
1045
1047
- dbg (key , % s );
1048
- dbg (seed , % d );
1046
+ dbg (key , %s );
1047
+ dbg (seed , %d );
1049
1048
printf ("%" PRIu32 "\n" , hash );
1050
1049
printf ("%d" PRIu32 "\n" , hash );
1051
1050
@@ -2221,7 +2220,7 @@ TEST t_ok_file_format_wav(void){
2221
2220
char * wav_file = malloc (1024 );
2222
2221
2223
2222
sprintf (wav_file , "%s/../sounds/key_space_down.wav" , EXECUTABLE_PATH_DIRNAME );
2224
- dbg (wav_file , % s );
2223
+ dbg (wav_file , %s );
2225
2224
FILE * file = fopen (wav_file , "rb" );
2226
2225
ok_wav audio = ok_wav_read (file , OK_WAV_DEFAULT_DECODE_FLAGS );
2227
2226
@@ -2631,24 +2630,6 @@ TEST t_my_cwd(void){
2631
2630
PASS ();
2632
2631
}
2633
2632
2634
- TEST t_jinja2_cli (void ){
2635
- struct jinja2_render_template_t * CFG = jinja2_init_config ();
2636
-
2637
- CFG -> input_json_string = "{\"abc\":\"world\"}" ;
2638
- CFG -> template_s = "hello {{ abc }}" ;
2639
- CFG -> debug_mode = true;
2640
- CFG -> debug_mode = false;
2641
- int res = jinja2_render_template (CFG );
2642
-
2643
- ASSERT_EQ (res , 0 );
2644
- ASSERT_EQ (CFG -> success , true);
2645
- ASSERT_EQ (strcmp (CFG -> output_s , "hello world" ), 0 );
2646
-
2647
- printf (AC_RESETALL AC_BLUE "%s" AC_RESETALL "\n" , CFG -> output_s );
2648
-
2649
- PASS ();
2650
- }
2651
-
2652
2633
typedef struct {
2653
2634
char * name ;
2654
2635
int cash ;
@@ -3330,21 +3311,21 @@ TEST t_c_timestamp(void){
3330
3311
ts .sec = 0 ;
3331
3312
ts .offset = 0 ;
3332
3313
ts .nsec = -1 ;
3333
- dbg (timestamp_valid (& ts ), % d );
3314
+ dbg (timestamp_valid (& ts ), %d );
3334
3315
3335
3316
ts .nsec = 1000000000 ;
3336
- dbg (!timestamp_valid (& ts ), % d );
3317
+ dbg (!timestamp_valid (& ts ), %d );
3337
3318
3338
3319
ts .nsec = 0 ;
3339
3320
ts .offset = -23 * 60 - 60 ;
3340
- dbg (!timestamp_valid (& ts ), % d );
3321
+ dbg (!timestamp_valid (& ts ), %d );
3341
3322
3342
3323
ts .offset = +23 * 60 + 60 ;
3343
- dbg (!timestamp_valid (& ts ), % d );
3324
+ dbg (!timestamp_valid (& ts ), %d );
3344
3325
3345
3326
ts .offset = 0 ;
3346
3327
ts .sec = INT64_C (-62135596801 );
3347
- dbg (!timestamp_valid (& ts ), % d );
3328
+ dbg (!timestamp_valid (& ts ), %d );
3348
3329
ts .sec = INT64_C (253402387140 );
3349
3330
timestamp_t ts1 ;
3350
3331
struct tm tm1 ;
@@ -3353,10 +3334,10 @@ TEST t_c_timestamp(void){
3353
3334
ts .nsec = 0 ;
3354
3335
ts .offset = 0 ;
3355
3336
memset (& tm1 , 0 , sizeof (tm1 ));
3356
- dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_year ), % d );
3357
- dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_mon ), % d );
3358
- dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_hour ), % d );
3359
- dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_sec ), % d );
3337
+ dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_year ), %d );
3338
+ dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_mon ), %d );
3339
+ dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_hour ), %d );
3340
+ dbg (timestamp_to_tm_utc (& ts , & tm1 .tm_sec ), %d );
3360
3341
3361
3342
PASS ();
3362
3343
}
@@ -4087,9 +4068,6 @@ SUITE(s_kitty){
4087
4068
SUITE (s_my_cwd ){
4088
4069
RUN_TEST (t_my_cwd );
4089
4070
}
4090
- SUITE (s_jinja2_cli ){
4091
- RUN_TEST (t_jinja2_cli );
4092
- }
4093
4071
SUITE (s_levenshtein ){
4094
4072
RUN_TEST (t_levenshtein );
4095
4073
}
@@ -4272,7 +4250,6 @@ int main(int argc, char **argv) {
4272
4250
// RUN_SUITE(s_occurrences);
4273
4251
// RUN_SUITE(s_str_replace);
4274
4252
RUN_SUITE (s_seethe );
4275
- RUN_SUITE (s_jinja2_cli );
4276
4253
RUN_SUITE (s_list );
4277
4254
RUN_SUITE (s_forever );
4278
4255
RUN_SUITE (s_eventemitter );
0 commit comments