File: version.h

package info (click to toggle)
kbd-chooser 1.68
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 896 kB
  • ctags: 281
  • sloc: ansic: 4,360; yacc: 777; lex: 131; makefile: 118; sh: 33
file content (20 lines) | stat: -rw-r--r-- 312 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <string.h>
#include <stdlib.h>

#define VERSION "1.08"

char *progname;

static inline void
set_progname(char *name) {
	char *p;

	p = rindex(name, '/');
	progname = (p ? p+1 : name);
}

static inline void
print_version_and_exit(void) {
	printf(_("%s from %s\n"), progname, "kbd-" VERSION);
	exit(0);
}