summaryrefslogtreecommitdiff
path: root/src/shared/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/command.h')
-rw-r--r--src/shared/command.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/shared/command.h b/src/shared/command.h
index 475e492..c07dee8 100644
--- a/src/shared/command.h
+++ b/src/shared/command.h
@@ -75,7 +75,7 @@ struct tagval : identval
void cleanup();
};
-
+
struct identstack
{
identval val;
@@ -128,7 +128,7 @@ struct ident
};
};
identfun fun; // ID_VAR, ID_FVAR, ID_SVAR, ID_COMMAND
-
+
ident() {}
// ID_VAR
ident(int t, const char *n, int m, int x, int *s, void *f = NULL, int flags = 0)
@@ -170,13 +170,13 @@ struct ident
valtype = v.type;
val = v;
}
-
+
void setval(const identstack &v)
{
valtype = v.valtype;
val = v.val;
}
-
+
void forcenull()
{
if(valtype==VAL_STR) delete[] val.s;
@@ -216,7 +216,7 @@ static inline float parsefloat(const char *s)
static inline void intformat(char *buf, int v, int len = 20) { nformatstring(buf, len, "%d", v); }
static inline void floatformat(char *buf, float v, int len = 20) { nformatstring(buf, len, v==int(v) ? "%.1f" : "%.6g", v); }
-static inline const char *getstr(const identval &v, int type)
+static inline const char *getstr(const identval &v, int type)
{
switch(type)
{
@@ -235,7 +235,7 @@ static inline int getint(const identval &v, int type)
{
case VAL_INT: return v.i;
case VAL_FLOAT: return int(v.f);
- case VAL_STR: case VAL_MACRO: return parseint(v.s);
+ case VAL_STR: case VAL_MACRO: return parseint(v.s);
default: return 0;
}
}
@@ -253,7 +253,7 @@ static inline float getfloat(const identval &v, int type)
}
}
inline float tagval::getfloat() const { return ::getfloat(*this, type); }
-inline float ident::getfloat() const { return ::getfloat(val, valtype); }
+inline float ident::getfloat() const { return ::getfloat(val, valtype); }
inline void ident::getval(tagval &v) const
{
@@ -332,4 +332,4 @@ inline void ident::getval(tagval &v) const
#define ICOMMAND(name, nargs, proto, b) ICOMMANDN(name, ICOMMANDNAME(name), nargs, proto, b)
#define ICOMMANDSNAME _icmds_
#define ICOMMANDS(name, nargs, proto, b) ICOMMANDNS(name, ICOMMANDSNAME, nargs, proto, b)
-
+