1form_driver(3CURSES) Curses Library Functions form_driver(3CURSES)
2
3
4
6 form_driver - command processor for the forms subsystem
7
9 cc [ flag... ] file... -lform -lcurses [ library... ]
10 #include <form.h>
11
12 int form_driver(FORM *form, int c);
13
14
16 The form_driver() function is the workhorse of the forms subsystem; it
17 checks to determine whether the character c is a forms request or data.
18 If it is a request, the form driver executes the request and reports
19 the result. If it is data (a printable ASCII character), it enters the
20 data into the current position in the current field. If it is not rec‐
21 ognized, the form driver assumes it is an application-defined command
22 and returns E_UNKNOWN_COMMAND. Application defined commands should be
23 defined relative to MAX_COMMAND, the maximum value of a request listed
24 below.
25
26
27 Form driver requests:
28
29 REQ_NEXT_PAGE Move to the next page.
30
31
32 REQ_PREV_PAGE Move to the previous page.
33
34
35 REQ_FIRST_PAGE Move to the first page.
36
37
38 REQ_LAST_PAGE Move to the last page.
39
40
41 REQ_NEXT_FIELD Move to the next field.
42
43
44 REQ_PREV_FIELD Move to the previous field.
45
46
47 REQ_FIRST_FIELD Move to the first field.
48
49
50 REQ_LAST_FIELD Move to the last field.
51
52
53 REQ_SNEXT_FIELD Move to the sorted next field.
54
55
56 REQ_SPREV_FIELD Move to the sorted prev field.
57
58
59 REQ_SFIRST_FIELD Move to the sorted first field.
60
61
62 REQ_SLAST_FIELD Move to the sorted last field.
63
64
65 REQ_LEFT_FIELD Move left to field.
66
67
68 REQ_RIGHT_FIELD Move right to field.
69
70
71 REQ_UP_FIELD Move up to field.
72
73
74 REQ_DOWN_FIELD Move down to field.
75
76
77 REQ_NEXT_CHAR Move to the next character in the field.
78
79
80 REQ_PREV_CHAR Move to the previous character in the field.
81
82
83 REQ_NEXT_LINE Move to the next line in the field.
84
85
86 REQ_PREV_LINE Move to the previous line in the field.
87
88
89 REQ_NEXT_WORD Move to the next word in the field.
90
91
92 REQ_PREV_WORD Move to the previous word in the field.
93
94
95 REQ_BEG_FIELD Move to the first char in the field.
96
97
98 REQ_END_FIELD Move after the last char in the field.
99
100
101 REQ_BEG_LINE Move to the beginning of the line.
102
103
104 REQ_END_LINE Move after the last char in the line.
105
106
107 REQ_LEFT_CHAR Move left in the field.
108
109
110 REQ_RIGHT_CHAR Move right in the field.
111
112
113 REQ_UP_CHAR Move up in the field.
114
115
116 REQ_DOWN_CHAR Move down in the field.
117
118
119 REQ_NEW_LINE Insert/overlay a new line.
120
121
122 REQ_INS_CHAR Insert the blank character at the cursor.
123
124
125 REQ_INS_LINE Insert a blank line at the cursor.
126
127
128 REQ_DEL_CHAR Delete the character at the cursor.
129
130
131 REQ_DEL_PREV Delete the character before the cursor.
132
133
134 REQ_DEL_LINE Delete the line at the cursor.
135
136
137 REQ_DEL_WORD Delete the word at the cursor.
138
139
140 REQ_CLR_EOL Clear to the end of the line.
141
142
143 REQ_CLR_EOF Clear to the end of the field.
144
145
146 REQ_CLR_FIELD Clear the entire field.
147
148
149 REQ_OVL_MODE Enter overlay mode.
150
151
152 REQ_INS_MODE Enter insert mode.
153
154
155 REQ_SCR_FLINE Scroll the field forward a line.
156
157
158 REQ_SCR_BLINE Scroll the field backward a line.
159
160
161 REQ_SCR_FPAGE Scroll the field forward a page.
162
163
164 REQ_SCR_BPAGE Scroll the field backward a page.
165
166
167 REQ_SCR_FHPAGE Scroll the field forward half a page.
168
169
170 REQ_SCR_BHPAGE Scroll the field backward half a page.
171
172
173 REQ_SCR_FCHAR Horizontal scroll forward a character.
174
175
176 REQ_SCR_BCHAR Horizontal scroll backward a character
177
178
179 REQ_SCR_HFLINE Horizontal scroll forward a line.
180
181
182 REQ_SCR_HBLINE Horizontal scroll backward a line.
183
184
185 REQ_SCR_HFHALF Horizontal scroll forward half a line.
186
187
188 REQ_SCR_HBHALF Horizontal scroll backward half a line.
189
190
191 REQ_VALIDATION Validate field.
192
193
194 REQ_PREV_CHOICE Display the previous field choice.
195
196
197 REQ_NEXT_CHOICE Display the next field choice.
198
199
201 The form_driver() function returns one of the following:
202
203 E_OK The function returned successfully.
204
205
206 E_SYSTEM_ERROR System error.
207
208
209 E_BAD_ARGUMENT An argument is incorrect.
210
211
212 E_NOT_POSTED The form is not posted.
213
214
215 E_INVALID_FIELD The field contents are invalid.
216
217
218 E_BAD_STATE The routine was called from an initialization or
219 termination function.
220
221
222 E_REQUEST_DENIED The form driver request failed.
223
224
225 E_UNKNOWN_COMMAND An unknown request was passed to the form driver.
226
227
229 See attributes(5) for descriptions of the following attributes:
230
231
232
233
234 ┌─────────────────────────────┬─────────────────────────────┐
235 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
236 ├─────────────────────────────┼─────────────────────────────┤
237 │MT-Level │Unsafe │
238 └─────────────────────────────┴─────────────────────────────┘
239
241 curses(3CURSES), forms(3CURSES), attributes(5)
242
244 The header <form.h> automatically includes the headers <eti.h> and
245 <curses.h>.
246
247
248
249SunOS 5.11 31 Dec 1996 form_driver(3CURSES)