OSDN Git Service

redesigning header.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Mon, 5 May 2014 14:24:23 +0000 (22:24 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Mon, 5 May 2014 14:24:23 +0000 (22:24 +0800)
21 files changed:
src/texsourc/itex.c
src/texsourc/local.c
src/texsourc/makefile
src/texsourc/openinou.c
src/texsourc/subroute.c
src/texsourc/tex0.c
src/texsourc/tex1.c
src/texsourc/tex2.c
src/texsourc/tex3.c
src/texsourc/tex4.c
src/texsourc/tex5.c
src/texsourc/tex6.c
src/texsourc/tex7.c
src/texsourc/tex8.c
src/texsourc/tex9.c
src/texsourc/texd.h
src/texsourc/texmfmem.h
src/texsourc/yandy_pdf_backend.c
src/texsourc/yandy_pool.c
src/texsourc/yandytex.c [moved from src/texsourc/texmf.c with 96% similarity]
src/texsourc/yandytex.h

index cd084d0..ae0196a 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.  */
 
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
 
 extern clock_t start_time, main_time, finish_time; /* in local.c */
 
-/* imported from pascal.h */
-/* localized here to avoid conflict with io.h in other code */
-
-#define read(f, b) ((b) = getc (f))
-
-
 #ifdef INITEX
   void do_initex (void); /* later in this file */
 #endif
index 671f4e6..e22a699 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.  */
 
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
@@ -38,8 +28,6 @@
 #include <kpathsea/variable.h>
 #include <kpathsea/absolute.h>
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 514dd89..b4e6eec 100644 (file)
@@ -41,7 +41,7 @@ LFLAGS=/MAP
 # LFLAGS=@yandytex.nt /MAP /DEBUG /PDB:yandytex.pdb lib\libdos.lib
 # LFLAGS=/MAP /DEBUG /PDB:yandytex.pdb
 
-objs = texmf.obj itex.obj openinou.obj subroute.obj local.obj \
+objs = yandytex.obj itex.obj openinou.obj subroute.obj local.obj \
        tex0.obj tex1.obj tex2.obj tex3.obj tex4.obj \
        tex5.obj tex6.obj tex7.obj tex8.obj tex9.obj \
        yandy_pool.obj yandytex.res md5.obj md5file.obj \
@@ -50,14 +50,13 @@ objs = texmf.obj itex.obj openinou.obj subroute.obj local.obj \
 # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 
 texmf.exe: $(objs) 
-       $(LINK) $(LFLAGS) texmf itex openinou subroute local \
+       $(LINK) $(LFLAGS) yandytex itex openinou subroute local \
        tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9 \
        yandy_pool yandytex.res md5 md5file yandy_pdf_backend \
        avl \
        kpathsea\kpathsea.lib libharu\libhpdf.lib libpng\libpng.lib zlib\zlib.lib
-       copy texmf.exe yandytex.exe
-       del ..\yandy\bin\texmf.exe
-       copy texmf.exe ..\yandy\bin\texmf.exe
+       del ..\yandy\bin\yandytex.exe
+       copy yandytex.exe ..\yandy\bin\yandytex.exe
 # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 avl.obj: libavl/libavl/avl.c
        $(CC) $(CFLAGS) libavl/libavl/avl.c
@@ -74,9 +73,9 @@ md5file.obj: md5file.c
 yandytex.res: yandytex.rc
        rc yandytex.rc
 
-texmf.obj: texmf.c \
+yandytex.obj: yandytex.c \
        texd.h texmf.h texmfmem.h coerce.h
-       $(CC) /DINITEX /DINI $(CFLAGS) texmf.c
+       $(CC) /DINITEX /DINI $(CFLAGS) yandytex.c
 
 itex.obj: itex.c \
        texd.h texmf.h texmfmem.h coerce.h
@@ -88,7 +87,7 @@ openinou.obj: openinou.c \
 
 subroute.obj: subroute.c \
        texd.h texmf.h texmfmem.h coerce.h
-       $(CC) $(CFLAGS) subroute.c      
+       $(CC) $(CFLAGS) subroute.c
 
 local.obj: local.c \
        texd.h texmf.h texmfmem.h coerce.h
index 140c44e..69d8a81 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.  */
 
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
+#ifdef MSDOS
+  #include <direct.h>           /* for _getcwd() */
+#else
+  #include <unistd.h>
 #endif
 
-#pragma warning(disable:4996)
-#include <kpathsea/kpathsea.h>
-#pragma warning(disable:4131) // old style declarator
-#pragma warning(disable:4135) // conversion between different integral types
-#pragma warning(disable:4127) // conditional expression is constant
-
-#include <setjmp.h>
-
-#include <direct.h>           /* for _getcwd() */
-
 #define EXTERN extern
 
 #include "texd.h"
@@ -501,7 +487,11 @@ bool open_output (FILE **f, char *fopen_mode)
       *log_line = '\0';
     else
     {
+#ifdef MSDOS
       (void) _getcwd(log_line, sizeof(log_line));
+#else
+      (void) getcwd(log_line, sizeof(log_line));
+#endif
       strcat(log_line, PATH_SEP_STRING);
     }
 
@@ -515,7 +505,11 @@ bool open_output (FILE **f, char *fopen_mode)
       *log_line = '\0';
     else
     {
+#ifdef MSDOS
       (void) _getcwd(log_line, sizeof(log_line));
+#else
+      (void) getcwd(log_line, sizeof(log_line));
+#endif
       strcat(log_line, PATH_SEP_STRING);
     }
 
@@ -529,7 +523,11 @@ bool open_output (FILE **f, char *fopen_mode)
       *log_line = '\0';
     else
     {
+#ifdef MSDOS
       (void) _getcwd(log_line, sizeof(log_line));
+#else
+      (void) getcwd(log_line, sizeof(log_line));
+#endif
       strcat(log_line, PATH_SEP_STRING);
     }
 
index 4367483..7a055f4 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.  */
 
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
 
-#define NAME_MAX 255      // max size of name component
-
-#define PATH_SEP              '/'
-#define PATH_SEP_STRING       "/"
-#define PATH_DELIMITER        ';'
-#define PATH_DELIMITER_STRING ";"
+#define PATH_SEP '/'
 
 // used only in jump_out in tex0.c, and in texbody in itex.c
 // and main in texmf.c and a few other abort situations in texmf.c
index d67a48e..4dfc501 100644 (file)
@@ -1,20 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index f3f9a55..ac7ca8b 100644 (file)
@@ -1,20 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 0f72d34..812652a 100644 (file)
@@ -1,20 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 9ff3484..56f2368 100644 (file)
@@ -1,20 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 0ebc005..bce4b28 100644 (file)
@@ -1,20 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 6d3a884..7917865 100644 (file)
@@ -1,19 +1,8 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index eff8c05..927387f 100644 (file)
@@ -1,19 +1,8 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 699ca47..253ff87 100644 (file)
@@ -1,19 +1,8 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index 3e76e02..29975b4 100644 (file)
@@ -1,29 +1,15 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
 
 #pragma warning(disable:4244)       /* 96/Jan/10 */
 
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-
-/* math_fraction etc used to be in tex7.c */
 /* sec 1181 */
 void math_fraction (void)
 {
@@ -970,11 +956,7 @@ void open_or_close_in (void)
 /*  string 785 is  .tex */
     else if ((cur_ext != 785) && (name_length + 5 < PATHMAX))
       {
-        name_of_file[name_length + 1] = '.';
-        name_of_file[name_length + 2] = 't';
-        name_of_file[name_length + 3] = 'e';
-        name_of_file[name_length + 4] = 'x';
-        name_of_file[name_length + 5] = ' ';
+        strncpy((char *) name_of_file + name_length + 1, ".tex ", 5);
         name_length = name_length + 4;
 
         if (a_open_in(read_file[n], TEXINPUTPATH))
@@ -1172,6 +1154,7 @@ lab50:
       "And type `I\\tracingonline=1\\show...' to show boxes and",
       "lists on your terminal as well as in the transcript file.");
   }
+
   error();
 }
 /* sec 1349 */
index 1fe19d4..29b323f 100644 (file)
@@ -1,20 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index a80223d..e3b697f 100644 (file)
@@ -666,7 +666,7 @@ EXTERN str_number cur_ext;
 EXTERN pool_pointer area_delimiter; 
 EXTERN pool_pointer ext_delimiter; 
 EXTERN integer format_default_length; 
-EXTERN ccharpointer TEX_format_default; 
+EXTERN char * TEX_format_default; 
 EXTERN bool name_in_progress; 
 EXTERN bool log_opened; 
 EXTERN bool quoted_file_name;
index 4af6403..5b77c67 100644 (file)
@@ -114,7 +114,7 @@ typedef struct
 typedef union
 {
 #ifdef TeX
-  glueratio gr;
+  glue_ratio gr;
   twohalves hh;
 #else
   twohalves hhfield;
index 0b7df59..aad1b69 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.  */
 
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #pragma warning(disable:4996)
-#include <kpathsea/kpathsea.h>
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
-
 #define EXTERN extern
 
 #include "texd.h"
index d35d308..f5be7bd 100644 (file)
@@ -1,19 +1,9 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 #pragma warning(disable:4127) // conditional expression is constant
 
-#include <setjmp.h>
 #include <time.h>
 
 #define EXTERN extern
similarity index 96%
rename from src/texsourc/texmf.c
rename to src/texsourc/yandytex.c
index 503dd53..8141103 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.  */
 
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
-#pragma warning(disable:4996)
-#include <kpathsea/config.h>
-#include <kpathsea/c-ctype.h>
-#include <kpathsea/line.h>
-#include <kpathsea/readable.h>
-#include <kpathsea/variable.h>
-#include <kpathsea/absolute.h>
-
-
-#pragma warning(disable:4131) // old style declarator
-#pragma warning(disable:4135) // conversion between different integral types
-#pragma warning(disable:4127) // conditional expression is constant
-
-#include <setjmp.h>
-
 #define EXTERN /* Instantiate data in `texd.h' or `mfd.h' here ! */
 
 #include "texd.h"
   #define edit_var            "UFYFEJU" /* shrouded 93/Nov/20 */
 #endif
 
-#include <ctype.h>        // needed for isascii and isalpha
-
-#define ISSPACE(c) (isascii (c) && isspace(c))
-
-#include <time.h>   // needed for time, struct tm etc.
-#include <signal.h>
-
-extern struct tm * localtime();
 
 /* following may be found in local.c --- used for key replacement */
 
 extern char * replacement[];    /* pointers to replacement strings */
 
-/* extern char *buffercopy; */  /* pointer to allocated copy of buffer */
-
-// extern char *grabenv(char *);        /* in local.c - bkph */
-
-/* extern void try_and_open(char *); */ /* inb local.c */
-
 #ifdef FUNNY_CORE_DUMP
   void funny_core_dump (void);
 #endif
index 7e57588..2a60a95 100644 (file)
 
 #define WORDS_BIGENDIAN 0
 
+#pragma warning(disable:4996) //
+#pragma warning(disable:4701) //
+#pragma warning(disable:4100)
+#pragma warning(disable:4244)
+#pragma warning(disable:4131) // old style declarator
+#pragma warning(disable:4135) // conversion between different integral types
+#pragma warning(disable:4127) // conditional expression is constant
+
 /* ``Standard'' headers.  */
 #include <kpathsea/c-auto.h>
 #include <kpathsea/c-std.h>
 #include <kpathsea/c-pathmx.h>
 #include <kpathsea/c-fopen.h>
+#include <kpathsea/c-ctype.h>
 #include <kpathsea/c-proto.h>
+#include <kpathsea/config.h>
 #include <kpathsea/getopt.h>
 #include <kpathsea/lib.h>
+#include <kpathsea/line.h>
+#include <kpathsea/readable.h>
 #include <kpathsea/types.h>
+#include <kpathsea/tex-file.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/absolute.h>
+#include <setjmp.h>
+#include <time.h>
+#include <signal.h>
 #include "hpdf.h"
 #include "avl.h"
 
-typedef signed char schar;
 typedef long        integer;
 typedef double      glue_ratio;
-typedef double      glueratio;
 typedef boolean     bool;
-typedef char *      ccharpointer;
 typedef double      real;
-typedef FILE *      file_ptr;
 typedef FILE *      alpha_file;
 typedef unsigned char ASCII_code;
 typedef unsigned short KANJI_code;