Re: texinfo4.5.91: problems with CSS inclusion

[email protected] (Karl Berry)
Newsgroups gmane.comp.tex.texinfo.pretest
Message-ID <[email protected]>
    At the end of append_char() in html.c
    the variable buf->length should be increased by one.

Ain't it the truth :).  Thanks for finding my silly mistake.  How about this:

*** html.c	13 May 2003 21:07:55 -0000	1.16
--- html.c	18 May 2003 13:14:29 -0000	1.17
***************
*** 153,168 ****
      buffer_type *buf;
      int c;
  {
!   char str[2] = { 0, 0 };
!   str[0] = c;  /* appease SGI compiler */
! 
!   if (buf->length + 1 >= buf->size)
      {
        buf->size += 100;
        buf->buffer = xrealloc (buf->buffer, buf->size);
-       buf->buffer[buf->length] = 0;  /* in case it was the first alloc */
      }
!   strcat (buf->buffer, str);
  }
  
  
--- 153,166 ----
      buffer_type *buf;
      int c;
  {
!   buf->length++;
!   if (buf->length >= buf->size)
      {
        buf->size += 100;
        buf->buffer = xrealloc (buf->buffer, buf->size);
      }
!   buf->buffer[buf->length - 1] = c;
!   buf->buffer[buf->length] = 0;
  }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.