/[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.93 by sysadm, Wed Jun 11 11:55:50 2025 UTC
# Line 315  int display_data(const void *p_data, lon Line 315  int display_data(const void *p_data, lon
315                          iflush();                          iflush();
316    
317                          input_ok = 0;                          input_ok = 0;
318                            ch = igetch_t(MAX_DELAY_TIME);
319                          while (!SYS_server_exit && !input_ok)                          while (!SYS_server_exit && !input_ok)
320                          {                          {
                                 ch = igetch_t(MAX_DELAY_TIME);  
                                 input_ok = 1;  
   
321                                  // extended key handler                                  // extended key handler
322                                  if (key_handler(&ch, &ctx) != 0)                                  if (key_handler(&ch, &ctx) != 0)
323                                  {                                  {
324                                          goto cleanup;                                          goto cleanup;
325                                  }                                  }
326    
327                                    input_ok = 1;
328                                  switch (ch)                                  switch (ch)
329                                  {                                  {
330                                  case KEY_NULL:                                  case KEY_NULL:
# Line 427  int display_data(const void *p_data, lon Line 426  int display_data(const void *p_data, lon
426                                          break;                                          break;
427                                  case KEY_F2: // For test only                                  case KEY_F2: // For test only
428                                          EDITOR_DATA *p_editor_data;                                          EDITOR_DATA *p_editor_data;
429                                          // size_t data_new_len = strlen(p_data) + LINE_BUFFER_LEN;                                          size_t data_new_len = strlen(p_data) + LINE_BUFFER_LEN;
430    
431                                          // char *p_data_new = malloc(data_new_len);                                          char *p_data_new = malloc(data_new_len);
432                                          // if (p_data_new == NULL)                                          if (p_data_new == NULL)
433                                          // {                                          {
434                                          //      break;                                                  break;
435                                          // }                                          }
436                                          p_editor_data = editor_data_load(p_data);                                          p_editor_data = editor_data_load(p_data);
437                                          if (p_editor_data == NULL)                                          if (p_editor_data == NULL)
438                                          {                                          {
439                                                  // free(p_data_new);                                                  free(p_data_new);
440                                                  break;                                                  break;
441                                          }                                          }
442    
443                                          editor_display(p_editor_data);                                          editor_display(p_editor_data);
444                                          // editor_data_save(p_editor_data, p_data_new, data_new_len);                                          editor_data_save(p_editor_data, p_data_new, data_new_len);
445                                          editor_data_cleanup(p_editor_data);                                          editor_data_cleanup(p_editor_data);
446                                          p_editor_data = NULL;                                          p_editor_data = NULL;
447                                          // free(p_data_new);                                          free(p_data_new);
448                                          // p_data_new = NULL;                                          p_data_new = NULL;
449    
450                                          // Refresh after display editor                                          // Refresh after display editor
451                                          line_current -= (screen_current_row - screen_begin_row);                                          line_current -= (screen_current_row - screen_begin_row);
# Line 462  int display_data(const void *p_data, lon Line 461  int display_data(const void *p_data, lon
461                                  }                                  }
462    
463                                  BBS_last_access_tm = time(0);                                  BBS_last_access_tm = time(0);
464                                    if (!input_ok)
465                                    {
466                                            ch = igetch_t(MAX_DELAY_TIME);
467                                    }
468                          }                          }
469    
470                          continue;                          continue;


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

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