Skip to content
Snippets Groups Projects
Commit 912151a5 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Display Git branch/hash instead of VERSION for revision info (like ans2asc)

This should fix the Win32 build.
parent 8d2832cd
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6437 passed
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#include <stdio.h> #include <stdio.h>
#include <ctype.h> /* toupper */ #include <ctype.h> /* toupper */
#include <string.h> /* strcmp */ #include <string.h> /* strcmp */
#include "sbbsdefs.h" // VERSION #include "git_branch.h"
#include "git_hash.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> /* SetConsoleMode */ #include <windows.h> /* SetConsoleMode */
...@@ -32,12 +33,12 @@ ...@@ -32,12 +33,12 @@
#endif #endif
#define CTRL_A '\1' #define CTRL_A '\1'
#undef ANSI
#define ANSI fprintf(out,"\x1b[") #define ANSI fprintf(out,"\x1b[")
static void print_usage(const char* prog) static void print_usage(const char* prog)
{ {
fprintf(stderr,"\nSynchronet Ctrl-A-Code to ANSI-Terminal-Sequence Conversion Utility v%s\n",VERSION); fprintf(stderr,"\nSynchronet Ctrl-A-Code to ANSI-Terminal-Sequence Conversion Utility %s/%s\n"
,GIT_BRANCH, GIT_HASH);
fprintf(stderr,"\nusage: %s infile.asc [outfile.ans] [[option] [...]]\n",prog); fprintf(stderr,"\nusage: %s infile.asc [outfile.ans] [[option] [...]]\n",prog);
fprintf(stderr,"\noptions:\n\n"); fprintf(stderr,"\noptions:\n\n");
fprintf(stderr,"-strip strip Ctrl-A codes without ANSI equivalent, e.g. pause, delay\n"); fprintf(stderr,"-strip strip Ctrl-A codes without ANSI equivalent, e.g. pause, delay\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment