texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/makeinfo sectioning.c,1.12,1.13 sectioning.h,1.2,1.3


From: dirt
Subject: texinfo/makeinfo sectioning.c,1.12,1.13 sectioning.h,1.2,1.3
Date: Sun, 14 Mar 2004 04:26:38 +0100

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

Modified Files:
        sectioning.c sectioning.h 
Log Message:
2004-03-14  Alper Ersoy  <address@hidden>

        * makeinfo/sectioning.c (sectioning_underscore): warn if both @top and
        @settitle are empty.
        (sectioning_html, insert_and_underscore): use @settitle argument if
        @top is empty.
        (insert_and_underscore): removed with_char argument from function
        declaration.

        * makeinfo/sectioning.h: insert_and_underscore proto update.



Index: sectioning.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/sectioning.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** sectioning.c        12 Mar 2004 18:21:06 -0000      1.12
--- sectioning.c        14 Mar 2004 03:26:36 -0000      1.13
***************
*** 337,340 ****
--- 337,357 ----
    free (temp);
  
+   /* If the argument to @top is empty, we try using the one from @settitle.
+      Warn if both are unusable.  */
+   if (STREQ (command, "top"))
+     {
+       int save_input_text_offset = input_text_offset;
+ 
+       get_rest_of_line (0, &temp);
+ 
+       /* Due to get_rest_of_line ... */
+       line_number--;
+ 
+       if (strlen (temp) == 0 && strlen (title) == 0)
+         warning ("Must specify a title with least one of @settitle or @top");
+ 
+       input_text_offset = save_input_text_offset;
+     }
+ 
    if (xml)
      {
***************
*** 351,354 ****
--- 368,372 ----
  
          get_rest_of_line (0, &temp);
+ 
            /* Use @settitle value if @top parameter is empty.  */
            if (STREQ (command, "top") && strlen(temp) == 0)
***************
*** 405,412 ****
      sectioning_html (level, secname);
    else
!     {
!       char character = scoring_characters[level];
!       insert_and_underscore (level, character, secname);
!     }
  }
  
--- 423,427 ----
      sectioning_html (level, secname);
    else
!     insert_and_underscore (level, secname);
  }
  
***************
*** 416,420 ****
     line of WITH_CHAR, the same length of the inserted text. */
  void
! insert_and_underscore (int level, int with_char, char *cmd)
  {
    int i, len;
--- 431,435 ----
     line of WITH_CHAR, the same length of the inserted text. */
  void
! insert_and_underscore (int level, char *cmd)
  {
    int i, len;
***************
*** 423,426 ****
--- 438,442 ----
    unsigned char *starting_pos, *ending_pos;
    char *temp;
+   char with_char = scoring_characters[level];
  
    close_paragraph ();
***************
*** 433,436 ****
--- 449,457 ----
  
    get_rest_of_line (0, &temp);
+ 
+   /* Use @settitle value if @top parameter is empty.  */
+   if (STREQ (command, "top") && strlen(temp) == 0)
+     temp = xstrdup (title ? title : "");
+ 
    starting_pos = output_paragraph + output_paragraph_offset;
  
***************
*** 530,533 ****
--- 551,558 ----
  
    get_rest_of_line (0, &temp);
+ 
+   /* Use @settitle value if @top parameter is empty.  */
+   if (STREQ (command, "top") && strlen(temp) == 0)
+     temp = xstrdup (title ? title : "");
  
    index = search_sectioning (cmd);

Index: sectioning.h
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/sectioning.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sectioning.h        13 Feb 2004 22:01:39 -0000      1.2
--- sectioning.h        14 Mar 2004 03:26:36 -0000      1.3
***************
*** 59,63 ****
  extern void
    sectioning_underscore (char *cmd),
!   insert_and_underscore (int level, int with_char, char *cmd);
  
  /* needed in node.c */
--- 59,63 ----
  extern void
    sectioning_underscore (char *cmd),
!   insert_and_underscore (int level, char *cmd);
  
  /* needed in node.c */



reply via email to

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