next up previous 62
Next: Viewing the source code (scb)
Up: Generating the index (scbindex)
Previous: Indexing the whole Starlink collection


Creating a personalised index

As well as examining all the source files from their natural home in the main Starlink source tree (the SCB_SOURCES directory), it is also possible to index source code from elsewhere, by giving the pathname of the directory or tarfile containing the source. In this way a personalised index can be created: suppose that scbindex has already been run on all the source code in /star/sources, writing index files in /star/etc/scb, as described in the previous section, and that you have a personal source copy (under development say) of Figaro in ~/star/sources/figaro. To create your own index in ~/star/etc/scb, which will for the most part match the global index but contain your version of Figaro, you can do the following:

% setenv SCB_INDEX ~/star/etc/scb
% scbcp /star/etc/scb $SCB_INDEX
% scbindex ~/star/sources/figaro
-- first a private copy is made of the global indexes using the supplied scbcp utility (see section 6.2), and then the Figaro parts are overwritten using scbindex. If the modified sources were in a compressed tar file in the current directory, rather than in ~/star/sources, then the last line above could be replaced by
% scbindex ./figaro.tar.Z
It would be possible to make a personal index containing Figaro only, in which case the copying step could be avoided, but then hyperlinks to routines in other Starlink packages would not work.

To make use of the personalised index, rather than the one set as the default at install time, the following must be done:

Command line use
For using the extractor program scb from the command line, set the environment variable SCB_INDEX to the directory containing the indexes, in the same way as during the index build as described above.
CGI browser use
For using scb in HTML mode, then append `?indexdir=directoryname' to the script's URL. Thus if your index is in /home/user/star/etc/scb and the browser is installed in /cgi-bin/star/ on server host.domain, then to use the default index (as defined when the package was installed) you should point your browser at
http://host.domain/cgi-bin/star/scb.pl
and to use your personal index you should point it at
http://host.domain/cgi-bin/star/scb.pl?indexdir=/home/user/star/etc/scb
Note the index directory must be the path of the index as seen by the web server.



next up previous 62
Next: Viewing the source code (scb)
Up: Generating the index (scbindex)
Previous: Indexing the whole Starlink collection

SCB --- Source Code Browser
Starlink User Note 225
M. B. Taylor
10 December 1999
E-mail:ussc@star.rl.ac.uk