Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yhzhang0128 committed Apr 3, 2022
1 parent f570d42 commit 57b1f56
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion earth/dev_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int tty_read(char* buf, int len) {
vprintf(format, args); \
va_end(args); \

int tty_write(const char *format, ...)
int tty_printf(const char *format, ...)
{
VPRINTF
fflush(stdout);
Expand Down
2 changes: 1 addition & 1 deletion earth/earth.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void earth_init() {
tty_init();
earth->tty_intr = tty_intr;
earth->tty_read = tty_read;
earth->tty_write = tty_write;
earth->tty_printf = tty_printf;

earth->tty_info = tty_info;
earth->tty_fatal = tty_fatal;
Expand Down
2 changes: 1 addition & 1 deletion earth/earth.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int disk_write(int block_no, int nblocks, char* src);

int tty_intr();
int tty_read(char* buf, int len);
int tty_write(const char *format, ...);
int tty_printf(const char *format, ...);

int tty_info(const char *format, ...);
int tty_fatal(const char *format, ...);
Expand Down
4 changes: 2 additions & 2 deletions library/egos.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct earth {

int (*tty_intr)();
int (*tty_read)(char* buf, int len);
int (*tty_write)(const char *format, ...);
int (*tty_printf)(const char *format, ...);

int (*tty_info)(const char *format, ...);
int (*tty_fatal)(const char *format, ...);
Expand All @@ -40,4 +40,4 @@ extern struct earth *earth;
#define FATAL earth->tty_fatal
#define SUCCESS earth->tty_success
#define HIGHLIGHT earth->tty_highlight
#define printf earth->tty_write
#define printf earth->tty_printf

0 comments on commit 57b1f56

Please sign in to comment.