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
|
The data in the xraylib/data directory is used in the creation of a C
routine that will be linked in to a program at link time. That is,
these files are *not* parsed at run time. Thus, if these files are
modified, the xraylib library must be rebuilt before any changes can
take effect.
For programmers:
1) The make process compiles, links, and runs the program in src/pr_data.c.
This program (src/prdata):
a) Reads in the data from the data files.
b) Creates the file src/xrayglob_inline.c which contains the definitions
of a set of variable arrays. The initialization values for these variable arrays
come from the data files.
2) xrayglob_inline.c is compiled and put in the xraylib library.
Note: The src/Makefile.am configures the preloading procedure.
Note: The routine XRayInit in the xrayfiles.c file is used for reading
in the data with the program generated by src/pr_data.c. Older
programs that were developed before the data preloading procedure
was developed call XRayInit directly. For these programs, a dummy XRayInit is
put into the xraylib library. This dummy XRayInit is in src/xrayfiles_inline.c
Note: The files src/xrayfiles.c and src/xrayglob.c are used for producing the
xrayglob_inline.c file. These two files are not part of the library.
|