File: version.h

package info (click to toggle)
kbd 2.0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 14,136 kB
  • sloc: sh: 12,838; ansic: 12,531; pascal: 472; lex: 466; makefile: 394; yacc: 356; perl: 126; sed: 16
file content (24 lines) | stat: -rw-r--r-- 397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "config.h"
#include "kbd.h"
#include "nls.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

char *progname;

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

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

static inline void __attribute__((noreturn))
print_version_and_exit(void)
{
	printf(_("%s from %s\n"), progname, PACKAGE_STRING);
	exit(0);
}