/[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.40 by sysadm, Sun Jul 20 02:04:21 2025 UTC Revision 1.43 by sysadm, Wed Oct 1 02:49:13 2025 UTC
# Line 19  Line 19 
19  #include "editor.h"  #include "editor.h"
20  #include "io.h"  #include "io.h"
21  #include "log.h"  #include "log.h"
22    #include "login.h"
23  #include "memory_pool.h"  #include "memory_pool.h"
24  #include "str_process.h"  #include "str_process.h"
25  #include <stdlib.h>  #include <stdlib.h>
# Line 743  int editor_display(EDITOR_DATA *p_editor Line 744  int editor_display(EDITOR_DATA *p_editor
744                                  {                                  {
745                                          BBS_last_access_tm = time(NULL);                                          BBS_last_access_tm = time(NULL);
746    
747                                            // Refresh current action while user input
748                                            if (user_online_update(NULL) < 0)
749                                            {
750                                                    log_error("user_online_update(NULL) error\n");
751                                            }
752    
753                                          if (str_len == 0) // ch >= 32 && ch < 127                                          if (str_len == 0) // ch >= 32 && ch < 127
754                                          {                                          {
755                                                  input_str[0] = (char)ch;                                                  input_str[0] = (char)ch;
# Line 807  int editor_display(EDITOR_DATA *p_editor Line 814  int editor_display(EDITOR_DATA *p_editor
814                                                          {                                                          {
815                                                                  col_pos = 1;                                                                  col_pos = 1;
816                                                          }                                                          }
817                                                          if (ch != CR)                                                          if (offset_out > 0)
818                                                          {                                                          {
819                                                                  col_pos += (str_len == 1 ? 1 : 2);                                                                  col_pos += (str_len == 1 ? 1 : 2);
820                                                          }                                                          }
# Line 832  int editor_display(EDITOR_DATA *p_editor Line 839  int editor_display(EDITOR_DATA *p_editor
839                                  {                                  {
840                                          BBS_last_access_tm = time(NULL);                                          BBS_last_access_tm = time(NULL);
841    
842                                            // Refresh current action while user input
843                                            if (user_online_update(NULL) < 0)
844                                            {
845                                                    log_error("user_online_update(NULL) error\n");
846                                            }
847    
848                                          if (ch == BACKSPACE)                                          if (ch == BACKSPACE)
849                                          {                                          {
850                                                  if (line_current - output_current_row + row_pos <= 0 && col_pos <= 1) // Forbidden                                                  if (line_current - output_current_row + row_pos <= 0 && col_pos <= 1) // Forbidden
# Line 920  int editor_display(EDITOR_DATA *p_editor Line 933  int editor_display(EDITOR_DATA *p_editor
933                                  case KEY_TIMEOUT:                                  case KEY_TIMEOUT:
934                                          goto cleanup;                                          goto cleanup;
935                                  case Ctrl('W'):                                  case Ctrl('W'):
936                                    case Ctrl('X'):
937                                          loop = 0;                                          loop = 0;
938                                          break;                                          break;
939                                  case Ctrl('S'): // Start of line                                  case Ctrl('S'): // Start of line
# Line 1121  int editor_display(EDITOR_DATA *p_editor Line 1135  int editor_display(EDITOR_DATA *p_editor
1135    
1136                                  BBS_last_access_tm = time(NULL);                                  BBS_last_access_tm = time(NULL);
1137    
1138                                    // Refresh current action while user input
1139                                    if (user_online_update(NULL) < 0)
1140                                    {
1141                                            log_error("user_online_update(NULL) error\n");
1142                                    }
1143    
1144                                  if (input_ok)                                  if (input_ok)
1145                                  {                                  {
1146                                          break;                                          break;


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

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