OSDN Git Service

removed c-std.h and dirio.h.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Thu, 1 May 2014 05:43:51 +0000 (13:43 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Thu, 1 May 2014 05:43:51 +0000 (13:43 +0800)
12 files changed:
src/texsourc/c-std.h [deleted file]
src/texsourc/common.h
src/texsourc/config.h
src/texsourc/dirio.h [deleted file]
src/texsourc/lib.h
src/texsourc/makefile
src/texsourc/openinou.c
src/texsourc/subroute.c
src/texsourc/tex0.c
src/texsourc/tex4.c
src/texsourc/texd.h
src/texsourc/texmf.c

diff --git a/src/texsourc/c-std.h b/src/texsourc/c-std.h
deleted file mode 100644 (file)
index 99d629b..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/* c-std.h: the first header files.
-
-   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_STD_H
-  #define C_STD_H
-
-  /* Header files that essentially all of our sources need, and
-     that all implementations have.  We include these first, to help with
-     NULL being defined multiple times.  */
-  #include <math.h>
-  #include <stdio.h>
-
-  /* POSIX.1 says that <unistd.h> may require <sys/types.h>.  */
-  #include <sys/types.h>
-  
-  /* This is the symbol that X uses to determine if <sys/types.h> has been
-     read, so we define it.  */
-  #define __TYPES__
-
-  /* X uses this symbol to say whether we have <stddef.h> etc.  */
-  #ifndef STDC_HEADERS
-    #define X_NOT_STDC_ENV
-  #endif
-
-  /* Be sure we have constants from <unistd.h>.  */
-  #include "c-unistd.h"
-
-  /* Include <stdlib.h> first to help avoid NULL redefinitions.  */
-  #if STDC_HEADERS
-    #include <stdlib.h>
-    #include <stddef.h>
-#else /* end of STDC_HEADERS */
-  extern char *getenv (const char *); /* extern char *getenv(); */
-
-  #ifndef ALLOC_RETURN_TYPE
-    #ifdef MSDOS
-      #include  <malloc.h>
-      #define ALLOC_RETURN_TYPE void
-    #else /* end of DOS case */
-      #define ALLOC_RETURN_TYPE char
-    #endif /* not DOS */
-#endif /* not ALLOC_RETURN_TYPE */
-
-/* extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc(); */
-extern ALLOC_RETURN_TYPE *calloc (size_t, size_t);
-extern ALLOC_RETURN_TYPE *malloc (size_t);
-extern ALLOC_RETURN_TYPE *realloc (void *, size_t);
-#endif /* not STDC_HEADERS */
-
-/* strchr vs. index, memcpy vs. bcopy, etc.  */
-#include "c-memstr.h"
-
-/* Error numbers and errno declaration.  */
-#include "c-errno.h"
-
-/* Numeric minima and maxima.  */
-#include "c-minmax.h"
-
-/* popen is part of POSIX.2, not POSIX.1.  So STDC_HEADERS isn't enough.  */
-/* extern FILE *popen(); */
-/* extern double hypot(); */
-/* extern double hypot (double, double); */    /* see math.h */
-
-#endif /* not C_STD_H */
index 6ab4d76..1d5cb16 100644 (file)
 #ifndef COMMON_H
 #define COMMON_H
 
-//#include "getopt.h"
 #include <kpathsea/getopt.h>
-#include "lib.h"
+#include <kpathsea/lib.h>
 #include "ourpaths.h"
 #include "pascal.h"
-//#include "types.h"
 #include <kpathsea/types.h>
+typedef boolean bool;
 
 
 /* We never need the `link' system call, which is sometimes declared in
index ff4d964..dacb13f 100644 (file)
 #ifndef CONFIG_H
 #define CONFIG_H
 
-/* System dependencies that are figured out by `configure'.  */
-#include "c-auto.h"
+#define WORDS_BIGENDIAN 0
 
 /* ``Standard'' headers.  */
-//#include "c-std.h"
 #include <kpathsea/c-auto.h>
 #include <kpathsea/c-std.h>
-
-/* Everybody uses PATH_MAX.  */
 #include <kpathsea/c-pathmx.h>
-
-/* How to open files with fopen.  */
 #include <kpathsea/c-fopen.h>
-
-/* Macros to discard or keep prototypes.  */
 #include <kpathsea/c-proto.h> 
 
 
@@ -67,13 +59,6 @@ typedef SCHAR_TYPE schar;
 #endif
 typedef INTEGER_TYPE integer;
 
-/* `volatile' is only used in Metafont to avoid bugs in the MIPS C
-   compiler.  If this definition goes wrong somehow, just get rid of it
-   and the two corresponding substitutions in mf/convert.  */
-/* #ifndef __STDC__ */
-/* #define volatile */
-/* #endif */   /* flushed 1994/March/20 to protect `int interrupt' */
-
 /* Some definitions of our own.  */
 #include "common.h"
 
diff --git a/src/texsourc/dirio.h b/src/texsourc/dirio.h
deleted file mode 100644 (file)
index 812d52d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* dirio.h: checked directory operations.
-
-   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 MSDOS
-
-#ifndef DIRIO_H
-#define DIRIO_H
-
-/* #if DIRENT || _POSIX_VERSION */
-#if defined(DIRENT) || defined(_POSIX_VERSION)                 /* 93/Dec/8 */
-  #include <dirent.h>
-  #define NLENGTH(dirent) strlen ((dirent)->d_name)
-#else /* not (DIRENT or _POSIX_VERSION) */
-  #define dirent direct
-  #define NLENGTH(dirent) ((dirent)->d_namlen)
-
-#ifdef SYSNDIR
-#include <sys/ndir.h>
-#endif /* not SYSNDIR */
-
-#ifdef NDIR
-#include <ndir.h>
-#endif /* not NDIR */
-
-#ifdef SYSDIR
-#include <sys/dir.h>
-#endif /* not SYSDIR */
-
-#endif /* not (DIRENT or _POSIX_VERSION) */
-
-/* Like opendir, closedir, and chdir, but abort if DIRNAME can't be opened.  */
-extern DIR *xopendir P1H(string);
-extern void xclosedir P1H(DIR *);
-#endif /* not DIRIO_H */
-
-#endif /* not DOS */ /* was: not DIRIO_H, which is wrong - bkph */
-
-/* #if !defined(DOS) || defined(PHARLAP) */ /* 1999/Jan/9 */
-
-/* Returns true if FN is a directory (or a symlink to a directory).  */
-extern bool dir_p (string fn);
-
-/* Returns true if FN is directory with no subdirectories.  */
-extern bool leaf_dir_p (string fn);
-
-/* #endif */ /* not DOS, or DOS with PHARLAP */
-
index 031a211..e69de29 100644 (file)
@@ -1,54 +0,0 @@
-/* lib.h: declarations for shared routines.
-
-   Copyright 1992, 1993 Karl Berry
-   Copyright 2007 TeX Users Group
-
-   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 LIB_H
-#define LIB_H
-
-//#include "types.h"
-#include <kpathsea/types.h>
-
-/* for original boolean */
-typedef int bool;
-
-#define FATAL_PERROR(s) do { perrormod (s); exit (errno); } while (0)
-
-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);
-extern string xstrdup (string s);
-extern bool same_file_p (string filename1, string filename2);
-extern string find_suffix (string name);
-extern string remove_suffix (string name);
-extern string make_suffix (string s, string suffix);
-extern string make_prefix (string stem_prefix, string name);
-extern string extend_filename (string name, string suffix);
-extern FILE *xfopen (string filename, string mode);
-extern void xfclose (FILE *, string filename);
-extern void xfseek (FILE *, long, int, string filename);
-extern long xftell (FILE *, string filename);
-
-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 XRETALLOC(addr, n, t) ((addr) = (t *) xrealloc (addr, (n) * sizeof(t)))
-#endif /* not LIB_H */
index a1651fc..66df3b8 100644 (file)
@@ -25,8 +25,7 @@ RC = rc
 # 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 \
-       /I"kpathsea" 
-#/I"libharu/include" /I"libharu/win32/include"
+       /I"kpathsea" /I"libharu/include" /I"libharu/win32/include"
 # Debugging version
 # CFLAGS=/c /Ge /Gy /Gf /Od /Zi /W4 /DMSDOS /DTeX /DPHARLAP /Ilib /YX
 
@@ -52,8 +51,8 @@ objs = texmf.obj itex.obj openinou.obj subroute.obj local.obj \
 texmf.exe: $(objs) 
        $(LINK) $(LFLAGS) texmf itex openinou subroute local \
        tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9 \
-       yandy_pool yandytex.res md5 md5file kpathsea\kpathsea.lib 
-#      libharu\libhpdf.lib libpng\libpng.lib zlib\zlib.lib
+       yandy_pool yandytex.res md5 md5file 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
@@ -68,59 +67,59 @@ yandytex.res: yandytex.rc
        rc yandytex.rc
 
 texmf.obj: texmf.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.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
+       texd.h texmf.h texmfmem.h coerce.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
+       texd.h texmf.h texmfmem.h coerce.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
+       texd.h texmf.h texmfmem.h coerce.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
+       texd.h texmf.h texmfmem.h coerce.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
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex1.obj: tex1.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex2.obj: tex2.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex3.obj: tex3.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex4.obj: tex4.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex5.obj: tex5.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex6.obj: tex6.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex7.obj: tex7.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex8.obj: tex8.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 tex9.obj: tex9.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 yandy_pool.obj: yandy_pool.c \
-       texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
+       texd.h texmf.h texmfmem.h coerce.h config.h common.h
 
 .SUFFIXES:
 .SUFFIXES: .obj .c
index 53737e6..89a6a65 100644 (file)
@@ -46,7 +46,7 @@
 /* openinout.c: open input and output files. */
 
 #define BUILDNAMEDIRECT         /* avoid malloc for string concat */
-
 bool test_read_access (unsigned char *, int);   /* in ourpaths.c - bkph */
 
 extern char *unixify (char *);      /* in pathsrch.c bkph */
@@ -72,7 +72,7 @@ char *xconcat (char *buffer, char *s1, char *s2)
   int n2 = strlen(s2);
 
   if (buffer == s2)
-  {     /* treat special case of overlap */
+  {
     memmove (buffer + n1, buffer, n2 + 1); /* trailing null ! */
     strncpy (buffer, s1, n1);
   }
index 132965d..d0aef99 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "texd.h"
 
-#include <io.h>    // needed for _finddata_t 
+#include <io.h>    // needed for _finddata_t
 #include <ctype.h> // needed for isascii and isalpha
 
 #define NAME_MAX 255      // max size of name component
@@ -172,8 +172,6 @@ bool eoln (FILE * file)
 /* Type mismatch (return) (int/enum) ? */
 }
 
-
-/* Modified version 97/May/17 to avoid malloc for every line read ... */
 char * read_a_line (FILE *f,  char *line, int limit)
 {
   int c;
@@ -1860,4 +1858,4 @@ void expand_subdir (string **dir_list_ptr, unsigned *dir_count_ptr, string dirna
 #endif  /* end of *not* DOS case */
 }
 
-char *get_env_shroud (char *);    /* in texmf.c */
\ No newline at end of file
+char *get_env_shroud (char *);    /* in texmf.c */
index cd3e8cb..c35928e 100644 (file)
@@ -128,7 +128,7 @@ INLINE void str_room_ (int val)
 #else
   if (pool_ptr + val > pool_size)
   {
-    overflow("pool size", pool_size - init_pool_ptr); /* pool size */
+    overflow("pool size", pool_size - init_pool_ptr);
   }
 #endif
 }
@@ -3025,4 +3025,4 @@ void show_node_list_(integer p)
     }
     p = link(p);
   }
-}
\ No newline at end of file
+}
index 8fdfddd..f5452b1 100644 (file)
@@ -1300,7 +1300,6 @@ void dvi_ship_out_(halfword p)
   if (total_pages == 0)
   {
     /* HPDF init.*/
-
 /*
     yandy_pdf = HPDF_New(error_handler, NULL);
     yandy_pdf->pdf_version = HPDF_VER_17;
index bee44be..b1f0295 100644 (file)
@@ -1,4 +1,4 @@
-//#include "hpdf.h"
+#include "hpdf.h"
 #define show_line(str,flag) fputs(str,stdout)
 #define show_char(chr) putc(chr, stdout)
 extern char log_line[];
@@ -2550,9 +2550,9 @@ extern int load_pool_strings (integer spare_size);
 #define help5(...)  tex_help(5, __VA_ARGS__)
 #define help6(...)  tex_help(6, __VA_ARGS__)
 /********BINDING WITH LIBHARU*********/
-/*
+
 EXTERN HPDF_Doc  yandy_pdf;
 EXTERN HPDF_Page yandy_page;
 EXTERN HPDF_Font yandy_font;
-*/
+
 /********BINDING WITH LIBHARU*********/
index d2e14a0..7110428 100644 (file)
@@ -27,7 +27,7 @@
   #define MYLIBAPI __declspec(dllexport)
 #endif
 
-//#include <kpathsea/kpathsea.h>
+#include <kpathsea/kpathsea.h>
 
 #pragma warning(disable:4996)
 #pragma warning(disable:4131) // old style declarator