Esempio n. 1
0
void init()
{
#ifndef ENABLE_IPS
    return;
#endif //!ENABLE_IPS

    execfile(CFG_FILE, false);
    log = openutf8file(LOG_FILE, "ab");

    if (!log)
        conoutf(CON_WARN, "couldn't open %s for writing", LOG_FILE);
}
Esempio n. 2
0
void CmdManager::run(int argc, char** argv)
{
	bool isint = argc <= 1;
	
	for(int i = 1; i<argc; ++i)
	{ 
		std::string a = getargv(i, argc, argv);
		
		if(a == "-i")
			isint = true;
		else if(a == "-e")
			execfile(getargv(++i, argc, argv));
		else if(a == "-p")
			execute(getargv(++i, argc, argv));
	}
	
	interact();
}
Esempio n. 3
0
void loadshaders()
{
    standardshaders = true;
    execfile("data/glsl.cfg");
    standardshaders = false;

    nullshader = lookupshaderbyname("null");
    hudshader = lookupshaderbyname("hud");
    hudnotextureshader = lookupshaderbyname("hudnotexture");
    stdworldshader = lookupshaderbyname("stdworld");
    if(!nullshader || !hudshader || !hudnotextureshader || !stdworldshader) fatal("cannot find shader definitions");

    dummyslot.shader = stdworldshader;

    textureshader = lookupshaderbyname("texture");
    notextureshader = lookupshaderbyname("notexture");
    nocolorshader = lookupshaderbyname("nocolor");
    foggedshader = lookupshaderbyname("fogged");
    foggednotextureshader = lookupshaderbyname("foggednotexture");
    
    nullshader->set();

    loadedshaders = true;
}
Esempio n. 4
0
int main(int argc, char** argv)
{
    set_affinity();
    printf("FFT/DFT benchmarking tool\n");
    printf("Copyright (C) 2016 D Levin https://www.kfrlib.com\n");
    printf("Benchmark source code is dual-licensed under MIT and GPL 2 or later\n");
    printf("Individual DFT/FFT algorithms have its own licenses. See its source code for details\n");
    printf("Usage:\n        %s <size> <size> ... <size>\n\n", execfile(argv).c_str());
    printf("Data type: %s\n", real_name);
    printf("Algorithm: %s\n", fft_benchmark<false>::name().c_str());
    printf("Built using %s\n\n", __VERSION__);

    printf(">[\n");
    for (size_t i = 1; i < argc; i++)
    {
        const long size = std::atol(argv[i]);
        if (size > 1)
            test_fft(size);
        else
            printf("Incorrect size: %s\n", argv[i]);
    }
    printf(">]\n");
    return 0;
}
Esempio n. 5
0
void reloadauth()
{
    server::clearusers();
    execfile(authfile);
}
Esempio n. 6
0
 void loadconfigs() { execfile("auth.cfg", false); }