Skip to content

Commit

Permalink
Adds version and show it on usage help.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsc committed Apr 19, 2021
1 parent 5c29a1f commit 38fd6e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dbg.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "dbg.h"
#include "env.h"
#include "version.h"
#include <fcntl.h>
#include <stdarg.h>
#include <stdlib.h>
Expand All @@ -9,7 +10,7 @@ char *prog_name;

void print_usage(void)
{
printf("Simple x86 + DOS Emulator\n"
printf("EMU2 - Simple x86 + DOS Emulator, version " EMU2_VERSION "\n"
"\n"
"Usage: %s [options] <prog.exe> [args...] [-- environment vars]\n"
"\n"
Expand All @@ -29,8 +30,8 @@ void print_usage(void)
" %-18s DOS current working directory, use 'C:\\' if not given.\n"
" %-18s Set unix path as root of drive 'n', by default all drives\n"
"\t\t point to the unix working directory.\n"
". %-18s Set DOS code-page. Set to '?' to show lost of code-pages.\n"
". %-18s Limit DOS memory to 512KB, fixes some old buggy programs.\n",
" %-18s Set DOS code-page. Set to '?' to show lost of code-pages.\n"
" %-18s Limit DOS memory to 512KB, fixes some old buggy programs.\n",
prog_name, ENV_DBG_NAME, ENV_DBG_OPT, ENV_PROGNAME, ENV_DEF_DRIVE, ENV_CWD,
ENV_DRIVE "n", ENV_CODEPAGE, ENV_LOWMEM);
exit(EXIT_SUCCESS);
Expand Down
4 changes: 4 additions & 0 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pragma once

#define EMU2_VERSION "2021.01"

0 comments on commit 38fd6e8

Please sign in to comment.