Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/menuc Join some lines; mdoc improvements; use more m...



details:   https://anonhg.NetBSD.org/src/rev/84fc5f84a251
branches:  trunk
changeset: 546935:84fc5f84a251
user:      wiz <wiz%NetBSD.org@localhost>
date:      Fri May 09 08:20:27 2003 +0000

description:
Join some lines; mdoc improvements; use more macros.

diffstat:

 usr.bin/menuc/menuc.1 |  63 +++++++++++++++++++++++---------------------------
 1 files changed, 29 insertions(+), 34 deletions(-)

diffs (197 lines):

diff -r 105489180bee -r 84fc5f84a251 usr.bin/menuc/menuc.1
--- a/usr.bin/menuc/menuc.1     Fri May 09 07:30:50 2003 +0000
+++ b/usr.bin/menuc/menuc.1     Fri May 09 08:20:27 2003 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: menuc.1,v 1.15 2003/05/09 07:30:50 dsl Exp $
+.\"    $NetBSD: menuc.1,v 1.16 2003/05/09 08:20:27 wiz Exp $
 .\"
 .\" Copyright 1997 Piermont Information Systems Inc.
 .\" All rights reserved.
@@ -40,7 +40,7 @@
 .Nm menuc
 .Nd menu compiler
 .Sh SYNOPSIS
-menuc
+.Nm
 .Op Fl o Ar name
 .Ar file
 .Sh DESCRIPTION
@@ -57,8 +57,7 @@
 .Sh ENVIRONMENT
 .Bl -tag -width MENUDEF
 .It Ev MENUDEF
-Can be set to point to a different set of
-definition files for
+Can be set to point to a different set of definition files for
 .Nm .
 The current location defaults to
 .Pa /usr/share/misc .
@@ -66,8 +65,7 @@
 .Sh MENU DESCRIPTIONS
 The input
 .Ar file
-defines static menus and options for processing
-those menus.
+defines static menus and options for processing those menus.
 It also contains comments, initial C code that is required to provide
 for definitions and other code necessary for the menu system, and an
 option declaration if dynamic menus are requested.
@@ -86,15 +84,14 @@
 .Ar file .
 All C code is passed verbatim to the C output file.
 .Nm
-comments do not start in C code
-and comments in the C code are passed verbatim to
-the output.
+comments do not start in C code and comments in the C code are
+passed verbatim to the output.
 The C comments are not recognized by
 .Nm .
 In all cases, C code starts with a left brace
-.Em ({)
+.Pq Em \&{
 and ends with the matching right brace
-.Em (}) .
+.Pq Em \&} .
 It is important to recognize that in code segments, any brace
 will be counted, even if it is in a C comment inside the code.
 .Pp
@@ -105,7 +102,9 @@
 The initial code block usually contains includes of header files used by
 code in the menu code blocks later in the
 .Ar file .
-If USER_MENU_INIT is #defined, then it will be evaluated before the
+If
+.Dv USER_MENU_INIT
+is #defined, then it will be evaluated before the
 rest of the menu is initialised, if it evaluates to a non-zero value
 then the initialisation will fail.
 The file is free format, so the actual formatting of the input
@@ -115,14 +114,14 @@
 All other C code that will appear in an
 .Em action .
 This will be specified as
-.Em \*[Lt]action\*[Gt]
+.Aq Em action
 in later text.
 Such an action will appear as:
 .Dl action \*[Lt]opt_endwin\*[Gt] \*[Lt]code\*[Gt]
 in the
 .Ar file .
 The
-.Em \*[Lt]opt_endwin\*[Gt] ,
+.Aq Em opt_endwin ,
 if present is:
 .Dl ( endwin )
 and specifies that the curses
@@ -131,7 +130,7 @@
 then reinstating the current curses window after the
 code has been run.
 The
-.Em \*[Lt]code\*[Gt]
+.Aq Em code
 is as described above.
 .Pp
 There are four kinds of menu definition elements.
@@ -187,7 +186,7 @@
 The upper left is in the curses coordinate system.
 If
 .Va x
-is \&-1 the menu window will be centered.
+is \-1 the menu window will be centered.
 If not specified, the upper left is the upper left of the screen
 and the height and width of the menu window is computed
 from the menu definition.
@@ -206,8 +205,7 @@
 menu window is smaller than the number of menu options.
 The
 .Va shortcut
-option prints a single character shortcut with each menu
-option.
+option prints a single character shortcut with each menu option.
 .Pp
 The third sets text variables.
 The
@@ -247,8 +245,8 @@
 .Dq foo
 is appears as
 .Dq MENU_foo .
-(Capitalization is important.)  This is important,
-because the menu is displayed and processed by
+(Capitalization is important.)
+This is important, because the menu is displayed and processed by
 calling the function
 .Dl process_menu (MENU_foo) ;
 .Pp
@@ -258,8 +256,7 @@
 These override the options from the most recent default declaration.
 .Pp
 The display action is optional and provides C code to
-execute at each and every time the menu is displayed
-for processing.
+execute at each and every time the menu is displayed for processing.
 If it is included, the format is:
 .Dl display \*[Lt]action\*[Gt] ;
 .Pp
@@ -268,19 +265,18 @@
 The general format of a menu item is:
 .Dl option \*[Lt]string\*[Gt], \*[Lt]element_list\*[Gt] ;
 The
-.Em \*[Lt]string\*[Gt]
+.Aq Em string
 is the text displayed for the menu item, this must be a quoted string
 or a name #defined to something that will initialise a const char * field.
 There may be an arbitrary number of these items.
 (If there are shortcuts in the menu, a practical limit
 of 51 should be recognized.
-It produces shortcuts a to w, y, z and A to Z.
+It produces shortcuts a to w, y, z, and A to Z.
 x is the shortcut for the exit item.)
 .Pp
 The
-.Em \*[Lt]element_list\*[Gt]
-is a comma separated list of what to do when the
-item is selected.
+.Aq Em element_list
+is a comma separated list of what to do when the item is selected.
 They may appear in any order.
 .Pp
 The first element processed when a menu item
@@ -322,9 +318,9 @@
 This text is displayed in a full page
 help window if the question mark is typed.
 The actual help text starts with a left brace
-.Em ({)
+.Pq Em \&{
 and ends with the matching right brace
-.Em (}) .
+.Pq Em \&} .
 The braces are not included in the
 help string, but all other characters between
 them are included.
@@ -439,14 +435,12 @@
 may be compiled into a complete program.
 For example, if the following was in a file called
 .Pa example.mc ,
-an executable program could be produced by the following
-commands.
+an executable program could be produced by the following commands.
 .Bd -literal -offset indent
 menuc -o example example.mc
 cc -o example example.c -lcurses
 .Ed
-A much
-more complete example is available with the source
+A much more complete example is available with the source
 distribution in a subdirectory called
 .Em testm .
 .Bd -literal
@@ -497,6 +491,7 @@
    option "Do Nothing!", action { };
 .Ed
 .Sh AUTHORS
-Philip A. Nelson for Piermont Information Systems Inc.
+.An Philip A. Nelson
+for Piermont Information Systems Inc.
 Initial ideas for this were developed and implemented in Pascal at the
 Leiden University, Netherlands, in the summer of 1980.



Home | Main Index | Thread Index | Old Index