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

Diff of /lbbs/src/lml.c

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

Revision 1.53 by sysadm, Fri Dec 19 14:08:44 2025 UTC Revision 1.56 by sysadm, Wed Jan 21 07:54:50 2026 UTC
# Line 3  Line 3 
3   * lml   * lml
4   *   - LML render   *   - LML render
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 187  int lml_init(void) Line 187  int lml_init(void)
187    
188          for (i = 0; i < lml_tag_count; i++)          for (i = 0; i < lml_tag_count; i++)
189          {          {
190                  for (j = 0; j < LML_TAG_NAME_BUF_LEN - 1 && lml_tag_def[i].tag_name[j] != '\0'; j++)                  for (j = 0; j < sizeof(tag_name_buf) - 1 && lml_tag_def[i].tag_name[j] != '\0'; j++)
191                  {                  {
192                          tag_name_buf[j] = (char)tolower(lml_tag_def[i].tag_name[j]);                          tag_name_buf[j] = (char)tolower(lml_tag_def[i].tag_name[j]);
193                  }                  }
# Line 409  int lml_render(const char *str_in, char Line 409  int lml_render(const char *str_in, char
409                          CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, tab_spaces, tab_width, line_width);                          CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, tab_spaces, tab_width, line_width);
410                          continue;                          continue;
411                  }                  }
412                    else if (!quote_mode && str_in[i] == '\033')
413                    {
414                            continue; // Skip control characters while not in quote mode
415                    }
416    
417                  if (!lml_tag_disabled && str_in[i] == '[')                  if (!lml_tag_disabled && str_in[i] == '[')
418                  {                  {
# Line 443  int lml_render(const char *str_in, char Line 447  int lml_render(const char *str_in, char
447                                  tag_name_pos++;                                  tag_name_pos++;
448                          }                          }
449    
450                          for (k = 0; k < LML_TAG_NAME_BUF_LEN - 1 && tag_name_pos + k < tag_end_pos; k++)                          for (k = 0; k < sizeof(tag_name_buf) - 1 && tag_name_pos + k < tag_end_pos; k++)
451                          {                          {
452                                  if (str_in[tag_name_pos + k] == ' ' || str_in[tag_name_pos + k] == ']')                                  if (str_in[tag_name_pos + k] == ' ' || str_in[tag_name_pos + k] == ']')
453                                  {                                  {


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

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