+++ /dev/null
-/* 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 */
#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
#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>
#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"
+++ /dev/null
-/* 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 */
-
-/* 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 */
# 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
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
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
/* 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 */
int n2 = strlen(s2);
if (buffer == s2)
- { /* treat special case of overlap */
+ {
memmove (buffer + n1, buffer, n2 + 1); /* trailing null ! */
strncpy (buffer, s1, n1);
}
#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
/* 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;
#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 */
#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
}
}
p = link(p);
}
-}
\ No newline at end of file
+}
if (total_pages == 0)
{
/* HPDF init.*/
-
/*
yandy_pdf = HPDF_New(error_handler, NULL);
yandy_pdf->pdf_version = HPDF_VER_17;
-//#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[];
#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*********/
#define MYLIBAPI __declspec(dllexport)
#endif
-//#include <kpathsea/kpathsea.h>
+#include <kpathsea/kpathsea.h>
#pragma warning(disable:4996)
#pragma warning(disable:4131) // old style declarator