Commit Graph

30 Commits

Author SHA1 Message Date
fvdl 03de13db6e Fix a few cases where NULL was used as integral value. 2003-10-21 02:55:43 +00:00
itojun 33c55cb2ac make use of realloc(3) safe 2003-10-16 06:19:11 +00:00
itojun 6ba71df691 use bounded string op 2003-07-16 06:40:47 +00:00
itojun 7087f39f8d use strlcpy/cat 2003-06-13 07:26:41 +00:00
blymn d8747fc408 Incorrect form commands were used for the left and right char handlers. 2002-08-07 11:03:45 +00:00
jdolecek fceac2db48 After showing help, touchwin/wrefresh the stdscr, do not try to do
that for form subwindow, which may be NULL (or is always, even?).

This fixes SIGSEGV when one goes to
Network related configuration -> Modify the hosts file -> Delete host entries
and presses F1 (Help).
2002-07-26 08:43:26 +00:00
jdolecek d5d1e7aa6c fgetln() does NOT return NUL-terminated string
This fixes bin/13624 by Jun-ichiro itojun Hagino
2002-07-26 07:59:33 +00:00
jdolecek 973b4b497c form_appenditem(): make sure fte->list is initialized
process_{pre,}form(): g/c unnecessary malloc, plug memory leak
gen_list(): only check ftp->list after realloc()
handle_{pre,}form(): allocate F[] via calloc(3), so that the memory is
     properly zeroed
2002-07-25 12:42:39 +00:00
jdolecek ee3d448cbd Array retrurned by form_fields() is NOT NULL-terminated - use field_count()
to get amount of fields on the form instead.
This fixes a SIGSEGV problem I encountered, and possibly also the crash part
of bin/17718 by Grant Beattie.
2002-07-25 09:38:31 +00:00
christos 93756e61ad XXX: this code needs a lot more cleanup... There is no clear malloc/free
policy and the data dependent initialization is very fragile. I.e.
     the code assumes because the data entry is of type foo, it has
     initialized certain fields and others not.
- make sure list is not NULL before you use it.
- don't realloc on every loop iteration!
- don't increment i when there are short lines; leads to uninitialized
  list[i] entries [fixes bills' core-dump, hi bill!]
2002-04-02 18:59:54 +00:00
itojun bb65ba4b13 fgetln() does not \0-terminate the result. 2001-08-03 09:18:58 +00:00
garbled c63c221b86 Fix a bug in the multilist noted by Brett Lymn. When nothing was selected
from the popup, don't populate the field with a NULL buffer.

Edit the TODO list, removing a few fixed items from my bughunt tonight.
2001-08-01 09:08:55 +00:00
garbled 6ee451eb01 Oops.. forgot to back a change out 2001-04-06 07:57:05 +00:00
garbled d0d9366447 Back out part of last change. it had an undesired effect. 2001-03-16 12:54:47 +00:00
garbled db9db9cc00 Handle the error case that the script specified in an escript-like form
function does not exist a little better, rather than dying later in fgetln.
Also fix up a wierd corner case in escript where the programmer forgets
to put in the scriptname.
2001-03-15 09:10:31 +00:00
garbled dc4794cae1 Fix a few bugs in the handling of INVIS and NOEDIT fields. Mostly having
to do with very large fields being cut off by the end of the screen.
Also.. change the max-width of an onscreen field to 19 from 21..  I don't
know where I got 21 from.. but it was definately wrong.
2001-03-14 08:22:00 +00:00
garbled 2566752a91 Add IPV6 and IPV4 field types to sushi. 2001-03-07 10:10:20 +00:00
garbled 25a0bdc99a Fix handling of the backspace and delete keys when editing a field. 2001-02-01 08:43:46 +00:00
garbled aa592358be Add a popup message telling users how to use the multiple selection and
list field types, so users aren't mystified when they encounter one.
2001-02-01 08:29:46 +00:00
garbled 305f1af6ff Major cleanup:
Add new form keyword, iscript, which allows script generated integer fields.
This uncovered a whole host of bugs, which uncovered a whole host of memory
leaks, which hopefully I've fixed most of now (in this file at least).
2001-01-31 09:35:42 +00:00
garbled 18d0882a77 Add a function to fetch a list of different package categories that are
available to the user to install binary packages with.

Modify the function API so it can handle preforms like it is supposed to.
2001-01-24 09:30:30 +00:00
garbled 1dc7842166 Deal with null returns from script entry field types in a semi-sane manner 2001-01-24 08:29:56 +00:00
garbled 18e0c94727 Fix an off-by one error in run.c having to do with the down arrow, and fix
some minor display glitches in the form routines.
2001-01-24 07:46:23 +00:00
garbled 69f61c7f62 Fix the editing popup window so it's actually readable. 2001-01-24 07:23:51 +00:00
garbled fdb7bdb2c0 Fix some bugs pointed out by Brett Lymn where I wasn't checking the return
value of field_buffer.
2001-01-24 07:17:10 +00:00
garbled b4aac50fda Changes to sushi to allow users to bind different keys to the various
built-in functions.  This allows users to change F1 to say, ^X, in the case
where a function key might not be available, or perhaps is bound to a window
manager.

problem noted by Nathan Williams
2001-01-10 10:00:29 +00:00
garbled ee3a00e29e de-lint 2001-01-10 03:05:48 +00:00
garbled 009ea1962a Fix a segfault when the user hits ESC inside the F4 selection box for a
list field.
2001-01-09 19:32:35 +00:00
veego df22eba7da len is size_t and not int.
Fixes compile problem on alpha.
2001-01-06 15:04:05 +00:00
garbled fbbe4d12db Initial import of sushi.
Sushi is an interactive, menu-based program that is designed to aid
the user or administrator with administrative and complex tasks on thier
machines.

Sushi provides a menu of various functions that the user can perform on
his or her machine.  Once the user selects a desired function, the
function is either performed outright, or in most cases, the user is
asked to fill in a simple form with required and option information,
which is then processed by sushi, and the action occurs.

The programming interface for sushi is very simple.  There are
directories containing various files, such as menu indexes, or forms for
the user to fill out.  These files are interpreted by sushi to generate
the menus the user sees on his/her screen.  When the form is filled out
by the user, the entries are passed as command-line arguments to a
program, or script contained in one of the subdirectories.  In this way,
it is possible to add new entries to the sushi menu structure, by simply
adding a new menu item, form and script, the binary does not need to be
recompiled to take advantage of this new menu.
2001-01-05 01:28:33 +00:00