Exemple #1
0
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;
}
Exemple #2
0
void
addOptionString(const char *s)
{ char *argv[256];
  int argc = breakargs(s, argv);

  parseOptions(argc, argv);
}
Exemple #3
0
void fsd::handlecidline(char *line)
{
   certificate *tempcert;
   int mode, level;
   char *array[4], *cid, *pwd;
   if (line[0]==';'||line[0]=='#') return;
   if (breakargs(line, array, 4)<3) return;
   cid=array[0], level=atoi(array[2]), pwd=array[1];
   tempcert=getcert(cid);
   if (!tempcert)
   {
      tempcert=new certificate(cid, pwd, level, mgmtime(), myserver->ident);
      mode=CERT_ADD;
   } else
   {
      tempcert->livecheck=1;
      if (!STRCASECMP(tempcert->password, pwd)&&level==tempcert->level)
         return;
      tempcert->configure(pwd, level, mgmtime(), myserver->ident);
      mode=CERT_MODIFY;
   }
   if (serverinterface) serverinterface->sendcert("*", mode, tempcert, NULL);
}