-#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>
+#include "print_helper.h"
#include "global_vars.h"
void pr_warning(const char* format, ...) {
fflush(stderr);
}
-void wprint_token_stdout() {
+void wprint_token(FILE* out_file) {
if (tokenType == MOT || tokenType == MOTCLE) {
- fwprintf(stdout, L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].value);
+ fwprintf(out_file, L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].value);
} else {
- fwprintf(stdout, L"%20s\n", tokenTypestr[tokenType]);
- }
- fflush(stdout);
-}
-
-void wprint_token_target() {
- if (tokenType == MOT || tokenType == MOTCLE) {
- fwprintf(target, L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].value);
- } else {
- fwprintf(target, L"%20s\n", tokenTypestr[tokenType]);
+ fwprintf(out_file, L"%20s\n", tokenTypestr[tokenType]);
}
+ fflush(out_file);
}