*** empty log message ***
[m17n/m17n-docs.git] / utils / imdoc.c
index 8854093..974d4ca 100644 (file)
@@ -17,6 +17,8 @@ invalid_file (char *filename)
   exit (1);
 }
 
+#define INHIBIT_TITLE
+
 int
 main (int argc, char **argv)
 {
@@ -103,10 +105,16 @@ main (int argc, char **argv)
        {
          MText *title = mplist_value (plist);
          
+#ifndef INHIBIT_TITLE
          printf ("@htmlonly\n title:\"");
+#else
+         printf ("@htmlonly\n");
+#endif
          plist = mplist_next (plist);
+#ifndef INHIBIT_TITLE
          mconv_encode_stream (Mutf8, title, stdout);
          printf ("\"");
+#endif
          if (mplist_key (plist) != Mnil)
            {
              MText *icon = mplist_value (plist);
@@ -114,11 +122,17 @@ main (int argc, char **argv)
                                           NULL, NULL, NULL);
              char *base;
              char cmd[1024];
+             int result;
 
              base = basename (strdup (iconfile));
              sprintf (cmd, "convert -resize 50%% %s images/icon-%s",
                       iconfile, base);
-             system (cmd);
+             result = system (cmd);
+             if (result != 0)
+               {
+                 fprintf (stderr, "Command fail: %s", cmd);
+                 exit (1);
+               }
              printf (" icon:<img src=\"icon-%s\" border=\"1\" style=\"vertical-align:middle;\">\n", base);
            }
          else