void scan_something_internal_(small_number, boolean);
#define scan_something_internal(level, negative) scan_something_internal_((small_number) (level), (boolean) (negative))
void scan_int(void);
-void scan_dimen_(bool, bool, bool);
+void scan_dimen_(boolean, boolean, boolean);
#define scan_dimen(mu, inf, shortcut) scan_dimen_((boolean) (mu), (boolean) (inf), (boolean) (shortcut))
void scan_glue_(small_number);
#define scan_glue(level) scan_glue_((small_number) (level))
halfword the_toks(void);
void ins_the_toks(void);
void conv_toks(void);
-halfword scan_toks_(bool, bool);
+halfword scan_toks_(boolean, boolean);
#define scan_toks(macrodef, xpand) scan_toks_((boolean) (macrodef), (boolean) (xpand))
void read_toks_(integer, halfword);
#define read_toks(n, r) read_toks_((integer) (n), (halfword) (r))
if (flag)
{
- puts("Inverted mapping xord[] pairs:\n");
+ puts("Inverted mapping xord[] pairs:");
for (k = 0; k < 256; k++)
{
if (xord[k] != 127)
- printf("%d => %d\n", k, xord[k]);
+ printf("%lld => %d\n", k, xord[k]);
}
}
}
#ifdef ALLOCATEMAIN
/* we already read this once earlier to grab mem_top */
if (trace_flag)
- printf("Read from fmt file mem_top = %d TeX words\n", x);
+ printf("Read from fmt file mem_top = %lld TeX words\n", x);
mem = allocate_main_memory(x); /* allocate main memory at this point */
if (x > current_pool_size)
{
if (trace_flag)
- printf("undump string pool reallocation (%d > %d)\n", x, current_pool_size);
+ printf("undump string pool reallocation (%lld > %d)\n", x, current_pool_size);
str_pool = realloc_str_pool (x - current_pool_size + increment_pool_size);
}
if (x > current_max_strings)
{
if (trace_flag)
- printf("undump string pointer reallocation (%d > %d)\n", x, current_max_strings);
+ printf("undump string pointer reallocation (%lld > %d)\n", x, current_max_strings);
str_start = realloc_str_start(x - current_max_strings + increment_max_strings);
}
undump_int(cs_count);
if (trace_flag)
- printf("itex undump cs_count %d ", cs_count);
+ printf("itex undump cs_count %lld ", cs_count);
{
undump_int(x); /* font_mem_size */
#ifdef ALLOCATEFONT
if (trace_flag)
- printf("Read from fmt fmem_ptr = %d\n", x);
+ printf("Read from fmt fmem_ptr = %lld\n", x);
if (x > current_font_mem_size)
{
if (trace_flag)
- printf("Undump realloc font_info (%d > %d)\n", x, current_font_mem_size);
+ printf("Undump realloc font_info (%lld > %d)\n", x, current_font_mem_size);
font_info = realloc_font_info (x - current_font_mem_size + increment_font_mem_size);
}
int i, j, n;
fprintf(log_file, "\n");
- fprintf(log_file, "(%d fonts frozen in format file:\n", font_ptr);
+ fprintf(log_file, "(%lld fonts frozen in format file:\n", font_ptr);
for (i = 1; i <= font_ptr; i++)
{
cs_count = frozen_control_sequence - 1 - hash_used;
if (trace_flag)
- printf("itex cs_count %d hash_size %d hash_extra %d hash_used %d",
+ printf("itex cs_count %lld hash_size %d hash_extra %d hash_used %ld",
cs_count, hash_size, hash_extra, hash_used);
for (p = hash_base; p <= hash_used; p++)
if (*buffer == '%' || *buffer == ';' || *buffer == '\n')
continue;
- if ((m = sscanf (buffer, "%d%n %s", &chrs, &n, &charname)) == 0)
+ if ((m = sscanf(buffer, "%d%n %s", &chrs, &n, &charname)) == 0)
continue;
else if (m == 2)
{
{
if (trace_flag)
{
- sprintf(log_line, "EXPANDED! %d (%d) == %d (%d)\n",
+ sprintf(log_line, "EXPANDED! %p (%d) == %p (%d)\n",
mnew, new_size, old, old_size);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Addresses trie_trl %d trie_tro %d trie_trc %d\n", trie_trl, trie_tro, trie_trc);
+ sprintf(log_line, "Addresses trie_trl %p trie_tro %p trie_trc %p\n", trie_trl, trie_tro, trie_trc);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Addresses hyph_word %d hyph_list %d\n", hyph_word, hyph_list);
+ sprintf(log_line, "Addresses hyph_word %p hyph_list %p\n", hyph_word, hyph_list);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Address main memory == %d\n", main_memory);
+ sprintf(log_line, "Address main memory == %p\n", main_memory);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Offset address main memory == %d\n", mem);
+ sprintf(log_line, "Offset address main memory == %p\n", mem);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "main memory", main_memory);
+ sprintf(log_line, "Old Address %s == %p\n", "main memory", main_memory);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "New Address %s == %d\n", "main memory", new_memory);
+ sprintf(log_line, "New Address %s == %p\n", "main memory", new_memory);
show_line(log_line, 0);
}
/* shift everything upward to make space for new low area */
if (trace_flag)
{
- sprintf(log_line, "memmove %d %d %d \n", new_memory + lo_size,
+ sprintf(log_line, "memmove %p %p %d \n", new_memory + lo_size,
new_memory, (current_mem_size + 1) * sizeof(memory_word));
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "font_info", font_info);
+ sprintf(log_line, "Old Address %s == %p\n", "font_info", font_info);
show_line(log_line, 0);
}
/* during initial allocation, font_info == NULL - realloc acts like malloc */
if (trace_flag)
{
- sprintf(log_line, "New Address %s == %d\n", "font_info", font_info);
+ sprintf(log_line, "New Address %s == %p\n", "font_info", font_info);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "string pool", str_pool);
+ sprintf(log_line, "Old Address %s == %p\n", "string pool", str_pool);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "New Address %s == %d\n", "string pool", str_pool);
+ sprintf(log_line, "New Address %s == %p\n", "string pool", str_pool);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "string start", str_start);
+ sprintf(log_line, "Old Address %s == %p\n", "string start", str_start);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "New Address %s == %d\n", "string start", str_start);
+ sprintf(log_line, "New Address %s == %p\n", "string start", str_start);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Addresses trie_l %d trie_o %d trie_c %d\n", trie_l, trie_o, trie_c);
+ sprintf(log_line, "Addresses trie_l %p trie_o %p trie_c %p\n", trie_l, trie_o, trie_c);
show_line(log_line, 0);
- sprintf(log_line, "Addresses trie_r %d trie_hash %d trie_taken %d\n",
+ sprintf(log_line, "Addresses trie_r %p trie_hash %p trie_taken %p\n",
trie_r, trie_hash, trie_taken);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "save stack", save_stack);
+ sprintf(log_line, "Old Address %s == %p\n", "save stack", save_stack);
show_line(log_line, 0);
}
{
sprintf(log_line, "Current %s %d\n", "save_size", current_save_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "save stack", save_stack);
+ sprintf(log_line, "New Address %s == %p\n", "save stack", save_stack);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "input stack", input_stack);
+ sprintf(log_line, "Old Address %s == %p\n", "input stack", input_stack);
show_line(log_line, 0);
}
{
sprintf(log_line, "Current %s %d\n", "stack_size", current_stack_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "input stack", input_stack);
+ sprintf(log_line, "New Address %s == %p\n", "input stack", input_stack);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "nest stack", nest);
+ sprintf(log_line, "Old Address %s == %p\n", "nest stack", nest);
show_line(log_line, 0);
}
{
sprintf(log_line, "Current %s %d\n", "nest_size", current_nest_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "nest stack", nest);
+ sprintf(log_line, "New Address %s == %p\n", "nest stack", nest);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "param stack", param_stack);
+ sprintf(log_line, "Old Address %s == %p\n", "param stack", param_stack);
show_line(log_line, 0);
}
{
sprintf(log_line, "Current %s %d\n", "param_size", current_param_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "param stack", param_stack);
+ sprintf(log_line, "New Address %s == %p\n", "param stack", param_stack);
show_line(log_line, 0);
}
if (trace_flag)
{
- sprintf(log_line, "Old Address %s == %d\n", "buffer", buffer);
+ sprintf(log_line, "Old Address %s == %p\n", "buffer", buffer);
show_line(log_line, 0);
}
{
sprintf(log_line, "Current %s %d\n", "buffer", current_buf_size);
show_line(log_line, 0);
- sprintf(log_line, "New Address %s == %d\n", "buffer", buffer);
+ sprintf(log_line, "New Address %s == %p\n", "buffer", buffer);
show_line(log_line, 0);
}
if (trace_flag)
{
- printf("Main Memory: variable node %d (%d - %d);\n"
- " one word %d (%d - %d)\n",
+ printf("Main Memory: variable node %lld (%lld - %ld);\n"
+ " one word %ld (%ld - %ld)\n",
lo_mem_max - mem_min, mem_min, lo_mem_max,
mem_end - hi_mem_min, hi_mem_min, mem_end);
}
if (output == stdout)
show_line(log_line, 0);
else
- fprintf(output, log_line);
+ fprintf(output, "%s", log_line);
}
}
if (output == stdout)
show_line(log_line, 0);
else
- fprintf(output, log_line);
+ fprintf(output, "%s", log_line);
}
if (ccount > 0)
if (output == stdout)
show_line(log_line, 0);
else
- fprintf(output, log_line);
+ fprintf(output, "%s", log_line);
}
free((void *)cnumtable);
--- /dev/null
+# Copyright 2007 TeX Users Group.
+# Copyright 2014 Clerk Ma.
+#
+# You may freely use, modify and/or distribute this file.
+
+# Makefile for Y&YTeX
+
+CC = clang-cl
+LINK = link
+RC = rc
+
+CFLAGS=/nologo /c /MT /GF /Ox /W4 /DMSDOS /DTeX \
+ /I"kpathsea" /I"zlib" /I"libmd5" /D_CRT_SECURE_NO_WARNINGS \
+ -Wno-char-subscripts -Wno-dangling-else \
+ -Wno-deprecated-declarations
+
+LFLAGS=/NOLOGO /MAP
+
+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 yandy_inlines.obj
+
+yandytex.exe: $(objs)
+ $(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 zlib\zlib.lib
+ del ..\yandy\bin\yandytex.exe
+ copy yandytex.exe ..\yandy\bin\yandytex.exe
+
+md5.obj: libmd5\md5.c
+ $(CC) -Ilibmd5 $(CFLAGS) libmd5\md5.c
+
+yandytex.res: yandytex.rc
+ rc /nologo yandytex.rc
+
+yandytex.obj: yandytex.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+ $(CC) /DINITEX $(CFLAGS) yandytex.c
+
+itex.obj: itex.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+ $(CC) /DINITEX $(CFLAGS) itex.c
+
+openinou.obj: openinou.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+ $(CC) $(CFLAGS) openinou.c
+
+subroute.obj: subroute.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+ $(CC) $(CFLAGS) subroute.c
+
+local.obj: local.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+ $(CC) /DINITEX $(CFLAGS) local.c
+
+tex0.obj: tex0.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex1.obj: tex1.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex2.obj: tex2.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex3.obj: tex3.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex4.obj: tex4.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex5.obj: tex5.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex6.obj: tex6.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex7.obj: tex7.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex8.obj: tex8.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+tex9.obj: tex9.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+yandy_pool.obj: yandy_pool.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+yandy_inlines.obj: yandy_inlines.c \
+ texd.h texmf.h texmfmem.h coerce.h yandy_macros.h
+
+.SUFFIXES:
+.SUFFIXES: .obj .c
+
+c..obj:
+ $(CC) $(CFLAGS) $*.c
+
return;
}
- if ((s == new_line_char))
+ if (s == new_line_char)
if (selector < pseudo)
{
print_ln();
return;
}
- nl = new_line_char;
- new_line_char = -1;
+ nl = new_line_char;
+ new_line_char = -1;
- /* translate ansi to dos 850 */
- if (!show_in_hex && s < 256 && s >= 32)
+ /* translate ansi to dos 850 */
+ if (!show_in_hex && s < 256 && s >= 32)
+ {
+ if (show_in_dos && s > 127)
{
- if (show_in_dos && s > 127)
+ if (wintodos[s - 128] > 0)
{
- if (wintodos[s - 128] > 0)
- {
- print_char(wintodos[s - 128]);
- }
- else
- {
- j = str_start[s];
-
- while (j < str_start[s + 1])
- {
- print_char(str_pool[j]);
- incr(j);
- }
- }
+ print_char(wintodos[s - 128]);
}
else
{
- print_char(s); /* don't translate to hex */
+ j = str_start[s];
+
+ while (j < str_start[s + 1])
+ {
+ print_char(str_pool[j]);
+ incr(j);
+ }
}
}
else
- { /* not just a character */
- j = str_start[s];
+ {
+ print_char(s); /* don't translate to hex */
+ }
+ }
+ else
+ { /* not just a character */
+ j = str_start[s];
- while (j < str_start[s + 1])
- {
- print_char(str_pool[j]);
- incr(j);
- }
+ while (j < str_start[s + 1])
+ {
+ print_char(str_pool[j]);
+ incr(j);
}
+ }
- new_line_char = nl; /* restore eol */
- return;
+ new_line_char = nl; /* restore eol */
+ return;
}
}
}
{
q = p + node_size(p);
- while ((mem[q].hh.rh == empty_flag))
+ while (is_empty(q))
{
t = rlink(q);
{
if (trace_flag)
{
- sprintf(log_line, "mem_min %d, mem_start %d, block_size %d\n", mem_min, mem_start, block_size);
+ sprintf(log_line, "mem_min %lld, mem_start %ld, block_size %d\n", mem_min, mem_start, block_size);
show_line(log_line, 0);
}
/* sec 0176 */
void print_rule_dimen(scaled d)
{
- if ((d == -1073741824L)) /* - 2^30 */
+ if (is_running(d))
print_char('*');
else
print_scaled(d);
if (state != token_list)
{
if (name <= 17)
- if ((name == 0))
+ if (name == 0)
if (base_ptr == 0)
print_nl("<*>");
else
if (trace_flag)
{
- sprintf(log_line, " pack_file_name `%s' (%d) ", name_of_file + 1, name_length); /* debugging */
+ sprintf(log_line, " pack_file_name `%s' (%lld) ", name_of_file + 1, name_length); /* debugging */
show_line(log_line, 0);
}
{
integer k;
- if (interaction == scroll_mode);
+ if (interaction == scroll_mode)
+ do_nothing();
if (!strcmp("input file name", s))
print_err("I can't find file `");
{
if (trace_flag)
{
- sprintf(log_line, "font_ptr %d font_max %d fmem_ptr %d lf %d font_mem_size %d\n",
+ sprintf(log_line, "font_ptr %lld font_max %d fmem_ptr %lld lf %ld font_mem_size %ld\n",
font_ptr, font_max, fmem_ptr, lf, font_mem_size);
show_line(log_line, 0);
}
if (trace_flag)
{
show_char('\n');
- sprintf(log_line, "dvi_swap() %d", dvi_gone);
+ sprintf(log_line, "dvi_swap() %lld", dvi_gone);
show_line(log_line, 0);
}
}
else if (type(q) == rule_node)
{
- if ((width(q) == -1073741824L)) /* 2^30 */
+ if (is_running(width(q)))
width(q) = width(p);
- if ((height(q) == -1073741824L)) /* 2^30 */
+ if (is_running(height(q)))
height(q) = height(p);
- if ((depth(q) == -1073741824L)) /* 2^30 */
+ if (is_running(depth(q)))
depth(q) = depth(p);
if (o != 0)
found:
if (q == tex_register)
scan_optional_equals();
- else
- if (scan_keyword("by"));
+ else if (scan_keyword("by"))
+ do_nothing();
arith_error = false;
{
if (trace_flag)
{
- sprintf(log_line, "SKIPPING %ld ", s);
+ sprintf(log_line, "SKIPPING %lld ", s);
show_line(log_line, 0);
}
goto common_ending;
{
if (trace_flag)
{
- sprintf(log_line, "SKIPPING %ld ", s);
+ sprintf(log_line, "SKIPPING %lld ", s);
show_line(log_line, 0);
}
goto common_ending;
common_ending:
if (trace_flag)
{
- sprintf(log_line, "NEW FONT %d ", f);
+ sprintf(log_line, "NEW FONT %lld ", f);
show_line(log_line, 0);
}
fprintf(log_file, "%c\n", ' ');
fprintf(log_file, "\n");
fprintf(log_file, "%s%s\n", "Here is how much of TeX's memory", " you used:");
- fprintf(log_file, "%c%ld%s", ' ', (int)(str_ptr - init_str_ptr), " string");
+ fprintf(log_file, "%c%lld%s", ' ', (integer)(str_ptr - init_str_ptr), " string");
if (str_ptr != init_str_ptr + 1)
putc('s', log_file);
#ifdef ALLOCATESTRING
if (show_current)
- fprintf(log_file, "%s%ld\n", " out of ", (int)(current_max_strings - init_str_ptr));
+ fprintf(log_file, "%s%d\n", " out of ", (int)(current_max_strings - init_str_ptr));
else
#endif
- fprintf(log_file, "%s%ld\n", " out of ", (int)(max_strings - init_str_ptr));
+ fprintf(log_file, "%s%d\n", " out of ", (int)(max_strings - init_str_ptr));
#ifdef ALLOCATESTRING
if (show_current)
- fprintf(log_file, "%c%ld%s%ld\n", ' ', (int)(pool_ptr - init_pool_ptr), " string characters out of ", current_pool_size - init_pool_ptr);
+ fprintf(log_file, "%c%lld%s%lld\n", ' ', (integer)(pool_ptr - init_pool_ptr), " string characters out of ", current_pool_size - init_pool_ptr);
else
#endif
- fprintf(log_file, "%c%ld%s%ld\n", ' ', (int)(pool_ptr - init_pool_ptr), " string characters out of ", pool_size - init_pool_ptr);
+ fprintf(log_file, "%c%lld%s%lld\n", ' ', (integer)(pool_ptr - init_pool_ptr), " string characters out of ", pool_size - init_pool_ptr);
#ifdef ALLOCATEMAIN
if (show_current)
- fprintf(log_file, "%c%ld%s%ld\n", ' ', (int)(lo_mem_max - mem_min + mem_end - hi_mem_min + 2), " words of memory out of ", current_mem_size);
+ fprintf(log_file, "%c%lld%s%d\n", ' ', (integer)(lo_mem_max - mem_min + mem_end - hi_mem_min + 2), " words of memory out of ", current_mem_size);
else
#endif
- fprintf(log_file, "%c%ld%s%ld\n", ' ', (int)(lo_mem_max - mem_min + mem_end - hi_mem_min + 2), " words of memory out of ", mem_end + 1 - mem_min);
+ fprintf(log_file, "%c%lld%s%lld\n", ' ', (integer)(lo_mem_max - mem_min + mem_end - hi_mem_min + 2), " words of memory out of ", mem_end + 1 - mem_min);
- fprintf(log_file, "%c%ld%s%ld\n", ' ', (int)(cs_count), " multiletter control sequences out of ", (hash_size + hash_extra));
- fprintf(log_file, "%c%ld%s%ld%s", ' ', (int)(fmem_ptr), " words of font info for ", (int)(font_ptr - font_base), " font");
+ fprintf(log_file, "%c%lld%s%d\n", ' ', (cs_count), " multiletter control sequences out of ", (hash_size + hash_extra));
+ fprintf(log_file, "%c%lld%s%lld%s", ' ', (fmem_ptr), " words of font info for ", (font_ptr - font_base), " font");
if (font_ptr != 1)
putc('s', log_file);
#ifdef ALLOCATEFONT
if (show_current)
- fprintf(log_file, "%s%ld%s%ld\n", ", out of ", current_font_mem_size, " for ", font_max - font_base);
+ 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%ld%s%ld\n", ", out of ", font_mem_size, " for ", font_max - font_base);
+ fprintf(log_file, "%s%d%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, " (i = in_stack, n = nest_stack, p = param_stack, b = buf_stack, s = save_stack)\n");
if (!knuth_flag)
- fprintf(log_file, " %d inputs open max out of %ld\n", high_in_open, max_in_open);
+ fprintf(log_file, " %lld inputs open max out of %d\n", high_in_open, max_in_open);
if (show_line_break_stats && first_pass_count > 0)
{
third_count = final_pass_count - paragraph_failed;
if (first_pass_count > 0)
- fprintf(log_file, "\n %d first pass (\\pretolerance = %d)", first_pass_count, pretolerance);
+ fprintf(log_file, "\n %d first pass (\\pretolerance = %lld)", first_pass_count, pretolerance);
if (second_pass_count > 0)
- fprintf(log_file, "\n %d second pass (\\tolerance = %d)", second_pass_count, tolerance);
+ fprintf(log_file, "\n %d second pass (\\tolerance = %lld)", second_pass_count, tolerance);
if (final_pass_count > 0 || emergency_stretch > 0)
{
dvi_out(max_push / 256);
dvi_out(max_push % 256);
- if (total_pages >= 65536) // 99/Oct/10 dvi_t 16 bit problem
+ if (total_pages >= 65536)
{
- sprintf(log_line, "\nWARNING: page count (dvi_t) in DVI file will be %ld not %ld\n",
+ sprintf(log_line, "\nWARNING: page count (dvi_t) in DVI file will be %lld not %lld\n",
(total_pages % 65536), total_pages);
if (log_opened)
- (void) fputs (log_line, log_file);
+ fputs(log_line, log_file);
show_line(log_line, 1);
}
dvi_out((total_pages / 256) % 256);
dvi_out(total_pages % 256);
- if (show_fonts_used && log_opened) /* 97/Dec/24 */
- show_font_info(); // now in local.c
+ if (show_fonts_used && log_opened)
+ show_font_info();
while (font_ptr > 0)
{
decr(k);
}
- if (trace_flag) /* 93/Dec/28 - bkph */
+ if (trace_flag)
{
- sprintf(log_line, "\ndviwrite %d", dvi_gone);
+ sprintf(log_line, "\ndviwrite %lld", dvi_gone);
show_line(log_line, 0);
}
#include "coerce.h"
/* sec 79 */
+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);
#include "texd.h"
+inline void do_nothing(void)
+{
+ if (trace_flag)
+ printf("DO_NOTHING.\n");
+}
+
inline void update_terminal(void)
{
#ifndef _WINDOWS
/* sec 0073 */
inline void print_err (const char * s)
{
- if (interaction == error_stop_mode);
- print_nl("! ");
-
+ if (interaction == error_stop_mode)
+ do_nothing();
+
+ print_nl("! ");
prints(s);
}
/* sec 0079 */
#endif
/* sec 0124 */
#define empty_flag max_halfword
-#define is_empty(a) (link(a) = empty_flag)
+#define is_empty(a) (link(a) == empty_flag)
#define node_size info
#define llink(a) info(a+1)
#define rlink(a) link(a+1)
#define edit_value tex_edit_value
extern char * replacement[];
-static char * program_name = NULL;
int gargc; /* number of args - set to zero after initialization */
char **gargv;
(void) time(&clock);
if (trace_flag)
- printf("The time is %u\n", clock);
+ printf("The time is %lld\n", clock);
if (clock < 0)
puts("Time not available!");
if (tmptr == NULL)
{
- printf("Cannot convert time (%0ld)!\n", clock);
+ printf("Cannot convert time (%0lld)!\n", clock);
year = 2038;
month = 1;
day = 18;
uexit(EXIT_FAILURE);
}
- (void) sprintf (s, "%d", linenumber);
+ (void) sprintf (s, "%lld", linenumber);
while (*s != '\0')
s++;
typedef enum
{
- NO_FILE_PATH = -1,
TEXFORMATPATH,
TEXINPUTPATH,
TFMFILEPATH,