qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs archive.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs archive.c
Date: Sun, 7 May 2017 16:27:19 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        17/05/07 16:27:19

Modified files:
        .              : archive.c 

Log message:
        archive: fix small bugs

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/archive.c?cvsroot=qemacs&r1=1.30&r2=1.31

Patches:
Index: archive.c
===================================================================
RCS file: /sources/qemacs/qemacs/archive.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- archive.c   3 May 2017 08:04:08 -0000       1.30
+++ archive.c   7 May 2017 20:27:18 -0000       1.31
@@ -103,7 +103,7 @@
             }
             if (cmd[1] == '2' && arg2) {
                 buf_put_byte(out, '\'');
-                buf_puts(out, arg1);
+                buf_puts(out, arg2);
                 buf_put_byte(out, '\'');
                 cmd += 2;
                 continue;
@@ -233,7 +233,7 @@
     { "bplist", "bplist00", 8, "plist", "plutil -p $1", NULL },
 //    { "bplist", "bplist00", 8, "plist", "plutil -convert xml1 -o - $1", NULL 
},
     { "jpeg", NULL, 0, "jpg", "jp2a --height=35 --background=dark $1", NULL, 
SF_COLOR },
-    { "image", NULL, 0, "bmp", "img2txt -f ansi $1", NULL, SF_COLOR  },
+    { "image", NULL, 0, "bmp", "img2txt -f utf8 $1", NULL, SF_COLOR  },
     { "pdf", NULL, 0, "pdf", "pstotext $1", NULL },
 };
 
@@ -248,7 +248,7 @@
     /* File extension based test */
     reduce_filename(rname, sizeof(rname), get_basename(filename));
     for (ctp = compress_types; ctp; ctp = ctp->next) {
-        if (ctp->magic_size && ctp->magic_size <= buf_size
+        if (ctp->magic && ctp->magic_size && ctp->magic_size <= buf_size
         &&  !memcmp(ctp->magic, buf, ctp->magic_size))
             return ctp;
         if (match_extension(rname, ctp->extensions))



reply via email to

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