repositories
/
TP_AL_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cleanups.
[TP_AL_C.git]
/
lexer
/
print_helper.c
diff --git
a/lexer/print_helper.c
b/lexer/print_helper.c
index f7ab04ffb9887b2e2fbdf5d96ea06b6016ca509c..8d6ddb447e3a9ab894521ccf8057ce0c80a7c753 100644
(file)
--- a/
lexer/print_helper.c
+++ b/
lexer/print_helper.c
@@
-1,7
+1,7
@@
-#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
-#include <
wchar
.h>
+#include <
stdarg
.h>
+#include "print_helper.h"
#include "global_vars.h"
void pr_warning(const char* format, ...) {
#include "global_vars.h"
void pr_warning(const char* format, ...) {
@@
-53,19
+53,20
@@
void wpr_error(const wchar_t *format, ...) {
fflush(stderr);
}
fflush(stderr);
}
-void wprint_token
_stdout(
) {
+void wprint_token
(FILE* out_file
) {
if (tokenType == MOT || tokenType == MOTCLE) {
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 {
} else {
- fwprintf(
stdout
, L"%20s\n", tokenTypestr[tokenType]);
+ fwprintf(
out_file
, L"%20s\n", tokenTypestr[tokenType]);
}
}
- fflush(
stdout
);
+ fflush(
out_file
);
}
}
-void wprint_
token_target(
) {
+void wprint_
ctoken(FILE* out_file
) {
if (tokenType == MOT || tokenType == MOTCLE) {
if (tokenType == MOT || tokenType == MOTCLE) {
- fwprintf(
target, L"%20s: %ls\n", tokenTypestr[tokenType], token[tokenFound].v
alue);
+ fwprintf(
out_file, L"%20s: %ls\n", tokenTypestr[tokenType], tokenV
alue);
} else {
} else {
- fwprintf(
target
, L"%20s\n", tokenTypestr[tokenType]);
+ fwprintf(
out_file
, L"%20s\n", tokenTypestr[tokenType]);
}
}
+ fflush(out_file);
}
}