summaryrefslogtreecommitdiff
path: root/usr.bin/top/version.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-08-14 14:00:29 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-08-14 14:00:29 +0000
commit6e46887b7158d427eebc23ab135222ed4df2bdf0 (patch)
tree3c75f1ac16fc0820700961b0f91b18496054cb6d /usr.bin/top/version.c
parent44dbc9719c1c86a71535213a3f43c4cee4a4b770 (diff)
top 3.4, with a few changes. Still needs more work.
Diffstat (limited to 'usr.bin/top/version.c')
-rw-r--r--usr.bin/top/version.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/usr.bin/top/version.c b/usr.bin/top/version.c
new file mode 100644
index 00000000000..281cb59bf99
--- /dev/null
+++ b/usr.bin/top/version.c
@@ -0,0 +1,27 @@
+/* $OpenBSD: version.c,v 1.1 1997/08/14 14:00:28 downsj Exp $ */
+
+/*
+ * 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 "top.h"
+#include "patchlevel.h"
+
+static char version[16];
+
+char *version_string()
+
+{
+ snprintf(version, sizeof(version), "%d.%d", VERSION, PATCHLEVEL);
+#ifdef BETA
+ strcat(version, BETA);
+#endif
+ return(version);
+}