12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fine Tuning the HardwareConfigurationYoumay wish to fine tune the installation by avoiding linking in hardware supportfor devices you will never be using at your site. The advantage is only that the <strong>spec</strong>executable images will be smaller and will require a bit less memory when running.The savings will be only on the order of 100 kbytes or so, depending on how manyhardware modules are eliminated. Youselect which hardware modules are includedby editing the file u_hdw.c and undefining the appropriate hardware keywords. Afterdoing so, you will need to redo the installation, although you may use the −p flag for apartial installation to save time.Adding Site-Dependent Help FilesIf a file named .local in the help subdirectory of the auxiliary file directory exists andcontains a list of file names, those names will be added to the topics contained in thehelp help file when <strong>spec</strong> is installed.When <strong>spec</strong> starts up, the help file news, which is provided by CSS, and the file local,if it exists, will be displayed. The help file format is described on <strong>page</strong> 70 in the ReferenceManual.Adding Site-Dependent C CodeThis step applies only to sophisticated end users of <strong>spec</strong> who understand the C languageand need to customize <strong>spec</strong> for <strong>spec</strong>ific, site-dependent uses. Most readers canskip to the next section. Note also, local code can be accessed using the data-pipefacility explained on <strong>page</strong> 113 in the Reference Manual.<strong>spec</strong> has provisions for end users to add their own C code to the program. Useraddedcode is accessed using the built-in calc() function. If you wish to incorporatenon-standard calculations within the <strong>spec</strong> program, you can do so by adding hooksfor the code in the u_hook.c source file. Ccode that you add should, in general, belimited to calculations. Youshould avoid I/O, signal catching, etc. Consult CSS for<strong>spec</strong>ific information about what is appropriate for including in user-added C code.The geo_*.c files in the standard <strong>spec</strong> distribution that contain the X-ray diffractometergeometry code are examples of site-dependent code.INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION ADMINISTRATOR’S GUIDE 195

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!