diff options
author | 2000-07-24 04:06:09 +0000 | |
---|---|---|
committer | 2000-07-24 04:06:09 +0000 | |
commit | 2a9262cfa0c64e36a033f83af8d3756af1bb0e57 (patch) | |
tree | bd7eebec09718dc6a1455d5b35dd937c44bb3da1 | |
parent | Rename move() to moveplayer() to avoid clashing with curses; (diff) | |
download | wireguard-openbsd-2a9262cfa0c64e36a033f83af8d3756af1bb0e57.tar.xz wireguard-openbsd-2a9262cfa0c64e36a033f83af8d3756af1bb0e57.zip |
Update to ncurses-5.1-20000722
-rw-r--r-- | lib/libcurses++/cursesf.cc | 11 | ||||
-rw-r--r-- | lib/libcurses++/cursesf.h | 93 | ||||
-rw-r--r-- | lib/libcurses++/cursesp.cc | 19 | ||||
-rw-r--r-- | lib/libcurses++/cursslk.cc | 7 | ||||
-rw-r--r-- | lib/libcurses/Makefile | 9 | ||||
-rw-r--r-- | lib/libcurses/base/lib_newterm.c | 16 | ||||
-rw-r--r-- | lib/libcurses/curs_color.3 | 6 | ||||
-rw-r--r-- | lib/libcurses/curs_extend.3 | 6 | ||||
-rw-r--r-- | lib/libcurses/curs_scanw.3 | 14 | ||||
-rw-r--r-- | lib/libcurses/curses.3tbl | 8 | ||||
-rw-r--r-- | lib/libcurses/curses.h | 4 | ||||
-rw-r--r-- | lib/libcurses/default_colors.3 (renamed from lib/libcurses/dft_fgbg.3) | 10 | ||||
-rw-r--r-- | lib/libcurses/tinfo/lib_tputs.c | 20 | ||||
-rw-r--r-- | lib/libcurses/trace/lib_tracebits.c | 63 | ||||
-rw-r--r-- | lib/libcurses/tty/tty_update.c | 25 | ||||
-rw-r--r-- | lib/libform/form_fieldtype.3 | 8 | ||||
-rw-r--r-- | lib/libmenu/Makefile | 10 | ||||
-rw-r--r-- | lib/libmenu/menu.3tbl | 22 | ||||
-rw-r--r-- | lib/libmenu/menu.h | 6 | ||||
-rw-r--r-- | lib/libmenu/menu_attributes.3 (renamed from lib/libmenu/menu_attribs.3) | 4 | ||||
-rw-r--r-- | usr.bin/tic/captoinfo.1tbl | 4 | ||||
-rw-r--r-- | usr.bin/tic/tic.1 | 4 | ||||
-rw-r--r-- | usr.bin/tset/tset.c | 28 |
23 files changed, 215 insertions, 182 deletions
diff --git a/lib/libcurses++/cursesf.cc b/lib/libcurses++/cursesf.cc index 1a88dbcab64..fe9a7a9acf9 100644 --- a/lib/libcurses++/cursesf.cc +++ b/lib/libcurses++/cursesf.cc @@ -35,7 +35,7 @@ #include "cursesapp.h" #include "internal.h" -MODULE_ID("$From: cursesf.cc,v 1.10 1999/10/30 23:49:28 tom Exp $") +MODULE_ID("$From: cursesf.cc,v 1.11 2000/06/09 16:15:40 juergen Exp $") NCursesFormField::~NCursesFormField () { if (field) @@ -48,7 +48,8 @@ NCursesFormField::~NCursesFormField () { FIELD** NCursesForm::mapFields(NCursesFormField* nfields[]) { int fieldCount = 0,lcv; - + FIELD** old_fields; + assert(nfields != 0); for (lcv=0; nfields[lcv]->field; ++lcv) @@ -63,8 +64,10 @@ NCursesForm::mapFields(NCursesFormField* nfields[]) { my_fields = nfields; - if (form) - delete[] ::form_fields(form); + if (form && (old_fields = ::form_fields(form))) { + ::set_form_fields(form,(FIELD**)0); + delete[] old_fields; + } return fields; } diff --git a/lib/libcurses++/cursesf.h b/lib/libcurses++/cursesf.h index ad977523cda..369d109a1c7 100644 --- a/lib/libcurses++/cursesf.h +++ b/lib/libcurses++/cursesf.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,12 +31,13 @@ * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 * ****************************************************************************/ -// $From: cursesf.h,v 1.11 1999/10/30 23:59:37 tom Exp $ +// $From: cursesf.h,v 1.12 2000/07/15 21:08:25 tom Exp $ #ifndef _CURSESF_H #define _CURSESF_H #include <cursesp.h> +#include <string.h> extern "C" { # include <form.h> @@ -91,10 +92,10 @@ protected: if (err != E_OK) THROW(new NCursesFormException (err)); } - + public: // Create a 'Null' field. Can be used to delimit a field list - NCursesFormField() + NCursesFormField() : field((FIELD*)0), ftype((NCursesFieldType*)0) { } @@ -104,14 +105,14 @@ public: int first_row = 0, int first_col = 0, int offscreen_rows = 0, - int additional_buffers = 0) + int additional_buffers = 0) : ftype((NCursesFieldType*)0) { field = ::new_field(rows,cols,first_row,first_col, offscreen_rows, additional_buffers); if (!field) OnError(errno); } - + virtual ~NCursesFormField (); // Duplicate the field at a new position @@ -321,12 +322,12 @@ private: static void frm_term(FORM *); static void fld_init(FORM *); static void fld_term(FORM *); - + // Calculate FIELD* array for the menu FIELD** mapFields(NCursesFormField* nfields[]); -protected: - // internal routines +protected: + // internal routines inline void set_user(void *user) { UserHook* uptr = (UserHook*)::form_userptr (form); assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form); @@ -337,8 +338,8 @@ protected: UserHook* uptr = (UserHook*)::form_userptr (form); assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form); return uptr->m_user; - } - + } + void InitForm (NCursesFormField* Fields[], bool with_frame, bool autoDeleteFields); @@ -353,14 +354,14 @@ protected: // 'Internal' constructor, builds an object without association to a // field array. - NCursesForm( int lines, - int cols, - int begin_y = 0, - int begin_x = 0) - : NCursesPanel(lines,cols,begin_y,begin_x), + NCursesForm( int lines, + int cols, + int begin_y = 0, + int begin_x = 0) + : NCursesPanel(lines,cols,begin_y,begin_x), form ((FORM*)0) { } - + public: // Create form for the default panel. NCursesForm (NCursesFormField* Fields[], @@ -372,9 +373,9 @@ public: // Create a form in a panel with the given position and size. NCursesForm (NCursesFormField* Fields[], - int lines, - int cols, - int begin_y, + int lines, + int cols, + int begin_y, int begin_x, bool with_frame=FALSE, // reserve space for a frame? bool autoDelete_Fields=FALSE) // do automatic cleanup? @@ -397,17 +398,17 @@ public: // Set these fields for the form inline void setFields(NCursesFormField* Fields[]) { - OnError(::set_form_fields(form,mapFields(Fields))); + OnError(::set_form_fields(form,mapFields(Fields))); } // Remove the form from the screen - inline void unpost (void) { - OnError (::unpost_form (form)); + inline void unpost (void) { + OnError (::unpost_form (form)); } - + // Post the form to the screen if flag is true, unpost it otherwise inline void post(bool flag = TRUE) { - OnError (flag ? ::post_form(form) : ::unpost_form (form)); + OnError (flag ? ::post_form(form) : ::unpost_form (form)); } // Decorations @@ -424,7 +425,7 @@ public: else OnError(E_SYSTEM_ERROR); } - + inline void label(const char *topLabel, const char *bottomLabel) { if (b_framed) NCursesPanel::label(topLabel,bottomLabel); @@ -578,18 +579,18 @@ template<class T> class NCursesUserForm : public NCursesForm protected: // 'Internal' constructor, builds an object without association to a // field array. - NCursesUserForm( int lines, - int cols, - int begin_y = 0, + NCursesUserForm( int lines, + int cols, + int begin_y = 0, int begin_x = 0, - const T* p_UserData = (T*)0) + const T* p_UserData = (T*)0) : NCursesForm(lines,cols,begin_y,begin_x) { if (form) set_user ((void *)p_UserData); } public: - NCursesUserForm (NCursesFormField Fields[], + NCursesUserForm (NCursesFormField Fields[], bool with_frame=FALSE, bool autoDelete_Fields=FALSE) : NCursesForm (Fields, with_frame, autoDelete_Fields) { @@ -603,11 +604,11 @@ public: if (form) set_user ((void *)p_UserData); }; - + NCursesUserForm (NCursesFormField Fields[], - int lines, - int cols, - int begin_y = 0, + int lines, + int cols, + int begin_y = 0, int begin_x = 0, const T* p_UserData = (T*)0, bool with_frame=FALSE, @@ -616,11 +617,11 @@ public: with_frame, autoDelete_Fields) { if (form) set_user ((void *)p_UserData); - }; - + }; + virtual ~NCursesUserForm() { }; - + inline T* UserData (void) const { return (T*)get_user (); }; @@ -645,7 +646,7 @@ private: } public: - Alpha_Field(int width) + Alpha_Field(int width) : NCursesFieldType(TYPE_ALPHA), min_field_width(width) { } @@ -660,7 +661,7 @@ private: } public: - Alphanumeric_Field(int width) + Alphanumeric_Field(int width) : NCursesFieldType(TYPE_ALNUM), min_field_width(width) { } @@ -678,7 +679,7 @@ private: public: Integer_Field(int prec, long low=0L, long high=0L) - : NCursesFieldType(TYPE_INTEGER), + : NCursesFieldType(TYPE_INTEGER), precision(prec), lower_limit(low), upper_limit(high) { } }; @@ -695,7 +696,7 @@ private: public: Numeric_Field(int prec, double low=0.0, double high=0.0) - : NCursesFieldType(TYPE_NUMERIC), + : NCursesFieldType(TYPE_NUMERIC), precision(prec), lower_limit(low), upper_limit(high) { } }; @@ -757,11 +758,11 @@ public: // ------------------------------------------------------------------------- // class UserDefinedFieldType : public NCursesFieldType { - friend class UDF_Init; // Internal helper to set up statics + friend class UDF_Init; // Internal helper to set up statics private: // For all C++ defined fieldtypes we need only one generic lowlevel // FIELDTYPE* element. - static FIELDTYPE* generic_fieldtype; + static FIELDTYPE* generic_fieldtype; protected: // This are the functions required by the low level libforms functions @@ -793,9 +794,9 @@ public: // ------------------------------------------------------------------------- // class UserDefinedFieldType_With_Choice : public UserDefinedFieldType { - friend class UDF_Init; // Internal helper to set up statics + friend class UDF_Init; // Internal helper to set up statics private: - // For all C++ defined fieldtypes with choice functions we need only one + // For all C++ defined fieldtypes with choice functions we need only one // generic lowlevel FIELDTYPE* element. static FIELDTYPE* generic_fieldtype_with_choice; diff --git a/lib/libcurses++/cursesp.cc b/lib/libcurses++/cursesp.cc index 2c5f5421056..20c6170442e 100644 --- a/lib/libcurses++/cursesp.cc +++ b/lib/libcurses++/cursesp.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -33,8 +33,9 @@ #include "cursesp.h" #include "internal.h" +#include <string.h> -MODULE_ID("$From: cursesp.cc,v 1.15 1999/10/30 23:59:37 tom Exp $") +MODULE_ID("$From: cursesp.cc,v 1.16 2000/07/15 21:08:13 tom Exp $") NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0; @@ -42,13 +43,13 @@ void NCursesPanel::init() { p = ::new_panel(w); if (!p) OnError(ERR); - + UserHook* hook = new UserHook; hook->m_user = NULL; hook->m_back = this; hook->m_owner = p; ::set_panel_userptr(p, (void *)hook); -} +} NCursesPanel::~NCursesPanel() { UserHook* hook = (UserHook*)::panel_userptr(p); @@ -61,7 +62,7 @@ NCursesPanel::~NCursesPanel() { void NCursesPanel::redraw() { PANEL *pan; - + pan = ::panel_above(NULL); while (pan) { ::touchwin(panel_window(pan)); @@ -95,20 +96,20 @@ NCursesPanel::frame(const char *title,const char *btitle) { int err = OK; if (!title && !btitle) { err = box(); - } + } else { err = box(); if (err==OK) - label(title,btitle); + label(title,btitle); } OnError(err); } void NCursesPanel::label(const char *tLabel, const char *bLabel) { - if (tLabel) + if (tLabel) centertext(0,tLabel); - if (bLabel) + if (bLabel) centertext(maxy(),bLabel); } diff --git a/lib/libcurses++/cursslk.cc b/lib/libcurses++/cursslk.cc index 7d39651b2ca..58afd5d4914 100644 --- a/lib/libcurses++/cursslk.cc +++ b/lib/libcurses++/cursslk.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,8 +34,9 @@ #include "cursslk.h" #include "cursesapp.h" #include "internal.h" +#include <string.h> -MODULE_ID("$From: cursslk.cc,v 1.5 1999/05/16 17:31:01 juergen Exp $") +MODULE_ID("$From: cursslk.cc,v 1.6 2000/07/15 21:07:50 tom Exp $") void Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text) { delete[] label; @@ -54,7 +55,7 @@ void Soft_Label_Key_Set::init() { for(int i=0; i < num_labels; i++) { slk_array[i].num = i+1; } - b_attrInit = FALSE; + b_attrInit = FALSE; } Soft_Label_Key_Set::Soft_Label_Key_Set() { diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile index f94571ebf71..0cd9a9051ce 100644 --- a/lib/libcurses/Makefile +++ b/lib/libcurses/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.45 2000/07/10 03:06:03 millert Exp $ +# $OpenBSD: Makefile,v 1.46 2000/07/24 04:06:09 millert Exp $ # Uncomment this to enable tracing in libcurses #CURSESTRACE=-DTRACE @@ -59,7 +59,7 @@ MAN= curs_addch.3 curs_addchstr.3 curs_addstr.3 curs_attr.3 curs_beep.3 \ curs_outopts.3 curs_overlay.3 curs_pad.3 curs_print.3 curs_printw.3 \ curs_refresh.3 curs_scanw.3 curs_scr_dump.3 curs_scroll.3 curs_slk.3 \ curs_termattrs.3 curs_touch.3 curs_util.3 curs_window.3 \ - curses.3 define_key.3 dft_fgbg.3 keybound.3 keyok.3 resizeterm.3 \ + curses.3 define_key.3 default_colors.3 keybound.3 keyok.3 resizeterm.3 \ wresize.3 termcap.3 terminfo.3 terminfo.5 term.5 term.7 MLINKS+=curses.3 ncurses.3 MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ @@ -168,9 +168,10 @@ MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 mvaddch.3 \ mvwin.3 curs_window.3 subwin.3 curs_window.3 derwin.3 curs_window.3 \ mvderwin.3 curs_window.3 dupwin.3 curs_window.3 wsyncup.3 \ curs_window.3 syncok.3 curs_window.3 wcursyncup.3 curs_window.3 \ - wsyncdown.3 dft_fgbg.3 use_default_colors.3 + wsyncdown.3 default_colors.3 use_default_colors.3 MLINKS+=curs_extend.3 curses_version.3 curs_extend.3 use_extended_names.3 \ - dft_fgbg.3 assume_default_colors.3 dft_fgbg.3 use_default_colors.3 + default_colors.3 assume_default_colors.3 default_colors.3 \ + use_default_colors.3 MLINKS+= terminfo.3 setupterm.3 terminfo.3 setterm.3 terminfo.3 set_curterm.3 \ terminfo.3 del_curterm.3 terminfo.3 restartterm.3 terminfo.3 tparm.3 \ terminfo.3 tparam.3 terminfo.3 tputs.3 terminfo.3 putp.3 \ diff --git a/lib/libcurses/base/lib_newterm.c b/lib/libcurses/base/lib_newterm.c index 23a5d3d892d..6e01e19a271 100644 --- a/lib/libcurses/base/lib_newterm.c +++ b/lib/libcurses/base/lib_newterm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_newterm.c,v 1.9 2000/07/10 03:06:15 millert Exp $ */ +/* $OpenBSD: lib_newterm.c,v 1.10 2000/07/24 04:06:10 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -49,7 +49,7 @@ #include <term.h> /* clear_screen, cup & friends, cur_term */ #include <tic.h> -MODULE_ID("$From: lib_newterm.c,v 1.46 2000/07/01 22:26:22 tom Exp $") +MODULE_ID("$From: lib_newterm.c,v 1.47 2000/07/22 22:33:34 Bruno.Haible Exp $") #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 @@ -200,10 +200,14 @@ newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp) */ { char *s; - if (((s = getenv("LC_ALL")) != 0 - || (s = getenv("LC_CTYPE")) != 0 - || (s = getenv("LANG")) != 0) - && strstr(s, "UTF-8") != 0) { + s = getenv("LC_ALL"); + if (s == NULL || *s == '\0') { + s = getenv("LC_CTYPE"); + if (s == NULL || *s == '\0') { + s = getenv("LANG"); + } + } + if (s != NULL && *s != '\0' && strstr(s, "UTF-8") != NULL) { SP->_outch = _nc_utf8_outch; } } diff --git a/lib/libcurses/curs_color.3 b/lib/libcurses/curs_color.3 index 95fa9a3ee70..db447938918 100644 --- a/lib/libcurses/curs_color.3 +++ b/lib/libcurses/curs_color.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: curs_color.3,v 1.8 2000/07/10 03:06:05 millert Exp $ +.\" $OpenBSD: curs_color.3,v 1.9 2000/07/24 04:06:09 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_color.3x,v 1.15 2000/07/08 11:59:51 tom Exp $ +.\" $From: curs_color.3x,v 1.16 2000/07/15 22:57:03 tom Exp $ .TH curs_color 3 "" .SH NAME \fBstart_color\fR, @@ -209,7 +209,7 @@ background color for all terminals can be modified using the \fBcurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_attr\fR(3), -\fBdft_fgbg\fR(3) +\fBdefault_colors\fR(3) .\"# .\"# The following sets edit modes for GNU EMACS .\"# Local Variables: diff --git a/lib/libcurses/curs_extend.3 b/lib/libcurses/curs_extend.3 index 722f362b4da..bff0d730d1e 100644 --- a/lib/libcurses/curs_extend.3 +++ b/lib/libcurses/curs_extend.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: curs_extend.3,v 1.2 2000/07/10 03:06:06 millert Exp $ +.\" $OpenBSD: curs_extend.3,v 1.3 2000/07/24 04:06:09 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1999,2000 Free Software Foundation, Inc. * @@ -30,7 +30,7 @@ .\" .\" Author: Thomas E. Dickey <dickey@clark.net> 1999 .\" -.\" $From: curs_extend.3x,v 1.4 2000/07/01 16:43:11 tom Exp $ +.\" $From: curs_extend.3x,v 1.6 2000/07/15 22:57:20 tom Exp $ .TH curs_extend 3 "" .SH NAME \fBcurs_extend\fR, @@ -74,8 +74,8 @@ any code depending on them be conditioned using NCURSES_VERSION. \fBcurs_getch\fR(3), \fBcurs_mouse\fR(3), \fBcurs_print\fR(3), +\fBdefault_colors\fR(3), \fBdefine_key\fR(3), -\fBdft_fgbg\fR(3), \fBkeybound\fR(3), \fBkeyok\fR(3), \fBresizeterm\fR(3), diff --git a/lib/libcurses/curs_scanw.3 b/lib/libcurses/curs_scanw.3 index 0c4cbd9c01c..2fdaf089635 100644 --- a/lib/libcurses/curs_scanw.3 +++ b/lib/libcurses/curs_scanw.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: curs_scanw.3,v 1.8 2000/07/10 03:06:08 millert Exp $ +.\" $OpenBSD: curs_scanw.3,v 1.9 2000/07/24 04:06:09 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * @@ -28,14 +28,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: curs_scanw.3x,v 1.10 2000/07/01 20:06:29 tom Exp $ +.\" $From: curs_scanw.3x,v 1.11 2000/07/15 21:48:17 tom Exp $ .TH curs_scanw 3 "" .SH NAME -+ \fBscanw\fR, -+ \fBwscanw\fR, -+ \fBmvscanw\fR, -+ \fBmvwscanw\fR, -+ \fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR window +\fBscanw\fR, +\fBwscanw\fR, +\fBmvscanw\fR, +\fBmvwscanw\fR, +\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR window .SH SYNOPSIS \fB#include <curses.h>\fR diff --git a/lib/libcurses/curses.3tbl b/lib/libcurses/curses.3tbl index a69033b1f09..f906acf45f8 100644 --- a/lib/libcurses/curses.3tbl +++ b/lib/libcurses/curses.3tbl @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: curses.3tbl,v 1.14 2000/07/10 03:06:10 millert Exp $ +.\" $OpenBSD: curses.3tbl,v 1.15 2000/07/24 04:06:09 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,1999 Free Software Foundation, Inc. * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: ncurses.3x,v 1.40 2000/07/08 13:10:31 tom Exp $ +.\" $From: ncurses.3x,v 1.41 2000/07/15 22:04:13 tom Exp $ .TH ncurses 3 "" .ds n 5 .ds d /usr/share/terminfo @@ -200,7 +200,7 @@ addch/\fBcurs_addch\fR(3) addchnstr/\fBcurs_addchstr\fR(3) addchstr/\fBcurs_addchstr\fR(3) addnstr/\fBcurs_addstr\fR(3) -assume_default_colors/\fBdft_fgbg\fR(3)* +assume_default_colors/\fBdefault_colors\fR(3)* attr_get/\fBcurs_attr\fR(3) attr_off/\fBcurs_attr\fR(3) attr_on/\fBcurs_attr\fR(3) @@ -433,7 +433,7 @@ unctrl/\fBcurs_util\fR(3) ungetch/\fBcurs_getch\fR(3) ungetmouse/\fBcurs_mouse\fR(3)* untouchwin/\fBcurs_touch\fR(3) -use_default_colors/\fBdft_fgbg\fR(3)* +use_default_colors/\fBdefault_colors\fR(3)* use_env/\fBcurs_util\fR(3) use_extended_names/\fBcurs_extend\fR(3)* vidattr/\fBterminfo\fR(3) diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h index ca6fb556e25..3fc791092ac 100644 --- a/lib/libcurses/curses.h +++ b/lib/libcurses/curses.h @@ -1,4 +1,4 @@ -/* $OpenBSD: curses.h,v 1.52 2000/07/10 03:06:10 millert Exp $ */ +/* $OpenBSD: curses.h,v 1.53 2000/07/24 04:06:09 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -50,7 +50,7 @@ /* These are defined only in curses.h, and are used for conditional compiles */ #define NCURSES_VERSION_MAJOR 5 #define NCURSES_VERSION_MINOR 1 -#define NCURSES_VERSION_PATCH 20000708 +#define NCURSES_VERSION_PATCH 20000722 /* This is defined in more than one ncurses header, for identification */ #undef NCURSES_VERSION diff --git a/lib/libcurses/dft_fgbg.3 b/lib/libcurses/default_colors.3 index c01f4a1a078..16e224d2c4c 100644 --- a/lib/libcurses/dft_fgbg.3 +++ b/lib/libcurses/default_colors.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dft_fgbg.3,v 1.6 2000/07/10 03:06:11 millert Exp $ +.\" $OpenBSD: default_colors.3,v 1.1 2000/07/24 04:06:10 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -28,12 +28,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey <dickey@clark.net> 1997,1999 +.\" Author: Thomas E. Dickey <dickey@clark.net> 1997,1999,2000 .\" -.\" $From: dft_fgbg.3x,v 1.12 2000/07/04 22:31:56 tom Exp $ -.TH dft_fgbg 3 "" +.\" $From: default_colors.3x,v 1.13 2000/07/15 22:06:50 tom Exp $ +.TH default_colors 3 "" .SH NAME -\fBdft_fgbg\fR, +\fBdefault_colors\fR, \fBuse_default_colors\fR, \fBassume_default_colors\fR \- use terminal's default colors .. diff --git a/lib/libcurses/tinfo/lib_tputs.c b/lib/libcurses/tinfo/lib_tputs.c index 4a5aa118864..11b13bac863 100644 --- a/lib/libcurses/tinfo/lib_tputs.c +++ b/lib/libcurses/tinfo/lib_tputs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_tputs.c,v 1.6 2000/06/19 03:53:50 millert Exp $ */ +/* $OpenBSD: lib_tputs.c,v 1.7 2000/07/24 04:06:10 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -47,7 +47,7 @@ #include <termcap.h> /* ospeed */ #include <tic.h> -MODULE_ID("$From: lib_tputs.c,v 1.47 2000/05/27 23:08:41 tom Exp $") +MODULE_ID("$From: lib_tputs.c,v 1.48 2000/07/22 22:33:23 Bruno.Haible Exp $") char PC = 0; /* used by termcap library */ speed_t ospeed = 0; /* used by termcap library */ @@ -80,7 +80,7 @@ delay_output(int ms) void _nc_flush(void) { - (void)fflush(NC_OUTPUT); + (void) fflush(NC_OUTPUT); } int @@ -122,20 +122,20 @@ _nc_utf8_outch(int ch) int result[7], *ptr; int count = 0; - if (ch < 0x80) + if ((unsigned int) ch < 0x80) count = 1; - else if (ch < 0x800) + else if ((unsigned int) ch < 0x800) count = 2; - else if (ch < 0x10000) + else if ((unsigned int) ch < 0x10000) count = 3; - else if (ch < 0x200000) + else if ((unsigned int) ch < 0x200000) count = 4; - else if (ch < 0x4000000) + else if ((unsigned int) ch < 0x4000000) count = 5; - else if (ch <= 0x7FFFFFFF) + else if ((unsigned int) ch <= 0x7FFFFFFF) count = 6; else { - count = 2; + count = 3; ch = 0xFFFD; } ptr = result + count; diff --git a/lib/libcurses/trace/lib_tracebits.c b/lib/libcurses/trace/lib_tracebits.c index fe933b0ad71..2460c4d8b95 100644 --- a/lib/libcurses/trace/lib_tracebits.c +++ b/lib/libcurses/trace/lib_tracebits.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_tracebits.c,v 1.5 2000/03/10 01:35:05 millert Exp $ */ +/* $OpenBSD: lib_tracebits.c,v 1.6 2000/07/24 04:06:11 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -36,7 +36,7 @@ #include <curses.priv.h> #include <term.h> /* cur_term */ -MODULE_ID("$From: lib_tracebits.c,v 1.5 2000/02/13 01:01:55 tom Exp $") +MODULE_ID("$From: lib_tracebits.c,v 1.6 2000/07/23 00:22:32 tom Exp $") #if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE) #define _POSIX_SOURCE @@ -155,30 +155,41 @@ _nc_tracebits(void) lookup_bits(buf, cflags, "cflags", cur_term->Nttyb.c_cflag); #if defined(CS5) && defined(CS8) - switch (cur_term->Nttyb.c_cflag & CSIZE) { -#if defined(CS5) && (CS5 != 0) - case CS5: - strcat(buf, "CS5 "); - break; -#endif -#if defined(CS6) && (CS6 != 0) - case CS6: - strcat(buf, "CS6 "); - break; -#endif -#if defined(CS7) && (CS7 != 0) - case CS7: - strcat(buf, "CS7 "); - break; -#endif -#if defined(CS8) && (CS8 != 0) - case CS8: - strcat(buf, "CS8 "); - break; -#endif - default: - strcat(buf, "CSIZE? "); - break; + { + static struct { + char *name; + int value; + } csizes[] = { + { + "CS5 ", CS5 + }, +#ifdef CS6 + { + "CS6 ", CS6 + }, +#endif +#ifdef CS7 + { + "CS7 ", CS7 + }, +#endif + { + "CS8 ", CS8 + }, + }; + char *result = "CSIZE? "; + int value = (cur_term->Nttyb.c_cflag & CSIZE); + unsigned n; + + if (value != 0) { + for (n = 0; n < SIZEOF(csizes); n++) { + if (csizes[n].value == value) { + result = csizes[n].name; + break; + } + } + } + strcat(buf, result); } #endif diff --git a/lib/libcurses/tty/tty_update.c b/lib/libcurses/tty/tty_update.c index 7127732c103..dfb983a61cc 100644 --- a/lib/libcurses/tty/tty_update.c +++ b/lib/libcurses/tty/tty_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_update.c,v 1.10 2000/07/10 03:06:17 millert Exp $ */ +/* $OpenBSD: tty_update.c,v 1.11 2000/07/24 04:06:11 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -72,7 +72,7 @@ #include <term.h> -MODULE_ID("$From: tty_update.c,v 1.141 2000/07/04 21:01:40 tom Exp $") +MODULE_ID("$From: tty_update.c,v 1.142 2000/07/23 01:41:17 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -858,14 +858,15 @@ ClrToEOL(chtype blank, bool needclear) int j; if (curscr != 0 - && SP->_cursrow >= 0 - && SP->_curscol >= 0) { + && SP->_cursrow >= 0) { for (j = SP->_curscol; j < screen_columns; j++) { - chtype *cp = &(curscr->_line[SP->_cursrow].text[j]); + if (j >= 0) { + chtype *cp = &(curscr->_line[SP->_cursrow].text[j]); - if (*cp != blank) { - *cp = blank; - needclear = TRUE; + if (*cp != blank) { + *cp = blank; + needclear = TRUE; + } } } } else { @@ -899,11 +900,9 @@ ClrToEOS(chtype blank) row = SP->_cursrow; col = SP->_curscol; - { - UpdateAttrs(blank); - TPUTS_TRACE("clr_eos"); - tputs(clr_eos, screen_lines - row, _nc_outch); - } + UpdateAttrs(blank); + TPUTS_TRACE("clr_eos"); + tputs(clr_eos, screen_lines - row, _nc_outch); while (col < screen_columns) curscr->_line[row].text[col++] = blank; diff --git a/lib/libform/form_fieldtype.3 b/lib/libform/form_fieldtype.3 index 77b85a3ff4e..72ff4b665a9 100644 --- a/lib/libform/form_fieldtype.3 +++ b/lib/libform/form_fieldtype.3 @@ -1,8 +1,8 @@ '\" t -.\" $OpenBSD: form_fieldtype.3,v 1.7 1999/01/22 03:30:53 millert Exp $ +.\" $OpenBSD: form_fieldtype.3,v 1.8 2000/07/24 04:06:11 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -29,8 +29,8 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: form_fieldtype.3x,v 1.7 1998/11/29 01:07:16 Rick.Ohnemus Exp $ -.TH form_field 3 "" +.\" $From: From: form_fieldtype.3x,v 1.8 2000/07/15 22:02:03 tom Exp $ +.TH form_fieldtype 3 "" .SH NAME \fBform_fieldtype\fR - define validation-field types .SH SYNOPSIS diff --git a/lib/libmenu/Makefile b/lib/libmenu/Makefile index 84f0b6f9c66..18ea99426f1 100644 --- a/lib/libmenu/Makefile +++ b/lib/libmenu/Makefile @@ -6,15 +6,15 @@ SRCS= m_adabind.c m_attribs.c m_cursor.c m_driver.c m_format.c \ m_req_name.c m_scale.c m_spacing.c m_sub.c m_userptr.c m_win.c HDRS= menu.h eti.h CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../libcurses -DHAVE_CONFIG_H -MAN= menu.3tbl menu_attribs.3 menu_cursor.3 menu_driver.3 menu_format.3 \ +MAN= menu.3tbl menu_attributes.3 menu_cursor.3 menu_driver.3 menu_format.3 \ menu_hook.3 menu_items.3 menu_mark.3 menu_new.3 menu_opts.3 \ menu_pattern.3 menu_post.3 menu_requestname.3 menu_spacing.3 \ menu_userptr.3 menu_win.3 mitem_current.3 mitem_name.3 mitem_new.3 \ mitem_opts.3 mitem_userptr.3 mitem_value.3 mitem_visible.3 -MLINKS= menu_attribs.3 set_menu_fore.3 menu_attribs.3 menu_fore.3 \ - menu_attribs.3 set_menu_back.3 menu_attribs.3 menu_back.3 \ - menu_attribs.3 set_menu_grey.3 menu_attribs.3 menu_grey.3 \ - menu_attribs.3 set_menu_pad.3 menu_attribs.3 menu_pad.3 \ +MLINKS= menu_attributes.3 set_menu_fore.3 menu_attributes.3 menu_fore.3 \ + menu_attributes.3 set_menu_back.3 menu_attributes.3 menu_back.3 \ + menu_attributes.3 set_menu_grey.3 menu_attributes.3 menu_grey.3 \ + menu_attributes.3 set_menu_pad.3 menu_attributes.3 menu_pad.3 \ menu_cursor.3 pos_menu_cursor.3 menu_format.3 set_menu_format.3 \ menu_hook.3 set_item_init.3 menu_hook.3 item_init.3 menu_hook.3 \ set_item_term.3 menu_hook.3 item_term.3 menu_hook.3 \ diff --git a/lib/libmenu/menu.3tbl b/lib/libmenu/menu.3tbl index 01e1e36b1c0..cf7e1e6d5cd 100644 --- a/lib/libmenu/menu.3tbl +++ b/lib/libmenu/menu.3tbl @@ -1,8 +1,8 @@ '\" t -.\" $OpenBSD: menu.3tbl,v 1.4 1999/01/22 03:45:06 millert Exp $ +.\" $OpenBSD: menu.3tbl,v 1.5 2000/07/24 04:06:12 millert Exp $ .\" .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: menu.3x,v 1.13 1998/11/29 01:09:07 Rick.Ohnemus Exp $ +.\" $From: menu.3x,v 1.14 2000/07/15 22:55:59 tom Exp $ .TH menu 3 "" .SH NAME \fBmenu\fR - curses extension for programming menus @@ -79,18 +79,18 @@ item_term \fBmenu_hook\fR(3) item_userptr \fBmitem_userptr\fR(3) item_value \fBmitem_value\fR(3) item_visible \fBmitem_visible\fR(3) -menu_back \fBmenu_attribs\fR(3) +menu_back \fBmenu_attributes\fR(3) menu_driver \fBmenu_driver\fR(3) -menu_fore \fBmenu_attribs\fR(3) +menu_fore \fBmenu_attributes\fR(3) menu_format \fBmenu_format\fR(3) -menu_grey \fBmenu_attribs\fR(3) +menu_grey \fBmenu_attributes\fR(3) menu_init \fBmenu_hook\fR(3) menu_items \fBmenu_items\fR(3) menu_mark \fBmenu_mark\fR(3) menu_opts \fBmenu_opts\fR(3) menu_opts_off \fBmenu_opts\fR(3) menu_opts_on \fBmenu_opts\fR(3) -menu_pad \fBmenu_attribs\fR(3) +menu_pad \fBmenu_attributes\fR(3) menu_pattern \fBmenu_pattern\fR(3) menu_request_by_name \fBmenu_requestname\fR(3) menu_request_name \fBmenu_requestname\fR(3) @@ -110,15 +110,15 @@ set_item_opts \fBmitem_opts\fR(3) set_item_term \fBmenu_hook\fR(3) set_item_userptr \fBmitem_userptr\fR(3) set_item_value \fBmitem_value\fR(3) -set_menu_back \fBmenu_attribs\fR(3) -set_menu_fore \fBmenu_attribs\fR(3) +set_menu_back \fBmenu_attributes\fR(3) +set_menu_fore \fBmenu_attributes\fR(3) set_menu_format \fBmenu_format\fR(3) -set_menu_grey \fBmenu_attribs\fR(3) +set_menu_grey \fBmenu_attributes\fR(3) set_menu_init \fBmenu_hook\fR(3) set_menu_items \fBmenu_items\fR(3) set_menu_mark \fBmenu_mark\fR(3) set_menu_opts \fBmitem_opts\fR(3) -set_menu_pad \fBmenu_attribs\fR(3) +set_menu_pad \fBmenu_attributes\fR(3) set_menu_pattern \fBmenu_pattern\fR(3) set_menu_spacing \fBmenu_spacing\fR(3) set_menu_sub \fBmenu_win\fR(3) diff --git a/lib/libmenu/menu.h b/lib/libmenu/menu.h index 30ec458ec71..519a1a1335e 100644 --- a/lib/libmenu/menu.h +++ b/lib/libmenu/menu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: menu.h,v 1.5 1999/05/17 03:04:26 millert Exp $ */ +/* $OpenBSD: menu.h,v 1.6 2000/07/24 04:06:12 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -35,6 +35,10 @@ #ifndef ETI_MENU #define ETI_MENU +#ifdef AMIGA +#define TEXT TEXT_ncurses +#endif + #include <curses.h> #include <eti.h> diff --git a/lib/libmenu/menu_attribs.3 b/lib/libmenu/menu_attributes.3 index 47389609262..e400d63fe20 100644 --- a/lib/libmenu/menu_attribs.3 +++ b/lib/libmenu/menu_attributes.3 @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: menu_attribs.3,v 1.6 1999/01/22 03:45:06 millert Exp $ +.\" $OpenBSD: menu_attributes.3,v 1.1 2000/07/24 04:06:12 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998 Free Software Foundation, Inc. * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: menu_attribs.3x,v 1.6 1998/11/29 01:09:20 Rick.Ohnemus Exp $ +.\" $From: menu_attributes.3x,v 1.6 1998/11/29 01:09:20 Rick.Ohnemus Exp $ .TH menu_attributes 3 "" .SH NAME \fBmenu_attributes\fR - color and attribute control for menus diff --git a/usr.bin/tic/captoinfo.1tbl b/usr.bin/tic/captoinfo.1tbl index ddff93bcb86..b4ae46c7cab 100644 --- a/usr.bin/tic/captoinfo.1tbl +++ b/usr.bin/tic/captoinfo.1tbl @@ -1,5 +1,5 @@ '\" t -.\" $OpenBSD: captoinfo.1tbl,v 1.5 2000/03/26 16:45:04 millert Exp $ +.\" $OpenBSD: captoinfo.1tbl,v 1.6 2000/07/24 04:06:12 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * @@ -29,7 +29,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: captoinfo.1m,v 1.14 2000/03/19 02:20:28 tom Exp $ +.\" $From: captoinfo.1m,v 1.15 2000/07/15 23:04:27 china Exp $ .TH captoinfo 1 "" .ds n 5 .ds d /usr/share/terminfo diff --git a/usr.bin/tic/tic.1 b/usr.bin/tic/tic.1 index 9cf07865de0..ef8d4b21697 100644 --- a/usr.bin/tic/tic.1 +++ b/usr.bin/tic/tic.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tic.1,v 1.10 2000/03/26 16:45:04 millert Exp $ +.\" $OpenBSD: tic.1,v 1.11 2000/07/24 04:06:12 millert Exp $ .\" .\"*************************************************************************** .\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $From: tic.1m,v 1.26 2000/03/19 02:18:18 tom Exp $ +.\" $From: tic.1m,v 1.27 2000/07/15 23:04:27 china Exp $ .TH tic 1 "" .ds n 5 .ds d /usr/share/terminfo diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c index e23a49bece0..1488060a31a 100644 --- a/usr.bin/tset/tset.c +++ b/usr.bin/tset/tset.c @@ -102,7 +102,7 @@ char *ttyname(int fd); #include <curses.h> /* for bool typedef */ #include <dump_entry.h> -MODULE_ID("$From: tset.c,v 0.41 2000/03/12 00:03:00 tom Exp $") +MODULE_ID("$From: tset.c,v 0.42 2000/07/09 23:17:34 tom Exp $") extern char **environ; @@ -260,10 +260,19 @@ static const SPEEDS speeds[] = {"2400", B2400}, {"4800", B4800}, {"9600", B9600}, + /* sgttyb may define up to this point */ +#ifdef B19200 {"19200", B19200}, +#endif +#ifdef B38400 {"38400", B38400}, +#endif +#ifdef B19200 {"19200", B19200}, +#endif +#ifdef B38400 {"38400", B38400}, +#endif #ifdef B19200 {"19200", B19200}, #else @@ -761,6 +770,7 @@ reset_mode(void) * Returns a "good" value for the erase character. This is loosely based on * the BSD4.4 logic. */ +#ifdef TERMIOS static int default_erase(void) { @@ -775,6 +785,7 @@ default_erase(void) return result; } +#endif /* * Update the values of the erase, interrupt, and kill characters in 'mode'. @@ -954,10 +965,10 @@ set_tabs() /* * Tell the user if a control key has been changed from the default value. */ +#ifdef TERMIOS static void report(const char *name, int which, unsigned def) { -#ifdef TERMIOS unsigned older, newer; char *p; @@ -984,8 +995,8 @@ report(const char *name, int which, unsigned def) (void) fprintf(stderr, "control-%c (^%c).\n", newer, newer); } else (void) fprintf(stderr, "%c.\n", newer); -#endif } +#endif /* * Convert the obsolete argument forms into something that getopt can handle. @@ -1052,17 +1063,12 @@ main(int argc, char **argv) void wrtermcap (char *); #endif /* __OpenBSD__ */ -#ifdef TERMIOS - if (tcgetattr(STDERR_FILENO, &mode) < 0) + if (GET_TTY(STDERR_FILENO, &mode) < 0) failed("standard error"); - oldmode = mode; +#ifdef TERMIOS ospeed = cfgetospeed(&mode); #else - if (gtty(STDERR_FILENO, &mode) < 0) - failed("standard error"); - - oldmode = mode; ospeed = mode.sg_ospeed; #endif @@ -1179,11 +1185,13 @@ main(int argc, char **argv) * If erase, kill and interrupt characters could have been * modified and not -Q, display the changes. */ +#ifdef TERMIOS if (!quiet) { report("Erase", VERASE, CERASE); report("Kill", VKILL, CINTR); report("Interrupt", VINTR, CKILL); } +#endif } #ifdef __OpenBSD__ |