X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdriver%2Fghci%2Fghci.c;fp=ghc%2Fdriver%2Fghci%2Fghci.c;h=f21a12a4ba44fa224be0b0bcda14865e9a160d61;hb=4d57994585c858a7be242c8db23a3e40834dfc72;hp=a41723a483eb9ee0275b53ee95943b6a07b107a1;hpb=2c77fa710ea39f78b4ab09217c67bc79db95b95d;p=ghc-hetmet.git diff --git a/ghc/driver/ghci/ghci.c b/ghc/driver/ghci/ghci.c index a41723a..f21a12a 100644 --- a/ghc/driver/ghci/ghci.c +++ b/ghc/driver/ghci/ghci.c @@ -1,6 +1,6 @@ /* * - * $Id: ghci.c,v 1.9 2005/04/22 17:15:51 sof Exp $ + * $Id: ghci.c,v 1.10 2005/05/05 00:58:38 sof Exp $ * * ghci wrapper for Win32 only * @@ -74,6 +74,12 @@ main(int argc, char** argv) ZeroMemory(&si, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO); + if ( getenv("_") ) { + printf("WARNING: GHCi invoked via 'ghci.exe' in *nix-like shells (cygwin-bash, in particular)\n"); + printf(" doesn't handle Ctrl-C well; use the 'ghcii.sh' shell wrapper instead\n"); + fflush(stdout); + } + /* Locate the binary we want to start up */ if ( !SearchPath(NULL, BINARY_NAME, @@ -81,7 +87,7 @@ main(int argc, char** argv) dwSize, (char*)binPath, &szEnd) ) { - errmsg("Unable to locate ghc.exe"); + errmsg1("%s: Unable to locate ghc.exe", argv[0]); return 1; } @@ -89,7 +95,7 @@ main(int argc, char** argv) /* Turn the path into short form - LFN form causes problems when passed in argv[0]. */ if ( !(GetShortPathName(binPath, binPathShort, dwSize)) ) { - errmsg("Unable to locate ghc.exe"); + errmsg1("%s: Unable to locate ghc.exe", argv[0]); return 1; } @@ -101,7 +107,7 @@ main(int argc, char** argv) } new_cmdline = (char*)malloc(sizeof(char) * (cmdline_len + 1)); if (!new_cmdline) { - errmsg("failed to start up ghc.exe; insufficient memory"); + errmsg1("%s: failed to start up ghc.exe; insufficient memory", argv[0]); return 1; }