cleanups, add manual page
[unix-history] / usr / src / usr.bin / more / prompt.c
index 42dd415..7ab02a4 100644 (file)
@@ -3,15 +3,13 @@
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
  *
- * This code is derived from software contributed to Berkeley by
- * Mark Nudleman.
- * 
  * Redistribution and use in source and binary forms are permitted
  * provided that the above copyright notice and this paragraph are
  * duplicated in all such forms and that any documentation,
  * advertising materials, and other materials related to such
  * distribution and use acknowledge that the software was developed
  * Redistribution and use in source and binary forms are permitted
  * provided that the above copyright notice and this paragraph are
  * duplicated in all such forms and that any documentation,
  * advertising materials, and other materials related to such
  * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
+ * by Mark Nudleman and the University of California, Berkeley.  The
+ * name of Mark Nudleman or the
  * University may not be used to endorse or promote products derived
  * from this software without specific prior written permission.
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  * University may not be used to endorse or promote products derived
  * from this software without specific prior written permission.
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
@@ -20,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)prompt.c   5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)prompt.c   5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -95,7 +93,7 @@ setmp()
 ap_pos(pos)
        POSITION pos;
 {
 ap_pos(pos)
        POSITION pos;
 {
-       sprintf(mp, "%ld", (long)pos);
+       (void)sprintf(mp, "%ld", (long)pos);
        setmp();
 }
 
        setmp();
 }
 
@@ -106,7 +104,7 @@ ap_pos(pos)
 ap_int(n)
        int n;
 {
 ap_int(n)
        int n;
 {
-       sprintf(mp, "%d", n);
+       (void)sprintf(mp, "%d", n);
        setmp();
 }
 
        setmp();
 }
 
@@ -307,9 +305,7 @@ wherechar(p, wp)
        char *p;
        int *wp;
 {
        char *p;
        int *wp;
 {
-       int c;
-
-       switch (c = *p)
+       switch (*p)
        {
        case 'b': case 'l': case 'p':
                switch (*++p)
        {
        case 'b': case 'l': case 'p':
                switch (*++p)