OSDN Git Service

replace some header files.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Wed, 30 Apr 2014 08:04:10 +0000 (16:04 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Wed, 30 Apr 2014 08:04:10 +0000 (16:04 +0800)
28 files changed:
src/texsourc/c-fopen.h [deleted file]
src/texsourc/c-pathmx.h [deleted file]
src/texsourc/c-proto.h [deleted file]
src/texsourc/common.h
src/texsourc/config.h
src/texsourc/itex.c
src/texsourc/lib.h
src/texsourc/local.c
src/texsourc/makedll [deleted file]
src/texsourc/makefile
src/texsourc/openinou.c
src/texsourc/subroute.c
src/texsourc/test-for.c [deleted file]
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/texmf.c
src/texsourc/texwin.h [deleted file]
src/texsourc/xstat.h [deleted file]
src/texsourc/yandy_pool.c

diff --git a/src/texsourc/c-fopen.h b/src/texsourc/c-fopen.h
deleted file mode 100644 (file)
index c4754e8..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* c-fopen.h: how to open files with fopen.
-
-   Copyright 1992 Karl Berry
-   Copyright 2007 TeX Users Group
-   Copyright 2014 Clerk Ma
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301 USA.  */
-
-#ifndef C_FOPEN_H
-#define C_FOPEN_H
-
-/* How to open a text file:  */
-#ifndef FOPEN_R_MODE
-  #define FOPEN_R_MODE "r"
-#endif
-
-#ifndef FOPEN_W_MODE
-  #define FOPEN_W_MODE "w"
-#endif
-
-/* How to open a binary file for reading:  */
-#ifndef FOPEN_RBIN_MODE
-  #if defined (VMS) || defined (DOS) || defined (VMCMS)
-    #define FOPEN_RBIN_MODE "rb"
-  #else
-    #define FOPEN_RBIN_MODE "r"
-  #endif /* not (VM/CMS or DOS or VMS) */
-#endif /* not FOPEN_RBIN_MODE */
-
-/* How to open a binary file for writing:  */
-#ifndef FOPEN_WBIN_MODE
-  #ifdef MSDOS
-    #define FOPEN_WBIN_MODE "wb"
-  #else /* end of DOS case */
-    #ifdef VMCMS
-      #define FOPEN_WBIN_MODE "wb, lrecl=1024, recfm=f"
-    #else
-      #define FOPEN_WBIN_MODE "w"
-    #endif /* not VM/CMS */
-  #endif /* not DOS */
-#endif /* not FOPEN_WBIN_MODE */
-
-#endif /* not C_FOPEN_H */
diff --git a/src/texsourc/c-pathmx.h b/src/texsourc/c-pathmx.h
deleted file mode 100644 (file)
index 361dc98..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* c-path_max.h: define PATH_MAX, the maximum length of a pathname.
-
-Copyright (C) 1992 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
-
-#ifndef C_PATH_MAX_H
-#define C_PATH_MAX_H
-
-#include "c-limits.h"
-
-#ifndef _POSIX_PATH_MAX
-  #define _POSIX_PATH_MAX 255
-#endif
-
-#ifndef PATH_MAX
-  #ifdef MAXPATHLEN
-    #define PATH_MAX MAXPATHLEN
-  #else
-    #define PATH_MAX _POSIX_PATH_MAX
-  #endif
-#endif /* not PATH_MAX */
-
-#endif /* not C_PATH_MAX_H */
diff --git a/src/texsourc/c-proto.h b/src/texsourc/c-proto.h
deleted file mode 100644 (file)
index d1b1586..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* c-proto.h: macros to include or discard prototypes.
-
-   Copyright 1992 Karl Berry
-   Copyright 2007 TeX Users Group
-   Copyright 2014 Clerk Ma
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301 USA.  */
-
-#ifndef C_PROTO_H
-#define C_PROTO_H
-
-/* Although most of the code here is written in GNU C, a few files are
-   shared with other distributions (TeX, xdvi, dvips), and so need to be
-   compilable with common C, also.  Here are macros which play around
-   with function declarations to make them work in both cases.  The P?H
-   macros are used for declarations, the P?C for definitions.  */
-
-#if __STDC__
-
-  #define P1H(p1) (p1)
-  #define P2H(p1,p2) (p1, p2)
-  #define P3H(p1,p2,p3) (p1, p2, p3)
-  #define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
-  #define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
-
-  #define P1C(t1,n1)(t1 n1)
-  #define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
-  #define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
-  #define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
-  #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
-    (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
-
-#else /* not __STDC__ */
-
-  #define P1H(p1) ()
-  #define P2H(p1, p2) ()
-  #define P3H(p1, p2, p3) ()
-  #define P4H(p1, p2, p3, p4) ()
-  #define P5H(p1, p2, p3, p4, p5) ()
-
-  #define P1C(t1,n1) (n1) t1 n1;
-  #define P2C(t1,n1, t2,n2) (n1, n2) t1 n1; t2 n2;
-  #define P3C(t1,n1, t2,n2, t3,n3) (n1, n2, n3) t1 n1; t2 n2; t3 n3;
-  #define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1, n2, n3, n4) \
-    t1 n1; t2 n2; t3 n3; t4 n4;
-  #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1, n2, n3, n4, n5) \
-    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
-
-#endif /* not __STDC__ */
-
-#endif /* not C_PROTO_H */
index ec3ec30..6ab4d76 100644 (file)
 #ifndef COMMON_H
 #define COMMON_H
 
-#include "getopt.h"
+//#include "getopt.h"
+#include <kpathsea/getopt.h>
 #include "lib.h"
 #include "ourpaths.h"
 #include "pascal.h"
-#include "types.h"
+//#include "types.h"
+#include <kpathsea/types.h>
 
 
 /* We never need the `link' system call, which is sometimes declared in
 /* Some features are only needed in certain programs.  */
 
 #ifdef TeX
-/* The type `glueratio' should be a floating point type which won't
-   unnecessarily increase the size of the memory_word structure.  This is
-   the basic requirement.  On most machines, if you're building a
-   normal-sized TeX, then glueratio must probably meet the following
-   restriction: sizeof(glueratio) <= sizeof(integer).  Usually, then,
-   glueratio must be `float'.  But if you build a big TeX, you can (on
-   most machines) and should make it `double' to avoid loss of precision
-   and conversions to and from double during calculations.  (All this
-   also goes for Metafont.)  Furthermore, if you have enough memory, it
-   won't hurt to have this defined to be `double' for running the
-   trip/trap tests.
-   
-   This type is set automatically to `float' by configure if a small TeX
-   is built.  */
 #ifndef GLUERATIO_TYPE
   #define GLUERATIO_TYPE double
 #endif
index 6d6ea4d..f466f22 100644 (file)
 
 /* ``Standard'' headers.  */
 #include "c-std.h"
+//#include <kpathsea/c-std.h>
 
 /* Everybody uses PATH_MAX.  */
-#include "c-pathmx.h"
+#include <kpathsea/c-pathmx.h>
 
 /* How to open files with fopen.  */
-#include "c-fopen.h"
+#include <kpathsea/c-fopen.h>
 
 /* Macros to discard or keep prototypes.  */
-#include "c-proto.h"
+#include <kpathsea/c-proto.h> 
 
 
 /* The smallest signed type: use `signed char' if ANSI C, `short' if
@@ -71,19 +72,6 @@ typedef INTEGER_TYPE integer;
 /* #ifndef __STDC__ */
 /* #define volatile */
 /* #endif */   /* flushed 1994/March/20 to protect `int interrupt' */
-\f
-/* System-dependent hacks.  */
-
-/* Hack to get around High C on an IBM RT treating `char' differently
-   than normal compilers, etc.   */
-#if defined (__HIGHC__) && defined (ibm032)
-pragma Off(Char_default_unsigned);
-pragma On(Char_is_rep);
-pragma On(Parm_warnings);
-pragma On(Pointers_compatible);
-pragma On(Pointers_compatible_with_ints);
-#endif /* __HIGHC__ and ibm032 */
-
 
 /* Some definitions of our own.  */
 #include "common.h"
index b69cb2c..4808243 100644 (file)
@@ -27,8 +27,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types
index 1b7ae04..031a211 100644 (file)
 #ifndef LIB_H
 #define LIB_H
 
-#include "types.h"
+//#include "types.h"
+#include <kpathsea/types.h>
 
-/* Define common sorts of messages.  */
+/* for original boolean */
+typedef int bool;
 
-/* This should be called only after a system call fails.  */
-// #define FATAL_PERROR(s) do { perror (s); exit (errno); } while (0)
 #define FATAL_PERROR(s) do { perrormod (s); exit (errno); } while (0)
 
-#define START_FATAL() do { fputs ("fatal: ", stderr)
-#define END_FATAL() fputs (".\n", stderr); exit (1); } while (0)
-
-#define FATAL(str)                                                     \
-  START_FATAL(); fprintf (stderr, "%s", str); END_FATAL ()
-#define FATAL1(str, e1)                                                        \
-  START_FATAL(); fprintf (stderr, str, e1); END_FATAL ()
-#define FATAL2(str, e1, e2)                                            \
-  START_FATAL(); fprintf (stderr, str, e1, e2); END_FATAL ()
-#define FATAL3(str, e1, e2, e3)                                                \
-  START_FATAL(); fprintf (stderr, str, e1, e2, e3); END_FATAL ()
-#define FATAL4(str, e1, e2, e3, e4)                                    \
-  START_FATAL(); fprintf (stderr, str, e1, e2, e3, e4); END_FATAL ()
-
-
-#define START_WARNING() do { fputs ("warning: ", stderr)
-#define END_WARNING() fputs (".\n", stderr); fflush (stderr); } while (0)
-
-#define WARNING(str)                                                   \
-  START_WARNING(); fprintf (stderr, "%s", str); END_WARNING ()
-#define WARNING1(str, e1)                                              \
-  START_WARNING(); fprintf (stderr, str, e1); END_WARNING ()
-#define WARNING2(str, e1, e2)                                          \
-  START_WARNING(); fprintf (stderr, str, e1, e2); END_WARNING ()
-#define WARNING3(str, e1, e2, e3)                                      \
-  START_WARNING(); fprintf (stderr, str, e1, e2, e3); END_WARNING ()
-#define WARNING4(str, e1, e2, e3, e4)                                  \
-  START_WARNING(); fprintf (stderr, str, e1, e2, e3, e4); END_WARNING ()
-
-/* I find this easier to read.  */
-#define STREQ(s1, s2) (strcmp (s1, s2) == 0)
-
-/* This is the maximum number of numerals that result when a 64-bit
-   integer is converted to a string, plus one for a trailing null byte,
-   plus one for a sign.  */
-#define MAX_INT_LENGTH 21
-\f
-/* Return a fresh copy of S1 followed by S2, et al.  */
 extern string concat (string s1, string s2);
 extern string concat3 (string, string, string);
 extern string concat4 (string, string, string, string);
 extern string concat5 (string, string, string, string, string);
-
-
-/* A fresh copy of just S.  */
 extern string xstrdup (string s);
-
-
-/* True if FILENAME1 and FILENAME2 are the same file.  If stat fails on
-   either name, returns false, with no error message.  */
 extern bool same_file_p (string filename1, string filename2);
-
-
-/* If NAME has a suffix, return a pointer to its first character (i.e.,
-   the one after the `.'); otherwise, return NULL.  */
 extern string find_suffix (string name);
-
-/* Return NAME with any suffix removed.  */
 extern string remove_suffix (string name);
-
-/* Return S with the suffix SUFFIX, removing any suffix already present.
-   For example, `make_suffix ("/foo/bar.baz", "karl")' returns
-   `/foo/bar.karl'.  Returns a string allocated with malloc.  */
 extern string make_suffix (string s, string suffix);
-
-/* Return NAME with STEM_PREFIX prepended to the stem. For example,
-   `make_prefix ("/foo/bar.baz", "x")' returns `/foo/xbar.baz'.
-   Returns a string allocated with malloc.  */
 extern string make_prefix (string stem_prefix, string name);
-
-/* If NAME has a suffix, simply return it; otherwise, return
-   `NAME.SUFFIX'.  */
 extern string extend_filename (string name, string suffix);
-
-
-/* Like their stdio counterparts, but abort on error, after calling
-   perror(3) with FILENAME as its argument.  */
 extern FILE *xfopen (string filename, string mode);
-// extern void xfclose (FILE *, string filename);
 extern void xfclose (FILE *, string filename);
 extern void xfseek (FILE *, long, int, string filename);
 extern long xftell (FILE *, string filename);
 
-
-/* These call the corresponding function in the standard library, and
-   abort if those routines fail.  Also, `xrealloc' calls `xmalloc' if
-   OLD_ADDRESS is null.  */
 extern address xmalloc (unsigned size);
 extern address xrealloc (address old_address, unsigned new_size);
 extern address xcalloc (unsigned nelem, unsigned elsize);
 
 /* (Re)Allocate N items of type T using xmalloc/xrealloc.  */
-#define XTALLOC(n, t) (t *) xmalloc ((n) * sizeof (t))
-#define XTALLOC1(t) XTALLOC (1, t)
 #define XRETALLOC(addr, n, t) ((addr) = (t *) xrealloc (addr, (n) * sizeof(t)))
-
 #endif /* not LIB_H */
index 4273079..a3c635f 100644 (file)
@@ -26,8 +26,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
 
 /* Most Y & Y changes are localized here -- init() */
 
-/* Note int main (int ac, char *av[]) is in texmf.c */
-/* and that calls main_program = texbody in itex.c => initialize */
-/* which in turn calls init here in local.c */
-/* which then calls init_commands here in local.c */ 
-
 #define USEOUREALLOC      /* 96/Jan/20 */
 
 #define USEMEMSET       /* 98/Jan/23 */
 
-/* #define PREALLOCHOLE */    /* make hole in heap at bottom debugging */
-
-/* #define CHECKALIGNMENT */  /* reactivated 95/Jan/7 */
-
-/* #define HEAPSHOW */      /* debugging 96/Jan/20 */
-
-/* #ifdef TRYANDOPEN */     /* debugging only */
-
-/* #define SHOWHEAPERROR */   /* debugging 96/Jan/10 */
-
 #ifndef _WINDOWS
 /* #define HEAPWALK */      /* debugging 96/Oct/22 */
 #endif
diff --git a/src/texsourc/makedll b/src/texsourc/makedll
deleted file mode 100644 (file)
index 5dd8bb0..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 2007 TeX Users Group.
-# Copyright 2014 Clerk Ma.
-#
-# You may freely use, modify and/or distribute this file.
-
-# Makefile for Y&YTeX
-
-# TO SET UP DEBUGGING INFO:
-# (1) add -Zi to CFLAGS for CL
-# (2) add /MAP /DEBUG /PDB:yandytex.pdb for LINK
-
-# NOTE: full optimization causes some problems especially in TEX5.C & TEX6.C
-# NOTE: assuming no aliasing causes some problems especially in TEXMF.C
-
-CC = cl
-
-LINK = link
-
-# -Gf saves about 7k bytes in EXE file
-
-# For production (-Bd show compiler passes)
-# ASSUMING WE WORK WITH MS COMPILER AND LINKER ONLY use -Gy and -Gf
-# CFLAGS=-c -DDOS -DMSDOS -DPHARLAP -DTeX -DMYDEBUG -Ilib -Ox -Gy -Gf -W3
-# CFLAGS=-c -DDOS -DMSDOS -DPHARLAP -DTeX -DMYDEBUG -Ilib -YX -Ox -Ge -Gy -Gf -W4
-# Release version
-# CFLAGS=/c /MT /W4 /GX /Ox /O2 /DMT /DMSDOS /DTeX /DPHARLAP /DNDEBUG /D_X86=1 /DWIN32 /D_WIN32 /DNDEBUG /D_WINDOWS /Ilib /YX
-CFLAGS=/c /MT /W4 /Ox /O2 /DMT /DMSDOS /DTeX /DPHARLAP /DNDEBUG /D_X86=1 /DWIN32 /D_WIN32 /DNDEBUG /D_WINDOWS
-# Debugging version
-# CFLAGS=/c /MT /W4 /GX /Od /Zi /DMT /DMSDOS /DTeX /DPHARLAP /D_X86=1 /DWIN32 /D_WIN32 /D_WINDOWS
-
-# NOTE: -Ox => -Ogityb1 -Gs
-
-# Link with MS LINK
-# LFLAGS=@yandytex.nt /MAP lib\libdos.lib
-# Release version
-# LFLAGS=/MAP lib\libdos.lib
-LFLAGS=/RELEASE /MAP:yandytexdll.map /DLL /subsystem:windows kernel32.lib gdi32.lib user32.lib 
-# debugging version
-# LFLAGS=/DEBUG /MAP:yandytexdll.map /PDB:yandytexdll.pdb /DLL /subsystem:windows kernel32.lib gdi32.lib user32.lib 
-# LFLAGS=/DEBUG /MAP:yandytexdll.map /DLL /subsystem:windows kernel32.lib gdi32.lib user32.lib 
-
-objs =         texmf.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
-
-# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
-
-texmf.dll: $(objs) 
-       $(LINK) $(LFLAGS) texmf itex openinou subroute local \
-       tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9
-       copy texmf.dll yandytex.dll
-
-# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
-
-texmf.obj: texmf.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-       $(CC) /DINITEX /DINI $(CFLAGS) texmf.c
-
-itex.obj: itex.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-       $(CC) /DINITEX $(CFLAGS) itex.c
-
-openinou.obj: openinou.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-       $(CC) $(CFLAGS) openinou.c
-
-subroute.obj: subroute.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-       $(CC) $(CFLAGS) subroute.c
-
-local.obj: local.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-       $(CC) /DINITEX $(CFLAGS) local.c
-
-# NOTE: cannot compile tex5.c and tex6.c with full optimizations ...
-
-tex0.obj: tex0.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex1.obj: tex1.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex2.obj: tex2.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex3.obj: tex3.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex4.obj: tex4.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex5.obj: tex5.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex6.obj: tex6.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex7.obj: tex7.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex8.obj: tex8.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-tex9.obj: tex9.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
-
-.SUFFIXES:
-.SUFFIXES: .obj .c
-
-c..obj:
-       $(CC) $(CFLAGS) $*.c
-
index d5061b0..5f7a1a6 100644 (file)
@@ -24,7 +24,8 @@ RC = rc
 # CFLAGS=-c -DDOS -DMSDOS -DPHARLAP -DTeX -DMYDEBUG -Ilib -YX -Ox -Ge -Gy -Gf -W4
 # Release version
 # CFLAGS=/c /Ge /Gy /Gf /Ox /W4 /DMSDOS /DTeX /DPHARLAP /DNDEBUG /Ilib /YX
-CFLAGS=/nologo /c /MT /GF /Gy /Ox /W4 /DMSDOS /DTeX /DPHARLAP /DNDEBUG 
+CFLAGS=/nologo /c /MT /GF /Gy /Ox /W4 /DMSDOS /DTeX /DPHARLAP /DNDEBUG \
+       /I"kpathsea"
 # /I"libharu/include" /I"libharu/win32/include"
 # Debugging version
 # CFLAGS=/c /Ge /Gy /Gf /Od /Zi /W4 /DMSDOS /DTeX /DPHARLAP /Ilib /YX
index ceaeaed..53737e6 100644 (file)
@@ -27,8 +27,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types
index 8e12a1b..c404101 100644 (file)
@@ -25,8 +25,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types
diff --git a/src/texsourc/test-for.c b/src/texsourc/test-for.c
deleted file mode 100644 (file)
index f9eaed3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-
-int main (void)
-{
-  unsigned char i;
-  //for (i = 0; i <= 255; i++)
-  for (i = 0; i++ < 255;)
-    printf("At: %d.", i);
-  return 0;
-}
index a919fbd..cd3e8cb 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
index 1068d98..f3f9a55 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
index 2daf0b4..0f72d34 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
index 01fd47f..74aca77 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
index eb6d7ba..3873781 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
@@ -163,6 +161,11 @@ void zdvipop(integer l)
 }
 /* following needs access to dvi_buf=zdvibuf see coerce.h */
 /* sec 0602 */
+/*
+void pdf_font_def_(internal_font_number f)
+{
+}
+*/
 void dvi_font_def_(internal_font_number f)
 {
   pool_pointer k;
index 578d3c2..6d3a884 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.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
index 762fa96..eff8c05 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.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
index b91fd05..699ca47 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.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
index a2e6ad9..232186b 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
index deec9c4..dcf047a 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types 
index 9fc1ede..bc998e1 100644 (file)
@@ -1,3 +1,6 @@
+#define show_line(str,flag) fputs(str,stdout)
+#define show_char(chr) putc(chr, stdout)
+extern char log_line[];
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
 #ifdef MSDOS
   #define ALLOCATEINI        /* allocate iniTeX (550 k) trie_c, trie_o, trie_l, trie_r, trie_hash, trie_taken */
index 1cd4f45..d2e14a0 100644 (file)
@@ -27,7 +27,7 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
+//#include <kpathsea/kpathsea.h>
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
@@ -65,9 +65,6 @@
 
 #define ISSPACE(c) (isascii (c) && isspace(c))
 
-// #include "c-ctype.h"
-// #include "c-pathch.h"
-
 #include <time.h>   // needed for time, struct tm etc.
 #include <signal.h>
 
@@ -126,6 +123,8 @@ int jump_used = 0;
 
 jmp_buf jumpbuffer;   // for non-local jumps
 
+void kpse_set_program_name (const char * argv0, const char * progname);
+
 int main (int ac, char *av[])
 {
   int flag = 0, ret = 0;
@@ -134,19 +133,12 @@ int main (int ac, char *av[])
   char custom_default[PATH_MAX];
 #endif
 
+  kpse_set_program_name(av[0], NULL);
+
   gargc = ac;         /* make available globally */
   gargv = av;         /* make available globally */
 
-#ifdef MSDOS
   program_name = set_program_name(av[0]);   /* rewritten 1994/Mar/1 - bkph */
-#else
-  program_name = strrchr (av[0], PATH_SEP); 
-
-  if (program_name == NULL)
-    program_name = av[0];
-  else
-    program_name++; 
-#endif
 
 #ifdef MSDOS
   if (init(gargc, gargv))   /* in local.c */
@@ -156,31 +148,6 @@ int main (int ac, char *av[])
   dump_default_var = dump_default;
   dump_default_length = strlen (dump_default_var + 1);  /* 93/Nov/20 */
 
-/* The following doesn't make sense on DOS since we can't core dump */
-
-#ifndef INI
-  if (ready_already != 314159)
-  {
-#ifdef MSDOS
-    program_name = set_program_name(av[0]); /* rewritten 1994/Mar/1 - bkph */
-#else
-    program_name = strrchr (av[0], PATH_SEP);
-
-    if (program_name == NULL)
-      program_name = av[0];
-    else
-      program_name++; 
-#endif
-/* TeX or Metafont adds the space at the end of the name.  */
-    if (strcmp (program_name, virgin_program) != 0)
-    {
-      (void) sprintf (custom_default, dump_format, program_name);
-      dump_default_var = custom_default;
-      dump_default_length = strlen (program_name) + dump_ext_length;
-    }
-  }
-#endif /* not INI */
-
 //  call main_program = texbody in itex.c
 //  now creates jump buffer for non-local goto's  99/Nov/7
 
@@ -283,8 +250,7 @@ void t_open_in (void)
 /* All our interrupt handler has to do is set TeX's or Metafont's global
    variable `interrupt'; then they will do everything needed.  */
 
-static RETSIGTYPE
-catch_interrupt (int err)
+static void catch_interrupt (int err)
 {
   (void) signal (SIGINT, SIG_IGN);
 
@@ -361,7 +327,7 @@ void get_date_and_time (integer *sys_minutes, integer *sys_day, integer *sys_mon
       }
     }
 #else
-    RETSIGTYPE (*old_handler)();
+    void (*old_handler)();
 
     if ((old_handler = signal (SIGINT, catch_interrupt)) != SIG_DFL)
       (void) signal (SIGINT, old_handler);
@@ -689,7 +655,7 @@ bool input_line (FILE *f)
 /* This string specifies what the `e' option does in response to an
    error message.  */ 
 
-static char *edit_value = EDITOR;
+static char *edit_value = "c:\\yandy\\WinEdt\\WinEdt.exe [Open('%s');SelLine(%d,7)]";
 
 void unshroud_string (char *real_var, char *var, int n)
 {
diff --git a/src/texsourc/texwin.h b/src/texsourc/texwin.h
deleted file mode 100644 (file)
index 0ee85f5..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/**********************************************************************
-
-  Common header information for YANDYTEX
-
-   Copyright 1992,1993,1994,1995,1996,1997,1998,1999 Y&Y, Inc.
-   Copyright 2007-2013 TeX Users Group
-   Copyright 2014 Clerk Ma
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301 USA.
-
-**********************************************************************/
-
-/////////////////////////////////////////////////////////
-
-#ifdef _WINDOWS
-#ifndef MYLIBAPI
-  #define MYLIBAPI __declspec(dllimport)
-#endif
-
-//////////////////////////////////////////////////////////
-
-MYLIBAPI int yandytex(HWND, char *, int (*) (char *, char *, char *));
-
-// last argument is a call-backup that can send PS strings back
-
-#define ICN_LISTBOX  525
-#define ICN_COPY     526
-#define ICN_RESET    527
-#define ICN_ADDTEXT  528
-#define ICN_SETTITLE 529
-#define ICN_DONE     530
-#define ICN_CLEAR    531
-
-// MYLIBAPI int reencodeflag;
-
-#endif
-
-#ifdef _WINDOWS
-  int ConsoleInput(char * question, char * help, char * buffer);
-#else
-  #define show_line(str,flag) fputs(str,stdout)
-  #define show_char(chr) putc(chr, stdout)
-#endif
-
-//////////////////////////////////////////////////////////
-
-extern char log_line[];
-//#include "hpdf.h"
\ No newline at end of file
diff --git a/src/texsourc/xstat.h b/src/texsourc/xstat.h
deleted file mode 100644 (file)
index 8562886..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/* xstat.h: declarations for using stat(2).
-
-   Copyright 1992 Karl Berry
-   Copyright 2007 TeX Users Group
-   Copyright 2014 Clerk Ma
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301 USA.  */
-
-#ifndef XSTAT_H
-#define XSTAT_H
-
-#include "types.h"
-#include <sys/stat.h>
-
-
-/* Predicates for testing file attributes.  */
-
-#if !defined(S_ISBLK) && defined(S_IFBLK)
-#define        S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#endif
-#if !defined(S_ISCHR) && defined(S_IFCHR)
-#define        S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#endif
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define        S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-#if !defined(S_ISREG) && defined(S_IFREG)
-#define        S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-#if !defined(S_ISFIFO) && defined(S_IFIFO)
-#define        S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#endif
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define        S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-#if !defined(S_ISSOCK) && defined(S_IFSOCK)
-#define        S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-#endif
-#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
-#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
-#endif
-#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
-#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-#endif
-
-/* Two files are indistinguishable if they are on the same device
-   and have the same inode.  This checks two stat buffers for that.  */
-/* NOTE: this doesn't work in DOS, since ino == 0 always */
-#define SAME_FILE_P(s1, s2) \
-  ((s1).st_ino == (s2).st_ino && (s1).st_dev == (s2).st_dev)
-
-/* Does stat(2) on PATH, and aborts if the stat fails.  */
-extern struct stat xstat P1H(string path);
-
-/* Ditto, for lstat(2) (except that lstat might not exist).  */
-#ifdef S_ISLNK
-extern struct stat xlstat P1H(string path);
-#else
-#define xlstat xstat
-#endif
-
-#endif /* not XSTAT_H */
index e3a498d..d35d308 100644 (file)
@@ -8,8 +8,6 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-#include "texwin.h"
-
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator
 #pragma warning(disable:4135) // conversion between different integral types