RossNet

FunnelWeb

Tutorial

Developer

Reference
1 Introduction
2 Interface
3 Scanner
4 Parser
5 Analyser
6 Tangle
7 Weave
8 Shell
9 Commands
10 Glossary
11 References

SEARCH
FunnelWeb Reference Manual

2.4 File Name Inheritance

During a single run of FunnelWeb, FunnelWeb can produce many different output files. As it would be very tedious to have to specify the name of each of these files explicitly each time FunnelWeb is run, FunnelWeb provides a system of defaults that allows the user to specify the minimum required to successfully complete the run. To do this, FunnelWeb allows file specifications to inherit fields from one another.

FunnelWeb structures filenames into three fields which are inherited independently. The fields are: directory, name, and extension. On systems having other fields (e.g. network node , device name ), the extra fields are considered to be part of the directory field. Version numbers are ignored. A field can inherit a value if its current value is the empty string.

The following table gives the full inheritance scheme used in FunnelWeb.

Script Input Include Journal List TeX HTML Prod
    @i         @o
+x +f +i +j +l +t +u +o
".fws" ".fw" ".fwi" ".jrn" ".lis" ".tex" ".html"  
    +f +f +f +f +f  
DefDir Defdir Defdir Defdir Defdir Defdir Defdir Defdir

The table is arranged with items of highest priority at the top. The "+" cells refer to the file specification supplied in the given command line argument. "+F" is the name of the input file. "Defdir" refers to the default directory specification provided by the operating system. Empty cells do not contribute.

The following example shows how the table is used. Suppose that the user invoked FunnelWeb as follows:

fw /usr/ross/work/sloth.fw +twalrus

To work out what the documentation file should be called, FunnelWeb starts with the empty string and then works down the Document column of the table. The top entry is empty so we ignore it and proceed to the second entry which consists of "+T". The user specified the string "walrus" as the value of this option, and as our current (empty) string does not have a name field, we insert the string "walrus" into the name field, resulting in the string "walrus". Moving down to the next row, we encounter the constant string ".tex". This string consists of an empty directory and name field, but a ".tex" file extension. As our current string "walrus", does not already have a file extension (i.e. the file extension field of our current string is empty), we add in ".tex", resulting in the string "walrus.tex". Next we encounter the "+F" field which is the input filename "/usr/ross/work/sloth.fw" consisting of a directory field "/usr/ross/work/", a name field "sloth", and a file extension field ".fw". Our "walrus.tex" string already has name and file extension fields, but its directory field is empty, and so we add in the directory field from the input file specification, resulting in the string "/usr/ross/work/walrus.tex". Finally, we hit the default directory specification, which is (say) "/usr/ross/play/". However, as the directory field of our walrus string is already full, it has no effect.

In general, there is no need to remember the exact details of FunnelWeb's filename inheritance. The important thing is to know that it exists, and to use it.

Prev Up Next


Webmaster    Copyright © Ross N. Williams 1992,1999. All rights reserved.