Generated XPMs are now finally valid.
authorTim Vaughan <tgvaughan@gmail.com>
Mon, 20 May 2019 21:55:17 +0000 (23:55 +0200)
committerTim Vaughan <tgvaughan@gmail.com>
Mon, 20 May 2019 21:55:38 +0000 (23:55 +0200)
sixel.el

index 8147c8f..6626e1d 100644 (file)
--- a/sixel.el
+++ b/sixel.el
@@ -141,8 +141,8 @@ representation of SIXEL-IMAGE."
                          (elt colour 3))
                  "\""))
               colour-map)
-      ",")
-     "\",\n"
+      ",\n")
+     ",\n"
      "\"-- c #000000\"")))
 
 (defun sixel-image-to-xpm-pixels (sixel-image)
@@ -174,7 +174,7 @@ of SIXEL-IMAGE."
          (sixel-image (sixel-process-data data-string)))
     (concat
      "/* XPM */"
-     "static char * pixmap = {"
+     "static char * pixmap[] = {"
      (sixel-image-to-xpm-values sixel-image) ",\n"
      (sixel-image-to-xpm-colours sixel-image) ",\n"
      (sixel-image-to-xpm-pixels sixel-image) "};")))