Generalized argument parser / tokenizer. The parser
recognizes three types of tokens:
(1) Key-value pairs: '-key value'
(2) Switches: '--switchName'
(3) Regular arguments: Strings that don't fit either (1) or (2)
Procedure to join a group of strings into a
namespace name (either fully- or partially-qualified)
Procedure to resolve a namespace name into
one that is fully-qualified. If the name is already fully-qualified,
nothing is done. If partially-qualified, then the name for the
calling scope is prepended. The syntax is as follows:
qualifyNS scope NSname
Scope:
wsRoot: Name is qualified wrt webSubmit root namespace
global: Name is qualified wrt global namespace (::)
someNamespaceName: Name is qualified wrt specified name
Procedure to declare a group of variables within a
namespace and to associate these variables with variables of the
same name in the calling scope. This is equivalent to a global
statement, with the global namespace being replaced by the namespace
specified in the argument.
Procedure to check to see if a namespace is defined
Procedure to handle bombs gracefully and send output
through CGI
Procedure to trap bogus errors generated by exec
when performed in a CGI context. Error is stripped from output of
exec and returned, unless a real error is generated
Determine whether thatFile is current with
respect to than thisFile. If thatFile does not exist, it is
not current. ThisFile must exist.
Determine whether a file exists and is readable.
Procedure to create link tags and variables
Procedure to check whether one list possesses at
least the elements contained in another list
Procedure to perform the equivalent of UNIX 'grep'
on a file. The purpose of writing such a routine is to provide for
platform independence.
Procedure to create a zero-size file. Equivalent
to the UNIX 'touch' command. Provided for platform independence.
Procedure to split a string into a list and remove
any whitespace around entries in the list. This is to deal with
situations due to spaces in a list with non-whitespace separators.
In addition, and separator characters char are ignored if they fall
within quotation marks (").
Procedure to split a string into a list and remove
all empty entries from the list. This is to deal with situations
where the string that is being split contains sections of
white-space that need to be compressed
Procedure to find and return the value of a specified
environment variable (global). If the variable does not exist, an
error is raised
Procedure to compare the value of an environment
variable with a specified value. This can be used, for example,
to determine if the REMOTE_HOST IP address corresponds to the
WebSubmit server.
Procedure to write a message to a WebSubmit log
file. The procedure provides for multiple log files and an
arbitrary message. CURRENT STATUS: Unused
Procedure to build up an access log message.
This message is the one printed in the log files when the main
WebSubmit page is accessed from a remote location (i.e., a URL
outside the WS hierarchy. CURRENT STATUS: Unused
Procedure to build up an error log message.
This message is the one printed in the log files when a WebSubmit
error occurs. CURRENT STATUS: Unused
Procedure to build up job submission log message.
This message is the one printed in the log files when jobs are
submitted via WebSubmit. CURRENT STATUS: Unused
Procedure to make a relative pathname absolute
Procedure to build a string of repeated characters
Procedure to build a simple text header for output
(debugging)
Procedure to pad a string on the left and right
with blanks
Procedure to initialize a list of scalars in the
*calling scope* to empty strings. If the variable already exists,
its value is not changed.
Procedure to write a collection of data to a Tcl
file. In this fashion, the data structure can be reproduced simply
by source-ing the file. In an attempt to preserve list structures,
it is assumed that any variable that has a name of the form "*List"
is in fact a list. Arrays are written element by element; strings
are simply 'set'.
Procedure to source a serialized version of a
collection of data.
Procedure to store read-only variable values
and to place variable traces on these variables
Procedure to store read-only array variable values
and to place variable traces on these variables
Implements a read-only variable scheme. Any time
a variable's value is written or unset, it is reset to its original
value as stored in webSubmit::VARSAFE
Implements a read-only array scheme. Any time
a variable's value is written or unset, it is reset to its original
value as stored in webSubmit::VARSAFE
Trace procedure to determine the environment
from which a variable change was invoked. If invoked from a
valid environment, no action is taken. If invoked from an
insecure location (i.e., the global environment), then the
trace generates a securityBomb and exits
Procedure to convert an ASCII character into a hex
representation suitable for a URL. Optional argument is a kludge to
handle newline replacements
Prcoedure to change file permissions (interface to UNIX chmod)
Procedure to trim white space from a list of variables