···11-/*
22- This file is part of Darling.
33-44- Copyright (C) 2019 Lubos Dolezel
55-66- Darling is free software: you can redistribute it and/or modify
77- it under the terms of the GNU General Public License as published by
88- the Free Software Foundation, either version 3 of the License, or
99- (at your option) any later version.
1010-1111- Darling is distributed in the hope that it will be useful,
1212- but WITHOUT ANY WARRANTY; without even the implied warranty of
1313- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414- GNU General Public License for more details.
1515-1616- You should have received a copy of the GNU General Public License
1717- along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818-*/
1919-2020-2121-#ifndef _form_H_
2222-#define _form_H_
2323-2424-void* _nc_Copy_Argument(void);
2525-void* _nc_Copy_Type(void);
2626-void* _nc_First_Active_Field(void);
2727-void* _nc_Free_Argument(void);
2828-void* _nc_Free_Type(void);
2929-void* _nc_Internal_Validation(void);
3030-void* _nc_Make_Argument(void);
3131-void* _nc_Position_Form_Cursor(void);
3232-void* _nc_Refresh_Current_Field(void);
3333-void* _nc_Set_Current_Field(void);
3434-void* _nc_Set_Form_Page(void);
3535-void* _nc_Synchronize_Attributes(void);
3636-void* _nc_Synchronize_Options(void);
3737-void* _nc_Widen_String(void);
3838-void* current_field(void);
3939-void* data_ahead(void);
4040-void* data_behind(void);
4141-void* dup_field(void);
4242-void* dynamic_field_info(void);
4343-void* field_arg(void);
4444-void* field_back(void);
4545-void* field_buffer(void);
4646-void* field_count(void);
4747-void* field_fore(void);
4848-void* field_index(void);
4949-void* field_info(void);
5050-void* field_init(void);
5151-void* field_just(void);
5252-void* field_opts(void);
5353-void* field_opts_off(void);
5454-void* field_opts_on(void);
5555-void* field_pad(void);
5656-void* field_status(void);
5757-void* field_term(void);
5858-void* field_type(void);
5959-void* field_userptr(void);
6060-void* form_driver(void);
6161-void* form_fields(void);
6262-void* form_init(void);
6363-void* form_opts(void);
6464-void* form_opts_off(void);
6565-void* form_opts_on(void);
6666-void* form_page(void);
6767-void* form_request_by_name(void);
6868-void* form_request_name(void);
6969-void* form_sub(void);
7070-void* form_term(void);
7171-void* form_userptr(void);
7272-void* form_win(void);
7373-void* free_field(void);
7474-void* free_fieldtype(void);
7575-void* free_form(void);
7676-void* link_field(void);
7777-void* link_fieldtype(void);
7878-void* move_field(void);
7979-void* new_field(void);
8080-void* new_fieldtype(void);
8181-void* new_form(void);
8282-void* new_page(void);
8383-void* pos_form_cursor(void);
8484-void* post_form(void);
8585-void* scale_form(void);
8686-void* set_current_field(void);
8787-void* set_field_back(void);
8888-void* set_field_buffer(void);
8989-void* set_field_fore(void);
9090-void* set_field_init(void);
9191-void* set_field_just(void);
9292-void* set_field_opts(void);
9393-void* set_field_pad(void);
9494-void* set_field_status(void);
9595-void* set_field_term(void);
9696-void* set_field_type(void);
9797-void* set_field_userptr(void);
9898-void* set_fieldtype_arg(void);
9999-void* set_fieldtype_choice(void);
100100-void* set_form_fields(void);
101101-void* set_form_init(void);
102102-void* set_form_opts(void);
103103-void* set_form_page(void);
104104-void* set_form_sub(void);
105105-void* set_form_term(void);
106106-void* set_form_userptr(void);
107107-void* set_form_win(void);
108108-void* set_max_field(void);
109109-void* set_new_page(void);
110110-void* unpost_form(void);
111111-112112-#endif
-552
src/lib/form/src/form.c
···11-/*
22- This file is part of Darling.
33-44- Copyright (C) 2019 Lubos Dolezel
55-66- Darling is free software: you can redistribute it and/or modify
77- it under the terms of the GNU General Public License as published by
88- the Free Software Foundation, either version 3 of the License, or
99- (at your option) any later version.
1010-1111- Darling is distributed in the hope that it will be useful,
1212- but WITHOUT ANY WARRANTY; without even the implied warranty of
1313- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414- GNU General Public License for more details.
1515-1616- You should have received a copy of the GNU General Public License
1717- along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818-*/
1919-2020-2121-#include <form/form.h>
2222-#include <stdlib.h>
2323-#include <stdio.h>
2424-2525-static int verbose = 0;
2626-2727-__attribute__((constructor))
2828-static void initme(void) {
2929- verbose = getenv("STUB_VERBOSE") != NULL;
3030-}
3131-3232-void* _nc_Copy_Argument(void)
3333-{
3434- if (verbose) puts("STUB: _nc_Copy_Argument called");
3535- return NULL;
3636-}
3737-3838-void* _nc_Copy_Type(void)
3939-{
4040- if (verbose) puts("STUB: _nc_Copy_Type called");
4141- return NULL;
4242-}
4343-4444-void* _nc_First_Active_Field(void)
4545-{
4646- if (verbose) puts("STUB: _nc_First_Active_Field called");
4747- return NULL;
4848-}
4949-5050-void* _nc_Free_Argument(void)
5151-{
5252- if (verbose) puts("STUB: _nc_Free_Argument called");
5353- return NULL;
5454-}
5555-5656-void* _nc_Free_Type(void)
5757-{
5858- if (verbose) puts("STUB: _nc_Free_Type called");
5959- return NULL;
6060-}
6161-6262-void* _nc_Internal_Validation(void)
6363-{
6464- if (verbose) puts("STUB: _nc_Internal_Validation called");
6565- return NULL;
6666-}
6767-6868-void* _nc_Make_Argument(void)
6969-{
7070- if (verbose) puts("STUB: _nc_Make_Argument called");
7171- return NULL;
7272-}
7373-7474-void* _nc_Position_Form_Cursor(void)
7575-{
7676- if (verbose) puts("STUB: _nc_Position_Form_Cursor called");
7777- return NULL;
7878-}
7979-8080-void* _nc_Refresh_Current_Field(void)
8181-{
8282- if (verbose) puts("STUB: _nc_Refresh_Current_Field called");
8383- return NULL;
8484-}
8585-8686-void* _nc_Set_Current_Field(void)
8787-{
8888- if (verbose) puts("STUB: _nc_Set_Current_Field called");
8989- return NULL;
9090-}
9191-9292-void* _nc_Set_Form_Page(void)
9393-{
9494- if (verbose) puts("STUB: _nc_Set_Form_Page called");
9595- return NULL;
9696-}
9797-9898-void* _nc_Synchronize_Attributes(void)
9999-{
100100- if (verbose) puts("STUB: _nc_Synchronize_Attributes called");
101101- return NULL;
102102-}
103103-104104-void* _nc_Synchronize_Options(void)
105105-{
106106- if (verbose) puts("STUB: _nc_Synchronize_Options called");
107107- return NULL;
108108-}
109109-110110-void* _nc_Widen_String(void)
111111-{
112112- if (verbose) puts("STUB: _nc_Widen_String called");
113113- return NULL;
114114-}
115115-116116-void* current_field(void)
117117-{
118118- if (verbose) puts("STUB: current_field called");
119119- return NULL;
120120-}
121121-122122-void* data_ahead(void)
123123-{
124124- if (verbose) puts("STUB: data_ahead called");
125125- return NULL;
126126-}
127127-128128-void* data_behind(void)
129129-{
130130- if (verbose) puts("STUB: data_behind called");
131131- return NULL;
132132-}
133133-134134-void* dup_field(void)
135135-{
136136- if (verbose) puts("STUB: dup_field called");
137137- return NULL;
138138-}
139139-140140-void* dynamic_field_info(void)
141141-{
142142- if (verbose) puts("STUB: dynamic_field_info called");
143143- return NULL;
144144-}
145145-146146-void* field_arg(void)
147147-{
148148- if (verbose) puts("STUB: field_arg called");
149149- return NULL;
150150-}
151151-152152-void* field_back(void)
153153-{
154154- if (verbose) puts("STUB: field_back called");
155155- return NULL;
156156-}
157157-158158-void* field_buffer(void)
159159-{
160160- if (verbose) puts("STUB: field_buffer called");
161161- return NULL;
162162-}
163163-164164-void* field_count(void)
165165-{
166166- if (verbose) puts("STUB: field_count called");
167167- return NULL;
168168-}
169169-170170-void* field_fore(void)
171171-{
172172- if (verbose) puts("STUB: field_fore called");
173173- return NULL;
174174-}
175175-176176-void* field_index(void)
177177-{
178178- if (verbose) puts("STUB: field_index called");
179179- return NULL;
180180-}
181181-182182-void* field_info(void)
183183-{
184184- if (verbose) puts("STUB: field_info called");
185185- return NULL;
186186-}
187187-188188-void* field_init(void)
189189-{
190190- if (verbose) puts("STUB: field_init called");
191191- return NULL;
192192-}
193193-194194-void* field_just(void)
195195-{
196196- if (verbose) puts("STUB: field_just called");
197197- return NULL;
198198-}
199199-200200-void* field_opts(void)
201201-{
202202- if (verbose) puts("STUB: field_opts called");
203203- return NULL;
204204-}
205205-206206-void* field_opts_off(void)
207207-{
208208- if (verbose) puts("STUB: field_opts_off called");
209209- return NULL;
210210-}
211211-212212-void* field_opts_on(void)
213213-{
214214- if (verbose) puts("STUB: field_opts_on called");
215215- return NULL;
216216-}
217217-218218-void* field_pad(void)
219219-{
220220- if (verbose) puts("STUB: field_pad called");
221221- return NULL;
222222-}
223223-224224-void* field_status(void)
225225-{
226226- if (verbose) puts("STUB: field_status called");
227227- return NULL;
228228-}
229229-230230-void* field_term(void)
231231-{
232232- if (verbose) puts("STUB: field_term called");
233233- return NULL;
234234-}
235235-236236-void* field_type(void)
237237-{
238238- if (verbose) puts("STUB: field_type called");
239239- return NULL;
240240-}
241241-242242-void* field_userptr(void)
243243-{
244244- if (verbose) puts("STUB: field_userptr called");
245245- return NULL;
246246-}
247247-248248-void* form_driver(void)
249249-{
250250- if (verbose) puts("STUB: form_driver called");
251251- return NULL;
252252-}
253253-254254-void* form_fields(void)
255255-{
256256- if (verbose) puts("STUB: form_fields called");
257257- return NULL;
258258-}
259259-260260-void* form_init(void)
261261-{
262262- if (verbose) puts("STUB: form_init called");
263263- return NULL;
264264-}
265265-266266-void* form_opts(void)
267267-{
268268- if (verbose) puts("STUB: form_opts called");
269269- return NULL;
270270-}
271271-272272-void* form_opts_off(void)
273273-{
274274- if (verbose) puts("STUB: form_opts_off called");
275275- return NULL;
276276-}
277277-278278-void* form_opts_on(void)
279279-{
280280- if (verbose) puts("STUB: form_opts_on called");
281281- return NULL;
282282-}
283283-284284-void* form_page(void)
285285-{
286286- if (verbose) puts("STUB: form_page called");
287287- return NULL;
288288-}
289289-290290-void* form_request_by_name(void)
291291-{
292292- if (verbose) puts("STUB: form_request_by_name called");
293293- return NULL;
294294-}
295295-296296-void* form_request_name(void)
297297-{
298298- if (verbose) puts("STUB: form_request_name called");
299299- return NULL;
300300-}
301301-302302-void* form_sub(void)
303303-{
304304- if (verbose) puts("STUB: form_sub called");
305305- return NULL;
306306-}
307307-308308-void* form_term(void)
309309-{
310310- if (verbose) puts("STUB: form_term called");
311311- return NULL;
312312-}
313313-314314-void* form_userptr(void)
315315-{
316316- if (verbose) puts("STUB: form_userptr called");
317317- return NULL;
318318-}
319319-320320-void* form_win(void)
321321-{
322322- if (verbose) puts("STUB: form_win called");
323323- return NULL;
324324-}
325325-326326-void* free_field(void)
327327-{
328328- if (verbose) puts("STUB: free_field called");
329329- return NULL;
330330-}
331331-332332-void* free_fieldtype(void)
333333-{
334334- if (verbose) puts("STUB: free_fieldtype called");
335335- return NULL;
336336-}
337337-338338-void* free_form(void)
339339-{
340340- if (verbose) puts("STUB: free_form called");
341341- return NULL;
342342-}
343343-344344-void* link_field(void)
345345-{
346346- if (verbose) puts("STUB: link_field called");
347347- return NULL;
348348-}
349349-350350-void* link_fieldtype(void)
351351-{
352352- if (verbose) puts("STUB: link_fieldtype called");
353353- return NULL;
354354-}
355355-356356-void* move_field(void)
357357-{
358358- if (verbose) puts("STUB: move_field called");
359359- return NULL;
360360-}
361361-362362-void* new_field(void)
363363-{
364364- if (verbose) puts("STUB: new_field called");
365365- return NULL;
366366-}
367367-368368-void* new_fieldtype(void)
369369-{
370370- if (verbose) puts("STUB: new_fieldtype called");
371371- return NULL;
372372-}
373373-374374-void* new_form(void)
375375-{
376376- if (verbose) puts("STUB: new_form called");
377377- return NULL;
378378-}
379379-380380-void* new_page(void)
381381-{
382382- if (verbose) puts("STUB: new_page called");
383383- return NULL;
384384-}
385385-386386-void* pos_form_cursor(void)
387387-{
388388- if (verbose) puts("STUB: pos_form_cursor called");
389389- return NULL;
390390-}
391391-392392-void* post_form(void)
393393-{
394394- if (verbose) puts("STUB: post_form called");
395395- return NULL;
396396-}
397397-398398-void* scale_form(void)
399399-{
400400- if (verbose) puts("STUB: scale_form called");
401401- return NULL;
402402-}
403403-404404-void* set_current_field(void)
405405-{
406406- if (verbose) puts("STUB: set_current_field called");
407407- return NULL;
408408-}
409409-410410-void* set_field_back(void)
411411-{
412412- if (verbose) puts("STUB: set_field_back called");
413413- return NULL;
414414-}
415415-416416-void* set_field_buffer(void)
417417-{
418418- if (verbose) puts("STUB: set_field_buffer called");
419419- return NULL;
420420-}
421421-422422-void* set_field_fore(void)
423423-{
424424- if (verbose) puts("STUB: set_field_fore called");
425425- return NULL;
426426-}
427427-428428-void* set_field_init(void)
429429-{
430430- if (verbose) puts("STUB: set_field_init called");
431431- return NULL;
432432-}
433433-434434-void* set_field_just(void)
435435-{
436436- if (verbose) puts("STUB: set_field_just called");
437437- return NULL;
438438-}
439439-440440-void* set_field_opts(void)
441441-{
442442- if (verbose) puts("STUB: set_field_opts called");
443443- return NULL;
444444-}
445445-446446-void* set_field_pad(void)
447447-{
448448- if (verbose) puts("STUB: set_field_pad called");
449449- return NULL;
450450-}
451451-452452-void* set_field_status(void)
453453-{
454454- if (verbose) puts("STUB: set_field_status called");
455455- return NULL;
456456-}
457457-458458-void* set_field_term(void)
459459-{
460460- if (verbose) puts("STUB: set_field_term called");
461461- return NULL;
462462-}
463463-464464-void* set_field_type(void)
465465-{
466466- if (verbose) puts("STUB: set_field_type called");
467467- return NULL;
468468-}
469469-470470-void* set_field_userptr(void)
471471-{
472472- if (verbose) puts("STUB: set_field_userptr called");
473473- return NULL;
474474-}
475475-476476-void* set_fieldtype_arg(void)
477477-{
478478- if (verbose) puts("STUB: set_fieldtype_arg called");
479479- return NULL;
480480-}
481481-482482-void* set_fieldtype_choice(void)
483483-{
484484- if (verbose) puts("STUB: set_fieldtype_choice called");
485485- return NULL;
486486-}
487487-488488-void* set_form_fields(void)
489489-{
490490- if (verbose) puts("STUB: set_form_fields called");
491491- return NULL;
492492-}
493493-494494-void* set_form_init(void)
495495-{
496496- if (verbose) puts("STUB: set_form_init called");
497497- return NULL;
498498-}
499499-500500-void* set_form_opts(void)
501501-{
502502- if (verbose) puts("STUB: set_form_opts called");
503503- return NULL;
504504-}
505505-506506-void* set_form_page(void)
507507-{
508508- if (verbose) puts("STUB: set_form_page called");
509509- return NULL;
510510-}
511511-512512-void* set_form_sub(void)
513513-{
514514- if (verbose) puts("STUB: set_form_sub called");
515515- return NULL;
516516-}
517517-518518-void* set_form_term(void)
519519-{
520520- if (verbose) puts("STUB: set_form_term called");
521521- return NULL;
522522-}
523523-524524-void* set_form_userptr(void)
525525-{
526526- if (verbose) puts("STUB: set_form_userptr called");
527527- return NULL;
528528-}
529529-530530-void* set_form_win(void)
531531-{
532532- if (verbose) puts("STUB: set_form_win called");
533533- return NULL;
534534-}
535535-536536-void* set_max_field(void)
537537-{
538538- if (verbose) puts("STUB: set_max_field called");
539539- return NULL;
540540-}
541541-542542-void* set_new_page(void)
543543-{
544544- if (verbose) puts("STUB: set_new_page called");
545545- return NULL;
546546-}
547547-548548-void* unpost_form(void)
549549-{
550550- if (verbose) puts("STUB: unpost_form called");
551551- return NULL;
552552-}