base_name.c

foundationI_fluffos_v1/lib/secure/SimulEfun/base_name.c · 537 B

From the archive foundation1_fluffos_v1.zip

Download the archive   « Back to the archive contents

//	/adm/simul_efun/base_name.c
//	from the Nightmare mudlib
//	returns the name of the file of an object without extensions
//	based on the simul_efun originally by Truilkan@Basis
//	created by Descartes of Borg 22 december 1992

string base_name(mixed val) {
    string name, base;
    int borg;
    if(!val){
        //tc("base_name() problem: "+get_stack());
        return name;
    }
    if(stringp(val)) name = val;
    else name = file_name(val);
    if(sscanf(name, "%s#%d", base, borg) ==2) return base;
    else return name;
}

Site Stats

Snippets: 1791
Codebases: 571