5 #include "print_helper.h"
6 #include "global_vars.h"
8 void pr_warning(const char* format
, ...) {
11 va_start(args
, format
);
12 fprintf(stdout
, format
, args
);
17 void pr_error(const char *format
, ...) {
20 va_start(args
, format
);
21 fprintf(stderr
, format
, args
);
27 void pr_debug(const char *format
, ...) {
30 va_start(args
, format
);
31 fprintf(stderr
, format
, args
);
36 void pr_debug(const char *format
, ...);
39 void wpr_warning(const wchar_t *format
, ...) {
42 va_start(args
, format
);
43 fwprintf(stdout
, format
, args
);
48 void wpr_error(const wchar_t *format
, ...) {
51 va_start(args
, format
);
52 fwprintf(stderr
, format
, args
);
57 void wprint_token(FILE* out_file
) {
58 if (tokenType
== MOT
|| tokenType
== MOTCLE
) {
59 fwprintf(out_file
, L
"%20s: %ls\n", tokenTypestr
[tokenType
], token
[tokenFound
].value
);
61 fwprintf(out_file
, L
"%20s\n", tokenTypestr
[tokenType
]);
66 void wprint_ctoken(FILE* out_file
) {
67 if (tokenType
== MOT
|| tokenType
== MOTCLE
) {
68 fwprintf(out_file
, L
"%20s: %ls\n", tokenTypestr
[tokenType
], tokenValue
);
70 fwprintf(out_file
, L
"%20s\n", tokenTypestr
[tokenType
]);