Go to the previous, next section.
@everyfooting Author: rootd // Editor: ensley // Texinfo: rootd @| @| 3 December 1994
The database builder checks the INSTALLDIR/lslr directory for files, builds the database with those files, and then deletes the files in the lslr directory.
Using the cshell, you can manually run the database builder with the following command:
makedb INSTALLDIR/lslr/*
This will automatically expand to be every file in the directory.
The database builder looks through the ls -lR file and puts the information in the appropriate database files. For each ls -lR file four new files will be created (or written over) in the four database directories: index, nocaseindex, data, and direc.
There are two types of lines in ls -lR files for which we have to produce output: lines indicating directories, and lines indicating files.
We maintain a directory counter, which starts at zero and counts the directory we are on.
We maintain a directory name string, which starts as "/" and always contains the current directory. We initialize the direc file by printing "/\n"
We can identify a line in an ls -lR as a directory if it has one field and ends with a ":" In this case we do the following things:
We can identify a file line because it has nine fields. In this case we do the following:
Note that every time you print a line of data to one of these files, you must terminate the line with a newline.
Here is some sample perl code from our prototype which shows what is happeing. Note that the prototype calls the data file the info file, and that the prototype does not have a nocaseindex file.
Whenever you see and X, replace it with an underscore (the underscore is causing problems with our texinfo output--we haven't successfully fixed it yet).
Go to the previous, next section.