texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/makeinfo cmds.c,1.43,1.44 index.c,1.20,1.21 makeinfo.c,1.59,1.60


From: karl
Subject: texinfo/makeinfo cmds.c,1.43,1.44 index.c,1.20,1.21 makeinfo.c,1.59,1.60
Date: Sun, 14 Mar 2004 23:47:22 +0100

Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv8403

Modified Files:
        cmds.c index.c makeinfo.c 
Log Message:
fix valgrind issues, from meyering

Index: cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** cmds.c      8 Mar 2004 22:46:38 -0000       1.43
--- cmds.c      14 Mar 2004 22:47:19 -0000      1.44
***************
*** 654,657 ****
--- 654,658 ----
  {
    char *acronym, *description;
+   unsigned len;
  
    /* We do everything at START.  */
***************
*** 681,686 ****
    if (description[0] == '{')
      description++;
!   if (description[strlen (description)-1] == '}')
!     description[strlen (description)-1] = '\0';
  
    /* Save new description.  */
--- 682,689 ----
    if (description[0] == '{')
      description++;
! 
!   len = strlen (description);
!   if (len && description[len-1] == '}')
!     description[len-1] = '\0';
  
    /* Save new description.  */

Index: index.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/index.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** index.c     1 Mar 2004 15:28:06 -0000       1.20
--- index.c     14 Mar 2004 22:47:19 -0000      1.21
***************
*** 665,669 ****
    {
      int i = output_paragraph_offset; 
!     while (output_paragraph[i-1] != '\n' && i > 0)
        i--;
      last_column = output_paragraph_offset - i;
--- 665,669 ----
    {
      int i = output_paragraph_offset; 
!     while (0 < i && output_paragraph[i-1] != '\n')
        i--;
      last_column = output_paragraph_offset - i;

Index: makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** makeinfo.c  14 Mar 2004 10:46:38 -0000      1.59
--- makeinfo.c  14 Mar 2004 22:47:19 -0000      1.60
***************
*** 889,912 ****
  canon_white (char *string)
  {
!   int len = strlen (string);
!   int x;
  
!   if (!len)
      return;
  
!   for (x = 0; x < len; x++)
      {
!       if (!cr_or_whitespace (string[x]))
!         {
!           strcpy (string, string + x);
!           break;
!         }
      }
!   len = strlen (string);
!   if (len)
!     len--;
!   while (len > -1 && cr_or_whitespace (string[len]))
!     len--;
!   string[len + 1] = 0;
  }
  
--- 889,914 ----
  canon_white (char *string)
  {
!   char *p = string;
!   unsigned len;
  
!   if (!*p)
      return;
  
!   do
      {
!       if (!cr_or_whitespace (*p))
!       break;
!       ++p;
      }
!   while (*p);
! 
!   len = strlen (p);
!   while (len && cr_or_whitespace (p[len-1]))
!     --len;
! 
!   if (p != string)
!     memmove (string, p, len);
! 
!   string[len] = 0;
  }
  
***************
*** 2766,2771 ****
       lines fixes it.  */
    if (character == '\n' && !html && !xml && !multitable_active)
!     while (whitespace (output_paragraph[output_paragraph_offset-1]))
!       output_paragraph_offset--;
  
    output_paragraph[output_paragraph_offset++] = character;
--- 2768,2776 ----
       lines fixes it.  */
    if (character == '\n' && !html && !xml && !multitable_active)
!     {
!       while (output_paragraph_offset
!            && whitespace (output_paragraph[output_paragraph_offset-1]))
!       output_paragraph_offset--;
!     }
  
    output_paragraph[output_paragraph_offset++] = character;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]