1form_field_new(3X)                                          form_field_new(3X)
2
3
4

NAME

6       form_field_new - create and destroy form fields
7

SYNOPSIS

9       #include <form.h>
10       FIELD *new_field(int height, int width,
11                        int toprow, int leftcol,
12                        int offscreen, int nbuffers);
13       FIELD *dup_field(FIELD *field, int toprow, int leftcol);
14       FIELD *link_field(FIELD *field, int toprow, int leftcol);
15       int free_field(FIELD *field);
16

DESCRIPTION

18       The  function  new_field  allocates a new field and initializes it from
19       the parameters given: height, width, row of upper-left  corner,  column
20       of  upper-left corner, number off-screen rows, and number of additional
21       working buffers.
22
23       The function dup_field duplicates a field  at  a  new  location.   Most
24       attributes  (including  current contents, size, validation type, buffer
25       count, growth threshold,  justification,  foreground,  background,  pad
26       character, options, and user pointer) are copied.  Field status and the
27       field page bit are not copied.
28
29       The function link_field acts like dup_field, but the new  field  shares
30       buffers with its parent.  Attribute data is separate.
31
32       The function free_field de-allocates storage associated with a field.
33

RETURN VALUE

35       The  function,  new_field,  dup_field, link_field return NULL on error.
36       They set errno according to their success:
37
38       E_OK The routine succeeded.
39
40       E_BAD_ARGUMENT
41            Routine detected an incorrect or out-of-range argument.
42
43       E_SYSTEM_ERROR
44            System error occurred, e.g., malloc failure.
45
46       The function free_field returns one of the following:
47
48       E_OK The routine succeeded.
49
50       E_BAD_ARGUMENT
51            Routine detected an incorrect or out-of-range argument.
52
53       E_CONNECTED
54            field is connected.
55

SEE ALSO

57       curses(3X), form(3X).
58

NOTES

60       The  header  file  <form.h>  automatically  includes  the  header  file
61       <curses.h>.
62

PORTABILITY

64       These  routines emulate the System V forms library.  They were not sup‐
65       ported on Version 7 or BSD versions.
66
67       It may be unwise to count on the set of attributes copied by  dup_field
68       being  portable;  the  System  V  forms  library documents are not very
69       explicit about what gets copied and what does not.
70

AUTHORS

72       Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S.
73       Raymond.
74
75
76
77                                                            form_field_new(3X)
Impressum