OSDN Git Service

updated codes.
[putex/putex.git] / src / dvisourc / dvitiff.c
index 0ad4617..163227b 100644 (file)
 \r
 /* Also, code for some other DVIWindo \specials */\r
 \r
-/* Revised 1999 June 13 to run in DLL form */\r
-\r
-#ifdef _WINDOWS\r
-  #define NOCOMM\r
-  #define NOSOUND\r
-  #define NODRIVERS\r
-  #define STRICT\r
-  #include <windows.h>\r
-#endif\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <malloc.h>\r
-#include <setjmp.h>\r
-\r
-#ifdef _WINDOWS\r
-  // We must define MYLIBAPI as __declspec(dllexport) before including\r
-  // dvipsone.h, then dvipsone.h will see that we have already\r
-  // defined MYLIBAPI and will not (re)define it as __declspec(dllimport)\r
-  #define MYLIBAPI __declspec(dllexport)\r
-  // #include "dvipsone.h"\r
-#endif\r
-\r
 #include "dvipsone.h"\r
-\r
-#ifdef _WINDOWS\r
-  #pragma warning(disable:4100) // unreferenced formal variable \r
-#endif\r
-\r
-#pragma warning(disable:4996)\r
-#pragma warning(disable:4127) // conditional expression is constant\r
-\r
-#pragma hdrstop\r
-\r
-#include <time.h>\r
-\r
 #include "dvispeci.h"\r
 \r
 #define DEBUGTIFF         /* to get in extra tracing code */\r
@@ -5380,7 +5344,7 @@ int oldcolor (FILE *output, FILE  *input)
   int n;\r
 /*  old text color support */\r
   if (strcmp(line, "textcolor") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
       showline(logline, 0);\r
@@ -5422,7 +5386,7 @@ int oldcolor (FILE *output, FILE  *input)
   }\r
   /*  old rule color support */\r
   else if (strcmp(line, "rulecolor") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
@@ -5454,7 +5418,7 @@ int oldcolor (FILE *output, FILE  *input)
   }\r
 /*  old figurecolor support */\r
   else if (strcmp(line, "figurecolor") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
@@ -5500,7 +5464,7 @@ int oldcolor (FILE *output, FILE  *input)
   }\r
 /*  old reverse video support */\r
   else if (strcmp(line, "reversevideo") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
@@ -5590,8 +5554,8 @@ int newspecials (FILE *output, FILE *input)
 /*  insert TIFF or BMP image */\r
   if (strcmp(line, "insertimage") == 0)\r
   {\r
-/*    (void) scanspecial (input, line, MAXLINE); */\r
-    (void) scanspecialraw (input, line, MAXLINE);\r
+/*    (void) scan_special (input, line, MAXLINE); */\r
+    (void) scan_special_raw (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag)\r
     {\r
@@ -5637,11 +5601,11 @@ int newspecials (FILE *output, FILE *input)
 /*  mark: name --- mark: "<File Open>" */ /* turn into named destination */\r
   else if (strcmp(line, "mark") == 0) {\r
     if (bPDFmarks == 0) {\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;   /* we recognize it, but ignore it */\r
     }\r
-/*    (void) scanspecial (input, line, MAXLINE);  */\r
-    (void) scanspecialraw (input, line, MAXLINE); /* fix 97/Nov/11 */\r
+/*    (void) scan_special (input, line, MAXLINE);  */\r
+    (void) scan_special_raw (input, line, MAXLINE); /* fix 97/Nov/11 */\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
       showline(logline, 0);\r
@@ -5676,11 +5640,11 @@ int newspecials (FILE *output, FILE *input)
 /*  we are ignoring for the moment file: ... and launch: ... */\r
   else if (strcmp(line, "button") == 0) {\r
     if (bPDFmarks == 0) {\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;   /* we recognize it, but ignore it */\r
     }\r
-/*    (void) scanspecial (input, line, MAXLINE); */\r
-    (void) scanspecialraw (input, line, MAXLINE); \r
+/*    (void) scan_special (input, line, MAXLINE); */\r
+    (void) scan_special_raw (input, line, MAXLINE); \r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
       showline(logline, 0);\r
@@ -5688,11 +5652,11 @@ int newspecials (FILE *output, FILE *input)
     if (sscanf(line, "%ld %ld%n", &dwidth, &dheight, &n) < 2) {\r
       showline(" ERROR: button ", 1); /* error output */\r
       showline(line, 1);\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;   /* it does not have required width and height ! */\r
     }\r
 /*    if (strstr(line, "launch:") != NULL) {\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;\r
     } */\r
     sname = line + n;         /* now after width and height */\r
@@ -5888,7 +5852,7 @@ int newspecials (FILE *output, FILE *input)
   }\r
   else if (strcmp(line, "viewrule") == 0 || /* 95/Mar/27 */\r
        strcmp(line, "viewtext") == 0) { /* 95/Mar/27 */\r
-     flushspecial(input);\r
+     flush_special(input);\r
      return 1;    /* we recognize it, but ignore it */\r
   }\r
 #ifdef DEBUGTIFF\r
@@ -5915,7 +5879,7 @@ int dohptag (FILE *output, FILE *input)
   char *s, *t;\r
   char filename[FILENAME_MAX];\r
 \r
-  (void) scanspecial (input, line, MAXLINE);\r
+  (void) scan_special (input, line, MAXLINE);\r
   if ((s = strchr(line, ' ')) != NULL) *s = '\0';\r
   if ((t = strrchr(line, '/')) != NULL) strcpy(filename, t+1);\r
   else if (strlen(line) < sizeof(filename)) strcpy(filename, line);\r