/[LeafOK_CVS]/lbbs/src/str_process.c
ViewVC logotype

Diff of /lbbs/src/str_process.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.14 by sysadm, Sat Jun 14 02:58:11 2025 UTC Revision 1.16 by sysadm, Sat Jun 14 11:15:46 2025 UTC
# Line 92  long split_data_lines(const char *p_buf, Line 92  long split_data_lines(const char *p_buf,
92                  // Exceed max_line_cnt                  // Exceed max_line_cnt
93                  if (line_cnt + 1 >= line_offsets_count)                  if (line_cnt + 1 >= line_offsets_count)
94                  {                  {
95                          log_error("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count);                          // log_error("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count);
96                          return line_cnt;                          return line_cnt;
97                  }                  }
98    
# Line 108  int ctrl_seq_filter(char *buffer) Line 108  int ctrl_seq_filter(char *buffer)
108  {  {
109          int i;          int i;
110          int j;          int j;
         char c;  
111    
112          for (i = 0, j = 0; buffer[i] != '\0'; i++)          for (i = 0, j = 0; buffer[i] != '\0'; i++)
113          {          {
114                  c = buffer[i];                  if (buffer[i] == '\r' || buffer[i] == '\7') // skip
   
                 if (c == '\r' || c == '\7') // skip  
115                  {                  {
116                          continue;                          continue;
117                  }                  }
118    
119                  if (c == '\033' && buffer[i + 1] == '[') // Skip control sequence                  if (buffer[i] == '\033' && buffer[i + 1] == '[') // Skip control sequence
120                  {                  {
121                          i += 2;                          i += 2;
122                          while (buffer[i] != '\0' && buffer[i] != 'm')                          while (buffer[i] != '\0' && buffer[i] != 'm')


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

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