Skip to content

Commit c11f4ad

Browse files
Merge pull request #137 from mstorsjo/override-switchchar
Allow overriding the SWITCHCHAR option by passing -DSWITCHCHAR=0/1 when building
2 parents 6ec2123 + e938bc8 commit c11f4ad

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cmdline.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@
4141
#include "input.h"
4242

4343
#if defined(__UNIX__) || defined(__CYGWIN__) || defined(__DJGPP__)
44-
#define HANDLECTRLZ 0
45-
#define SWITCHCHAR 0
44+
45+
#define HANDLECTRLZ 0
46+
#ifndef SWITCHCHAR
47+
#define SWITCHCHAR 0
48+
#endif
49+
4650
#else
47-
#define HANDLECTRLZ 1
48-
#define SWITCHCHAR 1
51+
52+
#define HANDLECTRLZ 1
53+
#ifndef SWITCHCHAR
54+
#define SWITCHCHAR 1
55+
#endif
56+
4957
#endif
5058

5159
#ifdef __I86__

0 commit comments

Comments
 (0)