mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@819 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f6999157f7
commit
2b6f413f9c
2 changed files with 11 additions and 11 deletions
|
@ -24,7 +24,7 @@ typedef struct _symbol
|
||||||
|
|
||||||
extern symbol_t *symbols;
|
extern symbol_t *symbols;
|
||||||
|
|
||||||
#define OSD_ALIAS 0x1337
|
#define OSD_ALIAS 1337
|
||||||
|
|
||||||
#define OSDCMD_OK 0
|
#define OSDCMD_OK 0
|
||||||
#define OSDCMD_SHOWHELP 1
|
#define OSDCMD_SHOWHELP 1
|
||||||
|
|
|
@ -219,20 +219,20 @@ static int _internal_osdfunc_alias(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
for (i=symbols; i!=NULL; i=i->next)
|
for (i=symbols; i!=NULL; i=i->next)
|
||||||
{
|
{
|
||||||
if (parm->numparms < 2)
|
if (!Bstrcasecmp(parm->parms[0],i->name))
|
||||||
{
|
{
|
||||||
if (!Bstrcasecmp(parm->parms[0],i->name))
|
if (parm->numparms < 2)
|
||||||
{
|
{
|
||||||
if (i->func == (void *)OSD_ALIAS)
|
if (i->func == (void *)OSD_ALIAS)
|
||||||
OSD_Printf("alias %s \"%s\"\n", i->name, i->help);
|
OSD_Printf("alias %s \"%s\"\n", i->name, i->help);
|
||||||
else OSD_Printf("%s is a function, not an alias\n",i->name);
|
else OSD_Printf("%s is a function, not an alias\n",i->name);
|
||||||
|
return OSDCMD_OK;
|
||||||
|
}
|
||||||
|
if (i->func != (void *)OSD_ALIAS)
|
||||||
|
{
|
||||||
|
OSD_Printf("Cannot override function \"%s\" with alias\n",i->name);
|
||||||
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
return OSDCMD_OK;
|
|
||||||
}
|
|
||||||
if (i != NULL && !Bstrcasecmp(parm->parms[0],i->name) && i->func != (void *)OSD_ALIAS)
|
|
||||||
{
|
|
||||||
OSD_Printf("Cannot override function \"%s\" with alias\n",i->name);
|
|
||||||
return OSDCMD_OK;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,9 +1270,9 @@ int OSD_RegisterFunction(const char *name, const char *help, int (*func)(const o
|
||||||
OSD_Printf("OSD_RegisterFunction(): \"%s\" is already defined\n", name);
|
OSD_Printf("OSD_RegisterFunction(): \"%s\" is already defined\n", name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// Bfree(symb->help);
|
Bfree((char *)symb->help);
|
||||||
symb->help = help;
|
symb->help = help;
|
||||||
symb->func = func;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
symb = addnewsymbol(name);
|
symb = addnewsymbol(name);
|
||||||
|
|
Loading…
Reference in a new issue