From owner-svn-src-head@freebsd.org Sat May 19 23:19:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9FAEE80EC; Sat, 19 May 2018 23:19:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9044A844F0; Sat, 19 May 2018 23:19:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 719D06037; Sat, 19 May 2018 23:19:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4JNJPWY011659; Sat, 19 May 2018 23:19:25 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4JNJO7A011655; Sat, 19 May 2018 23:19:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805192319.w4JNJO7A011655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 19 May 2018 23:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333902 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2018 23:19:26 -0000 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 #include #include #include #include +#include +#include +#include #include #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 #include #include +#include +#include +#include #include #include #include @@ -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 +#include #ifdef CBREAK # include # 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 +#include #include #include @@ -43,7 +43,9 @@ char *copyright = #include #include #include +#include #include +#include #include /* 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 +#include +#include int atoiwi(str)