/[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.29 by sysadm, Mon Nov 10 12:53:16 2025 UTC Revision 1.32 by sysadm, Sat Nov 22 10:36:37 2025 UTC
# Line 6  Line 6 
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7   */   */
8    
9    #ifdef HAVE_CONFIG_H
10    #include "config.h"
11    #endif
12    
13  #include "common.h"  #include "common.h"
14  #include "log.h"  #include "log.h"
15  #include "str_process.h"  #include "str_process.h"
# Line 38  int str_length(const char *str, int skip Line 42  int str_length(const char *str, int skip
42    
43                  if (skip_ctrl_seq && c == '\033' && str[i + 1] == '[') // Skip control sequence                  if (skip_ctrl_seq && c == '\033' && str[i + 1] == '[') // Skip control sequence
44                  {                  {
45                          for (i = i + 2; isdigit(str[i]) || str[i] == ';' || str[i] == '?'; i++)                          for (i = i + 2; isdigit((int)str[i]) || str[i] == ';' || str[i] == '?'; i++)
46                                  ;                                  ;
47    
48                          if (str[i] == 'm') // valid                          if (str[i] == 'm') // valid
49                          {                          {
50                                  // skip                                  // skip
51                          }                          }
52                          else if (isalpha(str[i]))                          else if (isalpha((int)str[i]))
53                          {                          {
54                                  // unsupported ANSI CSI command                                  // unsupported ANSI CSI command
55                          }                          }
# Line 199  long split_data_lines(const char *p_buf, Line 203  long split_data_lines(const char *p_buf,
203                  // Exceed max_line_cnt                  // Exceed max_line_cnt
204                  if (line_cnt + 1 >= line_offsets_count)                  if (line_cnt + 1 >= line_offsets_count)
205                  {                  {
206                          // log_error("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count);  #ifdef _DEBUG
207                            log_error("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count);
208    #endif
209                          return line_cnt;                          return line_cnt;
210                  }                  }
211    


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

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