BSD 4_2 development
[unix-history] / usr / doc / curses / intro.4
index 397f321..56093b4 100644 (file)
@@ -17,7 +17,7 @@ actually uses these functions,
 does not.
 .)f
 Certain other programs
 does not.
 .)f
 Certain other programs
-will find it considerably difficult to use these functions in this manner
+will find it difficult to use these functions in this manner
 without considerable unnecessary program overhead.
 For such applications,
 such as some
 without considerable unnecessary program overhead.
 For such applications,
 such as some
@@ -34,7 +34,7 @@ and
 .b gun .
 .)f
 and optimizing
 .b gun .
 .)f
 and optimizing
-.b cat(1) -type
+.b cat (1)-type
 programs,
 all that is needed is the motion optimizations.
 This, therefore, is a description
 programs,
 all that is needed is the motion optimizations.
 This, therefore, is a description
@@ -69,7 +69,6 @@ For example,
 .Vn HO
 is a string which moves the cursor to the "home" position\**.
 .(f
 .Vn HO
 is a string which moves the cursor to the "home" position\**.
 .(f
-.pp
 \**
 These names are identical to those variables
 used in the
 \**
 These names are identical to those variables
 used in the
@@ -77,7 +76,7 @@ used in the
 \*(db to describe each capability.
 See Appendix A for a complete list of those read,
 and
 \*(db to describe each capability.
 See Appendix A for a complete list of those read,
 and
-.b termcap(5)
+.b termcap (5)
 for a full description.
 .)f
 As there are two types of variables involving ttys,
 for a full description.
 .)f
 As there are two types of variables involving ttys,
@@ -85,9 +84,9 @@ there are two routines.
 The first,
 .Fn gettmode ,
 sets some variables based upon the tty modes accessed by
 The first,
 .Fn gettmode ,
 sets some variables based upon the tty modes accessed by
-.b gtty(2)
+.b gtty (2)
 and
 and
-.b stty(2) .
+.b stty (2) .
 The second,
 .Fn setterm ,
 a larger task by reading in the descriptions from the \*(tc \*(db.
 The second,
 .Fn setterm ,
 a larger task by reading in the descriptions from the \*(tc \*(db.
@@ -102,32 +101,32 @@ This is the way these routines are used by
 }
 \*felse\fP
        setterm(Def\*_term);
 }
 \*felse\fP
        setterm(Def\*_term);
-_puts(TI);
-_puts(VS);
+\*_puts(TI);
+\*_puts(VS);
 .)l
 .)b
 .pp
 .)l
 .)b
 .pp
-.Fn Isatty
+.Fn isatty
 checks to see if file descriptor 0 is a terminal\**.
 .(f
 \**
 checks to see if file descriptor 0 is a terminal\**.
 .(f
 \**
-.Fn Isatty
+.Fn isatty
 is defined in the default C library function routines.
 It does a
 is defined in the default C library function routines.
 It does a
-.b gtty(2)
+.b gtty (2)
 on the descriptor and checks the return value.
 .)f
 If it is,
 .Fn gettmode
 sets the terminal description modes from a
 on the descriptor and checks the return value.
 .)f
 If it is,
 .Fn gettmode
 sets the terminal description modes from a
-.b gtty(2) .
-.Fn Getenv
+.b gtty (2) .
+.Fn getenv
 is then called to get the name of the terminal,
 and that value (if there is one) is passed to
 .Fn setterm ,
 which reads in the variables from \*(tc
 associated with that terminal.
 is then called to get the name of the terminal,
 and that value (if there is one) is passed to
 .Fn setterm ,
 which reads in the variables from \*(tc
 associated with that terminal.
-.Fn Getenv "" (
+.Fn getenv "" (
 returns a pointer to a string containing the name of the terminal,
 which we save in the character pointer
 .Vn sp .)
 returns a pointer to a string containing the name of the terminal,
 which we save in the character pointer
 .Vn sp .)
@@ -142,12 +141,15 @@ The
 and
 .Vn VS
 sequences initialize the terminal
 and
 .Vn VS
 sequences initialize the terminal
-.Fn _puts "" (
+.Fn \*_puts "" (
 is a macro which uses
 .Fn tputs
 (see
 is a macro which uses
 .Fn tputs
 (see
-.b "termcap(3)" )
+.b termcap (3))
 to put out a string).
 to put out a string).
+It is these things which
+.Fn endwin
+undoes.
 .sh 2 "Movement Optimizations, or, Getting Over Yonder"
 .pp
 Now that we have all this useful information,
 .sh 2 "Movement Optimizations, or, Getting Over Yonder"
 .pp
 Now that we have all this useful information,
@@ -162,7 +164,7 @@ This is usually only true, however,
 if you have the social life of a kumquat.
 .)f
 The most difficult thing to do properly is motion optimization.
 if you have the social life of a kumquat.
 .)f
 The most difficult thing to do properly is motion optimization.
-When you consider how many different features different terminals have
+When you consider how many different features various terminals have
 (tabs, backtabs, non-destructive space, home sequences, absolute tabs, .....)
 you can see that deciding how to get from here to there
 can be a decidedly non-trivial task.
 (tabs, backtabs, non-destructive space, home sequences, absolute tabs, .....)
 you can see that deciding how to get from here to there
 can be a decidedly non-trivial task.
@@ -194,7 +196,7 @@ If you wish to force absolute addressing,
 you can use the function
 .Fn tgoto
 from the
 you can use the function
 .Fn tgoto
 from the
-.b termlib(7)
+.b termlib (7)
 routines,
 or you can tell
 .Fn mvcur
 routines,
 or you can tell
 .Fn mvcur