Commit Graph

157 Commits

Author SHA1 Message Date
blymn 316f67d63e Add defines MIN_FORM_COMMAND and MAX_FORM_COMMAND for ncurses
compatibility.  This closes PR 20029.
2004-01-23 13:01:17 +00:00
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
lukem c6af0a620d clear errno before strtol() if we're going to test it for ERANGE afterwards 2003-04-17 03:25:56 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
perry 8e25ed3ff9 currrent->current, accomodate->accommodate from Igor Sobrado PR misc/19814
also recognise->recognize (sorry, I know, flames anticipated.)
2003-03-31 18:44:09 +00:00
perry c286c47561 curent->current from Igor Sobrado in PR misc/19814
plus some other spelling errors and (sorry) some UK->USing for
consistency.
2003-03-31 18:41:51 +00:00
wiz 83de4abed2 Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
2003-03-15 23:48:27 +00:00
lukem a2ed7b2d73 use __RCSID() 2003-03-09 00:57:17 +00:00
wiz 03c12ea0f3 New sentence, new line. From Robert Elz. 2002-10-01 19:15:15 +00:00
blymn 841a6ed66f Allow either the field_check or char_check pointers to be NULL, as
suggested in PR 18028.
2002-08-22 11:34:00 +00:00
blymn 67d86161c7 Added MLINK entries to link all function names to their respective
man page.
2002-08-11 11:57:44 +00:00
blymn c4f23a93e4 Added extension to interface, set_field_printf which allows a printf
style setting of field buffers.
2002-08-09 14:15:12 +00:00
blymn d0dbcd8f3c Fix null dereference in set_field_type. 2002-08-07 13:57:03 +00:00
blymn d87fd85949 Prevent field scrolling when REQ_RIGHT_CHAR hits the RHS of the field. 2002-08-07 11:05:10 +00:00
wiz 6bce40bcab The argument of .Fn should look like this:
.Fn function_name "int first" "char *second"
not like this:
.Fn function_name "int first, char *second".
2002-08-06 12:44:34 +00:00
wiz af9ce6b208 Fix mdoc. Closes lib/17855. 2002-08-06 12:35:39 +00:00
blymn ad3d412058 set_field_opts and field_opts_on were both using the wrong pointer
resulting in libform crashing if O_STATIC was set on the default field.
2002-08-05 12:43:44 +00:00
blymn 8d09f0f70d Redraw field when the flags for the field change iff the field is
attached to a form and the form is posted.
2002-08-03 14:34:22 +00:00
blymn 93ae143731 Do not free the first element of the fields array. This fixes pr 17754. 2002-08-02 14:10:25 +00:00
blymn 4e295cd045 Allow REQ_RIGHT_CHAR to get to the end of the line. 2002-08-02 11:49:18 +00:00
blymn a5ab810726 Refresh window after a driver command. 2002-08-02 11:48:02 +00:00
blymn fa8f5d02f8 Reposition form cursor after field redrawn when setting a field value,
since the field set may not be the current one.  This fixes PR 17533.
2002-07-31 01:28:32 +00:00
blymn 90d6019c5e * Fix bad function reference. 2002-07-29 05:23:30 +00:00
blymn d0d41d9fd4 * Fix cursor motion bugs referred to in pr 17480
* Handle cursor motion for justifications other than left justified.
2002-07-29 05:17:37 +00:00
blymn ecd0dffb79 * Set character attributes when adding pad to field, null fields will
now be displayed correctly (fixes part 1 of pr 17480)
* Prevent field manipulations on null fields, the fields have nothing in
  them so they should not be manipulated.
2002-07-08 10:43:37 +00:00
blymn 8845943881 Prevent set_field_buffer from redrawing field that is attached to a form
when the form is not posted.
2002-07-04 10:51:02 +00:00
blymn 5ce770b15c Fixed typo in type declaration. 2002-06-19 14:12:57 +00:00
blymn 759e545dce * Major rework to allow the TAB character in fields. 2002-05-20 15:00:11 +00:00
wiz f8d8496236 Two fixes by Patrick Welche, and two by me. 2002-02-20 17:45:42 +00:00
wiz 0b7fe888c8 Normalize Dd. 2002-02-20 11:30:57 +00:00
wiz 8a5f4f7cae Normalize Dd, use Nx. 2002-02-20 11:30:35 +00:00
wiz b454907bfa Fix some markup, add menus(3) to SEE ALSO. 2002-02-20 11:30:07 +00:00
ross 9856438e91 generate & symbolically 2002-02-07 09:24:04 +00:00
ross 814f296b77 Generate <>& symbolically. 2002-02-07 07:00:09 +00:00
wiz b9661d6129 Whitespace nits. 2002-01-15 02:47:02 +00:00
thorpej c64b324a8f Fix -Wshadow warnings (gcc 3.1). 2001-12-31 01:04:46 +00:00
christos c709268130 bump major because of libcurses bump. 2001-12-03 14:02:41 +00:00
blymn ea62425208 Removed stray characters in comment block. 2001-09-27 07:56:34 +00:00
blymn d70e5167de Added notes about differences between this libform and the original AT&T
implementation.
2001-08-05 02:13:19 +00:00
blymn b3751f89f8 * Wrap field size checking into a function, makes if's more readable
* Fixed bad post character calculation on a dynamic single line field
  that has field contents greater than the field length and had scrolled.
2001-08-05 01:51:23 +00:00
blymn cbb9312d8b line up function prototype names. 2001-07-18 12:27:53 +00:00
blymn a818d9cc76 new_field argument list too long, use .Fo/.Fa/.Fc 2001-07-18 12:24:27 +00:00
blymn 46683adc25 Fix error returns. 2001-07-08 13:02:29 +00:00
blymn 11b49061bf ansify field_info prototype. 2001-07-08 13:01:21 +00:00
blymn cc66fb4a40 Add missing function and make some error returns into proper eti.h
errors.
2001-07-08 12:15:06 +00:00
blymn 92f6cf54a6 Added man pages. 2001-07-08 12:12:38 +00:00
blymn e1a3174b3e Add man pages for libform. 2001-07-08 12:10:28 +00:00
blymn c2f6b938e1 The information in the README no longer applies. 2001-07-08 10:35:26 +00:00
blymn 2a68310bea Fix limits on dynamic fields. 2001-06-28 11:38:19 +00:00
blymn 68c74a663e * Fixed REQ_DEL_CHAR for multi-line fields.
* Fixed REQ_DEL_LINE for multi-line fields.
2001-06-23 13:34:01 +00:00
wiz c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
blymn b179973d9d * Make req_del_prev work in multiline field. 2001-06-04 11:44:30 +00:00
blymn cf2022720d * Only line wrap buffer 0 in set_field_buffer since this is the
only one displayed.
2001-06-04 11:42:09 +00:00
blymn d0d87c13ff * Fix forward word and backward word driver commands. 2001-05-25 13:46:15 +00:00
blymn 98181dccba * Fix some of the cursor motion commands to handle multiline fields
* Fix line wrapping code for multiline fields
2001-05-23 15:02:55 +00:00
blymn 3f76420b8a Fixed wrapping of multiline fields. 2001-05-16 11:51:16 +00:00
sommerfeld 4c8f741def Add #include <string.h> to correct compile problem on alpha 2001-05-12 14:46:24 +00:00
blymn 7ffbe072ab * Rototilled internals to make multiline fields work correctly. Some
bugs remain such as vertical scrolling is not working and the field
  is not correctly redrawn after being cleared.  There are bound to be
  others.
2001-05-11 14:04:48 +00:00
blymn 0a50f51b50 Changed check_field code to use standard library calls for checking
the IPV6 address.  This code was provided to me by Itojun, thanks for
that go to him :-)
2001-05-11 13:59:43 +00:00
blymn 47eb37d515 * Fixed horizontal scrolling. 2001-04-06 05:24:59 +00:00
blymn a773c5b773 * Fix horizontal scrolling
* Fix cursor positioning at the end of a static field
* Fix the end field request handler.
2001-04-06 05:03:22 +00:00
blymn ab600f6ad4 * Fixes for horizontal scrolling
* Character is added to the destination field in auto-skip mode when
  a new field is skipped to.
2001-04-06 04:40:43 +00:00
blymn 7e7a04dc80 Bumped major because driver commands have changed value and the subwin
is no longer created by the library.
2001-03-25 12:37:29 +00:00
blymn 64bd55957f * Remove code that created the subwin if it did not exist as this is
not the correct behaviour.
 * Mods to support new curses window behaviour.
2001-03-25 12:34:47 +00:00
blymn 4aa1a8e86c * Fix wrapping behaviour - O_WRAP turns on/off wrapping on word
boundaries.
 * Only justify static fields and only scroll dynamic fields.
 * Handle O_PUBLIC and O_VISIBLE flags when drawing field.
 * Changes to support new curses window handling.
2001-03-25 12:32:53 +00:00
blymn 172c564232 * Bracket constant defines
* Driver commands are now offset by curses KEY_MAX
2001-03-25 12:27:22 +00:00
blymn 919001b4a1 * Fixed curses window handling, library no longer creates a subwin.
* Do not position the cursor in the field is O_PUBLIC is not set.
2001-03-25 12:24:47 +00:00
blymn 6c29066dc9 * truncate field contents to field length if field is or becomes static
* Allow field options to be changed when field posted unless field
   is the current one.
 * Allow field justification to be changed when field posted unless it
   is the current one.
 * dynamic_field_info now returns field size in rows and columns if
   the field is static - previously this was an error.
2001-03-25 12:21:06 +00:00
blymn a6ae537d07 Handle the "unknown" ipv6 address form (::). 2001-02-16 03:28:24 +00:00
blymn 3ebef9c407 Added new function form_max_page. 2001-02-16 03:21:35 +00:00
blymn 9bb8631d38 replace strncpy with strlcpy.... 'nuff said. 2001-02-16 03:19:32 +00:00
blymn af82d72d3e Avoid trying to wrap a single row field. 2001-02-15 05:21:26 +00:00
blymn 6cda6dc59f Truncate the buffer string to the field buffer size if the field is static. 2001-02-15 05:20:42 +00:00
blymn 95df9c4076 Various bug fixes:
* Allow the / char in the char_check routine
* Added debug for field checking
* Fixed handling of the 0xaabbccdd form
* Always set buffer 1 if it is available - previously dotted quad
  did not set this buffer.
* Fixed segv if no dots found
2001-02-13 01:00:11 +00:00
blymn ab9688a19e Fixed various bugs, the ipv6 type now works... 2001-02-11 12:15:30 +00:00
blymn 944e9d510a Extended the address formats that are allowed to include aa.bb.cc.dd/nn
and 0xaabbccdd styles.
2001-02-10 14:57:53 +00:00
blymn cf4178992e Check NULL0K _before_ PASSOK and clean up the PASSOK logic. 2001-02-10 14:55:18 +00:00
blymn 445edb6de2 Added ipv6 builtin type. 2001-02-10 14:53:11 +00:00
blymn 11525656c8 New builtin type to handle ipv6 style addresses. Thanks to Charles
Hannum for suggesting this needed to be done.
2001-02-10 14:51:32 +00:00
blymn 3d2346b6d0 * Moved field overflow check into _formi_add_char to allow overwriting a
full field.
* Fixed buf0_status being reset so O_BLANK now works correctly.
2001-02-06 00:02:25 +00:00
blymn 69869e5c1a Restructured driver character insert to allow overwrite of full field
without autoskipping.
2001-02-05 23:59:52 +00:00
blymn 644e74211b Made the field wrapping function available to other modules. 2001-02-03 12:41:08 +00:00
blymn d7aa2675c9 Fixed the counting of rows in the field.
Fixed O_NULLOK handling in field validation
2001-02-03 12:38:47 +00:00
blymn 7ce7b46217 Buffer now wrapped and redrawn when buffer is set. 2001-02-03 12:35:14 +00:00
blymn 043f30d2d2 Reset offsets when a new field is entered. 2001-02-03 12:33:17 +00:00
blymn 99af4c1003 Added field and character checking. 2001-01-30 06:44:42 +00:00
blymn 790e1a7fb4 When buffers are created they are given an empty string instead of just
being set to NULL.  Stops us returning a NULL pointer for buffers that
are never set.
2001-01-30 06:33:51 +00:00
blymn 91a2e44938 Fix off by one bug in field scrolling decision when inserting chars. 2001-01-23 02:01:56 +00:00
blymn 6334f1911b Added support for the O_OVERLOAD_* form options. 2001-01-23 01:59:29 +00:00
blymn b7108db3c2 Added check for null args pointer. 2001-01-23 01:57:01 +00:00
blymn 2746300fb2 Don't manipulate a field with a null string pointer.
Cleaned up debug code to handle null string pointer case too.
2001-01-22 01:07:33 +00:00
blymn 0e267bb5c1 Changed ordering of the cursor positioning call so the posted flag is
set before form_pos_cursor is called.
2001-01-22 01:05:34 +00:00
blymn 9149afdc3b bump lib minor 2001-01-21 11:49:20 +00:00
blymn 5b3b45d26a Position cursor when posting the form. 2001-01-21 11:48:29 +00:00
blymn 3df15dbec6 Prevent negative index on strncpy if end = start = 0 2001-01-21 11:47:09 +00:00
blymn cee5688d61 Prototype function for opening debug file. 2001-01-21 11:43:43 +00:00
blymn cc04d0d72a Prevent negative index in strncpy if start = end = 0 2001-01-21 11:42:14 +00:00
augustss c029defce9 Make these compile again.
(Say after me: Compile before commit. :)
2001-01-20 14:48:55 +00:00
blymn 36483ba984 * Fixed common error in all types code
* Removed the args field from types struct and made sure the args in
  the field are used.
2001-01-20 11:03:43 +00:00
blymn bcd5895d31 Fixed segv if a field that never had buffer 0 set has characters added
to it.
2001-01-18 23:53:10 +00:00