File: HTAlert.html

package info (click to toggle)
cern-httpd 3.0A-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,392 kB
  • ctags: 6,554
  • sloc: ansic: 37,902; makefile: 1,746; perl: 535; csh: 167; sh: 143
file content (125 lines) | stat: -rw-r--r-- 2,708 bytes parent folder | download | duplicates (6)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<HTML>
<HEAD>
<TITLE>HTAlert: Handling user messages in libwww</TITLE>
<NEXTID N="z3">
</HEAD>
<BODY>
<H1>Displaying Messages and Getting Input</H1>

This module is a part of the <A NAME="z0" HREF="Overview.html">CERN WWW Library</A>. It may be overridden for GUI clients. It allows progress
indications and warning messages to be communicated to the user in
a portable way.

<UL>
<LI>May 92 Created By C.T. Barker
<LI>Feb 93 Portablized etc TBL
</UL>
<PRE>
#include <A NAME="z1" HREF="HTUtils.html">"HTUtils.h"</A>

#ifdef SHORT_NAMES
#define HTPrPass	HTPromptPassword
#define HTPUnAPw	HTPromptUsernameAndPassword
#endif /*SHORT_NAMES*/
</PRE>

<H2>Flags for This Module</H2>

<PRE>
extern BOOL HTInteractive;      	    /* Any prompts from the Library? */
</PRE>

<H2>HTPrompt and HTPromptPassword: Display a message and get the
input</H2>

HTPromptPassword() doesn't echo reply on the screen.

<H3>On entry,</H3>
<DL>
<DT>Msg
<DD> String to be displayed.
<DT>deflt
<DD> If NULL the default value (only
for HTPrompt())
</DL>

<H3>On exit,</H3>
<DL>
<DT>Return value
<DD> is malloc'd string which
must be freed.
</DL>

<PRE>		
extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
extern char * HTPromptPassword PARAMS((CONST char * Msg));

</PRE>
<H2>HTPromptUsernameAndPassword: Get both username and password</H2>
<H3>On entry,</H3>
<DL>
<DT>Msg<DD>String to be displayed.
<DT>username<DD> Pointer to char pointer, i.e. <CODE>*username</CODE>
points to a string.  If non-NULL it is taken to be a default value.
<DT>password<DD> Pointer to char pointer, i.e. <CODE>*password</CODE>
points to a string.  Initial value discarded.
</DL>
<H3>On exit,</H3>
<DL>
<DT>*username<DD> and
<DT>*password<DD> point to newly allocated strings representing
the typed-in username and password.  Initial strings pointed to
by them are NOT freed!
</DL>
<PRE>
extern void HTPromptUsernameAndPassword PARAMS((CONST char *	Msg,
						char **		username,
						char **		password));

</PRE>
<H2>Display a message, don't wait for
input</H2>
<H3>On entry,</H3>
<DL>
<DT>Msg
<DD> String to be displayed.
</DL>

<PRE>
extern void HTAlert PARAMS((CONST char * Msg));


</PRE>
<H2>Display a progress message for information
(and diagnostics) only</H2>
<H3>On entry,</H3>The input is a list of parameters
for printf.
<PRE>extern void HTProgress PARAMS((CONST char * Msg));


</PRE>
<H2>Display a message, then wait for
'yes' or 'no'.</H2>
<H3>On entry,</H3>
<DL>
<DT>Msg
<DD> String to be displayed
</DL>

<H3>On exit,</H3>
<DL>
<DT>Returns
<DD> If the user reacts in the
affirmative, returns TRUE, returns
FALSE otherwise.
</DL>

<PRE>
extern BOOL HTConfirm PARAMS ((CONST char * Msg));





</A></PRE></BODY>
</HTML>