From e83feafda194767a6f744ed778cad5e01ebd3f4a Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Sat, 14 Sep 2013 21:31:42 +0800 Subject: [PATCH] Minimize Cygwin64 changes & use __unix__ instead of CYGWIN. --- display.c | 3 +-- estruct.h | 2 +- flook.c | 7 +++---- input.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/display.c b/display.c index 274db40..2fc1eb8 100644 --- a/display.c +++ b/display.c @@ -56,8 +56,6 @@ static int displaying = TRUE; #include /* for window size changes */ int chg_width, chg_height; - -static int newscreensize(int h, int w); #endif static int reframe(struct window *wp); @@ -73,6 +71,7 @@ static void modeline(struct window *wp); static void mlputi(int i, int r); static void mlputli(long l, int r); static void mlputf(int s); +static int newscreensize(int h, int w); #if RAINBOW static void putline(int row, int col, char *buf); diff --git a/estruct.h b/estruct.h index e443557..120b871 100644 --- a/estruct.h +++ b/estruct.h @@ -54,7 +54,7 @@ #undef BSD #endif -#if defined(SYSV) || defined(u3b2) || defined(_AIX) || (defined(i386) && defined(unix)) || defined(__hpux) || defined( CYGWIN) +#if defined(SYSV) || defined(u3b2) || defined(_AIX) || (defined(i386) && defined(unix)) || defined(__hpux) || defined( __unix__) #define USG 1 /* System V UNIX */ #else #define USG 0 diff --git a/flook.c b/flook.c index cde4fb5..0524816 100644 --- a/flook.c +++ b/flook.c @@ -75,15 +75,15 @@ boolean fexist( const char *fname) */ char *flook( const char *fname, int hflag) { + char *home; /* path to home directory */ + char *path; /* environmental PATH variable */ + char *sp; /* pointer into path spec */ int i; /* index */ static char fspec[NSTRING]; /* full path spec to search */ #if ENVFUNC - char *path; /* environmental PATH variable */ if (hflag) { - char *home; /* path to home directory */ - home = getenv("HOME"); if (home != NULL) { /* build home dir file spec */ @@ -108,7 +108,6 @@ char *flook( const char *fname, int hflag) path = getenv("PATH"); if (path != NULL) while (*path) { - char *sp; /* pointer into path spec */ /* build next possible file spec */ sp = fspec; diff --git a/input.c b/input.c index 8979157..1bd797d 100644 --- a/input.c +++ b/input.c @@ -345,9 +345,9 @@ int getcmd(void) #if VT220 proc_metac: +#endif if (c == 128+27) /* CSI */ goto handle_CSI; -#endif /* process META prefix */ if (c == (CONTROL | '[')) { c = get1key();