/[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.33 by sysadm, Thu Dec 18 02:56:01 2025 UTC Revision 1.35 by sysadm, Sat Jan 3 10:27:14 2026 UTC
# Line 3  Line 3 
3   * str_process   * str_process
4   *   - common string processing features with UTF-8 support   *   - common string processing features with UTF-8 support
5   *   *
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2026  Leaflet <leaflet@leafok.com>
7   */   */
8    
9  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
# Line 76  int str_length(const char *str, int skip Line 76  int str_length(const char *str, int skip
76    
77                          if (mbstowcs(wcs, input_str, 1) == (size_t)-1)                          if (mbstowcs(wcs, input_str, 1) == (size_t)-1)
78                          {                          {
79                                  log_debug("mbstowcs(%s) error\n", input_str);                                  log_debug("mbstowcs(%s) error", input_str);
80                                  wc_len = (UTF8_fixed_width ? 2 : 1); // Fallback                                  wc_len = (UTF8_fixed_width ? 2 : 1); // Fallback
81                          }                          }
82                          else                          else
# Line 140  int split_line(const char *buffer, int m Line 140  int split_line(const char *buffer, int m
140    
141                          if (mbstowcs(wcs, input_str, 1) == (size_t)-1)                          if (mbstowcs(wcs, input_str, 1) == (size_t)-1)
142                          {                          {
143                                  log_debug("mbstowcs(%s) error\n", input_str);                                  log_debug("mbstowcs(%s) error", input_str);
144                                  wc_len = (UTF8_fixed_width ? 2 : 1); // Fallback                                  wc_len = (UTF8_fixed_width ? 2 : 1); // Fallback
145                          }                          }
146                          else                          else
# Line 199  long split_data_lines(const char *p_buf, Line 199  long split_data_lines(const char *p_buf,
199                  // Exceed max_line_cnt                  // Exceed max_line_cnt
200                  if (line_cnt + 1 >= line_offsets_count)                  if (line_cnt + 1 >= line_offsets_count)
201                  {                  {
202                          log_debug("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count);                          log_debug("Line count %d reaches limit %d", line_cnt + 1, line_offsets_count);
203                          return line_cnt;                          return line_cnt;
204                  }                  }
205    


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

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