/[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.31 by sysadm, Mon May 5 05:28:16 2025 UTC Revision 1.32 by sysadm, Mon May 5 09:30:22 2025 UTC
# Line 151  static int _str_input(char *buffer, int Line 151  static int _str_input(char *buffer, int
151                  {                  {
152                          if (!hz && offset + 2 > buffer_length) // No enough space for Chinese character                          if (!hz && offset + 2 > buffer_length) // No enough space for Chinese character
153                          {                          {
154                                  igetch(1); // Clear remaining input                                  igetch(1); // Cleanup remaining input
155                                  outc('\a');                                  outc('\a');
156                                  iflush();                                  iflush();
157                                  continue;                                  continue;
# Line 181  static int _str_input(char *buffer, int Line 181  static int _str_input(char *buffer, int
181                  }                  }
182          }          }
183    
         prints("\r\n");  
         iflush();  
   
184          return offset;          return offset;
185  }  }
186    
187  int str_input(char *buffer, int buffer_length, int echo_mode)  int str_input(char *buffer, int buffer_length, int echo_mode)
188  {  {
189          int offset;          int len;
190    
191          memset(buffer, '\0', buffer_length);          buffer[0] = '\0';
192    
193          offset = _str_input(buffer, buffer_length, echo_mode);          len = _str_input(buffer, buffer_length, echo_mode);
194    
195          return offset;          prints("\r\n");
196            iflush();
197    
198            return len;
199  };  };
200    
201  int get_data(int row, int col, char *prompt, char *buffer, int buffer_length, int echo_mode)  int get_data(int row, int col, char *prompt, char *buffer, int buffer_length, int echo_mode)


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

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