2022-04-02 15:46:23 +00:00
|
|
|
void
|
|
|
|
print_with_fixed_tabs(Row *row) {
|
|
|
|
for (int i = 0; i < ROW_SIZE; i++) {
|
|
|
|
if(row->text[i] == 0) break;
|
|
|
|
if (row->text[i] == '\t') printf(" ");
|
|
|
|
else printf("%c", row->text[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-02 13:20:59 +00:00
|
|
|
void
|
|
|
|
c_print(char *c) {
|
|
|
|
Row *row = buffer;
|
|
|
|
int line = 1;
|
|
|
|
for (;; line++) {
|
2022-04-02 15:46:23 +00:00
|
|
|
printf("%3.i| ", line);
|
|
|
|
print_with_fixed_tabs(row);
|
|
|
|
puts("");
|
2022-04-02 13:20:59 +00:00
|
|
|
if (row->n == NULL) break;
|
|
|
|
row = row -> n;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-02 15:46:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|