Author: eadler
Date: Sat May 19 23:19:24 2018
New Revision: 333902
URL: https://svnweb.freebsd.org/changeset/base/333902

Log:
  top(1): unconditionally assume we are running on FreeBSD
  
  This allows us to remove a special header and more specifically just the
  system headers we want.

Deleted:
  head/usr.bin/top/os.h
Modified:
  head/usr.bin/top/commands.c
  head/usr.bin/top/display.c
  head/usr.bin/top/screen.c
  head/usr.bin/top/top.c
  head/usr.bin/top/utils.c

Modified: head/usr.bin/top/commands.c
==============================================================================
--- head/usr.bin/top/commands.c Sat May 19 23:04:42 2018        (r333901)
+++ head/usr.bin/top/commands.c Sat May 19 23:19:24 2018        (r333902)
@@ -18,14 +18,15 @@
  *  "top" (i.e.:  changing the number of processes to display).
  */
 
-#include "os.h"
-
 #include <sys/time.h>
 #include <sys/resource.h>
 
 #include <ctype.h>
 #include <errno.h>
 #include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include <unistd.h>
 
 #include "commands.h"

Modified: head/usr.bin/top/display.c
==============================================================================
--- head/usr.bin/top/display.c  Sat May 19 23:04:42 2018        (r333901)
+++ head/usr.bin/top/display.c  Sat May 19 23:19:24 2018        (r333902)
@@ -28,12 +28,13 @@
  *        *_process, u_endscreen.
  */
 
-#include "os.h"
-
 #include <sys/time.h>
 
 #include <curses.h>
 #include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
 #include <termcap.h>
 #include <time.h>
 #include <unistd.h>
@@ -927,7 +928,7 @@ char *thisline;
     p = strecpy(base, thisline);
 
     /* zero fill the rest of it */
-    memzero(p, display_width - (p - base));
+    bzero(p, display_width - (p - base));
 }
 
 void
@@ -970,7 +971,7 @@ char *newline;
        optr = strecpy(bufferline, newline);
 
        /* zero fill the rest of it */
-       memzero(optr, display_width - (optr - bufferline));
+       bzero(optr, display_width - (optr - bufferline));
     }
     else
     {
@@ -1381,7 +1382,7 @@ int line;
     diff = display_width - newcol;
     if (diff > 0)
     {
-       memzero(old, diff);
+       bzero(old, diff);
     }
 
     /* remember where the current line is */

Modified: head/usr.bin/top/screen.c
==============================================================================
--- head/usr.bin/top/screen.c   Sat May 19 23:04:42 2018        (r333901)
+++ head/usr.bin/top/screen.c   Sat May 19 23:19:24 2018        (r333902)
@@ -20,10 +20,10 @@
  *  preprocessor variable "TOStop".   --wnl
  */
 
-#include "os.h"
 #include "top.h"
 
 #include <sys/ioctl.h>
+#include <string.h>
 #ifdef CBREAK
 # include <sgtty.h>
 # define SGTTY

Modified: head/usr.bin/top/top.c
==============================================================================
--- head/usr.bin/top/top.c      Sat May 19 23:04:42 2018        (r333901)
+++ head/usr.bin/top/top.c      Sat May 19 23:19:24 2018        (r333902)
@@ -33,8 +33,8 @@ char *copyright =
  *     FD_SET   - macros FD_SET and FD_ZERO are used when defined
  */
 
-#include "os.h"
-
+#include <sys/types.h>
+#include <sys/param.h>
 #include <sys/jail.h>
 #include <sys/time.h>
 
@@ -43,7 +43,9 @@ char *copyright =
 #include <errno.h>
 #include <jail.h>
 #include <setjmp.h>
+#include <stdlib.h>
 #include <signal.h>
+#include <string.h>
 #include <unistd.h>
 
 /* includes specific to top */
@@ -59,6 +61,8 @@ char *copyright =
 
 /* Size of the stdio buffer given to stdout */
 #define Buffersize     2048
+
+typedef void sigret_t;
 
 /* The buffer that stdio will use */
 char stdoutbuf[Buffersize];

Modified: head/usr.bin/top/utils.c
==============================================================================
--- head/usr.bin/top/utils.c    Sat May 19 23:04:42 2018        (r333901)
+++ head/usr.bin/top/utils.c    Sat May 19 23:19:24 2018        (r333902)
@@ -16,7 +16,10 @@
  */
 
 #include "top.h"
-#include "os.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 
 int atoiwi(str)
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to