2021-07-05 07:26:07 +00:00
|
|
|
/*
|
|
|
|
gib_keys.c
|
|
|
|
|
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
Copyright (C) 2002 Brian Koropoff <brianhk@cs.washington.edu>
|
|
|
|
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
# include <string.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_STRINGS_H
|
|
|
|
# include <strings.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "QF/cbuf.h"
|
|
|
|
#include "QF/cmd.h"
|
2021-11-03 10:02:39 +00:00
|
|
|
#include "QF/input.h"
|
2021-07-05 07:26:07 +00:00
|
|
|
#include "QF/sys.h"
|
|
|
|
#include "QF/gib.h"
|
2021-12-21 08:40:42 +00:00
|
|
|
#include "QF/keys.h"
|
2021-07-05 07:26:07 +00:00
|
|
|
|
|
|
|
#include "compat.h"
|
|
|
|
#include "old_keys.h"
|
|
|
|
|
|
|
|
static void
|
|
|
|
Key_GIB_Bind_Get_f (void)
|
|
|
|
{
|
2021-11-08 02:20:04 +00:00
|
|
|
#if 0
|
2021-07-05 07:26:07 +00:00
|
|
|
const char *key, *cmd;
|
|
|
|
imt_t *imt;
|
|
|
|
int k;
|
|
|
|
|
|
|
|
if (GIB_Argc () != 2) {
|
|
|
|
GIB_USAGE ("key");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
key = OK_TranslateKeyName (GIB_Argv (1));
|
|
|
|
|
|
|
|
if ((k = Key_StringToKeynum (key)) == -1) {
|
|
|
|
GIB_Error ("bind", "bind::get: invalid key %s", key);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
imt = Key_FindIMT ("imt_mod");
|
|
|
|
if (!imt || !(cmd = Key_GetBinding (imt, k)))
|
|
|
|
GIB_Return ("");
|
|
|
|
else
|
|
|
|
GIB_Return (cmd);
|
2021-11-08 02:20:04 +00:00
|
|
|
#endif
|
2021-07-05 07:26:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
GIB_Key_Init (void)
|
|
|
|
{
|
|
|
|
GIB_Builtin_Add ("bind::get", Key_GIB_Bind_Get_f);
|
|
|
|
}
|