Hi,

Makeinfo behaves strangely when including JPEG image; in fact, when
the user includes a JPEG image without explicitly giving its
extension, makeinfo only looks in the current directory (and not in
the include search path).

For instance, this:

    @image{test, 4cm}

would not work if `test.jpg' were located in a `foo' subdirectory, and
makeinfo called as `makeinfo -I foo test.texi'.

I've attached a patch that seems to fix the problem, diffed against
CVS HEAD.


Kind regards,
Roland


-- 
Roland Levillain
EPITA Research and Development Laboratory (LRDE)
14-16, rue Voltaire - F-94276 Le Kremlin-BicĂȘtre Cedex - France
Phone: +33 1 44 08 00 85 - Fax: +33 1 53 14 59 22 - Web: www.lrde.epita.fr


Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.678
diff -u -r1.678 ChangeLog
--- ChangeLog	18 Mar 2007 18:51:08 -0000	1.678
+++ ChangeLog	29 Mar 2007 13:02:30 -0000
@@ -1,3 +1,12 @@
+2007-03-29  Roland Levillain  <[EMAIL PROTECTED]>
+
+	Fix inclusion of JPEG images (with non explicit extension)
+	not present in the current directory, but in the include search
+	path.
+
+	* makeinfo/makeinfo.c (cm_image): Look for a JPEG image in the
+	include search path before giving up.
+
 2007-03-18  Karl Berry  <[EMAIL PROTECTED]>
 
 	* makeinfo/makeinfo.c (cm_image): malloc enough space for the .txt
Index: makeinfo/makeinfo.c
===================================================================
RCS file: /sources/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.92
diff -u -r1.92 makeinfo.c
--- makeinfo/makeinfo.c	18 Mar 2007 18:51:08 -0000	1.92
+++ makeinfo/makeinfo.c	29 Mar 2007 13:02:30 -0000
@@ -3362,10 +3362,16 @@
             if (pathname == NULL) {
               sprintf (fullname, "%s.jpg", name_arg);
               if (access (fullname, R_OK) != 0) {
-                sprintf (fullname, "%s.gif", name_arg);
-                if (access (fullname, R_OK) != 0) {
-                  pathname = get_file_info_in_path (fullname,
-                                               include_files_path, &file_info);
+		  pathname = get_file_info_in_path (fullname,
+						    include_files_path,
+						    &file_info);
+		  if (pathname == NULL) {
+		    sprintf (fullname, "%s.gif", name_arg);
+		    if (access (fullname, R_OK) != 0) {
+		      pathname = get_file_info_in_path (fullname,
+							include_files_path,
+							&file_info);
+		    }
                 }
               }
             }
_______________________________________________
Texinfo home page: http://www.gnu.org/software/texinfo/
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-texinfo

Reply via email to