top(1): unconditionally provide 'FreeBSD' as a version

This commit is contained in:
Eitan Adler 2018-05-19 23:04:42 +00:00
parent 946e91ab0c
commit 8a133278b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333901
6 changed files with 4 additions and 38 deletions

View File

@ -2,7 +2,7 @@
PROG= top
SRCS= commands.c display.c machine.c screen.c top.c \
username.c utils.c version.c
username.c utils.c
SRCS+= sigdesc.h top.local.h
CFLAGS+= -I ${.OBJDIR}
MAN= top.1

View File

@ -56,7 +56,7 @@ void
show_help()
{
printf("Top version %s, %s\n", version_string(), copyright);
printf("Top version FreeBSD, %s\n", copyright);
fputs("\n\n\
A top users display for Unix\n\
\n\

View File

@ -1,2 +0,0 @@
#define PATCHLEVEL 5
#define BETA "beta12"

View File

@ -380,8 +380,7 @@ char *argv[];
switch(i)
{
case 'v': /* show version number */
fprintf(stderr, "%s: version %s\n",
myname, version_string());
fprintf(stderr, "%s: version FreeBSD\n", myname);
exit(1);
break;
@ -516,10 +515,9 @@ char *argv[];
default:
fprintf(stderr,
"Top version %s\n"
"Usage: %s [-abCHIijnPqStuvwz] [-d count] [-m io | cpu] [-o field] [-s time]\n"
" [-J jail] [-U username] [number]\n",
version_string(), myname);
myname);
exit(1);
}
}

View File

@ -25,8 +25,6 @@ extern int Header_lines; /* 7 */
char *itoa();
char *itoa7();
char *version_string();
/* Special atoi routine returns either a non-negative number or one of: */
#define Infinity -1
#define Invalid -2

View File

@ -1,28 +0,0 @@
/*
* Top users/processes display for Unix
* Version 3
*
* This program may be freely redistributed,
* but this entire comment MUST remain intact.
*
* Copyright (c) 1984, 1989, William LeFebvre, Rice University
* Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
*/
#include <stdio.h>
#include <string.h>
#include "top.h"
#include "patchlevel.h"
static char version[16];
char *version_string()
{
sprintf(version, "%d.%d", VERSION, PATCHLEVEL);
#ifdef BETA
strcat(version, BETA);
#endif
return(version);
}