+/* Copyright 2014 Clerk Ma
-#pragma warning(disable:4996)
-#pragma warning(disable:4131) // old style declarator
-#pragma warning(disable:4135) // conversion between different integral types
-#pragma warning(disable:4127) // conditional expression is constant
+ 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. */
#define EXTERN extern
#include "texd.h"
-#pragma warning(disable:4244) /* 96/Jan/10 */
-
/* sec 0581 */
void char_warning_(internal_font_number f, eight_bits c)
{
dvi_out(x / 0400); // dvi_out((x >> 8));
dvi_out(x % 0400); // dvi_out(x & 255);
}
-/* following needs access to dvi_buf=zdvibuf see coerce.h */
/* sec 0601 */
void zdvipop(integer l)
{
else
dvi_out(142);
}
-/* following needs access to dvi_buf=zdvibuf see coerce.h */
/* sec 0602 */
void dvi_font_def_(internal_font_number f)
{
free_node(p, movement_node_size);
}
}
-/* following needs access to dvi_buf=zdvibuf see coerce.h */
/* sec 1368 */
-void special_out_(halfword p)
+void special_out_(pointer p)
{
char old_setting;
pool_pointer k;
- if (cur_h != dvi_h)
- {
- movement(cur_h - dvi_h, right1);
- dvi_h = cur_h;
- }
-
- if (cur_v != dvi_v)
- {
- movement(cur_v - dvi_v, down1);
- dvi_v = cur_v;
- }
-
+ synch_h();
+ synch_v();
old_setting = selector;
selector = new_string;
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-/* About output \special{...} make some space in string pool 97/Mar/9 */
#ifdef ALLOCATESTRING
if (pool_ptr + 32000 > current_pool_size)
str_pool = realloc_str_pool (increment_pool_size);
-/* We don't bother to check whether this worked - will catch later */
-#endif
-/* Potential problem here if current_pool_size is not much more than pool_ptr! */
-/* Fixed 97/Mar/9 in version 2.0.3 */
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-#ifdef ALLOCATESTRING
+
show_token_list(link(write_tokens(p)), 0, 10000000L);
-/* Above is safe, since print/print_char/print_esc will extend string space */
#else
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
show_token_list(link(write_tokens(p)), 0, pool_size - pool_ptr);
#endif
+
selector = old_setting;
str_room(1);
- if (cur_length < 256) /* can use xxx1 ? */
+ if (cur_length < 256)
{
dvi_out(xxx1);
dvi_out(cur_length);
pool_ptr = str_start[str_ptr];
}
-/* noew returns -1 if it fails */
/* sec 1370 */
-void write_out_(halfword p)
+void write_out_(pointer p)
{
char old_setting;
/* integer oldmode; */
{
get_token();
}
- while(!(cur_tok == end_write_token)); /*1996/Jan/10*/
+ while(!(cur_tok == end_write_token));
}
mode = oldmode;
selector = old_setting;
}
/* sec 1373 */
-void out_what_(halfword p)
+void out_what_(pointer p)
{
/* small_number j; */
int j; /* 1995/Jan/7 */
break;
}
}
-/* following needs access to dvi_buf=zdvibuf see coerce.h */
/* sec 0619 */
void hlist_out (void)
{
halfword leader_box;
scaled leader_wd;
scaled lx;
- bool outer_doing_leaders;
+ boolean outer_doing_leaders;
scaled edge;
real glue_temp;
real cur_glue;
decr(cur_s);
}
-/* following needs access to dvi_buf=zdvibuf see coerce.h */
/* sec 0629 */
void vlist_out (void)
{
halfword leader_box;
scaled leader_ht;
scaled lx;
- bool outer_doing_leaders;
+ boolean outer_doing_leaders;
scaled edge;
real glue_temp;
real cur_glue;
decr(cur_s);
}
/* sec 0638 */
-/* following needs access to dvi_buf=zdvibuf see coerce.h */
-/* sec 0638 */
void dvi_ship_out_(halfword p)
{
integer page_loc;
}
void ship_out_(halfword p)
{
- if (pdf_output_flag)
- pdf_ship_out(p);
- else
- dvi_ship_out_(p);
+ switch (shipout_flag)
+ {
+ case out_pdf_flag:
+ pdf_ship_out(p);
+ break;
+ case out_dvi_flag:
+ case out_xdv_flag:
+ dvi_ship_out_(p);
+ break;
+ }
}
/* sec 0645 */
-void scan_spec_(group_code c, bool three_codes)
+void scan_spec_(group_code c, boolean three_codes)
{
integer s;
char spec_code;
/* glue_ord o; */
int o; /* 95/Jan/7 */
internal_font_number f;
- ffourquarters i;
+ four_quarters i;
eight_bits hd;
last_badness = 0;
{
link(adjust_tail) = adjust_ptr(p);
- while (link(adjust_tail)!= 0)
+ while (link(adjust_tail) != 0)
adjust_tail = link(adjust_tail);
p = link(p);
/* sec 0709 */
halfword char_box_(internal_font_number f, quarterword c)
{
- ffourquarters q;
+ four_quarters q;
eight_bits hd;
halfword b, p;
height(b) = height(p);
}
/* sec 0712 */
-scaled height_plus_depth_(internal_font_number f, fquarterword c)
+scaled height_plus_depth_(internal_font_number f, quarterword c)
{
- ffourquarters q;
+ four_quarters q;
eight_bits hd;
q = char_info(f, c);
integer m, n;
scaled u;
scaled w;
- ffourquarters q;
- ffourquarters r;
+ four_quarters q;
+ four_quarters r;
eight_bits hd;
/* small_number z; */
int z; /* 95/Jan/7 */
-/* bool large_attempt; */
+/* boolean large_attempt; */
int large_attempt; /* 95/Jan/7 */
f = null_font;