Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 830df08

Browse files
Update translator.c
restyling the c output
1 parent 6bcf07b commit 830df08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/translator.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ void BFt_convert_file() {
8787
fputs("struct termios cooked, raw;\n", file);
8888
}
8989

90-
fprintf(file, "#define VAR unsigned char\n");
91-
if(BFt_optim_lvl < 2) fprintf(file, "VAR cells[%zu];\n\n", BFi_mem_size);
92-
else fprintf(file, "VAR cells[%zu];\n\n", BFi_mem_size * 2);
90+
if(BFt_optim_lvl < 2) fprintf(file, "unsigned char cells[%zu];\n\n", BFi_mem_size);
91+
else fprintf(file, "unsigned char cells[%zu];\n\n", BFi_mem_size * 2);
9392

9493
fputs("int main() {\n", file);
9594
if(BFc_direct_inp) {
@@ -460,6 +459,7 @@ static void translate(FILE *file) {
460459
BFt_instr_t *instr = BFt_code;
461460
size_t chars = 8;
462461

462+
fprintf(file, "\t#define VAR unsigned char\n");
463463
fprintf(file, "\t#define INP getchar\n");
464464
fprintf(file, "\t#define OUT putchar\n\n");
465465

0 commit comments

Comments
 (0)