#
# You may freely use, modify and/or distribute this file.
#
-# makefle for linux (tested in ubuntu 14.04).
+# makefle for linux (tested in ubuntu 14.04: gcc/clang).
#
# apt-get install libkpathsea6 libkpathsea-dev
-# apt-get install libhpdf-2.2.1 libhpdf-dev
-# apt-get install libpng12-0 libpng12-dev
# apt-get install zlib1g zlib1g-dev
#
CC = gcc
-CFLAGS = -DMSDOS -DTeX -DINITEX -DINI -Ilibmd5
+CFLAGS = -O2 -DMSDOS -DTeX -DINITEX -DINI -Ilibmd5
LDFLAGS = -lkpathsea -lz
objects = yandytex.o itex.o openinou.o subroute.o local.o \
switch (c)
{
case 'v':
- want_version = true;
verbose_flag = true;
break;
case 'i':
reset_exceptions = false;
non_ascii = false;
key_replace = false;
- want_version = false;
open_trace_flag = false;
trace_flag = false;
verbose_flag = false;
if (optind == 0)
optind = ac;
-/*
- if (want_version)
- {
- stamp_it(log_line);
- strcat(log_line, "\n");
- show_line(log_line, 0);
- stampcopy(log_line);
- strcat(log_line, "\n");
- show_line(log_line, 0);
- }
-*/
-
return 0;
}
if (total_pages > 0)
{
show_inter_val((finish_time - main_time) / total_pages);
- printf(" sec per page.");
+ printf(" sec per page.\n");
}
}
}
free((void *)fnumtable);
-}
\ No newline at end of file
+}
$(LINK) $(LFLAGS) yandytex itex openinou subroute local \
tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9 \
yandy_pool yandytex.res md5 yandy_inlines \
- kpathsea\kpathsea.lib libpng\libpng.lib zlib\zlib.lib \
+ kpathsea\kpathsea.lib zlib\zlib.lib \
dvipdfmx\libdvipdfmx.lib
del ..\yandy\bin\yandytex.exe
copy yandytex.exe ..\yandy\bin\yandytex.exe
log_opened = true;
{
- if (want_version)
- {
- stamp_it(log_line);
- strcat(log_line, "\n");
- (void) fputs(log_line, log_file);
- stampcopy(log_line);
- strcat(log_line, "\n");
- (void) fputs(log_line, log_file);
- }
-
fprintf(log_file, "%s (%s %s)", tex_version, application, yandyversion);
if (format_ident > 0)
fprintf(log_file, "%s%d%s%d\n", ", out of ", current_font_mem_size, " for ", font_max - font_base);
else
#endif
- fprintf(log_file, "%s%d%s%d\n", ", out of ", font_mem_size, " for ", font_max - font_base);
+ fprintf(log_file, "%s%lu%s%d\n", ", out of ", font_mem_size, " for ", font_max - font_base);
- fprintf(log_file, "%c%ld%s", ' ', hyph_count, " hyphenation exception");
+ fprintf(log_file, "%c%d%s", ' ', hyph_count, " hyphenation exception");
if (hyph_count != 1)
putc('s', log_file);
- fprintf(log_file, "%s%ld\n", " out of ", hyphen_prime);
+ fprintf(log_file, "%s%lld\n", " out of ", hyphen_prime);
fprintf(log_file, " ");
- fprintf(log_file, "%ld%s", (int)max_in_stack, "i,");
- fprintf(log_file, "%ld%s", (int)max_nest_stack, "n,");
- fprintf(log_file, "%ld%s", (int)max_param_stack, "p,");
- fprintf(log_file, "%ld%s", (int)max_buf_stack + 1, "b,");
- fprintf(log_file, "%ld%s", (int)max_save_stack + 6, "s");
+ fprintf(log_file, "%d%s", (int) max_in_stack, "i,");
+ fprintf(log_file, "%d%s", (int) max_nest_stack, "n,");
+ fprintf(log_file, "%d%s", (int) max_param_stack, "p,");
+ fprintf(log_file, "%d%s", (int) max_buf_stack + 1, "b,");
+ fprintf(log_file, "%d%s", (int) max_save_stack + 6, "s");
fprintf(log_file, " stack positions out of ");
#ifdef ALLOCATESAVESTACK
if (show_current)
- fprintf(log_file, "%ld%s", current_stack_size, "i,");
+ fprintf(log_file, "%d%s", current_stack_size, "i,");
else
#endif
- fprintf(log_file, "%ld%s", stack_size, "i,");
+ fprintf(log_file, "%d%s", stack_size, "i,");
#ifdef ALLOCATENESTSTACK
if (show_current)
- fprintf(log_file, "%ld%s", current_nest_size, "n,");
+ fprintf(log_file, "%d%s", current_nest_size, "n,");
else
#endif
- fprintf(log_file, "%ld%s", nest_size, "n,");
+ fprintf(log_file, "%d%s", nest_size, "n,");
#ifdef ALLOCATEPARAMSTACK
if (show_current)
- fprintf(log_file, "%ld%s", current_param_size, "p,");
+ fprintf(log_file, "%d%s", current_param_size, "p,");
else
#endif
- fprintf(log_file, "%ld%s", param_size, "p,");
+ fprintf(log_file, "%d%s", param_size, "p,");
#ifdef ALLOCATEBUFFER
if (show_current)
- fprintf(log_file, "%ld%s", current_buf_size, "b,");
+ fprintf(log_file, "%d%s", current_buf_size, "b,");
else
#endif
fprintf(log_file, "%ld%s", buf_size, "b,");
#ifdef ALLOCATESAVESTACK
if (show_current)
- fprintf(log_file, "%ld%s", current_save_size, "s");
+ fprintf(log_file, "%d%s", current_save_size, "s");
else
#endif
- fprintf(log_file, "%ld%s", save_size, "s");
+ fprintf(log_file, "%d%s", save_size, "s");
fprintf(log_file, "\n");
EXTERN boolean reset_exceptions;
EXTERN boolean show_current;
EXTERN boolean return_flag;
-EXTERN boolean want_version;
EXTERN boolean civilize_flag;
EXTERN boolean show_numeric;
EXTERN boolean restrict_to_ascii;
char *unixify (char *);
#include "coerce.h"
-#undef inline
-#define inline
+
/* sec 79 */
-extern inline void node_list_display(integer p);
-extern inline void do_nothing(void);
-extern inline void update_terminal(void);
-extern inline void check_full_save_stack(void);
-extern inline void push_input(void);
-extern inline void pop_input(void);
-extern inline void print_err (const char * s);
-extern inline void ensure_dvi_open(void);
-extern inline void write_dvi(size_t a, size_t b);
-extern inline void prompt_input(const char *s);
-extern inline void synch_h(void);
-extern inline void synch_v(void);
-extern inline void set_cur_lang(void);
-extern char * md5_file (FILE * in_file);
-extern inline void str_room (int val);
-extern inline void tail_append_ (pointer val);
+extern void node_list_display(integer p);
+extern void do_nothing(void);
+extern void update_terminal(void);
+extern void check_full_save_stack(void);
+extern void push_input(void);
+extern void pop_input(void);
+extern void print_err (const char * s);
+extern void ensure_dvi_open(void);
+extern void write_dvi(size_t a, size_t b);
+extern void prompt_input(const char *s);
+extern void synch_h(void);
+extern void synch_v(void);
+extern void set_cur_lang(void);
+extern char * md5_file(FILE * in_file);
+extern void str_room(int val);
+extern void tail_append_(pointer val);
#define tail_append(a) tail_append_((pointer) a)
-extern inline void tex_help (unsigned int n, ...);
-extern inline void append_char(ASCII_code c);
-extern inline void append_lc_hex(ASCII_code c);
-extern inline void succumb(void);
-extern inline void dvi_out_ (ASCII_code op);
+extern void tex_help(unsigned int n, ...);
+extern void append_char(ASCII_code c);
+extern void append_lc_hex(ASCII_code c);
+extern void succumb(void);
+extern void dvi_out_(ASCII_code op);
#define dvi_out(op) dvi_out_((ASCII_code) (op))
-extern inline void free_avail_(halfword p);
+extern void free_avail_(halfword p);
#define free_avail(p) free_avail_((halfword) (p))
-extern inline void flush_string (void);
+extern void flush_string (void);
extern str_number load_pool_strings (integer spare_size);
extern str_number make_string_pool (const char *s);
#define help0() tex_help(0)
#include "texd.h"
-inline void do_nothing(void)
+void do_nothing(void)
{
if (trace_flag)
printf("DO_NOTHING.\n");
}
-inline void update_terminal(void)
+void update_terminal(void)
{
#ifndef _WINDOWS
fflush(stdout);
#endif
}
-inline void check_full_save_stack(void)
+void check_full_save_stack(void)
{
if (save_ptr > max_save_stack)
{
#endif
}
}
-inline void write_dvi(size_t a, size_t b)
+void write_dvi(size_t a, size_t b)
{
if (fwrite((char *) &dvi_buf[a], sizeof(dvi_buf[a]),
((b) - (a) + 1), dvi_file) != ((b) - (a) + 1))
FATAL_PERROR ("\n! dvi file");
}
-inline void prompt_input(const char * s)
+void prompt_input(const char * s)
{
prints(s);
term_input();
}
-inline void set_cur_lang(void)
+void set_cur_lang(void)
{
if (language <= 0)
cur_lang = 0;
else
cur_lang = language;
}
-inline void free_avail_(halfword p)
+void free_avail_(halfword p)
{
link(p) = avail;
avail = p;
#endif
}
/* sec 0042 */
-inline void append_char (ASCII_code c)
+void append_char (ASCII_code c)
{
str_pool[pool_ptr] = c;
incr(pool_ptr);
}
/* sec 0042 */
-inline void str_room(int val)
+void str_room(int val)
{
#ifdef ALLOCATESTRING
if (pool_ptr + val > current_pool_size)
#endif
}
/* sec 0044 */
-inline void flush_string (void)
+void flush_string (void)
{
decr(str_ptr);
pool_ptr = str_start[str_ptr];
}
/* sec 0048 */
-inline void append_lc_hex (ASCII_code c)
+void append_lc_hex (ASCII_code c)
{
if (c < 10)
append_char(c + '0');
append_char(c - 10 + 'a');
}
/* sec 0073 */
-inline void print_err (const char * s)
+void print_err (const char * s)
{
if (interaction == error_stop_mode)
do_nothing();
prints(s);
}
/* sec 0079 */
-inline void tex_help (unsigned int n, ...)
+void tex_help (unsigned int n, ...)
{
int i;
va_list help_arg;
va_end(help_arg);
}
/* sec 0093 */
-inline void succumb (void)
+void succumb (void)
{
if (interaction == error_stop_mode)
interaction = scroll_mode;
jump_out();
}
/* sec 0180 */
-inline void node_list_display(integer p)
+void node_list_display(integer p)
{
append_char('.');
show_node_list(p);
decr(pool_ptr);
}
/* sec 0214 */
-inline void tail_append_ (pointer val)
+void tail_append_ (pointer val)
{
link(tail) = val;
tail = link(tail);
}
/* sec 0321 */
-inline void push_input(void)
+void push_input(void)
{
if (input_ptr > max_in_stack)
{
incr(input_ptr);
}
/* sec 0322 */
-inline void pop_input(void)
+void pop_input(void)
{
decr(input_ptr);
cur_input = input_stack[input_ptr];
}
/* sec 0532 */
-inline void ensure_dvi_open(void)
+void ensure_dvi_open(void)
{
if (output_file_name == 0)
{
}
}
/* sec 0598 */
-inline void dvi_out_(ASCII_code op)
+md5_state_t dvi_md5_state;
+md5_byte_t dvi_md5_digest[16];
+
+void dvi_out_(ASCII_code op)
{
dvi_buf[dvi_ptr] = op;
incr(dvi_ptr);
dvi_swap();
}
/* sec 0616 */
-inline void synch_h(void)
+void synch_h(void)
{
if (cur_h != dvi_h)
{
}
}
/* sec 0616 */
-inline void synch_v(void)
+void synch_v(void)
{
if (cur_v != dvi_v)
{