summaryrefslogtreecommitdiff
path: root/Build/source/extra/bibtex/bibtex.cms-changes
blob: 5e7cdd7549e0fd1ea3ba8d6488bd1e38ef8fb64b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
This is BIBTEX.CMS-CHANGES in text format, as of June 9, 1988.

BIBTEX change file for VM/CMS and MVS.
Created by Nhut Nguyen, IBM Japan. Ltd., Tokyo, Japan. (1986).


Mar 14, 1986               made it working
Mar 14, 1986               changed filetype of the log file to BIBLOG
Mar 14, 1986               eliminate the prompt for input file
Jul 14, 1986               made the initialize routine shorter, to avoid
                           overflow during compilation
Jul 30, 1986 Alan Spragens broke up |x_format_name| procedure; changed
                           extensions on aux and bbl files; cleaned up
                           VM/CMS declarations and procedures at end
Oct 29, 1986 Agnes Hsu     leave extensions on aux, bib, and bst as in
                           Web; add '.*' extension before opening those
                           files
June 9, 1988 Dean Guenther Removed a few unecessary changes and did
                           some others for version .99
                           Note that all tabs (x'05') in BIBTEX.WEB
                           were replaced by two blanks (x'4040').

@x banner line
@d banner=='This is BibTeX, Version 0.99c' {printed when the program starts}
@y
@d banner=='This is BibTeX, VM/CMS Version 0.99c'
@z

@x term
@d term_out == tty
@d term_in == tty
@y
@d term_in==tty_in
@d term_out==tty_out
@z

@x otherwise
@d othercases == others:  {default for cases not listed explicitly}
@y
@d othercases == otherwise {default for cases not listed explicitly}
@z

@x
begin
initialize;
print_ln(banner);@/
@y
begin
  termin(term_in); termout(term_out);
  initialize;
  print_ln(banner);@/
@z

@x compiler directives
@{@&$C-,A+,D-@}   {no range check, catch arithmetic overflow, no debug overhead}
@!debug @{@&$C+,D+@}@+ gubed    {but turn everything on when debugging}
@y
{It seems impossible to turn CHECK and DEBUG on and off easily given
 how Tangle and VS/PASCAL work}
@z

@x
@!ASCII_code=0..127;  {seven-bit numbers}
@y
@!ASCII_code=packed 0..127; {seven-bit numbers}
@z

@x
@d last_text_char=127  {ordinal number of the largest element of |text_char|}
@y
@d last_text_char=255 {ordinal number of the largest element of |text_char|}
@d ccat==@=||@>
@z

@x
@!alpha_file=packed file of text_char;  {files that contain textual data}
@y
@!alpha_file=text; {files that contain textual data}
@z

@x
function erstat(var f:file):integer; extern;  {in the runtime library}
@#@t\2@>
@y
@z

@x
begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
@y
begin okstatus; pack_file_name;
  reset(f,'NAME='ccat trim(str(name_of_file)));
  a_open_in:=status;
@z

@x
begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
@y
begin okstatus; pack_file_name;
  rewrite(f,'NAME='ccat trim(str(name_of_file)));
  a_open_out:=status;
@z


@x
function input_ln(var f:alpha_file) : boolean;
@y
@<VM/CMS stuff@>
@#
function input_ln(var f:alpha_file) : boolean;
@z

@x
while (p_ptr < str_start[file_name+1]) do
    begin
    name_of_file[name_ptr] := chr (str_pool[p_ptr]);
@y
while (p_ptr < str_start[file_name+1]) do
    begin
    name_of_file[name_ptr] := xchr[str_pool[p_ptr]];
@z

@x
while (p_ptr < str_start[ext+1]) do
    begin
    name_of_file[name_ptr] := chr (str_pool[p_ptr]);
    incr(name_ptr); incr(p_ptr);
@y
while (p_ptr < str_start[ext+1]) do
    begin
    name_of_file[name_ptr] := xchr[str_pool[p_ptr]];
    incr(name_ptr); incr(p_ptr);
@z

@x
p_ptr := str_start[area];
while (p_ptr < str_start[area+1]) do
    begin
    name_of_file[name_ptr] := chr (str_pool[p_ptr]);
    incr(name_ptr); incr(p_ptr);
@y
p_ptr := str_start[area];
while (p_ptr < str_start[area+1]) do
    begin
    name_of_file[name_ptr] := xchr[str_pool[p_ptr]];
    incr(name_ptr); incr(p_ptr);
@z

@x
@!s_bst_area : str_number;  {\.{texinputs:}}
@y
@!s_aux_area : str_number; {\.{.*}}
@!s_bst_area : str_number; {\.{texinputs:}}
@z

@x
pre_define('.blg        ',4,file_ext_ilk);
s_log_extension := hash_text[pre_def_loc];
pre_define('.bst        ',4,file_ext_ilk);
s_bst_extension := hash_text[pre_def_loc];
pre_define('.bib        ',4,file_ext_ilk);
s_bib_extension := hash_text[pre_def_loc];
pre_define('texinputs:  ',10,file_area_ilk);
s_bst_area := hash_text[pre_def_loc];
pre_define('texbib:     ',7,file_area_ilk);
s_bib_area := hash_text[pre_def_loc];
@y
pre_define('.biblog     ',7,file_ext_ilk);
s_log_extension := hash_text[pre_def_loc];
pre_define('.bst        ',4,file_ext_ilk);
s_bst_extension := hash_text[pre_def_loc];
pre_define('.bib        ',4,file_ext_ilk);
s_bib_extension := hash_text[pre_def_loc];
pre_define('.*          ',2,file_area_ilk);
s_aux_area := hash_text[pre_def_loc];
pre_define('.*          ',2,file_area_ilk);
s_bst_area := hash_text[pre_def_loc];
pre_define('.*          ',2,file_area_ilk);
s_bib_area := hash_text[pre_def_loc];
@z

@x
  write (term_out,'Please type input file name (no extension)--');
  if (eoln(term_in)) then      {so the first |read| works}
      read_ln (term_in);
@y
    get (term_in) ; {so the first |get| works to clear EOL}
@z



@x    At line 2563
@<Add extensions and open files@>=
begin
name_length := aux_name_length;    {set to last used position}
add_extension (s_aux_extension);   {this also sets |name_length|}
@y
@<Add extensions and open files@>=
begin
name_length := aux_name_length;  {set to last used position}
add_extension (s_aux_extension);  {this also sets |name_length|}
add_extension (s_aux_area);  {this also sets |name_length|}
@z

@x
add_extension (s_bib_extension);
@y
add_extension (s_bib_extension);
add_extension (s_bib_area);
@z

@x
add_extension (s_bst_extension);
@y
add_extension (s_bst_extension);
add_extension (s_bst_area);
@z

@x
This section should be replaced, if necessary, by changes to the program
that are necessary to make \BibTeX\ work at a particular installation.
It is usually best to design your change file so that all changes to
previous sections preserve the section numbering; then everybody's version
will be consistent with the printed program. More extensive changes,
which introduce new sections, can be inserted here; then only the index
itself will get a new section number.

@y
This section contains procedures particular to VM/CMS.

@ Here are extra global variables for VM/CMS routines
@<Glob...@>=

@!status: boolean; {did the last |reset| or |rewrite| succede?}

@!tty_in, tty_out: text;
@ @<VM/CMS...@>=
procedure okstatus; begin status:=true; end;
procedure pack_file_name;
var buff : packed array[1..file_name_size] of char;
    i, j : 1..file_name_size;
begin  j := 1;
  for i := 1 to file_name_size do buff[i] := ' ';
  for i := 1 to file_name_size do
  begin
    if name_of_file[i] <> ' ' then
    begin
      buff[j] := name_of_file[i];
      incr(j);
    end;
  end;
  for i := 1 to file_name_size do name_of_file[i] := buff[i];
end;
@z