Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add capfile(5) to describe the termcap format.



details:   https://anonhg.NetBSD.org/src/rev/5643d6cb58a3
branches:  trunk
changeset: 778937:5643d6cb58a3
user:      roy <roy%NetBSD.org@localhost>
date:      Sat Apr 21 12:27:24 2012 +0000

description:
Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.

diffstat:

 distrib/sets/lists/comp/mi               |    8 +-
 distrib/sets/lists/man/mi                |   11 +-
 doc/RESPONSIBLE                          |    4 +-
 games/backgammon/backgammon/backgammon.6 |   14 +-
 lib/libc/gen/cgetcap.3                   |  264 +------------------------------
 lib/libc/gen/getttyent.3                 |    8 +-
 lib/libc/sys/issetugid.2                 |    6 +-
 lib/libcurses/Makefile                   |    4 +-
 lib/libcurses/acs.c                      |    8 +-
 lib/libcurses/curses.3                   |    7 +-
 lib/libcurses/curses.h                   |    3 +-
 lib/libcurses/curses_input.3             |   14 +-
 lib/libcurses/curses_screen.3            |   14 +-
 lib/libcurses/curses_termcap.3           |   15 +-
 lib/libcurses/getch.c                    |   10 +-
 lib/libcurses/keymap.h                   |    8 +-
 lib/libcurses/setterm.c                  |    6 +-
 libexec/getty/gettytab.5                 |   15 +-
 libexec/getty/ttys.5                     |    8 +-
 share/man/man3/intro.3                   |   10 +-
 share/man/man4/filemon.4                 |    8 +-
 share/man/man4/man4.amiga/ite.4          |    8 +-
 share/man/man4/man4.sparc/cgsix.4        |    8 +-
 share/man/man4/wscons.4                  |    6 +-
 share/man/man5/Makefile                  |    5 +-
 share/man/man5/capfile.5                 |  191 ++++++++++++++++++++++
 share/man/man5/disktab.5                 |   12 +-
 share/man/man5/passwd.5                  |    6 +-
 share/man/man5/printcap.5                |   15 +-
 share/man/man5/remote.5                  |    9 +-
 share/man/man7/hier.7                    |   21 +-
 share/man/man8/rescue.8                  |   34 +---
 usr.bin/cap_mkdb/cap_mkdb.1              |    8 +-
 usr.bin/chpass/chpass.1                  |    6 +-
 usr.bin/crunch/examples/fixit.conf       |    4 +-
 usr.bin/crunch/examples/really-big.conf  |    4 +-
 usr.bin/menuc/testm/Makefile             |    4 +-
 usr.bin/spell/spell/special.netbsd       |    1 +
 usr.bin/tabs/tabs.1                      |   12 +-
 usr.bin/tput/tput.1                      |    7 +-
 usr.bin/tset/Makefile                    |    4 +-
 usr.bin/tset/set.c                       |    8 +-
 usr.bin/tset/tset.1                      |    6 +-
 usr.bin/tset/wrterm.c                    |  115 -------------
 usr.bin/ul/ul.1                          |    6 +-
 usr.bin/vgrind/vgrind.1                  |    4 +-
 usr.bin/vgrind/vgrindefs.5               |    7 +-
 usr.sbin/bootp/bootpd/ConvOldTab.sh      |    4 +-
 usr.sbin/bootp/bootpd/bootptab.5         |   12 +-
 usr.sbin/isdn/isdnd/isdnd.8              |   10 +-
 usr.sbin/rtadvd/rtadvd.conf.5            |   14 +-
 51 files changed, 382 insertions(+), 614 deletions(-)

diffs (truncated from 2276 to 300 lines):

diff -r 5b76b8630cb2 -r 5643d6cb58a3 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Sat Apr 21 11:33:16 2012 +0000
+++ b/distrib/sets/lists/comp/mi        Sat Apr 21 12:27:24 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.1754 2012/04/18 19:29:01 christos Exp $
+#      $NetBSD: mi,v 1.1755 2012/04/21 12:27:24 roy Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6676,7 +6676,7 @@
 ./usr/share/man/cat3/getbsize.0                        comp-c-catman           .cat
 ./usr/share/man/cat3/getc.0                    comp-c-catman           .cat
 ./usr/share/man/cat3/getc_unlocked.0           comp-c-catman           .cat
-./usr/share/man/cat3/getcap.0                  comp-c-catman           .cat
+./usr/share/man/cat3/getcap.0                  comp-obsolete           obsolete
 ./usr/share/man/cat3/getch.0                   comp-c-catman           .cat
 ./usr/share/man/cat3/getchar.0                 comp-c-catman           .cat
 ./usr/share/man/cat3/getchar_unlocked.0                comp-c-catman           .cat
@@ -12986,7 +12986,7 @@
 ./usr/share/man/html3/getbsize.html            comp-c-htmlman          html
 ./usr/share/man/html3/getc.html                        comp-c-htmlman          html
 ./usr/share/man/html3/getc_unlocked.html       comp-c-htmlman          html
-./usr/share/man/html3/getcap.html              comp-c-htmlman          html
+./usr/share/man/html3/getcap.html              comp-obsolete           obsolete
 ./usr/share/man/html3/getch.html               comp-c-htmlman          html
 ./usr/share/man/html3/getchar.html             comp-c-htmlman          html
 ./usr/share/man/html3/getchar_unlocked.html    comp-c-htmlman          html
@@ -19210,7 +19210,7 @@
 ./usr/share/man/man3/getbsize.3                        comp-c-man              .man
 ./usr/share/man/man3/getc.3                    comp-c-man              .man
 ./usr/share/man/man3/getc_unlocked.3           comp-c-man              .man
-./usr/share/man/man3/getcap.3                  comp-c-man              .man
+./usr/share/man/man3/getcap.3                  comp-obsolete           obsolete
 ./usr/share/man/man3/getch.3                   comp-c-man              .man
 ./usr/share/man/man3/getchar.3                 comp-c-man              .man
 ./usr/share/man/man3/getchar_unlocked.3                comp-c-man              .man
diff -r 5b76b8630cb2 -r 5643d6cb58a3 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sat Apr 21 11:33:16 2012 +0000
+++ b/distrib/sets/lists/man/mi Sat Apr 21 12:27:24 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1387 2012/04/19 17:50:49 bouyer Exp $
+# $NetBSD: mi,v 1.1388 2012/04/21 12:27:26 roy Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1899,6 +1899,7 @@
 ./usr/share/man/cat5/bootptab.0                        man-bootserver-catman   .cat
 ./usr/share/man/cat5/bounce.0                  man-postfix-catman      postfix,.cat
 ./usr/share/man/cat5/canonical.0               man-postfix-catman      postfix,.cat
+./usr/share/man/cat5/capfile.0                 man-sys-catman          .cat
 ./usr/share/man/cat5/ccd.conf.0                        man-sysutil-catman      .cat
 ./usr/share/man/cat5/cdb.0                     man-sys-catman          .cat
 ./usr/share/man/cat5/cidr_table.0              man-postfix-catman      postfix,.cat
@@ -2052,7 +2053,7 @@
 ./usr/share/man/cat5/sysctl.conf.0             man-sys-catman          .cat
 ./usr/share/man/cat5/syslog.conf.0             man-sysutil-catman      .cat
 ./usr/share/man/cat5/targets.0                 man-iscsi-catman        iscsi,.cat
-./usr/share/man/cat5/termcap.0                 man-obsolete            obsolete
+./usr/share/man/cat5/termcap.0                 man-sys-catman          .cat
 ./usr/share/man/cat5/terminfo.0                        man-sys-catman          .cat
 ./usr/share/man/cat5/texinfo.0                 man-texinfo-catman      .cat
 ./usr/share/man/cat5/transport.0               man-postfix-catman      postfix,.cat
@@ -4690,6 +4691,7 @@
 ./usr/share/man/html5/bootptab.html            man-bootserver-htmlman  html
 ./usr/share/man/html5/bounce.html              man-postfix-htmlman     postfix,html
 ./usr/share/man/html5/canonical.html           man-postfix-htmlman     postfix,html
+./usr/share/man/html5/capfile.html             man-sys-htmlman         html
 ./usr/share/man/html5/ccd.conf.html            man-sysutil-htmlman     html
 ./usr/share/man/html5/cdb.html                 man-sys-htmlman         html
 ./usr/share/man/html5/cidr_table.html          man-postfix-htmlman     postfix,html
@@ -4828,7 +4830,7 @@
 ./usr/share/man/html5/sysctl.conf.html         man-sys-htmlman         html
 ./usr/share/man/html5/syslog.conf.html         man-sysutil-htmlman     html
 ./usr/share/man/html5/targets.html             man-iscsi-htmlman       iscsi,html
-./usr/share/man/html5/termcap.html             man-obsolete            obsolete
+./usr/share/man/html5/termcap.html             man-sys-htmlman         html
 ./usr/share/man/html5/terminfo.html            man-sys-htmlman         html
 ./usr/share/man/html5/texinfo.html             man-texinfo-htmlman     html
 ./usr/share/man/html5/transport.html           man-postfix-htmlman     postfix,html
@@ -7418,6 +7420,7 @@
 ./usr/share/man/man5/bootptab.5                        man-bootserver-man      .man
 ./usr/share/man/man5/bounce.5                  man-postfix-man         postfix,.man
 ./usr/share/man/man5/canonical.5               man-postfix-man         postfix,.man
+./usr/share/man/man5/capfile.5                 man-sys-man             .man
 ./usr/share/man/man5/ccd.conf.5                        man-sysutil-man         .man
 ./usr/share/man/man5/cdb.5                     man-sys-man             .man
 ./usr/share/man/man5/cidr_table.5              man-postfix-man         postfix,.man
@@ -7571,7 +7574,7 @@
 ./usr/share/man/man5/sysctl.conf.5             man-sys-man             .man
 ./usr/share/man/man5/syslog.conf.5             man-sysutil-man         .man
 ./usr/share/man/man5/targets.5                 man-iscsi-man           iscsi,.man
-./usr/share/man/man5/termcap.5                 man-obsolete            obsolete
+./usr/share/man/man5/termcap.5                 man-sys-man             .man
 ./usr/share/man/man5/terminfo.5                        man-sys-man             .man
 ./usr/share/man/man5/texinfo.5                 man-texinfo-man         .man
 ./usr/share/man/man5/transport.5               man-postfix-man         postfix,.man
diff -r 5b76b8630cb2 -r 5643d6cb58a3 doc/RESPONSIBLE
--- a/doc/RESPONSIBLE   Sat Apr 21 11:33:16 2012 +0000
+++ b/doc/RESPONSIBLE   Sat Apr 21 12:27:24 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: RESPONSIBLE,v 1.97 2012/02/22 20:59:26 reinoud Exp $
+#      $NetBSD: RESPONSIBLE,v 1.98 2012/04/21 12:27:27 roy Exp $
 
 List of sections of the system, and who is responsible for them (or at
 least considered an expert on them).
@@ -80,7 +80,7 @@
 iscsi target   agc
 root.cache     [no one]
 syspkgs                agc, apb
-termcap                blymn, jdc
+terminfo       roy
 [uw]tmp{,x}    christos
 
 
diff -r 5b76b8630cb2 -r 5643d6cb58a3 games/backgammon/backgammon/backgammon.6
--- a/games/backgammon/backgammon/backgammon.6  Sat Apr 21 11:33:16 2012 +0000
+++ b/games/backgammon/backgammon/backgammon.6  Sat Apr 21 12:27:24 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: backgammon.6,v 1.12 2005/09/15 02:09:41 wiz Exp $
+.\"    $NetBSD: backgammon.6,v 1.13 2012/04/21 12:27:27 roy Exp $
 .\"
 .\" Copyright (c) 1980, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"    @(#)backgammon.6        8.1 (Berkeley) 5/31/93
 .\"
-.Dd May 31, 1993
+.Dd April 5, 2012
 .Dt BACKGAMMON 6
 .Os
 .Sh NAME
@@ -80,7 +80,7 @@
 terminal is type
 .Ar term ,
 uses
-.Pa /usr/share/misc/termcap
+.Pa /usr/share/misc/terminfo
 .It Fl s Ar file
 recover previously saved game from
 .Ar file
@@ -97,7 +97,7 @@
 If
 .Ar term
 has capabilities for direct cursor movement (see
-.Xr termcap 5 )
+.Xr terminfo 5 )
 .Nm
 ``fixes'' the board after each move,
 so the board does not need to be reprinted,
@@ -105,7 +105,7 @@
 Also, any `p' option will be ignored.
 (The `t' option is not necessary unless the terminal type does not match
 the entry in the
-.Pa /usr/share/misc/termcap
+.Pa /usr/share/misc/terminfo
 data base.)
 .Sh QUICK REFERENCE
 When the program prompts by typing only your color,
@@ -164,10 +164,10 @@
 for home,
 or 0 or 25 as appropriate.
 .Sh FILES
-.Bl -tag -width /usr/share/misc/termcap -compact
+.Bl -tag -width /usr/share/misc/terminfo -compact
 .It Pa /usr/games/teachgammon
 rules and tutorial
-.It Pa /usr/share/misc/termcap
+.It Pa /usr/share/misc/terminfo
 terminal capabilities
 .El
 .Sh AUTHORS
diff -r 5b76b8630cb2 -r 5643d6cb58a3 lib/libc/gen/cgetcap.3
--- a/lib/libc/gen/cgetcap.3    Sat Apr 21 11:33:16 2012 +0000
+++ b/lib/libc/gen/cgetcap.3    Sat Apr 21 12:27:24 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: cgetcap.3,v 1.6 2009/08/19 15:43:02 joerg Exp $
+.\"    $NetBSD: cgetcap.3,v 1.7 2012/04/21 12:27:27 roy Exp $
 .\"
 .\" Copyright (c) 1992, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"    @(#)getcap.3    8.4 (Berkeley) 5/13/94
 .\"
-.Dd February 1, 2008
+.Dd April 5, 2012
 .Dt CGETCAP 3
 .Os
 .Sh NAME
@@ -178,11 +178,10 @@
 .Dv NULL
 if the requested capability couldn't be found.
 The end of the capability value is signaled by a
-.Sq \&:
-or
-.Tn ASCII
-.Dv NUL
-(see below for capability database syntax).
+.Sq \&: .
+See
+.Xr capfile 5
+for a description of the capability syntax.
 .Pp
 .Fn cgetnum
 retrieves the value of the numeric capability
@@ -263,84 +262,6 @@
 being used.
 Note that it does not erase the buffer pushed by a call to
 .Fn cgetset .
-.Sh CAPABILITY DATABASE SYNTAX
-Capability databases are normally
-.Tn ASCII
-and may be edited with standard text editors.
-Blank lines and lines beginning with a
-.Sq #
-are comments and are ignored.
-Lines ending with a
-.Sq \|\e
-indicate that the next line is a continuation
-of the current line; the
-.Sq \|\e
-and following newline are ignored.
-Long lines are usually continued onto several physical
-lines by ending each line except the last with a
-.Sq \|\e .
-.Pp
-Capability databases consist of a series of records, one per logical line.
-Each record contains a variable number of
-.So \&: Sc Ns -separated
-fields (capabilities).
-Empty fields consisting entirely of white space
-characters (spaces and tabs) are ignored.
-.Pp
-The first capability of each record specifies its names, separated by
-.Sq |
-characters.
-These names are used to reference records in the database.
-By convention, the last name is usually a comment and is not intended as
-a lookup tag.
-For example, the
-.Em vt100
-record from the
-.Pa termcap
-database begins:
-.Pp
-.Dl "d0\||\|vt100\||\|vt100-am\||\|vt100am\||\|dec vt100:"
-.Pp
-giving four names that can be used to access the record.
-.Pp
-The remaining non-empty capabilities describe a set of (name, value)
-bindings, consisting of a name optionally followed by a typed value:
-.Bl -column "nameTvalue"
-.It name Ta "typeless [boolean] capability"
-.Em name No "is present [true]"
-.It name Ns Em \&T Ns value Ta capability
-.Pq Em name , \&T
-has value
-.Em value
-.It name@ Ta "no capability" Em name No exists
-.It name Ns Em T Ns \&@ Ta capability
-.Pq Em name , T
-does not exist
-.El
-.Pp
-Names consist of one or more characters.
-Names may contain any character except
-.Sq \&: ,
-but it's usually best
-to restrict them to the printable characters and avoid use of
-graphics like
-.Sq # ,
-.Sq = ,
-.Sq % ,
-.Sq @ ,
-etc.
-.Pp
-Types are single characters used to separate capability names from
-their associated typed values.
-Types may be any character except a
-.Sq \&: .
-Typically, graphics like
-.Sq # ,
-.Sq = ,
-.Sq % ,
-etc. are used.
-Values may be any number of characters and may contain any character except
-.Sq \&: .
 .Sh CAPABILITY DATABASE SEMANTICS
 Capability records describe a set of (name, value) bindings.
 Names may have multiple values bound to them.
@@ -394,174 +315,6 @@
 can be used to control if
 .Qq tc
 expansion is performed or not.
-.Pp
-When a database is searched for a capability record, the first matching
-record in the search is returned.
-When a record is scanned for a capability, the first matching
-capability is returned; the capability



Home | Main Index | Thread Index | Old Index