Annotation of src/usr.bin/top/version.c, Revision 1.2
1.2 ! downsj 1: /* $OpenBSD: version.c,v 1.1 1997/08/14 14:00:28 downsj Exp $ */
1.1 downsj 2:
3: /*
4: * Top users/processes display for Unix
5: * Version 3
6: *
7: * This program may be freely redistributed,
8: * but this entire comment MUST remain intact.
9: *
10: * Copyright (c) 1984, 1989, William LeFebvre, Rice University
11: * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
12: */
13:
1.2 ! downsj 14: #include <sys/types.h>
! 15: #include <stdio.h>
! 16:
1.1 downsj 17: #include "top.h"
18: #include "patchlevel.h"
19:
20: char *version_string()
21:
22: {
1.2 ! downsj 23: static char version[16];
! 24:
1.1 downsj 25: snprintf(version, sizeof(version), "%d.%d", VERSION, PATCHLEVEL);
26: #ifdef BETA
27: strcat(version, BETA);
28: #endif
29: return(version);
30: }