/[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.91 by sysadm, Tue Jun 10 06:47:04 2025 UTC Revision 1.94 by sysadm, Wed Jun 11 14:54:15 2025 UTC
# Line 427  int display_data(const void *p_data, lon Line 427  int display_data(const void *p_data, lon
427                                          break;                                          break;
428                                  case KEY_F2: // For test only                                  case KEY_F2: // For test only
429                                          EDITOR_DATA *p_editor_data;                                          EDITOR_DATA *p_editor_data;
430                                          // size_t data_new_len = strlen(p_data) + LINE_BUFFER_LEN;                                          size_t data_new_len = strlen(p_data) + LINE_BUFFER_LEN;
431    
432                                          // char *p_data_new = malloc(data_new_len);                                          char *p_data_new = malloc(data_new_len);
433                                          // if (p_data_new == NULL)                                          if (p_data_new == NULL)
434                                          // {                                          {
435                                          //      break;                                                  break;
436                                          // }                                          }
437                                          p_editor_data = editor_data_load(p_data);                                          p_editor_data = editor_data_load(p_data);
438                                          if (p_editor_data == NULL)                                          if (p_editor_data == NULL)
439                                          {                                          {
440                                                  // free(p_data_new);                                                  free(p_data_new);
441                                                  break;                                                  break;
442                                          }                                          }
443    
444                                          editor_display(p_editor_data);                                          editor_display(p_editor_data);
445                                          // editor_data_save(p_editor_data, p_data_new, data_new_len);                                          editor_data_save(p_editor_data, p_data_new, data_new_len);
446                                          editor_data_cleanup(p_editor_data);                                          editor_data_cleanup(p_editor_data);
447                                          p_editor_data = NULL;                                          p_editor_data = NULL;
448                                          // free(p_data_new);                                          free(p_data_new);
449                                          // p_data_new = NULL;                                          p_data_new = NULL;
450    
451                                          // Refresh after display editor                                          // Refresh after display editor
452                                          line_current -= (screen_current_row - screen_begin_row);                                          line_current -= (screen_current_row - screen_begin_row);


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

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