"Fossies" - the Fresh Open Source Software Archive 
Member "atop-2.8.1/version.c" (7 Jan 2023, 531 Bytes) of package /linux/misc/atop-2.8.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "version.c" see the
Fossies "Dox" file reference documentation.
1 /* No manual changes in this file */
2 #include <stdio.h>
3 #include <string.h>
4 #include "version.h"
5 #include "versdate.h"
6
7 static char atopversion[] = ATOPVERS;
8 static char atopdate[] = ATOPDATE;
9
10 char *
11 getstrvers(void)
12 {
13 static char vers[256];
14
15 snprintf(vers, sizeof vers,
16 "Version: %s - %s <gerlof.langeveld@atoptool.nl>",
17 atopversion, atopdate);
18
19 return vers;
20 }
21
22 unsigned short
23 getnumvers(void)
24 {
25 int vers1, vers2;
26
27 sscanf(atopversion, "%u.%u", &vers1, &vers2);
28
29 return (unsigned short) ((vers1 << 8) + vers2);
30 }