1 FORM_FIELD_NEW(3CURSES) Curses Library Functions FORM_FIELD_NEW(3CURSES) 2 3 4 5 NAME 6 form_field_new, new_field, dup_field, link_field, free_field - create 7 and destroy forms fields 8 9 SYNOPSIS 10 cc [ flag... ] file... -lform -lcurses [ library... ] 11 #include <form.h> 12 13 FIELD *new_field(int r, int c, int frow, int fcol, int nrow, int ncol); 14 15 16 FIELD *dup_field(FIELD *field, int frow, int fcol); 17 18 19 FIELD *link_field(FIELD *field, int frow, int fcol); 20 21 22 int free_field(FIELD *field); 23 24 25 DESCRIPTION 26 new_field() creates a new field with r rows and c columns, starting at 27 frow, fcol, in the subwindow of a form. nrow is the number of off- 28 screen rows and nbuf is the number of additional working buffers. This 29 routine returns a pointer to the new field. 30 31 32 dup_field() duplicates field at the specified location. All field 33 attributes are duplicated, including the current contents of the field 34 buffers. 35 36 37 link_field() also duplicates field at the specified location. However, 38 unlike dup_field(), the new field shares the field buffers with the 39 original field. After creation, the attributes of the new field can be 40 changed without affecting the original field. 41 42 43 free_field() frees the storage allocated for field. 44 45 RETURN VALUES 46 Routines that return pointers return NULL on error. free_field() 47 returns one of the following: 48 49 E_OK 50 The function returned successfully. 51 52 53 E_CONNECTED 54 The field is already connected to a form. 55 56 57 E_SYSTEM_ERROR 58 System error. 59 60 61 E_BAD_ARGUMENT 62 An argument is incorrect. 63 64 65 ATTRIBUTES 66 See attributes(5) for descriptions of the following attributes: 67 68 69 70 71 +---------------+-----------------+ 72 |ATTRIBUTE TYPE | ATTRIBUTE VALUE | 73 +---------------+-----------------+ 74 |MT-Level | Unsafe | 75 +---------------+-----------------+ 76 77 SEE ALSO 78 curses(3CURSES), forms(3CURSES), attributes(5) 79 80 NOTES 81 The header <form.h> automatically includes the headers <eti.h> and 82 <curses.h>. 83 84 85 86 December 31, 1996 FORM_FIELD_NEW(3CURSES)