1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

uemacs/version.c: Add version function to output the version string information.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Thiago Farina 2010-08-29 20:39:06 -03:00 committed by Linus Torvalds
parent 74336ca924
commit 5664b10291
4 changed files with 16 additions and 6 deletions

View File

@ -19,14 +19,14 @@ PROGRAM=em
SRC=ansi.c basic.c bind.c buffer.c crypt.c display.c eval.c exec.c \
file.c fileio.c ibmpc.c input.c isearch.c line.c lock.c main.c \
pklock.c posix.c random.c region.c search.c spawn.c tcap.c \
termio.c vmsvt.c vt52.c window.c word.c names.c globals.c
termio.c vmsvt.c vt52.c window.c word.c names.c globals.c version.c
OBJ=ansi.o basic.o bind.o buffer.o crypt.o display.o eval.o exec.o \
file.o fileio.o ibmpc.o input.o isearch.o line.o lock.o main.o \
pklock.o posix.o random.o region.o search.o spawn.o tcap.o \
termio.o vmsvt.o vt52.o window.o word.o names.o globals.o
termio.o vmsvt.o vt52.o window.o word.o names.o globals.o version.o
HDR=ebind.h edef.h efunc.h epath.h estruct.h evar.h
HDR=ebind.h edef.h efunc.h epath.h estruct.h evar.h util.h version.h
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them

2
main.c
View File

@ -143,7 +143,7 @@ int main(int argc, char **argv)
usage(EXIT_FAILURE);
}
if (strcmp(argv[1], "--version") == 0) {
printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION);
version();
exit(EXIT_SUCCESS);
}
}

7
version.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
#include "version.h"
void version(void)
{
printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION);
}

View File

@ -4,6 +4,9 @@
#define PROGRAM_NAME "em"
#define PROGRAM_NAME_LONG "uEmacs/Pk"
#define VERSION "4.0.15"
#define VERSION "4.0.15"
#endif // VERSION_H_
/* Print the version string. */
void version(void);
#endif /* VERSION_H_ */