1
0
Fork 0
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:
Marenz 2011-06-12 14:25:41 +02:00
commit af06387ec9
3 changed files with 40 additions and 3 deletions

View file

@ -66,11 +66,14 @@ enum ListType
LIST_BINARY = 2, LIST_BINARY = 2,
} }
/+
struct String struct String
{ {
size_t length; size_t length;
ubyte *ptr; ubyte *ptr;
} }+/
alias char[] String;
struct MatchVar struct MatchVar
{ {

View file

@ -8,6 +8,8 @@ import psyc.common;
import psyc.syntax; import psyc.syntax;
extern (C):
/** Modifier flags. */ /** Modifier flags. */
enum ModifierFlag enum ModifierFlag
{ {
@ -46,12 +48,41 @@ enum PacketFlag
/** Structure for a modifier. */ /** Structure for a modifier. */
struct Modifier struct Modifier
{ {
char oper; char operator;
String name; String name;
String value; String value;
ModifierFlag flag; 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. */ /** Structure for an entity or routing header. */
struct Header struct Header
{ {

View file

@ -2,6 +2,9 @@ module psyc.render;
import psyc.packet; import psyc.packet;
extern (C):
/* /*
* All rendering functions and the definitions they use are defined here. * All rendering functions and the definitions they use are defined here.
*/ */