This commit is contained in:
psyc://psyced.org/~lynX 2011-05-08 22:11:58 +02:00
parent ed0db6fa32
commit 14944d8484
2 changed files with 10 additions and 11 deletions

View File

@ -95,7 +95,7 @@ f_psyc_render(svalue_t *sp) {
meth, mlen, body, blen,
PSYC_PACKET_CHECK_LENGTH);
printf("rendering... packet.length = %ld\n", packet.length);
printf("rendering... packet.length = %d\n", packet.length);
// alloc_mstring creates an *untabled* string suitable for tmp data
memsafe(out = alloc_mstring(packet.length), packet.length, "f_psyc_render");
psyc_render(&packet, get_txt(out), packet.length);
@ -115,7 +115,6 @@ f_psyc_parse (svalue_t *sp) {
string_t *str = NULL;
vector_t *v;
mapping_t *map;
svalue_t *sv;
mp_int i;
char oper = 0;
psycString name = {0,0}, value = {0,0}, elem = {0,0};
@ -123,9 +122,7 @@ f_psyc_parse (svalue_t *sp) {
int ret;
size_t len;
if (! (current_object->flags & O_SHADOW))
errorf("Need to learn how to make an object have O_SHADOW quick!\n");
assert_shadow_sent(current_object);
psycState *state = O_GET_PSYC_STATE(current_object);
if (!state) {
state = pxalloc(sizeof(psycState));
@ -141,7 +138,7 @@ f_psyc_parse (svalue_t *sp) {
errorf("\npsyc_parse got %ld int* bytes... not supported yet\n", i);
}
else if (sp->type == T_STRING) {
printf("\npsyc_parse got a %ld bytes long string...\n", mstrsize(sp->u.str));
printf("\npsyc_parse got a %d bytes long string...\n", mstrsize(sp->u.str));
psyc_setParseBuffer(state->parser, psyc_newString(get_txt(sp->u.str),
mstrsize(sp->u.str)));
}
@ -160,6 +157,7 @@ f_psyc_parse (svalue_t *sp) {
put_mapping(&v->item[PSYC_ENTITY], map);
do {
svalue_t *sv;
ret = psyc_parse(state->parser, &oper, &name, &value);
switch (ret) {
@ -197,10 +195,11 @@ f_psyc_parse (svalue_t *sp) {
continue;
}
if (name.length) {
sv = pxalloc(sizeof(svalue_t));
put_string(sv, new_n_tabled(name.ptr, name.length));
sv = get_map_lvalue(v->item[PSYC_ENTITY].u.map, sv);
}
sv = pxalloc(sizeof(svalue_t));
put_string(sv, new_n_tabled(name.ptr, name.length));
sv = get_map_lvalue(v->item[PSYC_ENTITY].u.map, sv);
} else
errorf("sv needs to point to the current map_lvalue .. FIXME!\n");
// is it good to put entity variable values into the
// shared string table? probably yes.. but it's a guess

View File

@ -17,7 +17,7 @@ version_longtype="stable"
# A timestamp, to be used by bumpversion and other scripts.
# It can be used, for example, to 'touch' this file on every build, thus
# forcing revision control systems to add it on every checkin automatically.
version_stamp="Sun May 8 21:54:01 CEST 2011"
version_stamp="Sun May 8 22:11:18 CEST 2011"
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
version_major=4