]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Forgot to initialize some global variables.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Oct 2003 10:02:54 +0000 (10:02 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:02 +0000 (12:11 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/x-glade.c
gettext-tools/src/x-perl.c
gettext-tools/src/x-python.c

index 30fc90f18bee91998a1c412d961984fcace38864..8812f65cbf0a58b9a7e65ae17ec47cdf68674efa 100644 (file)
@@ -1,3 +1,11 @@
+2003-10-04  Bruno Haible  <bruno@clisp.org>
+
+       * x-glade.c (do_extract_glade): Initialize stack_depth.
+       * x-perl.c (extract_perl): Initialize linesize and linepos.
+
+       * x-python.c (phase2_getc): Set last_comment_line.
+       (phase5_get): Set last_non_comment_line.
+
 2003-10-04  Bruno Haible  <bruno@clisp.org>
 
        * x-glade.c: Don't include msgl-ascii.h and msgl-iconv.h.
index aa668d3f56755b39d079a82b9e0ba228a19a1621..f1925587d1e67d47ba46a8a2ede16e75379016a9 100644 (file)
@@ -390,6 +390,8 @@ do_extract_glade (FILE *fp,
   XML_SetCharacterDataHandler (parser, character_data_handler);
   XML_SetCommentHandler (parser, comment_handler);
 
+  stack_depth = 0;
+
   while (!feof (fp))
     {
       char buf[4096];
index 6bead1916d7d06a1382d39271971327d943b3008..4af37e5d42c682568dd59b4bca2c9a566d949e02 100644 (file)
@@ -3022,6 +3022,8 @@ extract_perl (FILE *f, const char *real_filename, const char *logical_filename,
   token_stack.items = NULL;
   token_stack.nitems = 0;
   token_stack.nitems_max = 0;
+  linesize = 0;
+  linepos = 0;
   here_eaten = 0;
   end_of_file = false;
 
index 4b92117ff5bc8f8c2ed325990d36f57bec33a307..6f1a8d53f26ebc3a73f7a1027750e046658153e3 100644 (file)
@@ -253,6 +253,7 @@ phase2_getc ()
       else if (c == '#')
        {
          /* Eat a comment.  */
+         last_comment_line = line_number;
          comment_start ();
          for (;;)
            {
@@ -680,7 +681,12 @@ phase5_get (token_ty *tp)
            continue;
          tp->type = token_type_other;
          return;
+       }
+
+      last_non_comment_line = tp->line_number;
 
+      switch (c)
+       {
        case '.':
          {
            int c1 = phase2_getc ();