texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/makeinfo makeinfo.c,1.52,1.53


From: dirt
Subject: texinfo/makeinfo makeinfo.c,1.52,1.53
Date: Sat, 28 Feb 2004 13:56:00 +0100

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

Modified Files:
        makeinfo.c 
Log Message:
2004-02-28  Alper Ersoy  <address@hidden>

        * makeinfo/makeinfo.c (info_trailer): call current_document_encoding
        here too.



Index: makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** makeinfo.c  27 Feb 2004 18:09:53 -0000      1.52
--- makeinfo.c  28 Feb 2004 12:55:57 -0000      1.53
***************
*** 1739,1765 ****
    free (real_output_filename);
  }
- 
- 
  
! /* If enable_encoding and document_encoding are both set, return a Local
!    Variables section (as a malloc-ed string) so that Emacs' locale
!    features can work.  Else return NULL.  */
! 
  char *
  info_trailer (void)
  {
!   if (!enable_encoding || document_encoding_code <= US_ASCII)
      return NULL;
  
!   {
! #define LV_FMT "\n\037\nLocal Variables:\ncoding: %s\nEnd:\n"
!     char *enc_name = encoding_table[document_encoding_code].encname;
!     char *lv = xmalloc (sizeof (LV_FMT) + strlen (enc_name));
!     sprintf (lv, LV_FMT, enc_name);
!     return lv;
!   }
! }
  
  
  
  void
--- 1739,1768 ----
    free (real_output_filename);
  }
  
! /* If enable_encoding is set and @documentencoding is used, return a
!    Local Variables section (as a malloc-ed string) so that Emacs'
!    locale features can work.  Else return NULL.  */
  char *
  info_trailer (void)
  {
!   char *encoding;
! 
!   if (!enable_encoding)
      return NULL;
  
!   encoding = current_document_encoding ();
  
+   if (encoding && *encoding)
+     {
+ #define LV_FMT "\n\037\nLocal Variables:\ncoding: %s\nEnd:\n"
+       char *lv = xmalloc (sizeof (LV_FMT) + strlen (encoding));
+       sprintf (lv, LV_FMT, encoding);
+       free (encoding);
+       return lv;
+     }
  
+   free (encoding);
+   return NULL;
+ }
  
  void



reply via email to

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