mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
c2str
This commit is contained in:
parent
8906e67529
commit
9f3cc511aa
2 changed files with 33 additions and 32 deletions
|
@ -23,7 +23,8 @@
|
||||||
#define PSYC_VERSION 1
|
#define PSYC_VERSION 1
|
||||||
#define PSYC_EPOCH 1440444041 // 2015-08-24 21:20:41 CET (Monday)
|
#define PSYC_EPOCH 1440444041 // 2015-08-24 21:20:41 CET (Monday)
|
||||||
|
|
||||||
#define PSYC_C2STR(str) {sizeof(str)-1, str}
|
#define PSYC_C2STR(str) (PsycString) {sizeof(str)-1, str}
|
||||||
|
#define PSYC_C2STRI(str) {sizeof(str)-1, str}
|
||||||
#define PSYC_C2ARG(str) str, sizeof(str)-1
|
#define PSYC_C2ARG(str) str, sizeof(str)-1
|
||||||
#define PSYC_C2ARG2(str) sizeof(str)-1, str
|
#define PSYC_C2ARG2(str) sizeof(str)-1, str
|
||||||
#define PSYC_S2ARG(str) (str).data, (str).length
|
#define PSYC_S2ARG(str) (str).data, (str).length
|
||||||
|
|
|
@ -5,42 +5,42 @@
|
||||||
/// Routing variables in alphabetical order.
|
/// Routing variables in alphabetical order.
|
||||||
const PsycString psyc_routing_vars[] =
|
const PsycString psyc_routing_vars[] =
|
||||||
{
|
{
|
||||||
PSYC_C2STR("_amount_fragments"),
|
PSYC_C2STRI("_amount_fragments"),
|
||||||
PSYC_C2STR("_context"),
|
PSYC_C2STRI("_context"),
|
||||||
//PSYC_C2STR("_count"), // older PSYC
|
//PSYC_C2STRI("_count"), // older PSYC
|
||||||
PSYC_C2STR("_counter"), // the name for this is supposed to be _count, not _counter
|
PSYC_C2STRI("_counter"), // the name for this is supposed to be _count, not _counter
|
||||||
PSYC_C2STR("_fragment"),
|
PSYC_C2STRI("_fragment"),
|
||||||
//PSYC_C2STR("_length"), // older PSYC
|
//PSYC_C2STRI("_length"), // older PSYC
|
||||||
PSYC_C2STR("_source"),
|
PSYC_C2STRI("_source"),
|
||||||
//PSYC_C2STR("_source_identification"), // older PSYC
|
//PSYC_C2STRI("_source_identification"), // older PSYC
|
||||||
PSYC_C2STR("_source_identity"),
|
PSYC_C2STRI("_source_identity"),
|
||||||
PSYC_C2STR("_source_relay"),
|
PSYC_C2STRI("_source_relay"),
|
||||||
PSYC_C2STR("_source_relay_relay"), // until you have a better idea.. is this really in use?
|
PSYC_C2STRI("_source_relay_relay"), // until you have a better idea.. is this really in use?
|
||||||
PSYC_C2STR("_tag"),
|
PSYC_C2STRI("_tag"),
|
||||||
PSYC_C2STR("_tag_relay"),
|
PSYC_C2STRI("_tag_relay"),
|
||||||
//PSYC_C2STR("_tag_reply"), // older PSYC
|
//PSYC_C2STRI("_tag_reply"), // older PSYC
|
||||||
PSYC_C2STR("_target"),
|
PSYC_C2STRI("_target"),
|
||||||
PSYC_C2STR("_target_forward"),
|
PSYC_C2STRI("_target_forward"),
|
||||||
PSYC_C2STR("_target_relay"),
|
PSYC_C2STRI("_target_relay"),
|
||||||
//PSYC_C2STR("_understand_modules"), // older PSYC
|
//PSYC_C2STRI("_understand_modules"), // older PSYC
|
||||||
//PSYC_C2STR("_using_modules"), // older PSYC
|
//PSYC_C2STRI("_using_modules"), // older PSYC
|
||||||
};
|
};
|
||||||
|
|
||||||
// Variable types in alphabetical order.
|
// Variable types in alphabetical order.
|
||||||
const PsycDictInt psyc_var_types[] =
|
const PsycDictInt psyc_var_types[] =
|
||||||
{
|
{
|
||||||
{PSYC_C2STR("_amount"), PSYC_TYPE_AMOUNT},
|
{PSYC_C2STRI("_amount"), PSYC_TYPE_AMOUNT},
|
||||||
{PSYC_C2STR("_color"), PSYC_TYPE_COLOR},
|
{PSYC_C2STRI("_color"), PSYC_TYPE_COLOR},
|
||||||
{PSYC_C2STR("_date"), PSYC_TYPE_DATE},
|
{PSYC_C2STRI("_date"), PSYC_TYPE_DATE},
|
||||||
{PSYC_C2STR("_degree"), PSYC_TYPE_DEGREE},
|
{PSYC_C2STRI("_degree"), PSYC_TYPE_DEGREE},
|
||||||
{PSYC_C2STR("_entity"), PSYC_TYPE_ENTITY},
|
{PSYC_C2STRI("_entity"), PSYC_TYPE_ENTITY},
|
||||||
{PSYC_C2STR("_flag"), PSYC_TYPE_FLAG},
|
{PSYC_C2STRI("_flag"), PSYC_TYPE_FLAG},
|
||||||
{PSYC_C2STR("_language"), PSYC_TYPE_LANGUAGE},
|
{PSYC_C2STRI("_language"), PSYC_TYPE_LANGUAGE},
|
||||||
{PSYC_C2STR("_list"), PSYC_TYPE_LIST},
|
{PSYC_C2STRI("_list"), PSYC_TYPE_LIST},
|
||||||
{PSYC_C2STR("_nick"), PSYC_TYPE_NICK},
|
{PSYC_C2STRI("_nick"), PSYC_TYPE_NICK},
|
||||||
{PSYC_C2STR("_page"), PSYC_TYPE_PAGE},
|
{PSYC_C2STRI("_page"), PSYC_TYPE_PAGE},
|
||||||
{PSYC_C2STR("_uniform"), PSYC_TYPE_UNIFORM},
|
{PSYC_C2STRI("_uniform"), PSYC_TYPE_UNIFORM},
|
||||||
{PSYC_C2STR("_time"), PSYC_TYPE_TIME},
|
{PSYC_C2STRI("_time"), PSYC_TYPE_TIME},
|
||||||
};
|
};
|
||||||
|
|
||||||
const size_t psyc_routing_vars_num = PSYC_NUM_ELEM(psyc_routing_vars);
|
const size_t psyc_routing_vars_num = PSYC_NUM_ELEM(psyc_routing_vars);
|
||||||
|
|
Loading…
Reference in a new issue