base_name.c

foundation2_fluffos_v1/lib/secure/sefun/base_name.c · 446 B

From the archive foundation2_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(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