Debian Codegraph @

ibmpc/dos/README

raw
1 %% /u/sy/beebe/tex/bibclean/2-11/ibmpc/dos/README, Thu May 2 08:18:01 1996
2 %% Edit by Nelson H. F. Beebe <[email protected]>
3
4 ===============================
5 bibclean for IBM PC DOS systems
6 ===============================
7
8 %% Author:
9 %% Nelson H. F. Beebe
10 %% Center for Scientific Computing
11 %% Department of Mathematics
12 %% University of Utah
13 %% Salt Lake City, UT 84112
14 %% USA
15 %% Email: [email protected] (Internet)
16 %% WWW URL: http://www.math.utah.edu/~beebe
17
18
19 ====
20 NEWS
21 ====
22
23 Several pre-compiled versions of bibclean for the IBM PC DOS
24 environment are provided with this release, so most users will only
25 have to copy the bibclean.exe file and the bibclean.ini file into some
26 directory listed in the PATH variable. See the ``Doing it Yourself''
27 section below for details on building bibclean.
28
29 Here are the file sizes of the bibclean executables on the Intel
30 architecture, sorted from smallest to largest:
31
32 71684 May 1 20:25 ./linux/bibclean (stripped)
33 112238 May 2 08:07 ./dos/wat10/wcc386/bibclean.exe
34 113514 May 2 08:11 ./dos/wat10/wpp386/bibclean.exe
35 133563 May 2 07:52 ./dos/msc6p0/bibclean.exe
36 133604 May 2 08:03 ./dos/wat10/wcc/bibclean.exe
37 152883 May 2 07:48 ./dos/msc5p1/bibclean.exe
38 156860 May 2 07:58 ./dos/tcc3p0/bibclean.exe
39 157004 May 2 07:25 ./dos/tpp3p0/bibclean.exe
40 157785 May 2 07:56 ./dos/tcc2p0/bibclean.exe
41 211679 May 1 20:25 ./linux/bibclean (not stripped)
42
43 For O/S-independent changes in bibclean, see the top-level ChangeLog
44 file.
45
46 One of the changes in this release for IBM PC DOS systems is the use
47 of binary input mode for the BibTeX input files, making it possible
48 for Ctl-Z to be treated as a regular character. It is no longer
49 necessary, as it was in previous releases of bibclean for the IBM PC,
50 to remove the test line in testbib1.org, in order to get all of the
51 tests to pass.
52
53 Occasionally, the error file will contain blank lines between
54 messages. The reason for this is that check_inodes() in chek.c sets
55 the variable stdlog_on_stdout by trying to figure out if the log file
56 is different from the normal output file. When that variable is set
57 to YES, warnings are prefixed by a newline to prevent them from being
58 issued in the middle of a line of output data. IBM PC DOS does not
59 have the concept of an inode, which together with the device number,
60 on UNIX and VAX VMS is a unique file identifier, so check_inodes()
61 tests other fields of the stat structure for equality to see, and
62 these tests are not sufficient to always make the correct decision.
63 For example, if the output and log files are both created as named
64 files within the same clock tick (1/60 sec), then the test in
65 check_inodes() will incorrectly conclude they are identical, even
66 though they are different.
67
68 One possible solution would be to issue a sleep(1) call before the log
69 file is opened, which would ensure different time stamps; however,
70 that function is not available with the Microsoft C compilers,
71 although both Turbo C and Watcom C have it. What is really needed to
72 distinguish the files is their initial disk block addresses, or their
73 file names (DOS file systems do not support links, so different
74 filenames imply different files; this is not true on UNIX or VMS), but
75 I can find no documented C library call that will obtain this
76 information.
77
78 Another solution would be to call utime() after the open of the log
79 file and set its write time forward by one clock tick (two seconds in
80 DOS file systems). With the Microsoft C compilers, _dos_getftime()
81 and _dos_setftime() could be used too; with Turbo C, getftime() and
82 setftime() similarly available.
83
84 If anyone has a better idea how to solve this problem, I will happily
85 accept suggestions.
86
87
88 =======================
89 Borland Turbo C and C++
90 =======================
91
92 This release of bibclean 2.11 has been built and successfully tested
93 with Turbo C 3.0, using tcc30bld.bat on SunPC 4.1 running on a native
94 Intel 486 25MHz processor board inside my Sun UltraSPARC 170
95 workstation. The huge memory model is required to successfully link
96 the program. The executable, associated batch files, and the
97 customized config.h file, can be found in the tcc3p0 subdirectory.
98
99 Success was also obtained with Turbo C 2.0 in the huge memory model;
100 the files are in the tcc2p0 subdirectory.
101
102 Turbo C++ 3.0 compilation and testing also works; the results are in
103 the tpp3p0 directory.
104
105
106 ===================
107 Microsoft C and C++
108 ===================
109
110 A build with Microsoft C 5.0 was successful in the compact, large, and
111 huge models, but the output in the compact model was erroneous, and
112 the large and huge model versions died with
113
114 run-time error R6009
115 - not enough space for environment
116
117 despite the fact that the environment contained on 3 short variables
118 and the PATH variable.
119
120 With Microsoft C 5.1, compilation and testing was successful in the
121 huge model; the executable and associated files are in the msc5p1
122 subdirectory. The bibclean.exe file produced is 153KB, slightly
123 smaller than the 156KB file from Turbo C 3.0.
124
125 Compilation and testing with Microsoft C 6.0 was successful in the
126 compact model; the executable and associated files are in the msc6p0
127 subdirectory.
128
129 Microsoft C 7.0 will not run on SunPC, even with a native 486
130 processor board; it complains:
131
132 run-time error R6901
133 - DOSX32 : This is a protected-mode application that requires DPMI
134 (DOS Protected Mode Interface) services. Examples of hosts that provide
135 these services include:
136 - a DOS session under Windows 3.x in enhanced mode
137 - Qualitas' 386MAX or BlueMAX version 6.x
138
139 With older versions of SunPC, it would not start even if 386max.sys was
140 installed in config.sys. When I put 386max.sys there for these tests,
141 after rebooting, the compiler starts, and then shuts down:
142
143 cl -c -I. isbn.c
144 Microsoft (R) C/C++ Optimizing Compiler Version 7.00
145 Copyright (c) Microsoft Corp 1984-1992. All rights reserved.
146
147 isbn.c
148
149 runtime error R6008
150 - not enough space for arguments
151
152 This happens no matter what the /E switch on command.com is set to in
153 config.sys: I tried sizes from 512 to 40K.
154
155 Also, if 386max.sys is used, then SunPC will only work with a 486
156 hardware board, but not in software emulation mode,
157
158 Microsoft software products, as usual, are the pits!
159
160 I've placed copies of the batch files and config.h file in the msc7p0
161 subdirectory, but I cannot create an executable. Perhaps some reader
162 can do so, and send me the results. I would also very much like to see
163 the results of Microsoft C++ compilation.
164
165
166 ================
167 Watcom C and C++
168 ================
169
170 The batch files for building bibclean with the Waterloo compiler
171 assume that you have copied the file watcom/src/startup/wildargv.c
172 from the compiler installation tree to the current directory. I have
173 not supplied a copy command in the batch files, because the local home
174 of this compiler on my system has not yet been finalized.
175
176 On a Sun UltraSPARC 170 running Sun Solaris 2.5, with C++ 4.0
177 compilation, the memory sizes of the various object files are:
178
179 =============================================
180 Module code init uninit total
181 data data
182 =============================================
183 bibclean.o 30898 1837 12372 45107
184 chek.o 15646 716 0 16362
185 do.o 62733 4214 10248 77195
186 fix.o 13863 159 4096 18118
187 fndfil.o 4763 86 3084 7933
188 isbn.o 11205 6633 14 17852
189 keybrd.o 9643 362 36 10041
190 match.o 4583 157 0 4740
191 option.o 13549 17797 12 31358
192 romtol.o 1483 98 0 1581
193 strist.o 578 58 0 636
194 strtol.o 2974 99 0 3073
195 ---------------------------------------------
196 Total 171918 32216 29862 233996
197 =============================================
198
199 Evidently, the sum of initialized and uninitialized data is about
200 62KB.
201
202 After several attempts that were thwarted by the IBM PC 64KB segment
203 size limit, I finally found a set of switches that allow use of the
204 Watcom C/C++ 10.0 wcc compiler:
205
206 wcc -I. -ml -zq -zt512 chek.c
207
208 This produced an executable in both compact and large models that
209 passed the validation suite successfully, except for the last one,
210 Scribe test 3, where the program goes into an infinite loop writing
211
212 %% "testscr3.org", line 0: Pushback buffer overflow: characters lost.
213
214 Adding the -ox optimization switch to the compilations had no effect.
215 Thus, the wat10/wcc/bibclean.exe executable should not be regarded as
216 reliable.
217
218 I also tried using C++ compilation like this:
219
220 wcl -c -cc++ -I. -mc -ox -zq -zt512 chek.c
221
222 I then had to remove the -ox optimization flag for chek.c and do.c
223 because the compiler ran out of memory. Even without that flag, the
224 compiler could not handle do.c, which is the largest source file in
225 bibclean. Also I had to change one statement in isbn.c from
226
227 for (p = start = s; (p = next_ISBN(p,&next), p) != (const char*)NULL;
228 start = p)
229 to
230 for (p = start = s; (p = next_ISBN(p,&next)) != (const char*)NULL;
231 start = p)
232
233 because the C++ compiler erroneously treated the comma expression as
234 of type long, which is incompatible with const char *.
235
236 Thus, successful compilation with Watcom C++ is not possible without
237 code rewriting, which I'm not prepared to do at this time.
238
239 Compilation and testing with the Watcom C/C++ 10.0 wcc386 compiler was
240 successful; the required files are stored in the watcom subdirectory.
241 This version of the program requires an Intel 386 or higher processor,
242 and does not use segmented memory addressing. Because it uses more
243 efficient 32-bit addressing, instead of multiple instructions to
244 twiddle segment and offset registers, it is likely to run faster than
245 the Turbo C version. The 386 executable program file is also 28%
246 smaller than the segmented memory version. If you attempt to run the
247 wat10/wcc386/bibclean.exe file on a 286 or older system, or on an
248 emulator that does not support the 386 extensions, such as SunPC 4.1,
249 it terminates immediately with an error
250
251 DOS/16M error: [15] protected mode available only with 386 or 486
252
253 It works successfully on SunPC 4.1 when the 486 board is installed.
254 Unfortunately, it also produces an obnoxious copyright message each
255 time it is run:
256
257 DOS/4GW Protected Mode Run-time Version 1.95
258 Copyright (c) Rational Systems, Inc. 1990-1993
259
260 These messages arise from the dos4gw.exe file that is dynamically
261 loaded. You can suppress them by setting an environment variable like
262 this:
263 set DOS4G=quiet
264
265 The dos4gw.exe file is needed to run the bibclean.exe file, and can be
266 FREELY distributed with it. Further details can be found in its
267 documentation file, wat10/wcc386/dos4gw.doc.
268
269 Finally, a build and test was done successfully with the 386 C++
270 compiler, wpp386; the associated files are in the wat10/wpp386
271 subdirectory.
272
273
274 =================
275 Doing it Yourself
276 =================
277
278 If you are content to use a precompiled version of bibclean provided
279 with the distribution, stop reading now.
280
281 Because of the poor quality of, and variation in, IBM PC DOS make
282 implementations, I have not attempted to use Makefiles for building
283 bibclean on the IBM PC. Instead, I use a pair of batch files, one to
284 set the search paths and environment variables for a particular
285 compiler, and another to invoke the compiler to compile and link the
286 complete program. The first of these will require modification at
287 end-user sites, because there are no standards for where software is
288 installed on IBM PC DOS systems. The second will not require
289 modification unless you change compilers, or want to experiment with
290 different compilation options.
291
292 Copy the source files, *.c and *.h, and the test files, test*.*, from
293 the distribution directory into an empty directory, and then copy in
294 the batch files and the config.h file from one of these
295 subdirectories:
296
297 ./msc5p1
298 ./msc6p0
299 ./msc7p0
300 ./tcc2p0
301 ./tcc3p0
302 ./wat10/wcc
303 ./wat10/wcc386
304 ./wat10/wpp386
305
306 For example, tcc3p0 contains these files:
307
308 bibclean.exe ibmclean.bat tcc30bld.bat
309 config.h ibmtest.bat tcc30pth.bat
310
311 Depending on how you installed the files, it may be necessary to
312 change UNIX LF line terminators to PC DOS CR LF terminators in the
313 *.c, *.h, and test*.* files in the first step. Some compilers will
314 happily handle both styles of line termination. The files in the
315 above compiler-specific directories have already been converted to PC
316 DOS format.
317
318 After modifying the batch files as needed, execute the one that sets
319 the sets the path (e.g. tcc30pth) to prepare for compilation. Then
320 execute the build batch file (e.g. tcc30bld). If the compilation
321 and/or linking fail, fix the problems (config.h may need minor tweaks
322 if you changed compilers). Otherwise, execute the ibmtest batch file.
323 If the installation is correct, no differences will be found during
324 its execution. You can use ibmclean to remove the temporary output
325 test files. Some versions of PC DOS have an improved file comparison
326 utility named fc; you can copy it into the current directory under the
327 name diff.exe if you want to use it instead of the primitive diff
328 utility historically available with PC DOS.
329
330 Your port should support wildcarded files on the command line. With
331 the Microsoft, Turbo, and Waterloo C compilers, special library object
332 files named setargv (Microsoft), wildargs (Turbo), or wildargv
333 (Waterloo) can be linked in to provide this service.
334
335 If you succeed in porting bibclean to a new compiler and/or operating
336 system, and the resulting program can pass all of the validation
337 tests, please return an archive file (e.g. .arc, .tar, .zip, or .zoo)
338 to the author with the executable program, your batch files, and all
339 changed source files. Send either a uuencoded or Mime-encoded e-mail
340 message to the address above, or if you have Internet anonymous ftp
341 access, deposit the archive file in ftp://ftp.math.utah.edu/incoming,
342 and then send the author notification that you have done so. For
343 security reasons, that directory cannot be listed, nor can you
344 overwrite anything that is already there.
345
346 =======
347 THE END
348 =======