1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

Only support UTF-8 keyboard sequence on Cygwin.

FIX: Missing on  Linux, ue --help prints progname set in Makefile.
This commit is contained in:
Renaud 2015-02-14 10:21:50 +08:00
parent 703c472f0b
commit fbe92a1f52
2 changed files with 5 additions and 3 deletions

View File

@ -33,7 +33,7 @@ CFLAGS=-O2 $(WARNINGS)
#CFLAGS=-O4 -DSVR4 # Sun
#CFLAGS=-O -qchars=signed # RS/6000
ifeq ($(uname_S),Linux)
DEFINES=-DAUTOCONF -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM) -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
LIBS=-lcurses
endif
ifeq ($(uname_S),FreeBSD)
@ -43,8 +43,8 @@ ifeq ($(uname_S),Darwin)
DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_DARWIN_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
endif
ifeq ($(uname_S),CYGWIN)
DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM)
LIBS=-lcurses # SYSV
DEFINES=-DAUTOCONF -DCYGWIN -DPROGRAM=$(PROGRAM)
LIBS=-lcurses
endif
ifeq ($(uname_S),MINGW32)
DEFINES=-DAUTOCONF -DSYSV -DMINGW32 -DPROGRAM=$(PROGRAM)

View File

@ -457,6 +457,7 @@ handle_CSI:
return CTLX | c;
}
#ifdef CYGWIN
/* Accept UTF-8 sequence */
if( c <= 0xC1 || c > 0xF4)
return c ;
@ -474,6 +475,7 @@ handle_CSI:
utf8_to_unicode( utf, 0, sizeof utf, (unicode_t *) &c) ;
}
#endif
/* otherwise, just return it */
return c;