mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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;
|
||||
|
||||
#define OSD_ALIAS 0x1337
|
||||
#define OSD_ALIAS 1337
|
||||
|
||||
#define OSDCMD_OK 0
|
||||
#define OSDCMD_SHOWHELP 1
|
||||
|
|
|
@ -218,23 +218,23 @@ static int _internal_osdfunc_alias(const osdfuncparm_t *parm)
|
|||
}
|
||||
|
||||
for (i=symbols; i!=NULL; i=i->next)
|
||||
{
|
||||
if (parm->numparms < 2)
|
||||
{
|
||||
if (!Bstrcasecmp(parm->parms[0],i->name))
|
||||
{
|
||||
if (parm->numparms < 2)
|
||||
{
|
||||
if (i->func == (void *)OSD_ALIAS)
|
||||
OSD_Printf("alias %s \"%s\"\n", i->name, i->help);
|
||||
else OSD_Printf("%s is a function, not an alias\n",i->name);
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
if (i != NULL && !Bstrcasecmp(parm->parms[0],i->name) && i->func != (void *)OSD_ALIAS)
|
||||
if (i->func != (void *)OSD_ALIAS)
|
||||
{
|
||||
OSD_Printf("Cannot override function \"%s\" with alias\n",i->name);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OSD_RegisterFunction(Bstrdup(parm->parms[0]),Bstrdup(parm->parms[1]),(void *)OSD_ALIAS);
|
||||
OSD_Printf("%s\n",parm->raw);
|
||||
|
@ -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);
|
||||
return -1;
|
||||
}
|
||||
// Bfree(symb->help);
|
||||
Bfree((char *)symb->help);
|
||||
symb->help = help;
|
||||
symb->func = func;
|
||||
return 0;
|
||||
}
|
||||
|
||||
symb = addnewsymbol(name);
|
||||
|
|
Loading…
Reference in a new issue