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

Diff of /lbbs/src/editor.c

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

Revision 1.26 by sysadm, Mon Jun 16 14:30:44 2025 UTC Revision 1.28 by sysadm, Tue Jun 17 13:17:04 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
 #define _POSIX_C_SOURCE 200809L  
   
17  #include "editor.h"  #include "editor.h"
18  #include "bbs.h"  #include "bbs.h"
19  #include "io.h"  #include "io.h"
# Line 708  int editor_display(EDITOR_DATA *p_editor Line 706  int editor_display(EDITOR_DATA *p_editor
706                                  if ((ch >= 32 && ch < 127) || (ch > 127 && ch <= 255 && str_len == 2) || // Printable character or GBK                                  if ((ch >= 32 && ch < 127) || (ch > 127 && ch <= 255 && str_len == 2) || // Printable character or GBK
707                                          ch == CR || ch == KEY_ESC)                                                                                       // Special character                                          ch == CR || ch == KEY_ESC)                                                                                       // Special character
708                                  {                                  {
709                                          BBS_last_access_tm = time(0);                                          BBS_last_access_tm = time(NULL);
710    
711                                          if (str_len == 0) // ch >= 32 && ch < 127                                          if (str_len == 0) // ch >= 32 && ch < 127
712                                          {                                          {
# Line 784  int editor_display(EDITOR_DATA *p_editor Line 782  int editor_display(EDITOR_DATA *p_editor
782                                  }                                  }
783                                  else if (ch == KEY_DEL || ch == BACKSPACE) // Del                                  else if (ch == KEY_DEL || ch == BACKSPACE) // Del
784                                  {                                  {
785                                          BBS_last_access_tm = time(0);                                          BBS_last_access_tm = time(NULL);
786    
787                                          if (ch == BACKSPACE)                                          if (ch == BACKSPACE)
788                                          {                                          {
# Line 1061  int editor_display(EDITOR_DATA *p_editor Line 1059  int editor_display(EDITOR_DATA *p_editor
1059                                          break;                                          break;
1060                                  }                                  }
1061    
1062                                  BBS_last_access_tm = time(0);                                  BBS_last_access_tm = time(NULL);
1063    
1064                                  if (input_ok)                                  if (input_ok)
1065                                  {                                  {


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

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