/[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.51 by sysadm, Tue Nov 4 13:49:51 2025 UTC Revision 1.54 by sysadm, Wed Nov 5 04:19:21 2025 UTC
# Line 3  Line 3 
3   * editor   * editor
4   *   - user interactive full-screen text editor   *   - user interactive full-screen text editor
5   *   *
6   * Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7   */   */
8    
9  #include "bbs.h"  #include "bbs.h"
# Line 18  Line 18 
18  #include <string.h>  #include <string.h>
19  #include <sys/param.h>  #include <sys/param.h>
20    
21  #define EDITOR_ESC_DISPLAY_STR "\033[32m*\033[m"  enum _editor_constant_t
22  #define EDITOR_MEM_POOL_LINE_PER_CHUNK 1000  {
23  #define EDITOR_MEM_POOL_CHUNK_LIMIT (MAX_EDITOR_DATA_LINES / EDITOR_MEM_POOL_LINE_PER_CHUNK + 1)          EDITOR_MEM_POOL_LINE_PER_CHUNK = 1000,
24            EDITOR_MEM_POOL_CHUNK_LIMIT = (MAX_EDITOR_DATA_LINES / EDITOR_MEM_POOL_LINE_PER_CHUNK + 1),
25    };
26    
27    static const char EDITOR_ESC_DISPLAY_STR[] = "\033[32m*\033[m";
28    
29  static MEMORY_POOL *p_mp_data_line;  static MEMORY_POOL *p_mp_data_line;
30  static MEMORY_POOL *p_mp_editor_data;  static MEMORY_POOL *p_mp_editor_data;
# Line 700  int editor_display(EDITOR_DATA *p_editor Line 704  int editor_display(EDITOR_DATA *p_editor
704                          iflush();                          iflush();
705    
706                          str_len = 0;                          str_len = 0;
707                          ch = igetch_t(MAX_DELAY_TIME);                          ch = igetch_t(BBS_max_user_idle_time);
708                          while (!SYS_server_exit)                          while (!SYS_server_exit)
709                          {                          {
710                                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)                                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)
# Line 1156  int editor_display(EDITOR_DATA *p_editor Line 1160  int editor_display(EDITOR_DATA *p_editor
1160                                          break;                                          break;
1161                                  }                                  }
1162    
1163                                  ch = igetch_t(MAX_DELAY_TIME);                                  ch = igetch_t(BBS_max_user_idle_time);
1164                          }                          }
1165    
1166                          continue;                          continue;


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

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