texinfo-commits
[Top][All Lists]
Advanced

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

texinfo update (Mon Jul 19 15:44:02 EDT 2004)


From: Karl Berry
Subject: texinfo update (Mon Jul 19 15:44:02 EDT 2004)
Date: Mon, 19 Jul 2004 15:45:05 -0400

Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.358
retrieving revision 1.359
diff -c -r1.358 -r1.359
*** ChangeLog   16 Jul 2004 19:27:28 -0000      1.358
--- ChangeLog   19 Jul 2004 19:36:07 -0000      1.359
***************
*** 1,3 ****
--- 1,11 ----
+ 2004-07-19  Alper Ersoy  <address@hidden>
+ 
+       * makeinfo/makeinfo.c (main): with XML, instead of directly calling
+       handle_variable_internal for -D and -U command line flags, hold the
+       variable declarations until output document is started.
+       (convert_from_loaded_file): handle variables provided with -D and -U
+       flags here, just before entering the reader_loop.
+ 
  2004-07-15  Werner Lemberg  <address@hidden>
  
        * doc/texinfo.tex (\s): New command to typeset text with a slanted
Index: makeinfo/makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -c -r1.63 -r1.64
*** makeinfo/makeinfo.c 12 Jul 2004 14:05:37 -0000      1.63
--- makeinfo/makeinfo.c 19 Jul 2004 19:35:47 -0000      1.64
***************
*** 1,5 ****
  /* makeinfo -- convert Texinfo source into other formats.
!    $Id: makeinfo.c,v 1.63 2004/07/12 14:05:37 karl Exp $
  
     Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
--- 1,5 ----
  /* makeinfo -- convert Texinfo source into other formats.
!    $Id: makeinfo.c,v 1.64 2004/07/19 19:35:47 dirt Exp $
  
     Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
***************
*** 518,523 ****
--- 518,536 ----
    {NULL, 0, NULL, 0}
  };
  
+ /* We use handle_variable_internal for -D and -U, and it depends on
+    execute_string, which depends on input_filename, which is not defined
+    while we are handling options. :-\  So we save these defines in this
+    struct, and handle them later.  */
+ typedef struct command_line_define
+ {
+   struct command_line_define *next;
+   int action;
+   char *define;
+ } COMMAND_LINE_DEFINE;
+ 
+ static COMMAND_LINE_DEFINE *command_line_defines = NULL;
+ 
  /* For each file mentioned in the command line, process it, turning
     Texinfo commands into wonderfully formatted output text. */
  int
***************
*** 605,611 ****
          case 'D':
          case 'U':
            /* User specified variable to set or clear. */
!           handle_variable_internal ((c == 'D') ? SET : CLEAR, optarg);
            break;
  
          case 'd': /* --docbook */
--- 618,633 ----
          case 'D':
          case 'U':
            /* User specified variable to set or clear. */
!           if (xml && !docbook)
!             {
!               COMMAND_LINE_DEFINE *new = xmalloc (sizeof 
(COMMAND_LINE_DEFINE));
!               new->action = (c == 'D') ? SET : CLEAR;
!               new->define = xstrdup (optarg);
!               new->next = command_line_defines;
!               command_line_defines = new;
!             }
!           else
!             handle_variable_internal ((c == 'D' ? SET : CLEAR), optarg);
            break;
  
          case 'd': /* --docbook */
***************
*** 1650,1655 ****
--- 1672,1690 ----
                     output_filename, VERSION, input_filename);
  
    close_paragraph ();
+ 
+   if (xml && !docbook)
+     {
+       /* Just before the real main loop, let's handle the defines.  */
+       COMMAND_LINE_DEFINE *temp;
+ 
+       for (temp = command_line_defines; temp; temp = temp->next)
+         {
+           handle_variable_internal (temp->action, temp->define);
+           free(temp->define);
+         }
+     }
+ 
    reader_loop ();
    if (xml)
      xml_end_document ();
P ChangeLog
P makeinfo/makeinfo.c


reply via email to

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