8d6ddb447e3a9ab894521ccf8057ce0c80a7c753
4 #include "print_helper.h"
5 #include "global_vars.h"
7 void pr_warning(const char* format
, ...) {
10 va_start(args
, format
);
11 fprintf(stdout
, format
, args
);
16 void pr_error(const char *format
, ...) {
19 va_start(args
, format
);
20 fprintf(stderr
, format
, args
);
26 void pr_debug(const char *format
, ...) {
29 va_start(args
, format
);
30 fprintf(stderr
, format
, args
);
35 void pr_debug(const char *format
, ...);
38 void wpr_warning(const wchar_t *format
, ...) {
41 va_start(args
, format
);
42 fwprintf(stdout
, format
, args
);
47 void wpr_error(const wchar_t *format
, ...) {
50 va_start(args
, format
);
51 fwprintf(stderr
, format
, args
);
56 void wprint_token(FILE* out_file
) {
57 if (tokenType
== MOT
|| tokenType
== MOTCLE
) {
58 fwprintf(out_file
, L
"%20s: %ls\n", tokenTypestr
[tokenType
], token
[tokenFound
].value
);
60 fwprintf(out_file
, L
"%20s\n", tokenTypestr
[tokenType
]);
65 void wprint_ctoken(FILE* out_file
) {
66 if (tokenType
== MOT
|| tokenType
== MOTCLE
) {
67 fwprintf(out_file
, L
"%20s: %ls\n", tokenTypestr
[tokenType
], tokenValue
);
69 fwprintf(out_file
, L
"%20s\n", tokenTypestr
[tokenType
]);