Beispiel #1
0
int main                        // MAIN-LINE
    ( int arg_count             // - # arguments
    , char const * args[] )     // - arguments for make
{
    char const * * pgm_args;    // - arguments passed to make
    unsigned index;             // - index of argument
    int retn;                   // - return

    if( load_dlls() ) {
        pgm_args = (char const **)alloca( ( arg_count + 1 ) * sizeof( char* ) );
        for( index = 1; index < arg_count; ++ index ) {
            pgm_args[index] = args[index];
        }
        pgm_args[index] = 0;
        pgm_args[0] = "WMAKE";
        retn = spawnv( P_WAIT, "wmake", pgm_args );
    } else {
        printf( "WMAKEPT terminated without running WMAKE\n" );
        retn = -1;
    }
    return( retn );
}
Beispiel #2
0
int handle_init ()
{
	idle_timeout = config_get_intval("idle_timeout", 300);
	memset(&fds, 0, sizeof(fds));

	/*proxy_fd = connect_to_svr( config_get_strval ("dbproxy_ip"),*/
	/*config_get_intval("dbproxy_port", 0), 65535, 1 );*/

	statistic_file = config_get_strval("statistic_logfile");
	if ( load_dlls(config_get_strval("games_conf")) == -1 )
		return -1;

	setup_timer();
	init_sprites();
	if (config_get_strval("addr_mcast_ip")) {
		if (create_addr_mcast_socket() == 0) {
			send_addr_mcast_pkg(addr_mcast_1st_pkg);
			DEBUG_LOG("send mcast");
		} else {
			return -1;
		}
	}
	return 0;
}