Beispiel #1
0
int
main (int argc, char * argv[])
{
  OCState state;
  int err = 0; 

  if (cgi_test ()) {
    err = cgi_main (&state);
  } else {
    err = cmd_main (&state, argc, argv);
  }
  
  if (err) return 1;
  else return 0;
}
Beispiel #2
0
///////////////////////////////////////////////////////////////////////
//  Function: cCgiInterface::TheMain
//
//    Author: $author$
//      Date: 9/16/2011
///////////////////////////////////////////////////////////////////////
int cCgiInterface::TheMain
(int argc,
 char** argv,
 char** env)
{
    int err = 0;
    eError error;

    if (!(error = c_DEBUG_INIT_LEVELS(e_DEBUG_LEVELS_ERROR)))
    {
        err = cgi_main(argc, argv, env);
        c_DEBUG_FINISH();
    }
    return err;
}
Beispiel #3
0
 virtual int cgi_run(int argc, char_t** argv, char_t** env) {
     int err = 0, err2 = 0;
     if (!(err = before_get_cgi_environment(argc, argv, env))) {
         if (!(err = get_cgi_environment(argc, argv, env))) {
             if (!(err = before_get_cgi_content(argc, argv, env))) {
                 if (!(err = get_cgi_content(argc, argv, env))) {
                     if (!(err = cgi_main(argc, argv, env))) {
                     }
                 }
                 if ((err2 = after_get_cgi_content(argc, argv, env)) && (!err)) {
                     err = err2;
                 }
             }
         }
         if ((err2 = after_get_cgi_environment(argc, argv, env)) && (!err)) {
             err = err2;
         }
     }
     return err;
 }