diff options
-rw-r--r-- | include/proto.h | 11 | ||||
-rw-r--r-- | mbbsd/edit.c | 15 | ||||
-rw-r--r-- | mbbsd/kaede.c | 31 |
3 files changed, 11 insertions, 46 deletions
diff --git a/include/proto.h b/include/proto.h index f717aa9a..0b7f99ff 100644 --- a/include/proto.h +++ b/include/proto.h @@ -331,11 +331,11 @@ int guess_main(void); void set_converting_type(int which); /* io */ -int igetch(void); -int num_in_buf(void); -int wait_input(float f, int bIgnoreBuf); -int peek_input(float f, int c); -int input_isfull(); +int igetch(void); +int num_in_buf(void); +int input_isfull(); +int wait_input(float f, int bIgnoreBuf); +int peek_input(float f, int c); void drop_input(void); void add_io(int fd, int timeout); int getdata(int line, int col, const char *prompt, char *buf, int len, int echo); @@ -352,7 +352,6 @@ int vget(int line, int col, const char *prompt, char *buf, int len, int mode); /* kaede */ char*Ptt_prints(char *str, size_t size, int mode); void outmsg(const char *msg); -void outslr(const char *left, int leftlen, const char *right, int rightlen); void out_lines(const char *str, int line); #define HAVE_EXPAND_ESC_STAR int expand_esc_star(char *buf, const char *src, int szbuf); diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 78bad60c..93c1735e 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -434,6 +434,7 @@ show_phone_mode_panel(void) static void edit_msg(void) { + char buf[STRLEN]; int n = curr_buf->currpnt; if (curr_buf->ansimode) /* Thor: §@ ansi ½s¿è */ @@ -442,21 +443,17 @@ edit_msg(void) if (curr_buf->phone_mode) show_phone_mode_panel(); - move(b_lines, 0); - clrtoeol(); - outs( ANSI_COLOR(37;44) " ½s¿è¤å³¹ " - ANSI_COLOR(31;47) " (^Z/F1)" ANSI_COLOR(30) "»¡©ú " - ANSI_COLOR(31;47) "(^P/^G)" ANSI_COLOR(30) "´¡¤J²Å¸¹/¹Ï¤ù " - ANSI_COLOR(31) "(^X/^Q)" ANSI_COLOR(30) "Â÷¶}"); - - prints( "ùø%s¢x%c%c%c%cùø %3d:%3d ", + snprintf(buf, sizeof(buf), + " (^Z/F1)»¡©ú (^P/^G)´¡¤J²Å¸¹/¹Ï¤ù (^X/^Q)Â÷¶}\t" + "ùø%s¢x%c%c%c%cùø%3d:%3d", curr_buf->insert_mode ? "´¡¤J" : "¨ú¥N", curr_buf->ansimode ? 'A' : 'a', curr_buf->indent_mode ? 'I' : 'i', curr_buf->phone_mode ? 'P' : 'p', curr_buf->raw_mode ? 'R' : 'r', curr_buf->currln + 1, n + 1); - outslr("", 78, ANSI_RESET, 0); + + vs_footer(" ½s¿è¤å³¹ ", buf); } /** diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c index 47e6439a..d8eab25f 100644 --- a/mbbsd/kaede.c +++ b/mbbsd/kaede.c @@ -72,37 +72,6 @@ Ptt_prints(char *str, size_t size, int mode) return str; } -// XXX left-right (for large term) -// TODO someday please add ANSI detection version -void -outslr(const char *left, int leftlen, const char *right, int rightlen) -{ - if (left == NULL) - left = ""; - if (right == NULL) - right = ""; - if(*left && leftlen < 0) - leftlen = strlen(left); - if(*right && rightlen < 0) - rightlen = strlen(right); - // now calculate padding - rightlen = t_columns - leftlen - rightlen; - outs(left); - - // ignore right msg if we need to. - if(rightlen >= 0) - { - while(--rightlen > 0) - outc(' '); - outs(right); - } else { - rightlen = t_columns - leftlen; - while(--rightlen > 0) - outc(' '); - } -} - - /* Jaky */ void out_lines(const char *str, int line) |