| 1 |
Tue Aug 20 16:19:51 CDT 1996 |
| 2 |
Andy Fingerhut ([email protected]) |
| 3 |
|
| 4 |
In release 1.4, there are quite a few hand modifications to the C code |
| 5 |
that was automatically created from the Fortran code with f2c. They |
| 6 |
are all summarized in change log comments at the beginning of the |
| 7 |
changed files. All of the original files from f2c were checked in to |
| 8 |
RCS before modification, so it is possible to see exactly what changes |
| 9 |
were made, for the extremely curious. That precaution was also for my |
| 10 |
benefit, in case I ever recompile the Fortran sources, and want to |
| 11 |
make similar changes to that new C source code. |
| 12 |
|
| 13 |
Below is the README file for this directory included with the 1.3 |
| 14 |
release of the LPC-10 package. A few parts of it are a little out of |
| 15 |
date, but it is correct for the most part. |
| 16 |
|
| 17 |
|
| 18 |
Sun Jul 7 15:30:31 CDT 1996 |
| 19 |
Andy Fingerhut ([email protected]) |
| 20 |
|
| 21 |
To create the LPC-10 library, copy the appropriate makefile to the |
| 22 |
proper name for easy use, e.g., for Unix, copy makefile.unx to the |
| 23 |
file "Makefile". The file makefile.dos has been used with some |
| 24 |
version of the 'nmake' utility that comes with the Microsoft C |
| 25 |
compiler (the same one used for Nautilus v1.5a, which I believe |
| 26 |
specifies Microsoft C version 7.0 or later). |
| 27 |
|
| 28 |
Then edit the file lpc10.h in the directory above. It should already |
| 29 |
be set up to work properly on any Unix compiler for which "int" is 32 |
| 30 |
bits and "short" is 16 bits, and under the Microsoft C compiler |
| 31 |
configured so that "long" is 32 bits and "int" is 16 bits. There must |
| 32 |
be a typedef for the two types INT32 and INT16 in that file. You |
| 33 |
should choose types that compile to those sizes using your compiler, |
| 34 |
because there are places in the LPC-10 code that expect INT16's to |
| 35 |
have exactly 16 bits (at least, I *think* they must be no larger), and |
| 36 |
INT32's to have exactly 32 bits. |
| 37 |
|
| 38 |
|
| 39 |
A few notes on how these files were created |
| 40 |
------------------------------------------- |
| 41 |
|
| 42 |
(This section is mostly for my benefit, so I can remember what I did. |
| 43 |
You don't need to read it if you just want to use this package. It |
| 44 |
might be useful to read it if you change the Fortran sources and want |
| 45 |
to recreate a usable library of C sources. -- Andy) |
| 46 |
|
| 47 |
These C sources were created automatically from the Fortran sources |
| 48 |
using f2c, for the most part. Listed below are the extra |
| 49 |
modifications that were made after this automatic conversion. Many of |
| 50 |
them were made so that it was not necessary to install f2c in order to |
| 51 |
use this LPC-10 coder. |
| 52 |
|
| 53 |
1. |
| 54 |
|
| 55 |
Put all of those files that were necessary for only the coder, rather |
| 56 |
than an application that uses the coder, into this subdirectory called |
| 57 |
lpc10. |
| 58 |
|
| 59 |
2. |
| 60 |
|
| 61 |
Copied f2c.h from the f2c distribution into this subdirectory. Some |
| 62 |
modifications were made to the "typedef" statements in this file, to |
| 63 |
explicitly indicate the sizes (in bits) that different integer types |
| 64 |
should be. The types INT32 and INT16 must be defined in a file called |
| 65 |
lpc10.h in the directory above. Created the file f2clib.c, containing |
| 66 |
only the functions pow_ii(), r_sign(), and i_nint() from the f2c |
| 67 |
library. |
| 68 |
|
| 69 |
3. |
| 70 |
|
| 71 |
The f2c output originally had a file called contrl_com.c, that defined |
| 72 |
a small structure containing a few variables that were used in many |
| 73 |
different functions of the LPC10 code. Every file containing |
| 74 |
functions that used it defined it as "extern", while contrl_com.c |
| 75 |
actually allocated storage for the structure. Bill Dorsey, one of the |
| 76 |
lead developers of Nautilus, said that the Microsoft C compiler had |
| 77 |
problems either compiling this file, or linking it with all of the |
| 78 |
other compiled files, so he just eliminated that file and removed the |
| 79 |
"extern" keyword from the one of the files that declared it that way. |
| 80 |
The file chosen (arbitrarily) was analys.c. |
| 81 |
|
| 82 |
4. |
| 83 |
|
| 84 |
Copied the makefiles for Unix and Microsoft C from the Nautilus v1.5a |
| 85 |
distribution into the lpc10 directory. Modified them to take out |
| 86 |
references to Nautilus. These makefiles don't create an executable, |
| 87 |
but a library of compiled functions called liblpc10.a (Unix) or |
| 88 |
LPC10.LIB (DOS). This library can be used when linking an executable |
| 89 |
that calls the functions lpcini_(), lpcenc_(), and lpcdec_(). |