/[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.61 by sysadm, Wed Dec 17 03:47:00 2025 UTC Revision 1.63 by sysadm, Thu Dec 18 10:43:48 2025 UTC
# Line 272  int editor_data_insert(EDITOR_DATA *p_ed Line 272  int editor_data_insert(EDITOR_DATA *p_ed
272          {          {
273                  if (p_editor_data->display_line_total >= MAX_EDITOR_DATA_LINES)                  if (p_editor_data->display_line_total >= MAX_EDITOR_DATA_LINES)
274                  {                  {
275  #ifdef _DEBUG                          log_debug("Split line error, display_line_total(%ld) reach limit(%d)\n",
                         log_error("Split line error, display_line_total(%ld) reach limit(%d)\n",  
276                                            p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES);                                            p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES);
 #endif  
277    
278                          return -2;                          return -2;
279                  }                  }
# Line 369  int editor_data_insert(EDITOR_DATA *p_ed Line 367  int editor_data_insert(EDITOR_DATA *p_ed
367                          // Insert blank display line after last_display_line                          // Insert blank display line after last_display_line
368                          if (p_editor_data->display_line_total >= MAX_EDITOR_DATA_LINES)                          if (p_editor_data->display_line_total >= MAX_EDITOR_DATA_LINES)
369                          {                          {
370  #ifdef _DEBUG                                  log_debug("display_line_total over limit %d >= %d\n", p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES);
                                 log_error("display_line_total over limit %d >= %d\n", p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES);  
 #endif  
371    
372                                  // Terminate prior display line with \n, to avoid error on cleanup                                  // Terminate prior display line with \n, to avoid error on cleanup
373                                  if (display_line + i - 1 >= 0 && p_editor_data->display_line_lengths[display_line + i - 1] > 0)                                  if (display_line + i - 1 >= 0 && p_editor_data->display_line_lengths[display_line + i - 1] > 0)
# Line 763  int editor_display(EDITOR_DATA *p_editor Line 759  int editor_display(EDITOR_DATA *p_editor
759                                                  ch = igetch(100);                                                // 0.1 second                                                  ch = igetch(100);                                                // 0.1 second
760                                                  if (ch == KEY_NULL || ch == KEY_TIMEOUT) // Ignore received bytes if no futher input                                                  if (ch == KEY_NULL || ch == KEY_TIMEOUT) // Ignore received bytes if no futher input
761                                                  {                                                  {
762  #ifdef _DEBUG                                                          log_debug("Ignore %d bytes of incomplete UTF8 character\n", str_len);
                                                         log_error("Ignore %d bytes of incomplete UTF8 character\n", str_len);  
 #endif  
763                                                          str_len = 0;                                                          str_len = 0;
764                                                          break;                                                          break;
765                                                  }                                                  }
# Line 974  int editor_display(EDITOR_DATA *p_editor Line 968  int editor_display(EDITOR_DATA *p_editor
968                                  switch (ch)                                  switch (ch)
969                                  {                                  {
970                                  case KEY_NULL:                                  case KEY_NULL:
971  #ifdef _DEBUG                                          log_debug("KEY_NULL\n");
                                         log_error("KEY_NULL\n");  
 #endif  
972                                          goto cleanup;                                          goto cleanup;
973                                  case KEY_TIMEOUT:                                  case KEY_TIMEOUT:
974                                          log_error("User input timeout\n");                                          log_debug("User input timeout\n");
975                                          goto cleanup;                                          goto cleanup;
976                                  case Ctrl('W'):                                  case Ctrl('W'):
977                                  case Ctrl('X'):                                  case Ctrl('X'):


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

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