]> vcs.slashdirt.org Git - sw/tic2json.git/commitdiff

vcs.slashdirt.org Git - sw/tic2json.git/commitdiff

git git / sw / tic2json.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d69358)
minor cleanup no code change
2021年8月21日 13:32:14 +0000 (15:32 +0200)
2021年8月21日 14:31:06 +0000 (16:31 +0200)

diff --git a/tic2json.c b/tic2json.c
index 1ce2f4120dacafb7044c5df1d50eb5aca7f61e8f..7fef597910e0943b0aac625ed95c40237bbfed5f 100644 (file)
--- a/tic2json.c
+++ b/tic2json.c
@@ -39,6 +39,10 @@
int ticv02yylex_destroy();
#endif
+#ifdef BAREBUILD
+ #warning BAREBUILD currently requires editing the code by hand
+#endif
+
bool filter_mode;
uint8_t *etiq_en; // type: < 255 tokens. This could be made a bit field if memory is a concern
@@ -229,18 +233,18 @@ void print_field(struct tic_field *field)
if (tp.optflags & OPT_LONGDATE) {
const char *o, *d = field->horodate;
switch (d[0]) {
- default:
- case ' ':
- o = "";
- break;
- case 'E':
- case 'e':
- o = "+02:00";
- break;
- case 'H':
- case 'h':
- o = "+01:00";
- break;
+ default:
+ case ' ':
+ o = "";
+ break;
+ case 'E':
+ case 'e':
+ o = "+02:00";
+ break;
+ case 'H':
+ case 'h':
+ o = "+01:00";
+ break;
}
printf(", \"horodate\": \"20%.2s-%.2s-%.2sT%.2s:%.2s:%.2s%s\"", d+1, d+3, d+5, d+7, d+9, d+11, o);
}
@@ -343,8 +347,8 @@ int main(int argc, char **argv)
filter_mode = false;
etiq_en = NULL;
- memset(&tp, 0, sizeof(tp));
+ memset(&tp, 0, sizeof(tp));
tp.framedelims[0] = '['; tp.framedelims[1] = ']';
tp.fdelim = ' ';
diff --git a/tic2json.h b/tic2json.h
index c8fb8254d96af547fd904be3e71e571494bb480f..e986cc60480a1beab93b4030851c3fc9bd2206db 100644 (file)
--- a/tic2json.h
+++ b/tic2json.h
@@ -16,7 +16,7 @@
#ifdef BAREBUILD
#define pr_err(format, ...) /* nothing */
#else
- #define pr_err(format, ...) fprintf(stderr, format, ## __VA_ARGS__)
+ #define pr_err(format, ...) fprintf(stderr, "ERREUR: " format, ## __VA_ARGS__)
#endif
#define TIC2JSON_VER "1.1"
tic2json TIC parser/converter
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /