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:
parent
74336ca924
commit
5664b10291
6
Makefile
6
Makefile
@ -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
2
main.c
@ -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
7
version.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include "version.h"
|
||||
|
||||
void version(void)
|
||||
{
|
||||
printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION);
|
||||
}
|
Loading…
Reference in New Issue
Block a user