3
FWEB version 1.62 (September 25, 1998)
5
Based on version 0.5 of S. Levy's CWEB [copyright (C) 1987 Princeton University]
7
@x-----------------------------------------------------------------------------
9
@ Now we deal with the possibility that we will be including files from
10
other than the current directory. Line commands may change the apparent
11
directory, so an include intended to be from the current directory may not
12
succeed. Here we'll code in the actual \FWEB\ directory structure, defining
13
two macros |VFILE| and |SFILE| to generate a file name from the top-level
14
directory or a specific subdirectory, respectively. In doing this, we use
15
the environmental built-in macro |_HOME|. We construct the file name in Unix
16
format, even for~VMS. We do this in a special way so that we can then
17
use the |$TRANSLIT| built-in in two different ways depending on whether
18
we're on the VAX or a Unix system.
26
@m FWEB_HOME _HOME/fweb/v1 /* E.g., \.{/u/krommes/fweb/v1}. */
29
@#ifndef SDIR /* One might override this from the command line or ini file. */
31
/* \.{Machine-dependent}: Specify location of the bootstrap code. */
33
@m SDIR FWEB_HOME/unix/ansi
35
@m SDIR FWEB_HOME/unix/apollo
39
@m SDIR FWEB_HOME/unix/dsu
41
@m SDIR FWEB_HOME/unix/mac
43
@m SDIR FWEB_HOME/misc
45
@m SDIR FWEB_HOME/unix/sgi
47
@m SDIR FWEB_HOME/unix/sun
51
@m SDIR . /* Current directory. */
52
@#endif /* Bootstrap locations. */
57
@m VFILE(name) FL_NM_FMT(FWEB_HOME,#!name) /* File in top-level
64
@m SFILE(name) FL_NM_FMT(SDIR,#!name) /* File in specific
70
@m FL_NM_FMT(sub,name) FL_NM_FMT0(sub>#!name)
72
/* \.{Machine-dependent}: Translate file-name formats. */
74
@m FL_NM_FMT0(name) $STRING($TRANSLIT(#name,"/>]",".]")) /* \.] is
77
@m FL_NM_FMT0(name) $STRING($TRANSLIT(#name,">","\\")) /* The PC is
78
perverse, using backslashes. */
80
@m FL_NM_FMT0(name) $STRING($TRANSLIT(#name,">","/")) /* Standard Unix,
81
with forward slashes. */
82
@#endif /* File-name format translations. */
84
/* \.{Machine-dependent}: The |SYS_PATH| macro is used for such things as
85
\.{sys/types.h} that have slashes in them. */
87
@m SYS_PATH(name) <$TRANSLIT(#name,"/","\\")>
89
@m SYS_PATH(name) <#!name>