/[LeafOK_CVS]/lbbs/src/screen.c
ViewVC logotype

Diff of /lbbs/src/screen.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 by sysadm, Mon Mar 21 17:08:21 2005 UTC Revision 1.13 by sysadm, Tue Mar 22 08:19:11 2005 UTC
# Line 78  press_any_key () Line 78  press_any_key ()
78    prints ("                           \033[1;33m按任意键继续...\033[0;37m");    prints ("                           \033[1;33m按任意键继续...\033[0;37m");
79    iflush ();    iflush ();
80    
81    return igetch ();    return igetch_t (60);
82  }  }
83    
84  void  void
85  set_input_echo (int echo)  set_input_echo (int echo)
86  {  {
   char temp[256];  
   
87    if (echo)    if (echo)
88      {      {
89        outc ('\x83');            // ASCII code 131        outc ('\x83');            // ASCII code 131
# Line 96  set_input_echo (int echo) Line 94  set_input_echo (int echo)
94  //    outc ('\x85'); // ASCII code 133  //    outc ('\x85'); // ASCII code 133
95        prints ("\xff\xfb\x01\xff\xfb\x03");        prints ("\xff\xfb\x01\xff\xfb\x03");
96        iflush ();        iflush ();
97        igetch ();        igetch_t (60);
98        igetch ();        igetch_t (60);
99      }      }
100  }  }
101    
# Line 109  str_input (char *buffer, int buffer_leng Line 107  str_input (char *buffer, int buffer_leng
107    
108    memset (buffer, '\0', buffer_length);    memset (buffer, '\0', buffer_length);
109    
110    while (c = igetch ())    while (c = igetch_t (60))
111      {      {
112        if (c == CR)        if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR)
113          break;          break;
114        if (c == LF)        if (c == LF)
115          continue;          continue;
116        if (c == BACKSPACE)        if (c == BACKSPACE)
# Line 233  display_file_ex (const char *filename, i Line 231  display_file_ex (const char *filename, i
231                input_ok = 0;                input_ok = 0;
232                while (!input_ok)                while (!input_ok)
233                  {                  {
234                    ch = igetch ();                    ch = igetch_t (MAX_DELAY_TIME);
235                    input_ok = 1;                    input_ok = 1;
236                    switch (ch)                    switch (ch)
237                      {                      {
# Line 294  display_file_ex (const char *filename, i Line 292  display_file_ex (const char *filename, i
292                              goto exit;                              goto exit;
293                          }                          }
294                        break;                        break;
295                        case KEY_NULL:
296                        case KEY_TIMEOUT:
297                      case KEY_LEFT:                      case KEY_LEFT:
298                      case 'q':                      case 'q':
299                      case 'Q':                      case 'Q':


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1