projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-09-06 01:00:04 by ken]
[ghc-hetmet.git]
/
ghc
/
driver
/
ghci
/
ghci.c
diff --git
a/ghc/driver/ghci/ghci.c
b/ghc/driver/ghci/ghci.c
index
723b767
..
d04af16
100644
(file)
--- a/
ghc/driver/ghci/ghci.c
+++ b/
ghc/driver/ghci/ghci.c
@@
-1,6
+1,6
@@
/*
*
/*
*
- * $Id: ghci.c,v 1.3 2001/08/02 01:01:46 sof Exp $
+ * $Id: ghci.c,v 1.5 2002/01/07 16:32:54 sof Exp $
*
* ghci wrapper - invokes ghc.exe with the added command-line
* option "--interactive".
*
* ghci wrapper - invokes ghc.exe with the added command-line
* option "--interactive".
@@
-25,7
+25,7
@@
* * Compile it up (assuming the .ico file is in the same dir
* as the .rc file):
*
* * Compile it up (assuming the .ico file is in the same dir
* as the .rc file):
*
- * MSVC: rc /I. ghci.rc /o ghci.res
+ * MSVC: rc /i. /fo ghci.res ghci.rc
* mingw: windres -o ghci.res -i ghci.rc -O coff
*
* * Add the resulting .res file to the link line of the wrapper:
* mingw: windres -o ghci.res -i ghci.rc -O coff
*
* * Add the resulting .res file to the link line of the wrapper:
@@
-79,7
+79,7
@@
main(int argc, char** argv)
return 1;
}
return 1;
}
- new_argv = (char**)malloc(sizeof(char) * (argc + 1 + 1));
+ new_argv = (char**)malloc(sizeof(char*) * (argc + 1 + 1));
if (new_argv == NULL) {
errmsg("failed to start up ghc.exe");
return 1;
if (new_argv == NULL) {
errmsg("failed to start up ghc.exe");
return 1;
@@
-95,7
+95,7
@@
main(int argc, char** argv)
}
for ( i=1; i < argc; i++ ) {
}
for ( i=1; i < argc; i++ ) {
- new_argv[i+1] = (char*)malloc(sizeof(char) * (strlen(argv[i] + 1)));
+ new_argv[i+1] = (char*)malloc(sizeof(char) * (strlen(argv[i]) + 1));
if (new_argv[i+1] == NULL) {
errmsg("failed to start up ghc.exe");
return 1;
if (new_argv[i+1] == NULL) {
errmsg("failed to start up ghc.exe");
return 1;
@@
-116,5
+116,13
@@
main(int argc, char** argv)
==> Just use spawnv().
*/
==> Just use spawnv().
*/
+#if 0
+ fprintf(stderr, "Invoking ghc: ");
+ i=0;
+ while (new_argv[i] != NULL) {
+ fprintf(stderr, "%s ", new_argv[i++]);
+ }
+ fprintf(stderr, "\n"); fflush(stderr);
+#endif
return _spawnv(_P_WAIT, binPath, new_argv);
}
return _spawnv(_P_WAIT, binPath, new_argv);
}