1996-02-22 04:53:13 -08:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Objective Caml */
|
1996-02-22 04:53:13 -08:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1996-02-22 04:53:13 -08:00
|
|
|
/* Automatique. Distributed only by permission. */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#include <process.h>
|
|
|
|
|
1996-05-09 07:59:22 -07:00
|
|
|
char * runtime_name = "ocamlrun.exe";
|
|
|
|
char * errmsg = "Cannot find ocamlrun.exe\n";
|
1996-02-22 04:53:13 -08:00
|
|
|
|
|
|
|
int main(argc, argv)
|
|
|
|
int argc;
|
|
|
|
char ** argv;
|
|
|
|
{
|
|
|
|
int retcode;
|
|
|
|
retcode = spawnvp(P_WAIT, runtime_name, argv);
|
|
|
|
/* We use P_WAIT instead of P_OVERLAY here because under NT,
|
|
|
|
P_OVERLAY returns to the command interpreter, displaying the prompt
|
|
|
|
before executing the command. */
|
|
|
|
if (retcode == -1) {
|
|
|
|
write(2, errmsg, strlen(errmsg));
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
return retcode;
|
|
|
|
}
|