TeX for Xenix and SysV/3B2
Dominick Samperi
samperi at mancol.UUCP
Thu May 12 12:03:31 AEST 1988
In order to compile Pat Monardo's Common TeX 2.9 (written in C) under
SCO's Xenix, or under SysV/Release2+ on a 3b2, a few changes had to be
made. In the case of the 3b2, a long switch statement in eval.c had to
be broken up (into two pieces) in order to avoid a "switch table overflow"
internal compiler error. In the case of SCO Xenix, many integer constants
that could not be stored in a 16 bit int had to be converted to longs,
and a few other similar changes had to be made to insure that expressions
involving ints and longs were evaluated properly. (There may be other
inconsistent uses of int/long values that I missed - I did not use lint.)
Patches for the 3b2 (3b2.pat) and for SCO Xenix (xenix.pat) are contained
in the shell archive below. (Use Larry Wall's patch program to apply them.)
Apply the patch file to the distribution source. 3b2 users should compile
with -DBIG, and SCO users should use -M2h -LARGE (but note that the
file boxlists.c will not compile under SCO with optimization on). INITEX
is made by including -DINIT, and VIRTEX is made by leaving it out. Make
the format files (plain.fmt and lplain.fmt, for example) by using INITEX
(type 'initex plain', or 'initex lplain', then \dump when you get a single
'*' prompt), and run tex with a particular format file by using
virtex (type 'virtex &plain file', or 'virtex &lplain file', or use a
shell script, with the & escaped). Also, if you aren't sure what the
effect of the makefile variable VPATH is, then comment its definition
out, to avoid possible confusion.
INITEX compiled under MS-DOS, after a little hacking, but the resulting
executable was about 950K, much too large to run.
Comments, suggestions, etc. on the items below would be greatly
appreciated.
1. It appears that "Common TeX" and "CTeX" are different
programs (judging from posted comments about CTeX that are not
true for the "Common TeX" source that I have - for example, there is
no "MS-DOS directory"). What is the difference between these two
programs, and are there other versions of TeX in C?
2. Where can one find bibtex, the bibliography program that is
discussed in LaTeX, by Leslie Lamport?
3. Where can one find TeX device drivers?
Thanks!
Dominick Samperi
manhat!samperi at nyu.edu
samperi at acf8.nyu.edu
#!/bin/sh
# to extract, remove the header and type "sh filename"
if `test ! -s ./3b2.pat`
then
echo "writing ./3b2.pat"
cat > ./3b2.pat << '\Rogue\Monster\'
*** ../DIST/eval.c Wed May 11 20:56:57 1988
--- eval.c Thu May 5 19:24:30 1988
***************
*** 60,65
hword r;
int s;
int t;
bool ligature_present;
--- 60,66 -----
hword r;
int s;
int t;
+ int sw_val;
bool ligature_present;
***************
*** 81,87
if (tracing_commands > 0)
show_cur_cmd_chr();
! switch (abs(mode) + cur_cmd)
{
hmode(LETTER):
hmode(OTHER_CHAR):
--- 82,89 -----
if (tracing_commands > 0)
show_cur_cmd_chr();
! sw_val = abs(mode) + cur_cmd ;
! switch (sw_val)
{
hmode(LETTER):
hmode(OTHER_CHAR):
***************
*** 280,286
any_mode(REMOVE_ITEM):
delete_last();
break;
!
vmode(UN_VBOX):
hmode(UN_HBOX):
mmode(UN_HBOX):
--- 282,296 -----
any_mode(REMOVE_ITEM):
delete_last();
break;
!
! default:
! goto more_switch ;
! }
! goto end_switch ;
!
! more_switch:
! switch(sw_val)
! {
vmode(UN_VBOX):
hmode(UN_HBOX):
mmode(UN_HBOX):
***************
*** 506,511
do_extension();
break;
}
goto big_switch;
#define make_lig_disc() \
--- 516,522 -----
do_extension();
break;
}
+ end_switch:
goto big_switch;
#define make_lig_disc() \
\Rogue\Monster\
else
echo "will not over write ./3b2.pat"
fi
if `test ! -s ./xenix.pat`
then
echo "writing ./xenix.pat"
cat > ./xenix.pat << '\Rogue\Monster\'
*** ../DIST/align.c Sun Mar 13 21:53:17 1988
--- align.c Sat May 7 17:05:34 1988
***************
*** 71,77
save_cs_ptr = cur_cs;
push_alignment();
! align_state = -1000000;
if (mode == MMODE && (tail != head || incompleat_noad != NULL)) {
print_err("Improper ");
print_esc("halign");
--- 71,77 -----
save_cs_ptr = cur_cs;
push_alignment();
! align_state = -1000000L;
if (mode == MMODE && (tail != head || incompleat_noad != NULL)) {
print_err("Improper ");
print_esc("halign");
***************
*** 94,100
cur_loop = NULL;
scanner_status = ALIGNING;
warning_index = save_cs_ptr;
! align_state = -1000000;
loop {
link(cur_align) = new_param_glue(TAB_SKIP_CODE);
cur_align = link(cur_align);
--- 94,100 -----
cur_loop = NULL;
scanner_status = ALIGNING;
warning_index = save_cs_ptr;
! align_state = -1000000L;
loop {
link(cur_align) = new_param_glue(TAB_SKIP_CODE);
cur_align = link(cur_align);
***************
*** 108,114
break;
if (cur_cmd <= CAR_RET &&
cur_cmd >= TAB_MARK &&
! align_state == -1000000) {
if (p == align_tokens &&
cur_loop == NULL &&
cur_cmd == TAB_MARK) {
--- 108,114 -----
break;
if (cur_cmd <= CAR_RET &&
cur_cmd >= TAB_MARK &&
! align_state == -1000000L) {
if (p == align_tokens &&
cur_loop == NULL &&
cur_cmd == TAB_MARK) {
***************
*** 136,142
get_preamble_token();
if (cur_cmd <= CAR_RET &&
cur_cmd >= TAB_MARK &&
! align_state == -1000000)
break;
if (cur_cmd == MAC_PARAM) {
print_err("Only one # is allowed per tab");
--- 136,142 -----
get_preamble_token();
if (cur_cmd <= CAR_RET &&
cur_cmd >= TAB_MARK &&
! align_state == -1000000L)
break;
if (cur_cmd == MAC_PARAM) {
print_err("Only one # is allowed per tab");
***************
*** 184,190
align_peek ()
{
restart:
! align_state = 1000000;
get_nbx_token();
if (cur_cmd == NO_ALIGN) {
scan_left_brace();
--- 184,190 -----
align_peek ()
{
restart:
! align_state = 1000000L;
get_nbx_token();
if (cur_cmd == NO_ALIGN) {
scan_left_brace();
***************
*** 344,350
return TRUE;
init_span(p);
}
! align_state = 1000000;
get_nbx_token();
cur_align = p;
init_col();
--- 344,350 -----
return TRUE;
init_span(p);
}
! align_state = 1000000L;
get_nbx_token();
cur_align = p;
init_col();
*** ../DIST/arith.c Sun Mar 13 21:53:19 1988
--- arith.c Sat May 7 17:05:34 1988
***************
*** 52,58
delta = 10;
do {
if (delta > UNITY)
! s += 0100000 - (delta / 2);
print_char('0' + s / UNITY);
s = 10 * (s % UNITY);
delta *= 10;
--- 52,58 -----
delta = 10;
do {
if (delta > UNITY)
! s += 0100000L - (delta / 2);
print_char('0' + s / UNITY);
s = 10 * (s % UNITY);
delta *= 10;
***************
*** 71,78
}
if (n == 0)
return y;
! else if (x <= (07777777777 - y) / n &&
! -x <= (07777777777 + y) / n)
return (n * x + y);
else {
arith_error = TRUE;
--- 71,78 -----
}
if (n == 0)
return y;
! else if (x <= (07777777777L - y) / n &&
! -x <= (07777777777L + y) / n)
return (n * x + y);
else {
arith_error = TRUE;
***************
*** 128,137
negate(x);
positive = FALSE;
}
! t = (x % 0100000) * n;
! u = (x / 0100000) * n + (t / 0100000);
! v = (u % d) * 0100000 + (t % 0100000);
! if (u / d >= 0100000)
arith_error = TRUE;
else u = 0100000 * (u / d) + (v / d);
if (positive) {
--- 128,137 -----
negate(x);
positive = FALSE;
}
! t = (x % 0100000L) * n;
! u = (x / 0100000L) * n + (t / 0100000L);
! v = (u % d) * 0100000L + (t % 0100000L);
! if (u / d >= 0100000L)
arith_error = TRUE;
else u = 0100000L * (u / d) + (v / d);
if (positive) {
***************
*** 133,139
v = (u % d) * 0100000 + (t % 0100000);
if (u / d >= 0100000)
arith_error = TRUE;
! else u = 0100000 * (u / d) + (v / d);
if (positive) {
remainder = v % d;
return u;
--- 133,139 -----
v = (u % d) * 0100000L + (t % 0100000L);
if (u / d >= 0100000L)
arith_error = TRUE;
! else u = 0100000L * (u / d) + (v / d);
if (positive) {
remainder = v % d;
return u;
***************
*** 155,161
else if (s <= 0)
return INF_BAD;
else {
! if (t <= 7230584)
r = (t * 297) / s;
else if (s >= 1663497)
r = t / (s / 297);
--- 155,161 -----
else if (s <= 0)
return INF_BAD;
else {
! if (t <= 7230584L)
r = (t * 297) / s;
else if (s >= 1663497L)
r = t / (s / 297);
***************
*** 157,163
else {
if (t <= 7230584)
r = (t * 297) / s;
! else if (s >= 1663497)
r = t / (s / 297);
else r = t;
if (r > 1290)
--- 157,163 -----
else {
if (t <= 7230584L)
r = (t * 297) / s;
! else if (s >= 1663497L)
r = t / (s / 297);
else r = t;
if (r > 1290)
***************
*** 162,167
else r = t;
if (r > 1290)
return INF_BAD;
! else return ((r * r * r + 0400000) / 01000000);
}
}
--- 162,167 -----
else r = t;
if (r > 1290)
return INF_BAD;
! else return ((r * r * r + 0400000L) / 01000000L);
}
}
*** ../DIST/def.c Sun Mar 13 21:53:31 1988
--- def.c Sat May 7 17:05:37 1988
***************
*** 282,288
if (cur_chr == CAT_CODE_BASE)
n = MAX_CHAR_CODE;
else if (cur_chr == MATH_CODE_BASE)
! n = 0100000;
else if (cur_chr == SF_CODE_BASE)
n = 077777;
else if (cur_chr == DEL_CODE_BASE)
--- 282,288 -----
if (cur_chr == CAT_CODE_BASE)
n = MAX_CHAR_CODE;
else if (cur_chr == MATH_CODE_BASE)
! n = 0100000L;
else if (cur_chr == SF_CODE_BASE)
n = 077777L;
else if (cur_chr == DEL_CODE_BASE)
***************
*** 284,290
else if (cur_chr == MATH_CODE_BASE)
n = 0100000;
else if (cur_chr == SF_CODE_BASE)
! n = 077777;
else if (cur_chr == DEL_CODE_BASE)
n = 077777777;
else n = 127;
--- 284,290 -----
else if (cur_chr == MATH_CODE_BASE)
n = 0100000L;
else if (cur_chr == SF_CODE_BASE)
! n = 077777L;
else if (cur_chr == DEL_CODE_BASE)
n = 077777777L;
else n = 127;
***************
*** 286,292
else if (cur_chr == SF_CODE_BASE)
n = 077777;
else if (cur_chr == DEL_CODE_BASE)
! n = 077777777;
else n = 127;
p = cur_chr;
scan_seven_bit_int();
--- 286,292 -----
else if (cur_chr == SF_CODE_BASE)
n = 077777L;
else if (cur_chr == DEL_CODE_BASE)
! n = 077777777L;
else n = 127;
p = cur_chr;
scan_seven_bit_int();
***************
*** 675,681
if (scan_keyword("at")) {
scan_normal_dimen();
s = cur_val;
! if (s <= 0 || s >= 01000000000) {
print_err("Improper `at' size (");
print_scaled(s);
print("pt), replaced by 10pt");
--- 675,681 -----
if (scan_keyword("at")) {
scan_normal_dimen();
s = cur_val;
! if (s <= 0 || s >= 01000000000L) {
print_err("Improper `at' size (");
print_scaled(s);
print("pt), replaced by 10pt");
***************
*** 686,692
} else if (scan_keyword("scaled")) {
scan_int();
s = -cur_val;
! if (cur_val <= 0 || cur_val > 32768) {
print_err("Illegal magnification has been changed to 1000");
help_font_magnification();
int_error(cur_val);
--- 686,692 -----
} else if (scan_keyword("scaled")) {
scan_int();
s = -cur_val;
! if (cur_val <= 0 || cur_val > 32768L) {
print_err("Illegal magnification has been changed to 1000");
help_font_magnification();
int_error(cur_val);
***************
*** 690,696
print_err("Illegal magnification has been changed to 1000");
help_font_magnification();
int_error(cur_val);
! s = -1000;
}
} else {
s = -1000;
--- 690,696 -----
print_err("Illegal magnification has been changed to 1000");
help_font_magnification();
int_error(cur_val);
! s = -1000L;
}
} else {
s = -1000L;
***************
*** 693,699
s = -1000;
}
} else {
! s = -1000;
}
name_in_progress = FALSE;
for (f = FONT_BASE + 1; f <= font_ptr; f++) {
--- 693,699 -----
s = -1000L;
}
} else {
! s = -1000L;
}
name_in_progress = FALSE;
for (f = FONT_BASE + 1; f <= font_ptr; f++) {
***************
*** 726,732
int_error(mag_set);
geq_word_define((ptr) INT_BASE + MAG_CODE, mag_set);
}
! if (mag <= 0 || mag > 32768) {
print_err("Illegal magnification has been changed to 1000");
help_ill_mag();
int_error(mag);
--- 726,732 -----
int_error(mag_set);
geq_word_define((ptr) INT_BASE + MAG_CODE, mag_set);
}
! if (mag <= 0 || mag > 32768L) {
print_err("Illegal magnification has been changed to 1000");
help_ill_mag();
int_error(mag);
*** ../DIST/dvi.c Sun Mar 13 21:53:34 1988
--- dvi.c Sat May 7 17:05:38 1988
***************
*** 73,79
val x;
{
if (x >= 0) {
! dvi_out(x / 0100000000);
} else {
x += 010000000000;
x += 010000000000;
--- 73,79 -----
val x;
{
if (x >= 0) {
! dvi_out(x / 0100000000L);
} else {
x += 010000000000L;
x += 010000000000L;
***************
*** 75,83
if (x >= 0) {
dvi_out(x / 0100000000);
} else {
! x += 010000000000;
! x += 010000000000;
! dvi_out(x / 0100000000 + 128);
}
x %= 01000000000;
dvi_out(x / 0200000);
--- 75,83 -----
if (x >= 0) {
dvi_out(x / 0100000000L);
} else {
! x += 010000000000L;
! x += 010000000000L;
! dvi_out(x / 0100000000L + 128);
}
x %= 01000000000L;
dvi_out(x / 0200000L);
***************
*** 79,87
x += 010000000000;
dvi_out(x / 0100000000 + 128);
}
! x %= 01000000000;
! dvi_out(x / 0200000);
! x %= 0200000;
dvi_out(x / 0400);
dvi_out(x % 0400);
}
--- 79,87 -----
x += 010000000000L;
dvi_out(x / 0100000000L + 128);
}
! x %= 01000000000L;
! dvi_out(x / 0200000L);
! x %= 0200000L;
dvi_out(x / 0400);
dvi_out(x % 0400);
}
***************
*** 211,217
not_found:
info(q) = YZ_OK;
! if (abs(w) >= 040000000) {
dvi_out(o + 3);
dvi_four(w);
return;
--- 211,217 -----
not_found:
info(q) = YZ_OK;
! if (abs(w) >= 040000000L) {
dvi_out(o + 3);
dvi_four(w);
return;
***************
*** 216,222
dvi_four(w);
return;
}
! if (abs(w) >= 0100000) {
dvi_out(o + 2);
if (w < 0)
w += 0100000000;
--- 216,222 -----
dvi_four(w);
return;
}
! if (abs(w) >= 0100000L) {
dvi_out(o + 2);
if (w < 0)
w += 0100000000L;
***************
*** 219,228
if (abs(w) >= 0100000) {
dvi_out(o + 2);
if (w < 0)
! w += 0100000000;
! dvi_out(w / 0200000);
! w %= 0200000;
! goto two;
}
if (abs(w) >= 0200) {
dvi_out(o + 1);
--- 219,228 -----
if (abs(w) >= 0100000L) {
dvi_out(o + 2);
if (w < 0)
! w += 0100000000L;
! dvi_out(w / 0200000L);
! w %= 0200000L;
! goto two;
}
if (abs(w) >= 0200) {
dvi_out(o + 1);
***************
*** 227,233
if (abs(w) >= 0200) {
dvi_out(o + 1);
if (w < 0)
! w += 0200000;
goto two;
}
dvi_out(o);
--- 227,233 -----
if (abs(w) >= 0200) {
dvi_out(o + 1);
if (w < 0)
! w += 0200000L;
goto two;
}
dvi_out(o);
***************
*** 774,781
dvi_out(PRE);
dvi_out(ID_BYTE);
! dvi_four(25400000);
! dvi_four(473628672);
prepare_mag();
dvi_four(mag);
old_setting = selector;
--- 774,781 -----
dvi_out(PRE);
dvi_out(ID_BYTE);
! dvi_four(25400000L);
! dvi_four(473628672L);
prepare_mag();
dvi_four(mag);
old_setting = selector;
***************
*** 816,823
dvi_out(POST);
dvi_four(last_bop);
last_bop = dvi_offset + dvi_ptr - 5;
! dvi_four(25400000);
! dvi_four(473628672);
prepare_mag();
dvi_four(mag);
dvi_four(max_v);
--- 816,823 -----
dvi_out(POST);
dvi_four(last_bop);
last_bop = dvi_offset + dvi_ptr - 5;
! dvi_four(25400000L);
! dvi_four(473628672L);
prepare_mag();
dvi_four(mag);
dvi_four(max_v);
*** ../DIST/error.c Sun Mar 13 21:53:39 1988
--- error.c Sat May 7 17:05:39 1988
***************
*** 91,97
s2 = cur_cmd;
s3 = cur_chr;
s4 = align_state;
! align_state = 1000000;
OK_to_interrupt = FALSE;
if (last > first + 1 &&
buffer[first + 1] >= '0' &&
--- 91,97 -----
s2 = cur_cmd;
s3 = cur_chr;
s4 = align_state;
! align_state = 1000000L;
OK_to_interrupt = FALSE;
if (last > first + 1 &&
buffer[first + 1] >= '0' &&
*** ../DIST/eval.c Sun Mar 13 21:53:41 1988
--- eval.c Sat May 7 17:05:40 1988
***************
*** 378,384
mmode(DELIM_NUM):
scan_twenty_seven_bit_int();
! set_math_char((hword) (cur_val / 010000));
break;
mmode(MATH_COMP):
--- 378,384 -----
mmode(DELIM_NUM):
scan_twenty_seven_bit_int();
! set_math_char((hword) (cur_val / 010000L));
break;
mmode(MATH_COMP):
***************
*** 689,695
tail_append(new_null_box());
width(tail) = hsize;
tail_append(new_glue(fill_glue));
! tail_append(new_penalty(-010000000000));
build_page();
}
return FALSE;
--- 689,695 -----
tail_append(new_null_box());
width(tail) = hsize;
tail_append(new_glue(fill_glue));
! tail_append(new_penalty(-010000000000L));
build_page();
}
return FALSE;
*** ../DIST/heap.c Sun Mar 13 21:53:51 1988
--- heap.c Sat May 7 17:05:42 1988
***************
*** 90,96
node_size(p) = q - p;
p = rlink(p);
} while (p != rover);
! if (s == 010000000000)
return MAX_HALFWORD;
if (lo_mem_max + 2 < hi_mem_min &&
lo_mem_max + 2 <= MEM_BOT + MAX_HALFWORD) {
--- 90,96 -----
node_size(p) = q - p;
p = rlink(p);
} while (p != rover);
! if (s == 010000000000L)
return MAX_HALFWORD;
if (lo_mem_max + 2 < hi_mem_min &&
lo_mem_max + 2 <= MEM_BOT + MAX_HALFWORD) {
***************
*** 204,210
ptr old_rover;
#ifdef INIT
! get_node(010000000000);
p = rlink(rover);
rlink(rover) = MAX_HALFWORD;
old_rover = rover;
--- 204,210 -----
ptr old_rover;
#ifdef INIT
! get_node(010000000000L);
p = rlink(rover);
rlink(rover) = MAX_HALFWORD;
old_rover = rover;
*** ../DIST/mathlists.c Sun Mar 13 21:53:59 1988
--- mathlists.c Sat May 7 17:05:45 1988
***************
*** 174,180
scan_math (p)
ptr p;
{
! int c;
restart:
get_nbrx_token();
--- 174,180 -----
scan_math (p)
ptr p;
{
! unsigned int c;
restart:
get_nbrx_token();
***************
*** 238,244
}
set_math_char (c)
! int c;
{
ptr p;
--- 238,244 -----
}
set_math_char (c)
! unsigned int c;
{
ptr p;
*** ../DIST/page.c Sun Mar 13 21:54:07 1988
--- page.c Sat May 7 17:05:48 1988
***************
*** 227,233
c = b + pi + insert_penalties;
else c = DEPLORABLE;
} else c = b;
! if (insert_penalties >= 10000) c = AWFUL_BAD;
if (tracing_pages > 0)
show_page_stats(b, pi, c);
if (c <= least_page_cost) {
--- 227,233 -----
c = b + pi + insert_penalties;
else c = DEPLORABLE;
} else c = b;
! if (insert_penalties >= 10000L) c = AWFUL_BAD;
if (tracing_pages > 0)
show_page_stats(b, pi, c);
if (c <= least_page_cost) {
*** ../DIST/par.c Sun Mar 13 21:54:08 1988
--- par.c Sat May 7 17:05:49 1988
***************
*** 504,510
b = 0;
fit_class = DECENT_FIT;
} else {
! if (shortfall > 7230584 && cur_active_width[2] < 1663497) {
b = INF_BAD;
fit_class = VERY_LOOSE_FIT;
goto done;
--- 504,510 -----
b = 0;
fit_class = DECENT_FIT;
} else {
! if (shortfall > 7230584L && cur_active_width[2] < 1663497L) {
b = INF_BAD;
fit_class = VERY_LOOSE_FIT;
goto done;
*** ../DIST/print.c Sun Mar 13 21:54:09 1988
--- print.c Sat May 7 17:05:50 1988
***************
*** 229,235
k = 0;
if (n < 0) {
print_char('-');
! if (n > -100000000) {
negate(n);
} else {
m = -1 - n;
--- 229,235 -----
k = 0;
if (n < 0) {
print_char('-');
! if (n > -100000000L) {
negate(n);
} else {
m = -1 - n;
*** ../DIST/scan.c Sun Mar 13 21:54:14 1988
--- scan.c Sat May 7 17:05:51 1988
***************
*** 376,382
scan_fifteen_bit_int ()
{
scan_int();
! if (cur_val < 0 || cur_val > 077777) {
print_err("Bad math code");
help_mathchar();
int_error(cur_val);
--- 376,382 -----
scan_fifteen_bit_int ()
{
scan_int();
! if (cur_val < 0 || cur_val > 077777L) {
print_err("Bad math code");
help_mathchar();
int_error(cur_val);
***************
*** 387,393
scan_twenty_seven_bit_int ()
{
scan_int();
! if (cur_val < 0 || cur_val> 0777777777) {
print_err("Bad delimiter code");
help_del();
int_error(cur_val);
--- 387,393 -----
scan_twenty_seven_bit_int ()
{
scan_int();
! if (cur_val < 0 || cur_val> 0777777777L) {
print_err("Bad delimiter code");
help_del();
int_error(cur_val);
***************
*** 437,443
scan_something_internal(INT_VAL, FALSE);
} else {
radix = 10;
! m = 214748364;
if (cur_tok == OCTAL_TOKEN) {
radix = 8;
m = 02000000000;
--- 437,443 -----
scan_something_internal(INT_VAL, FALSE);
} else {
radix = 10;
! m = 214748364L;
if (cur_tok == OCTAL_TOKEN) {
radix = 8;
m = 02000000000L;
***************
*** 440,446
m = 214748364;
if (cur_tok == OCTAL_TOKEN) {
radix = 8;
! m = 02000000000;
get_x_token();
} else if (cur_tok == HEX_TOKEN) {
radix = 16;
--- 440,446 -----
m = 214748364L;
if (cur_tok == OCTAL_TOKEN) {
radix = 8;
! m = 02000000000L;
get_x_token();
} else if (cur_tok == HEX_TOKEN) {
radix = 16;
***************
*** 444,450
get_x_token();
} else if (cur_tok == HEX_TOKEN) {
radix = 16;
! m = 010000000000;
get_x_token();
}
vacuous = TRUE;
--- 444,450 -----
get_x_token();
} else if (cur_tok == HEX_TOKEN) {
radix = 16;
! m = 010000000000L;
get_x_token();
}
vacuous = TRUE;
***************
*** 618,626
prepare_mag();
if (mag != 1000) {
cur_val = xn_over_d(cur_val, 1000L, mag);
! f = (1000 * f + 0200000 * remainder) / mag;
! cur_val += f / 0200000;
! f %= 0200000;
}
}
if (scan_keyword("pt"))
--- 618,626 -----
prepare_mag();
if (mag != 1000) {
cur_val = xn_over_d(cur_val, 1000L, mag);
! f = (1000 * f + 0200000L * remainder) / mag;
! cur_val += f / 0200000L;
! f %= 0200000L;
}
}
if (scan_keyword("pt"))
***************
*** 641,649
goto attach_fraction;
}
cur_val = xn_over_d(cur_val, num, denom);
! f = (num * f + 0200000 * remainder) / denom;
! cur_val += f / 0200000;
! f %= 0200000;
attach_fraction:
if (cur_val >= 0400000)
--- 641,649 -----
goto attach_fraction;
}
cur_val = xn_over_d(cur_val, num, denom);
! f = (num * f + 0200000L * remainder) / denom;
! cur_val += f / 0200000L;
! f %= 0200000L;
attach_fraction:
if (cur_val >= 0400000L)
***************
*** 646,652
f %= 0200000;
attach_fraction:
! if (cur_val >= 0400000)
arith_error = TRUE;
else cur_val = cur_val * UNITY + f;
--- 646,652 -----
f %= 0200000L;
attach_fraction:
! if (cur_val >= 0400000L)
arith_error = TRUE;
else cur_val = cur_val * UNITY + f;
***************
*** 654,660
scan_optional_space();
attach_sign:
! if (arith_error || abs(cur_val) >= 010000000000) {
print_err("Dimension too large");
help_big_dimen();
error();
--- 654,660 -----
scan_optional_space();
attach_sign:
! if (arith_error || abs(cur_val) >= 010000000000L) {
print_err("Dimension too large");
help_big_dimen();
error();
*** ../DIST/tex.c Sun Mar 13 21:54:15 1988
--- tex.c Sat May 7 17:05:55 1988
***************
*** 27,33
#include "page.h"
char banner[] = "This is Common TeX, Version 2.9";
! int ready_already;
main (argc, argv)
int argc;
--- 27,33 -----
#include "page.h"
char banner[] = "This is Common TeX, Version 2.9";
! long ready_already;
main (argc, argv)
int argc;
***************
*** 50,56
first = 1;
state = NEW_LINE;
start = 1;
! if (ready_already != 314159)
initialize();
ready_already = 314159;
print(banner);
--- 50,56 -----
first = 1;
state = NEW_LINE;
start = 1;
! if (ready_already != 314159L)
initialize();
ready_already = 314159L;
print(banner);
***************
*** 52,58
start = 1;
if (ready_already != 314159)
initialize();
! ready_already = 314159;
print(banner);
selector = TERM_ONLY;
if (format_ident == 0)
--- 52,58 -----
start = 1;
if (ready_already != 314159L)
initialize();
! ready_already = 314159L;
print(banner);
selector = TERM_ONLY;
if (format_ident == 0)
***************
*** 160,166
#undef time
begintime()
{
! return (time(0));
}
final_cleanup ()
--- 160,166 -----
#undef time
begintime()
{
! return (time((long *)0));
}
final_cleanup ()
***************
*** 340,346
char* envedit;
int old_setting;
char edit[FILE_NAME_SIZE + 17];
! char* texedit = "/usr/ucb/vi +%d %s &";
val getenv();
if ((envedit = (char*) getenv("TEXEDIT")) != NULL)
--- 340,346 -----
char* envedit;
int old_setting;
char edit[FILE_NAME_SIZE + 17];
! char* texedit = "/bin/vi +%d %s &";
val getenv();
if ((envedit = (char*) getenv("TEXEDIT")) != NULL)
*** ../DIST/texext.c Sun Mar 13 21:54:16 1988
--- texext.c Sat May 7 17:05:55 1988
***************
*** 309,315
selector = LOG_ONLY;
print_nl("");
}
! show_token_list(token_link(def_ref), NULL, 10000000);
print_ln();
flush_list(def_ref);
selector = old_setting;
--- 309,315 -----
selector = LOG_ONLY;
print_nl("");
}
! show_token_list(token_link(def_ref), NULL, 10000000L);
print_ln();
flush_list(def_ref);
selector = old_setting;
*** ../DIST/tfm.c Sun Mar 13 21:54:20 1988
--- tfm.c Sat May 7 17:05:56 1988
***************
*** 228,234
* Read box dimensions
*/
alpha = 16;
! while (z >= 040000000) {
z >>= 1;
alpha <<= 1;
}
--- 228,234 -----
* Read box dimensions
*/
alpha = 16;
! while (z >= 040000000L) {
z >>= 1;
alpha <<= 1;
}
*** ../DIST/token.c Sun Mar 13 21:54:23 1988
--- token.c Sat May 7 17:05:56 1988
***************
*** 347,353
if (cur_cmd == OMIT)
begin_token_list(omit_template, (qword) V_TEMPLATE);
else begin_token_list((ptr) v_part(cur_align), (qword) V_TEMPLATE);
! align_state = 1000000;
goto restart;
}
}
--- 347,353 -----
if (cur_cmd == OMIT)
begin_token_list(omit_template, (qword) V_TEMPLATE);
else begin_token_list((ptr) v_part(cur_align), (qword) V_TEMPLATE);
! align_state = 1000000L;
goto restart;
}
}
***************
*** 398,404
p = new_token();
token_link(p) = q;
token(p) = CS_TOKEN_FLAG + FROZEN_CR;
! align_state = -1000000;
break;
case ABSORBING:
--- 398,404 -----
p = new_token();
token_link(p) = q;
token(p) = CS_TOKEN_FLAG + FROZEN_CR;
! align_state = -1000000L;
break;
case ABSORBING:
*** ../DIST/tokenlists.c Sun Mar 13 21:54:26 1988
--- tokenlists.c Sat May 7 17:05:57 1988
***************
*** 310,316
m = 16;
else m = n;
s = align_state;
! align_state = 1000000;
do {
begin_file_reading();
name = m + 1;
--- 310,316 -----
m = 16;
else m = n;
s = align_state;
! align_state = 1000000L;
do {
begin_file_reading();
name = m + 1;
***************
*** 339,345
if (!input_ln(read_file[m], TRUE)) {
a_close(read_file[m]);
read_open[m] = CLOSED;
! if (align_state != 1000000) {
runaway();
print_err("File ended within ");
print_esc("read");
--- 339,345 -----
if (!input_ln(read_file[m], TRUE)) {
a_close(read_file[m]);
read_open[m] = CLOSED;
! if (align_state != 1000000L) {
runaway();
print_err("File ended within ");
print_esc("read");
***************
*** 344,350
print_err("File ended within ");
print_esc("read");
help_read();
! align_state = 1000000;
error();
}
}
--- 344,350 -----
print_err("File ended within ");
print_esc("read");
help_read();
! align_state = 1000000L;
error();
}
}
***************
*** 363,369
store_new_token(cur_tok);
}
end_file_reading();
! } while (align_state != 1000000);
cur_val = def_ref;
scanner_status = NORMAL;
align_state = s;
--- 363,369 -----
store_new_token(cur_tok);
}
end_file_reading();
! } while (align_state != 1000000L);
cur_val = def_ref;
scanner_status = NORMAL;
align_state = s;
*** ../DIST/tokenstack.c Sun Mar 13 21:54:27 1988
--- tokenstack.c Sat May 7 17:05:57 1988
***************
*** 32,38
ptr param_ptr;
ptr max_param_stack;
! val align_state = 1000000;
ptr base_ptr;
ptr def_ref;
ptr warning_index;
--- 32,38 -----
ptr param_ptr;
ptr max_param_stack;
! val align_state = 1000000L;
ptr base_ptr;
ptr def_ref;
ptr warning_index;
***************
*** 229,235
{l = tally; \
tally = 0; \
selector = PSEUDO; \
! trick_count = 1000000;}
show_context ()
{
--- 229,235 -----
{l = tally; \
tally = 0; \
selector = PSEUDO; \
! trick_count = 1000000L;}
show_context ()
{
***************
*** 355,362
}
begin_pseudoprint();
if (token_type < MACRO)
! show_token_list(start, loc, 100000);
! else show_token_list(token_link(start), loc, 100000);
}
selector = old_setting;
if (trick_count == 1000000)
--- 355,362 -----
}
begin_pseudoprint();
if (token_type < MACRO)
! show_token_list(start, loc, 100000L);
! else show_token_list(token_link(start), loc, 100000L);
}
selector = old_setting;
if (trick_count == 1000000L)
***************
*** 359,365
else show_token_list(token_link(start), loc, 100000);
}
selector = old_setting;
! if (trick_count == 1000000)
set_trick_count();
if (tally < trick_count)
m = tally - first_count;
--- 359,365 -----
else show_token_list(token_link(start), loc, 100000L);
}
selector = old_setting;
! if (trick_count == 1000000L)
set_trick_count();
if (tally < trick_count)
m = tally - first_count;
*** ../DIST/arith.h Sun Mar 13 21:53:19 1988
--- arith.h Sat May 7 17:05:58 1988
***************
*** 10,17
*
*/
! #define UNITY 0200000
! #define TWO 0400000
val half();
scal round_decimals();
--- 10,17 -----
*
*/
! #define UNITY 0200000L
! #define TWO 0400000L
val half();
scal round_decimals();
*** ../DIST/box.h Sun Mar 13 21:53:20 1988
--- box.h Sat May 7 17:05:58 1988
***************
*** 46,52
#define RULE_NODE 2
#define RULE_NODE_SIZE 4
! #define NULL_FLAG -010000000000
#define is_running(R) (R == NULL_FLAG)
#define INS_NODE 3
--- 46,52 -----
#define RULE_NODE 2
#define RULE_NODE_SIZE 4
! #define NULL_FLAG -010000000000L
#define is_running(R) (R == NULL_FLAG)
#define INS_NODE 3
*** ../DIST/boxlists.h Sun Mar 13 21:53:23 1988
--- boxlists.h Sat May 7 17:05:58 1988
***************
*** 33,41
int box_end();
! #define BOX_FLAG 010000000000
! #define SHIP_OUT_FLAG (BOX_FLAG + 512)
! #define LEADER_FLAG (BOX_FLAG + 513)
#define BOX_CODE 0
#define COPY_CODE 1
#define LAST_BOX_CODE 2
--- 33,41 -----
int box_end();
! #define BOX_FLAG 010000000000L
! #define SHIP_OUT_FLAG (BOX_FLAG + 512L)
! #define LEADER_FLAG (BOX_FLAG + 513L)
#define BOX_CODE 0
#define COPY_CODE 1
#define LAST_BOX_CODE 2
*** ../DIST/evalstack.h Sun Mar 13 21:53:42 1988
--- evalstack.h Sat May 7 17:06:00 1988
***************
*** 18,24
int pop_nest();
int print_mode();
! #define IGNORE_DEPTH -65536000
typedef struct
{
--- 18,24 -----
int pop_nest();
int print_mode();
! #define IGNORE_DEPTH -65536000L
typedef struct
{
*** ../DIST/file.h Sun Mar 13 21:53:48 1988
--- file.h Sat May 7 17:06:00 1988
***************
*** 68,76
int set_paths();
! #define default_font_path "."
! #define default_format_path "."
! #define default_input_path "."
#define NO_FILE_PATH 0
#define INPUT_FILE_PATH 1
--- 68,76 -----
int set_paths();
! #define default_font_path "/usr/local/lib/tex/fonts"
! #define default_format_path "/usr/local/lib/tex/formats"
! #define default_input_path "/usr/local/lib/tex/inputs"
#define NO_FILE_PATH 0
#define INPUT_FILE_PATH 1
*** ../DIST/math.h Sun Mar 13 21:53:56 1988
--- math.h Sat May 7 17:06:03 1988
***************
*** 66,72
#define RADICAL_NOAD_SIZE 5
#define FRACTION_NOAD (RADICAL_NOAD + 1)
#define FRACTION_NOAD_SIZE 6
! #define DEFAULT_CODE 010000000000
#define thickness width
#define numerator supscr
#define denominator subscr
--- 66,72 -----
#define RADICAL_NOAD_SIZE 5
#define FRACTION_NOAD (RADICAL_NOAD + 1)
#define FRACTION_NOAD_SIZE 6
! #define DEFAULT_CODE 010000000000L
#define thickness width
#define numerator supscr
#define denominator subscr
*** ../DIST/page.h Sun Mar 13 21:54:07 1988
--- page.h Sat May 7 17:06:04 1988
***************
*** 18,24
ptr prune_page_top();
global scal best_height_plus_depth;
! #define DEPLORABLE 100000
ptr vert_break();
ptr vsplit();
--- 18,24 -----
ptr prune_page_top();
global scal best_height_plus_depth;
! #define DEPLORABLE 100000L
ptr vert_break();
ptr vsplit();
*** ../DIST/par.h Sun Mar 13 21:54:08 1988
--- par.h Sat May 7 17:06:04 1988
***************
*** 59,65
int try_break();
! #define AWFUL_BAD 07777777777
global val minimal_demerits[];
global val minimum_demerits;
--- 59,65 -----
int try_break();
! #define AWFUL_BAD 07777777777L
global val minimal_demerits[];
global val minimum_demerits;
*** ../DIST/scan.h Sun Mar 13 21:54:15 1988
--- scan.h Sat May 7 17:06:05 1988
***************
*** 34,40
int scan_twenty_seven_bit_int();
int scan_int();
! #define INFINITY 017777777777
global int radix;
--- 34,40 -----
int scan_twenty_seven_bit_int();
int scan_int();
! #define INFINITY 017777777777L
global int radix;
***************
*** 50,56
#define EURO_POINT_TOKEN (OTHER_TOKEN + ',')
int scan_dimen();
! #define MAX_DIMEN 07777777777
#define scan_normal_dimen() scan_dimen(FALSE, FALSE, FALSE)
--- 50,56 -----
#define EURO_POINT_TOKEN (OTHER_TOKEN + ',')
int scan_dimen();
! #define MAX_DIMEN 07777777777L
#define scan_normal_dimen() scan_dimen(FALSE, FALSE, FALSE)
*** ../DIST/tex.h Sun Mar 13 21:54:16 1988
--- tex.h Sat May 7 17:06:05 1988
***************
*** 106,112
#define TOK_MAX TOK_TOP
#else
#define MEM_MIN 0
! #define MEM_MAX 35000
#define TOK_MIN 0
#define TOK_MAX 35000
#endif
--- 106,112 -----
#define TOK_MAX TOK_TOP
#else
#define MEM_MIN 0
! #define MEM_MAX 32000
#define TOK_MIN 0
#define TOK_MAX 32000
#endif
***************
*** 108,114
#define MEM_MIN 0
#define MEM_MAX 35000
#define TOK_MIN 0
! #define TOK_MAX 35000
#endif
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
--- 108,114 -----
#define MEM_MIN 0
#define MEM_MAX 32000
#define TOK_MIN 0
! #define TOK_MAX 32000
#endif
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
***************
*** 113,119
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
! #define MAX_HALFWORD 65535
#endif
/*
--- 113,119 -----
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
! #define MAX_HALFWORD ((unsigned)65535)
#endif
/*
***************
*** 173,179
*/
global char banner[];
! global int ready_already;
/*
* functions in the outer block
--- 173,179 -----
*/
global char banner[];
! global long ready_already;
/*
* functions in the outer block
\Rogue\Monster\
else
echo "will not over write ./xenix.pat"
fi
echo "Finished archive 1 of 1"
exit
--
Dominick Samperi, Manhattan College, NYC
manhat!samperi at NYU.EDU ihnp4!rutgers!nyu.edu!manhat!samperi
philabs!cmcl2!manhat!samperi ihnp4!rutgers!hombre!samperi
(^ that's an ell) uunet!swlabs!mancol!samperi
More information about the Comp.unix.xenix
mailing list