/[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.138 by sysadm, Sun Dec 28 01:46:21 2025 UTC Revision 1.141 by sysadm, Sun Feb 8 15:43:19 2026 UTC
# Line 3  Line 3 
3   * screen   * screen
4   *   - advanced telnet-based user interactive input / output features   *   - advanced telnet-based user interactive input / output features
5   *   *
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2026  Leaflet <leaflet@leafok.com>
7   */   */
8    
9  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
# Line 98  inline int press_any_key() Line 98  inline int press_any_key()
98    
99  int press_any_key_ex(const char *msg, int sec)  int press_any_key_ex(const char *msg, int sec)
100  {  {
         int ch = 0;  
         int duration = 0;  
         time_t t_begin = time(NULL);  
   
101          moveto(SCREEN_ROWS, 0);          moveto(SCREEN_ROWS, 0);
102          clrtoeol();          clrtoeol();
103    
104          prints(msg);          prints(msg);
105          iflush();          iflush();
106    
107            return press_any_key_no_prompt(sec);
108    }
109    
110    inline int press_any_key_no_prompt(int sec)
111    {
112            int ch = 0;
113            int duration = 0;
114            time_t t_begin = time(NULL);
115    
116          igetch_reset();          igetch_reset();
117    
118          do          do
# Line 165  static int _str_input(char *buffer, int Line 170  static int _str_input(char *buffer, int
170                  {                  {
171                          continue;                          continue;
172                  }                  }
173                    else if (ch == KEY_ESC)
174                    {
175                            buffer[0] = '\0';
176                            offset = 0;
177                            break;
178                    }
179                  else if (ch == BACKSPACE || ch == KEY_DEL)                  else if (ch == BACKSPACE || ch == KEY_DEL)
180                  {                  {
181                          if (offset > 0)                          if (offset > 0)
# Line 340  int get_data(int row, int col, char *pro Line 351  int get_data(int row, int col, char *pro
351                  {                  {
352                          continue;                          continue;
353                  }                  }
354                    else if (ch == KEY_ESC)
355                    {
356                            buffer[0] = '\0';
357                            len = 0;
358                            break;
359                    }
360                  else if (ch == BACKSPACE)                  else if (ch == BACKSPACE)
361                  {                  {
362                          if (offset > 0)                          if (offset > 0)


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

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