about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTVMSUtils.h
blob: d7efe8c40022d97bda882625179b30cadfcdc059 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*             VMS specific routines

 */

#ifndef HTVMSUTIL_H
#define HTVMSUTIL_H

#ifndef HTUTILS_H
#include <HTUtils.h>
#endif

#include <HTAnchor.h>

#ifdef __cplusplus
extern "C" {
#endif
    extern BOOL HTVMSFileVersions;	/* Include version numbers in listing? */

/* PUBLIC							HTVMS_authSysPrv()
 *		CHECKS IF THIS PROCESS IS AUTHORIZED TO ENABLE SYSPRV
 * ON ENTRY:
 *	No arguments.
 *
 * ON EXIT:
 *	returns	YES if SYSPRV is authorized
 */
    extern BOOL HTVMS_authSysPrv(void);

/* PUBLIC							HTVMS_enableSysPrv()
 *		ENABLES SYSPRV
 * ON ENTRY:
 *	No arguments.
 *
 * ON EXIT:
 *
 */
    extern void HTVMS_enableSysPrv(void);

/* PUBLIC							HTVMS_disableSysPrv()
 *		DISABLES SYSPRV
 * ON ENTRY:
 *	No arguments.
 *
 * ON EXIT:
 *
 */
    extern void HTVMS_disableSysPrv(void);

/* PUBLIC							HTVMS_checkAccess()
 *		CHECKS ACCESS TO FILE FOR CERTAIN USER
 * ON ENTRY:
 *	FileName	The file to be accessed
 *	UserName	Name of the user to check access for
 *
 * ON EXIT:
 *	returns YES if access is allowed
 *
 */
    extern BOOL HTVMS_checkAccess(const char *FileName,
				  const char *UserName,
				  const char *Method);

/* PUBLIC							HTVMS_wwwName()
 *		CONVERTS VMS Name into WWW Name
 * ON ENTRY:
 *	vmsname		VMS file specification (NO NODE)
 *
 * ON EXIT:
 *	returns		www file specification
 *
 * EXAMPLES:
 *	vmsname				wwwname
 *	DISK$USER			disk$user
 *	DISK$USER:			/disk$user/
 *	DISK$USER:[DUNS]		/disk$user/duns
 *	DISK$USER:[DUNS.ECHO]		/disk$user/duns/echo
 *	[DUNS]				duns
 *	[DUNS.ECHO]			duns/echo
 *	[DUNS.ECHO.-.TRANS]		duns/echo/../trans
 *	[DUNS.ECHO.--.TRANS]		duns/echo/../../trans
 *	[.DUNS]				duns
 *	[.DUNS.ECHO]			duns/echo
 *	[.DUNS.ECHO]TEST.COM		duns/echo/test.com
 *	TEST.COM			test.com
 *
 *
 */
    const extern char *HTVMS_wwwName(const char *vmsname);

    extern int HTVMSBrowseDir(const char *address,
			      HTParentAnchor *anchor,
			      HTFormat format_out,
			      HTStream *sink);

    extern int HTVMS_remove(char *filename);
    extern void HTVMS_purge(char *filename);

#ifdef __cplusplus
}
#endif
#endif				/* not HTVMSUTIL_H */
="p"></A> <TR><TD align="right"><A HREF="credits.html"><STRONG>BACK</STRONG></A> chapter thread <A HREF="glossary.html"><STRONG>NEXT</STRONG></A> <TR><TD align="right"><A HREF="http://mitpress.mit.edu/0262082810">MIT Press web page for <CITE>Simply Scheme</CITE></A> </TABLE></TABLE> <HR> <A NAME="funlist"></A> <P>This table does not represent the complete Scheme language. It includes the nonstandard Scheme primitives that we use in this book, and it omits many standard ones that are not needed here. <P> <P><TABLE> <TR><TD><CODE>'</CODE> <TD>Abbreviation for <CODE>(quote</CODE> &hellip;<CODE>)</CODE>. <TR><TD><A NAME="g202"></A><CODE>*</CODE><TD>Multiply numbers. <TR><TD><A NAME="g203"></A><CODE>+</CODE><TD>Add numbers. <TR><TD><A NAME="g204"></A><CODE>-</CODE><TD>Subtract numbers. <TR><TD><A NAME="g205"></A><CODE>/</CODE><TD>Divide numbers. <TR><TD><CODE><</CODE><TD>Is the first argument less than the second? <TR><TD><CODE><=</CODE><TD>Is the first argument less than or equal to the second? <TR><TD><CODE>=</CODE><TD>Are two numbers equal? (Like <CODE>equal?</CODE> but works only for numbers). <TR><TD><CODE>></CODE><TD>Is the first argument greater than the second? <TR><TD><CODE>>=</CODE><TD>Is the first argument greater than or equal to the second? <TR><TD><CODE>abs</CODE><TD>Return the absolute value of the argument. <TR><TD><CODE>accumulate</CODE><TD>Apply a combining function to all elements (see <A HREF="../ssch8/higher.html#accum">here</A>). <TR><TD><CODE>align</CODE><TD>Return a string spaced to a given width (see <A HREF="../ssch20/io.html#spformat">here</A>). <TR><TD><CODE>and</CODE><TD>(Special form) Are all of the arguments true values (i.e., not <CODE>#f</CODE>)? <TR><TD><CODE>appearances</CODE><TD>Return the number of times the first argument is in the second. <TR><TD><CODE>append</CODE><TD>Return a list containing the elements of the argument lists. <TR><TD><CODE>apply</CODE><TD>Apply a function to the arguments in a list. <TR><TD><CODE>assoc</CODE><TD>Return association list entry matching key. <TR><TD><CODE>before?</CODE><TD>Does the first argument come alphabetically before the second? <TR><TD><CODE>begin</CODE><TD>(Special form) Carry out a sequence of instructions (see <A HREF="../ssch20/io.html#beg">here</A>). <TR><TD><CODE>bf</CODE><TD>Abbreviation for <CODE>butfirst</CODE>. <TR><TD><CODE>bl</CODE><TD>Abbreviation for <CODE>butlast</CODE>. <TR><TD><CODE>boolean?</CODE><TD>Return true if the argument is <CODE>#t</CODE> or <CODE>#f</CODE>. <TR><TD><CODE>butfirst</CODE><TD>Return all but the first letter of a word, or word of a sentence. <TR><TD><CODE>butlast</CODE><TD>Return all but the last letter of a word, or word of a sentence. <TR><TD><CODE>c...r</CODE><TD>Combinations of <CODE>car</CODE> and <CODE>cdr</CODE> (see <A HREF="../ssch17/lists.html#cadr">here</A>). <TR><TD><CODE>car</CODE><TD>Return the first element of a list. <TR><TD><CODE>cdr</CODE><TD>Return all but the first element of a list. <TR><TD><A NAME="g206"></A><CODE>ceiling</CODE><TD>Round a number up to the nearest integer. <TR><TD><CODE>children</CODE><TD>Return a list of the children of a tree node. <TR><TD><CODE>close-all-ports</CODE><TD>Close all open input and output ports. <TR><TD><CODE>close-input-port</CODE><TD>Close an input port. <TR><TD><CODE>close-output-port</CODE><TD>Close an output port. <TR><TD><CODE>cond</CODE><TD>(Special form) Choose among several alternatives (see <A HREF="../ssch6/true.html#cond">here</A>). <TR><TD><CODE>cons</CODE><TD>Prepend an element to a list. <TR><TD><A NAME="g207"></A><CODE>cos</CODE><TD>Return the cosine of a number (from trigonometry). <TR><TD><CODE>count</CODE><TD>Return the number of letters in a word or number of words in a sentence. <TR><TD><CODE>datum</CODE><TD>Return the datum of a tree node. <TR><TD><CODE>define</CODE><TD>(Special form) Create a global name (for a procedure or other value). <TR><TD><CODE>display</CODE><TD>Print the argument without starting a new line. <TR><TD><CODE>empty?</CODE><TD>Is the argument empty, i.e., the empty word <CODE>""</CODE> or the empty sentence <CODE>()</CODE>? <TR><TD><CODE>eof-object?</CODE><TD>Is the argument an end-of-file object? <TR><TD><CODE>equal?</CODE><TD>Are the two arguments the same thing? <TR><TD><A NAME="g208"></A><CODE>error</CODE><TD>Print an error message and return to the Scheme prompt. <TR><TD><A NAME="g209"></A><CODE>even?</CODE><TD>Is the argument an even integer? <TR><TD><CODE>every</CODE><TD>Apply a function to each element of a word or sentence (see <A HREF="../ssch8/higher.html#every">here</A>). <TR><TD><A NAME="g210"></A><CODE>expt</CODE><TD>Raise the first argument to the power of the second. <TR><TD><CODE>filter</CODE><TD>Select a subset of a list (see <A HREF="../ssch17/lists.html#filter">here</A>). <TR><TD><CODE>first</CODE><TD>Return first letter of a word, or first word of a sentence. <TR><TD><A NAME="g211"></A><CODE>floor</CODE><TD>Round a number down to the nearest integer. <TR><TD><CODE>for-each</CODE><TD>Perform a computation for each element of a list. <TR><TD><CODE>if</CODE><TD>(Special form) Choose between two alternatives (see <A HREF="../ssch6/true.html#spif">here</A>). <TR><TD><A NAME="g212"></A><CODE>integer?</CODE><TD>Is the argument an integer? <TR><TD><CODE>item</CODE><TD>Return the $n$th letter of a word, or $n$th word of a sentence. <TR><TD><CODE>keep</CODE><TD>Select a subset of a word or sentence (see <A HREF="../ssch8/higher.html#keep">here</A>). <TR><TD><CODE>lambda</CODE><TD>(Special form) Create a new procedure (see Chapter \lambchop). <TR><TD><CODE>last</CODE><TD>Return last letter of a word, or last word of a sentence. <TR><TD><CODE>length</CODE><TD>Return the number of elements in a list. <TR><TD><CODE>let</CODE><TD>(Special form) Give temporary names to values (see <A HREF="../ssch7/variables.html#splet">here</A>). <TR><TD><CODE>list</CODE><TD>Return a list containing the arguments. <TR><TD><CODE>list->vector</CODE><TD>Return a vector with the same elements as the list. <TR><TD><CODE>list-ref</CODE><TD>Select an element from a list (counting from zero). <TR><TD><CODE>list?</CODE><TD>Is the argument a list? <TR><TD><A NAME="g213"></A><CODE>load</CODE><TD>Read a program file into Scheme. <TR><TD><A NAME="g214"></A><CODE>log</CODE><TD>Return the logarithm of a number. <TR><TD><CODE>make-node</CODE><TD>Create a new node of a tree. <TR><TD><CODE>make-vector</CODE><TD>Create a new vector of the given length. <TR><TD><CODE>map</CODE><TD>Apply a function to each element of a list (see <A HREF="../ssch17/lists.html#map">here</A>). <TR><TD><A NAME="g215"></A><CODE>max</CODE><TD>Return the largest of the arguments. <TR><TD><CODE>member</CODE><TD>Return subset of a list starting with selected element, or <CODE>#f</CODE>. <TR><TD><CODE>member?</CODE><TD>Is the first argument an element of the second? (see <A HREF="../ssch6/true.html#memq">here</A>). <TR><TD><A NAME="g216"></A><CODE>min</CODE><TD>Return the smallest of the arguments. <TR><TD><CODE>newline</CODE><TD>Go to a new line of printing. <TR><TD><CODE>not</CODE><TD>Return <CODE>#t</CODE> if argument is <CODE>#f</CODE>; return <CODE>#f</CODE> otherwise. <TR><TD><CODE>null?</CODE><TD>Is the argument the empty list? <TR><TD><CODE>number?</CODE><TD>Is the argument a number? <TR><TD><A NAME="g217"></A><CODE>odd?</CODE><TD>Is the argument an odd integer? <TR><TD><CODE>open-input-file</CODE><TD>Open a file for reading, return a port. <TR><TD><CODE>open-output-file</CODE><TD>Open a file for writing, return a port. <TR><TD><CODE>or</CODE><TD>(Special form) Are any of the arguments true values (i.e., not <CODE>#f</CODE>)? <TR><TD><A NAME="g218"></A><CODE>procedure?</CODE><TD>Is the argument a procedure? <TR><TD><CODE>quote</CODE><TD>(Special form) Return the argument, unevaluated (see <A HREF="../ssch5/words.html#spquote">here</A>). <TR><TD><A NAME="g219"></A><CODE>quotient</CODE><TD>Divide numbers, but round down to integer. <TR><TD><A NAME="g220"></A><CODE>random</CODE><TD>Return a random number &ge; 0 and smaller than the argument. <TR><TD><CODE>read</CODE><TD>Read an expression from the keyboard (or a file). <TR><TD><CODE>read-line</CODE><TD>Read a line from the keyboard (or a file), returning a sentence. <TR><TD><CODE>read-string</CODE><TD>Read a line from the keyboard (or a file), returning a string. <TR><TD><CODE>reduce</CODE><TD>Apply a combining function to all elements of list (see <A HREF="../ssch17/lists.html#reduce">here</A>). <TR><TD><A NAME="g221"></A><CODE>remainder</CODE><TD>Return the remainder from dividing the first number by the second. <TR><TD><CODE>repeated</CODE><TD>Return the function described by <I>f</I>(<I>f</I>(&sdot;&sdot;&sdot;(<I>f</I>(<I>x</I>)))) (see <A HREF="../ssch8/higher.html#repeated">here</A>). <TR><TD><A NAME="g222"></A><CODE>round</CODE><TD>Round a number to the nearest integer. <TR><TD><CODE>se</CODE><TD>Abbreviation for <CODE>sentence</CODE>. <TR><TD><CODE>sentence</CODE><TD>Join the arguments together into a big sentence. <TR><TD><CODE>sentence?</CODE><TD>Is the argument a sentence? <TR><TD><CODE>show</CODE><TD>Print the argument and start a new line. <TR><TD><CODE>show-line</CODE><TD>Show the argument sentence without surrounding parentheses. <TR><TD><A NAME="g223"></A><CODE>sin</CODE><TD>Return the sine of a number (from trigonometry). <TR><TD><A NAME="g224"></A><CODE>sqrt</CODE><TD>Return the square root of a number. <TR><TD><CODE>square</CODE><TD>Not a primitive! <CODE>(define (square x) (* x x))</CODE> <TR><TD><CODE>trace</CODE><TD>Report on all future invocations of a procedure. <TR><TD><CODE>untrace</CODE><TD>Undo the effect of <CODE>trace</CODE>. <TR><TD><CODE>vector</CODE><TD>Create a vector with the arguments as elements. <TR><TD><CODE>vector->list</CODE><TD>Return a list with the same elements as the vector. <TR><TD><CODE>vector-length</CODE><TD>Return the number of elements in a vector. <TR><TD><CODE>vector-ref</CODE><TD>Return an element of a vector (counting from zero). <TR><TD><CODE>vector-set!</CODE><TD>Replace an element in a vector. <TR><TD><CODE>vector?</CODE><TD>Is the argument a vector? <TR><TD><CODE>vowel?</CODE><TD>Not a primitive! <CODE>(define (vowel? x) (member? x '(a e i o u)))</CODE> <TR><TD><CODE>word</CODE><TD>Joins words into one big word. <TR><TD><CODE>word?</CODE><TD>Is the argument a word? (Note: numbers are words.) <TR><TD><CODE>write</CODE><TD>Print the argument in machine-readable form (see <A HREF="../ssch22/files.html#spwrite">here</A>). </TABLE> <HR> <P><A HREF="../ss-toc2.html">(back to Table of Contents)</A><P> <A HREF="credits.html"><STRONG>BACK</STRONG></A> chapter thread <A HREF="glossary.html"><STRONG>NEXT</STRONG></A> <P> <ADDRESS> <A HREF="../index.html">Brian Harvey</A>, <CODE>bh@cs.berkeley.edu</CODE> </ADDRESS> </BODY> </HTML>