texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/makeinfo makeinfo.c,1.51,1.52


From: karl
Subject: texinfo/makeinfo makeinfo.c,1.51,1.52
Date: Fri, 27 Feb 2004 19:09:56 +0100

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

Modified Files:
        makeinfo.c 
Log Message:
.extension from janneke

Index: makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** makeinfo.c  27 Feb 2004 05:27:06 -0000      1.51
--- makeinfo.c  27 Feb 2004 18:09:53 -0000      1.52
***************
*** 3204,3215 ****
        char *pathname = NULL;
        char *fullname = xmalloc (strlen (name_arg)
!                        + (ext_arg && *ext_arg ? strlen (ext_arg) + 1 : 4) + 
1);
  
        if (ext_arg && *ext_arg)
          {
!           sprintf (fullname, "%s.%s", name_arg, ext_arg);
            if (access (fullname, R_OK) != 0)
              pathname = get_file_info_in_path (fullname, include_files_path,
                                                &file_info);
          }
        else
--- 3204,3225 ----
        char *pathname = NULL;
        char *fullname = xmalloc (strlen (name_arg)
!                        + (ext_arg && *ext_arg ? strlen (ext_arg) + 1: 4) + 1);
  
        if (ext_arg && *ext_arg)
          {
!           sprintf (fullname, "%s%s", name_arg, ext_arg);
            if (access (fullname, R_OK) != 0)
              pathname = get_file_info_in_path (fullname, include_files_path,
                                                &file_info);
+ 
+         if (pathname == NULL)
+           {
+             /* Backwards compatibility (4.6 <= version < 4.7):
+                try prefixing @image's EXTENSION parameter with a period. */
+             sprintf (fullname, "%s.%s", name_arg, ext_arg);
+             if (access (fullname, R_OK) != 0)
+               pathname = get_file_info_in_path (fullname, include_files_path,
+                                                 &file_info);
+           }
          }
        else
***************
*** 3290,3294 ****
            char *txtname = xmalloc (strlen (name_arg)
                                     + (ext_arg && *ext_arg
!                                       ? strlen (ext_arg) + 1 : 4) + 1);
            strcpy (txtname, name_arg);
            strcat (txtname, ".txt");
--- 3300,3304 ----
            char *txtname = xmalloc (strlen (name_arg)
                                     + (ext_arg && *ext_arg
!                                       ? strlen (ext_arg) : 4) + 1);
            strcpy (txtname, name_arg);
            strcat (txtname, ".txt");



reply via email to

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