Skip to content

Commit 38fd6e8

Browse files
committed
Adds version and show it on usage help.
1 parent 5c29a1f commit 38fd6e8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/dbg.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "dbg.h"
22
#include "env.h"
3+
#include "version.h"
34
#include <fcntl.h>
45
#include <stdarg.h>
56
#include <stdlib.h>
@@ -9,7 +10,7 @@ char *prog_name;
910

1011
void print_usage(void)
1112
{
12-
printf("Simple x86 + DOS Emulator\n"
13+
printf("EMU2 - Simple x86 + DOS Emulator, version " EMU2_VERSION "\n"
1314
"\n"
1415
"Usage: %s [options] <prog.exe> [args...] [-- environment vars]\n"
1516
"\n"
@@ -29,8 +30,8 @@ void print_usage(void)
2930
" %-18s DOS current working directory, use 'C:\\' if not given.\n"
3031
" %-18s Set unix path as root of drive 'n', by default all drives\n"
3132
"\t\t point to the unix working directory.\n"
32-
". %-18s Set DOS code-page. Set to '?' to show lost of code-pages.\n"
33-
". %-18s Limit DOS memory to 512KB, fixes some old buggy programs.\n",
33+
" %-18s Set DOS code-page. Set to '?' to show lost of code-pages.\n"
34+
" %-18s Limit DOS memory to 512KB, fixes some old buggy programs.\n",
3435
prog_name, ENV_DBG_NAME, ENV_DBG_OPT, ENV_PROGNAME, ENV_DEF_DRIVE, ENV_CWD,
3536
ENV_DRIVE "n", ENV_CODEPAGE, ENV_LOWMEM);
3637
exit(EXIT_SUCCESS);

src/version.h

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pragma once
2+
3+
#define EMU2_VERSION "2021.01"
4+

0 commit comments

Comments
 (0)