Cvar_FindVar
============
*/
-cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, int neededflags)
+cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
{
- int hashindex;
+ unsigned hashindex;
cvar_hash_t *hash;
// use hash lookup to minimize search time
return NULL;
}
-cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, int neededflags)
+cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, unsigned neededflags)
{
cvar_t *var;
* Returns a pointer to the pointer stored in hashtable[] (or the one it links to)
* because we'll need to update that when deleting a cvar as other cvar(s) may share its hashindex.
*/
-static cvar_hash_t **Cvar_FindVarLink(cvar_state_t *cvars, const char *var_name, cvar_t **parent, cvar_t ***link, cvar_t **prev_alpha, int neededflags)
+static cvar_hash_t **Cvar_FindVarLink(cvar_state_t *cvars, const char *var_name, cvar_t **parent, cvar_t ***link, cvar_t **prev_alpha, unsigned neededflags)
{
- int hashindex;
+ unsigned hashindex;
cvar_t *cvar;
cvar_hash_t **hashlinkptr;
Cvar_VariableValue
============
*/
-float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, int neededflags)
+float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, unsigned neededflags)
{
cvar_t *var;
return atof (var->string);
}
-float Cvar_VariableValue(cvar_state_t *cvars, const char *var_name, int neededflags)
+float Cvar_VariableValue(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
{
return Cvar_VariableValueOr(cvars, var_name, 0, neededflags);
}
Cvar_VariableString
============
*/
-const char *Cvar_VariableStringOr(cvar_state_t *cvars, const char *var_name, const char *def, int neededflags)
+const char *Cvar_VariableStringOr(cvar_state_t *cvars, const char *var_name, const char *def, unsigned neededflags)
{
cvar_t *var;
return var->string;
}
-const char *Cvar_VariableString(cvar_state_t *cvars, const char *var_name, int neededflags)
+const char *Cvar_VariableString(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
{
return Cvar_VariableStringOr(cvars, var_name, cvar_null_string, neededflags);
}
Cvar_VariableDefString
============
*/
-const char *Cvar_VariableDefString(cvar_state_t *cvars, const char *var_name, int neededflags)
+const char *Cvar_VariableDefString(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
{
cvar_t *var;
Cvar_VariableDescription
============
*/
-const char *Cvar_VariableDescription(cvar_state_t *cvars, const char *var_name, int neededflags)
+const char *Cvar_VariableDescription(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
{
cvar_t *var;
Cvar_CompleteVariable
============
*/
-const char *Cvar_CompleteVariable(cvar_state_t *cvars, const char *partial, int neededflags)
+const char *Cvar_CompleteVariable(cvar_state_t *cvars, const char *partial, unsigned neededflags)
{
cvar_t *cvar;
size_t len;
Thanks to Fett erich@heintz.com
*/
-int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, int neededflags)
+int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, unsigned neededflags)
{
cvar_t *cvar;
size_t len;
Thanks to taniwha
*/
-const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, int neededflags)
+const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, unsigned neededflags)
{
const cvar_t *cvar;
size_t len = 0;
}
// written by LadyHavoc
-void Cvar_CompleteCvarPrint(cvar_state_t *cvars, const char *partial, int neededflags)
+void Cvar_CompleteCvarPrint(cvar_state_t *cvars, const char *partial, unsigned neededflags)
{
cvar_t *cvar;
size_t len = strlen(partial);
{
cvar_state_t *cvars = &cvars_all;
cvar_hash_t *hash;
- int hashindex;
+ unsigned hashindex;
if (!(variable->flags & cmd_local->cvars_flagsmask))
{
{
cvar_t *current, *next;
cvar_hash_t *hash;
- int hashindex;
+ unsigned hashindex;
/*
* Link the variable in
* alphanumerical order
void Cvar_RestoreInitState(cvar_state_t *cvars)
{
- int hashindex;
+ unsigned hashindex;
cvar_t *c, **cp;
cvar_t *c2, **cp2;
for (cp = &cvars->vars;(c = *cp);)
typedef struct cvar_s
{
- int flags;
+ unsigned flags;
const char *name;
void Cvar_SetQuick (cvar_t *var, const char *value);
void Cvar_SetValueQuick (cvar_t *var, float value);
-float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, float def, int neededflags);
+float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, float def, unsigned neededflags);
// returns def if not defined
-float Cvar_VariableValue (cvar_state_t *cvars, const char *var_name, int neededflags);
+float Cvar_VariableValue (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
// returns 0 if not defined or non numeric
-const char *Cvar_VariableStringOr (cvar_state_t *cvars, const char *var_name, const char *def, int neededflags);
+const char *Cvar_VariableStringOr (cvar_state_t *cvars, const char *var_name, const char *def, unsigned neededflags);
// returns def if not defined
-const char *Cvar_VariableString (cvar_state_t *cvars, const char *var_name, int neededflags);
+const char *Cvar_VariableString (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
// returns an empty string if not defined
-const char *Cvar_VariableDefString (cvar_state_t *cvars, const char *var_name, int neededflags);
+const char *Cvar_VariableDefString (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
// returns an empty string if not defined
-const char *Cvar_VariableDescription (cvar_state_t *cvars, const char *var_name, int neededflags);
+const char *Cvar_VariableDescription (cvar_state_t *cvars, const char *var_name, unsigned neededflags);
// returns an empty string if not defined
-const char *Cvar_CompleteVariable (cvar_state_t *cvars, const char *partial, int neededflags);
+const char *Cvar_CompleteVariable (cvar_state_t *cvars, const char *partial, unsigned neededflags);
// attempts to match a partial variable name for command line completion
// returns NULL if nothing fits
void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full);
-void Cvar_CompleteCvarPrint (cvar_state_t *cvars, const char *partial, int neededflags);
+void Cvar_CompleteCvarPrint (cvar_state_t *cvars, const char *partial, unsigned neededflags);
qbool Cvar_Command (struct cmd_state_s *cmd);
// called by Cmd_ExecuteString when Cmd_Argv(cmd, 0) doesn't match a known
// Writes lines containing "set variable value" for all variables
// with the archive flag set to true.
-cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, int neededflags);
-cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, int neededflags);
+cvar_t *Cvar_FindVar(cvar_state_t *cvars, const char *var_name, unsigned neededflags);
+cvar_t *Cvar_FindVarAfter(cvar_state_t *cvars, const char *prev_var_name, unsigned neededflags);
-int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, int neededflags);
-const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, int neededflags);
+int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, unsigned neededflags);
+const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, unsigned neededflags);
// Added by EvilTypeGuy - functions for tab completion system
// Thanks to Fett erich@heintz.com
// Thanks to taniwha