コード例 #1
0
ファイル: xpce-stub.c プロジェクト: edechter/packages-xpce
int PASCAL
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
	LPSTR lpszCmdLine, int nCmdShow)
{ char *	argv[100];
  int		argc;

  program = program_name(hInstance);
  argc = breakargs(program, lpszCmdLine, argv);

  bind_terminal();
  PL_set_prolog_flag("verbose", PL_ATOM, "silent"); /* operate silently */
  DEBUG(ok("About to start Prolog with %d arguments", argc));
  if ( !PL_initialise(argc, argv) )
  { ok("Initialisation failed");
    PL_halt(1);
  }

  if ( PL_toplevel() )
  { PL_halt(0);
  } else
  { ok("Toplevel failed");
    PL_halt(1);
  }

  return 0;
}
コード例 #2
0
ファイル: pl-main.c プロジェクト: DouglasRMiles/swipl-devel
int
main(int argc, char **argv)
{
#if O_CTRLC
    main_thread_id = GetCurrentThreadId();
    SetConsoleCtrlHandler((PHANDLER_ROUTINE)consoleHandlerRoutine, TRUE);
#endif

#if O_ANSI_COLORS
    PL_w32_wrap_ansi_console();	/* decode ANSI color sequences (ESC[...m) */
#endif
#ifdef READLINE
    PL_initialise_hook(install_readline);
#endif

    if ( !PL_initialise(argc, argv) )
        PL_halt(1);

    for(;;)
    {   int status = PL_toplevel() ? 0 : 1;

        PL_halt(status);
    }

    return 0;
}
コード例 #3
0
	void close_store() {
		if (alive) {
			PL_halt(PL_toplevel() ? 0 : 1);
		}
	}