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
|
The source code required to build Yorick is contained in the following
files:
Makefile -for UNIX make utility
array.c -array subscripting
ascio.c -ASCII I/O operations
bcast.c -broadcast/scatter/gather functions
bcast.h
binio.c -binary I/O functions
binio.h
binobj.c -utility functions to manage arrays and structs
binpdb.c -PDB binary file interpreter
binstd.c -standard integer and floating point layouts
cache.c -random binary I/O caching package
clog.c -Contents Log binary file description interpreter
codger.c -Codger, Yorick's automatic wrapper generator
convrt.c -format conversion routines for binary I/O
debug.c -debugging aids for the Yorick interpreter
defmem.c -memory management package
defmem.h
defstr.c -string management package
defstr.h
fmcalc.c -fmcalc computes integer and floating point layout
fnctn.c -invoke and return from Yorick functions
graph.c -Gist graphics interface to Yorick interpreter
graph0.c -mesh_loc function
hash.c -hash table package
hash.h
list.c -_lst and other linked list handling functions
main.c -main program for Yorick
nonc.c -non-C math functions (exponentiation, complex)
ops.c -miscellaneous virtual machine instructions
ops0.c -operand and type promotion/conversion functions
ops1.c -unary and binary logical operators
ops2.c -binary arithmetic operators
ops3.c -assignment and data structure operations
opsv.c -load virtual function tables, initialization
parse.c -parse the Yorick programming language
parse.h
range.c -subscript range functions
std0.c -"standard equipment" Yorick functions
std1.c -ditto, second part
std2.c -ditto, binary file interface
sysdep.c -code which may be operating system dependent
sysdep.h
task.c -manage transitions from parser to virtual machine
ydata.c -basic Yorick utility functions
ydata.h
yinput.c -read input for Yorick parser
yio.c -Yorick ASCII I/O routines
yio.h
yorick.y -Yorick grammar (YACC parser generator code)
yorick.c -Bison-generated parser from yorick.y
yrdwr.c -generic binary file read and write routines
The Yorick source includes two programs which are separate from
Yorick, Codger and fmcalc. The fmcalc code is run once before Yorick
can be compiled at a site. It experimentally determines the layout of
integer and floating point data for the machine on which it runs,
outputting its results to a C header file (prmtyp.h) required by some
of the Yorick code. Codger generates initialization and wrapper code
(ycode.c) necessary for Yorick or any Yorick-based code. Hence, it
will be run each time a new version of Yorick is to be compiled.
The Yorick hash table, memory management, and string management
packages (hash.[ch], defmem.[ch], and defstr.[ch]) are independent of
the rest of Yorick; that is, they may be used as part of any code.
(The string management package depends on the memory management
package, however.)
The hash package provides a wide variety of functions for
maintaining hash tables where the lookup key is an ASCII string. A
few more complicated functions are provided for tables with a
non-ASCII lookup key. (These are more complicated because various
comparison and lookup functions must be externally supplied, as in the
ANSI standard qsort or bsearch functions.) The hash tables
automatically grow (rehashing themselves) as they become full. Thus,
building a table normally requires O(N logN) operations instead of
O(N) operations; you can, however, specify an initial size to avoid
this behavior at the cost of potentially wasting space.
The memory management package provides trivial shells for malloc,
free, and realloc which standardize the behavior of these functions
when presented with NULL pointers, and maintain a simple count of
allocated blocks as a primitive debugging aid. More importantly, the
package includes a generic block allocator, which can be used to
efficiently manage large numbers of blocks of known size.
The string management package uses the block allocator to handle
allocation of large numbers of relatively short (up to about 80
character) temporary strings very efficiently. Longer strings drop
back to the slower malloc/free functions. The two most useful
functions are the ones which copy and concatenate strings while
automatically creating destination arrays.
The binary file package is nearly separate from the rest of Yorick,
although it consists of source code from quite a few files. This
source code depends on the hash, memory management, and string
management packages as well:
bcast.c -broadcast/scatter/gather functions
bcast.h
binio.c -binary I/O functions
binio.h
binobj.c -utility functions to manage arrays and structs
binpdb.c -PDB binary file interpreter
binstd.c -standard integer and floating point layouts
cache.c -random binary I/O caching package
convrt.c -format conversion routines for binary I/O
clog.c -Contents Log binary file description interpreter
yrdwr.c -generic binary file read and write routines
binit.c -not part of Yorick, required for standalone use
Yorick also has a netCDF interpreter, but that package is written in
the Yorick programming language, rather than in C.
A simple set of memory management routines for allocating temporary
working space in a manner that is "safe" against asynchronous interrupts
is provided in the following files:
yasync.h -header for C versions of fortrn.c memory manager
fortrn.c -FORTRAN callable error and memory management routines
These are for use by routines written to be loaded into special versions
of Yorick; they are not used by Yorick itself.
|