mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
Merge branch 'master' of supraverse.net:libpsyc
This commit is contained in:
commit
af06387ec9
3 changed files with 40 additions and 3 deletions
|
@ -66,11 +66,14 @@ enum ListType
|
|||
LIST_BINARY = 2,
|
||||
}
|
||||
|
||||
/+
|
||||
struct String
|
||||
{
|
||||
size_t length;
|
||||
ubyte *ptr;
|
||||
}
|
||||
}+/
|
||||
|
||||
alias char[] String;
|
||||
|
||||
struct MatchVar
|
||||
{
|
||||
|
|
|
@ -8,6 +8,8 @@ import psyc.common;
|
|||
import psyc.syntax;
|
||||
|
||||
|
||||
extern (C):
|
||||
|
||||
/** Modifier flags. */
|
||||
enum ModifierFlag
|
||||
{
|
||||
|
@ -46,11 +48,40 @@ enum PacketFlag
|
|||
/** Structure for a modifier. */
|
||||
struct Modifier
|
||||
{
|
||||
char oper;
|
||||
char operator;
|
||||
String name;
|
||||
String value;
|
||||
ModifierFlag flag;
|
||||
} ;
|
||||
|
||||
static Modifier opCall ( char op, char[] nam, char[] val )
|
||||
{
|
||||
Modifier v;
|
||||
|
||||
with (v)
|
||||
{
|
||||
operator = op;
|
||||
name = nam;
|
||||
value = val;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
bool opEquals ( ref Modifier n )
|
||||
{
|
||||
return operator == n.operator &&
|
||||
value == n.value &&
|
||||
name == n.name;
|
||||
}
|
||||
|
||||
Modifier dup ( )
|
||||
{
|
||||
auto v = M(operator, name.dup, value.dup);
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
alias Modifier M;
|
||||
|
||||
/** Structure for an entity or routing header. */
|
||||
struct Header
|
||||
|
|
|
@ -2,6 +2,9 @@ module psyc.render;
|
|||
|
||||
import psyc.packet;
|
||||
|
||||
|
||||
extern (C):
|
||||
|
||||
/*
|
||||
* All rendering functions and the definitions they use are defined here.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue