Merge branch 'master' of git://git.psyced.org/git/psyclpc

This commit is contained in:
Gabor Adam Toth 2011-05-10 15:33:31 +02:00
commit d0df37f341
2 changed files with 28 additions and 26 deletions

View File

@ -17,35 +17,37 @@
# include "xalloc.h"
typedef struct psyc_state_s {
psycParseState *parser;
vector_t *packet;
// tmp storage for incomplete modifier/body
char oper;
char *name;
size_t name_len;
char *value;
size_t value_len;
// tmp storage for remaining unparsed bytes at the end of the buffer
char *remaining;
size_t remaining_len;
psycParseState *parser;
vector_t *packet;
// tmp storage for incomplete modifier/body
char oper;
char *name;
size_t name_len;
char *value;
size_t value_len;
// tmp storage for remaining unparsed bytes at the end of the buffer
char *remaining;
size_t remaining_len;
} psyc_state_t;
static inline void
psyc_free_state (psyc_state_t *ps) {
if (!ps)
return;
if (ps->name)
pfree((void *) ps->name);
if (ps->value)
pfree((void *) ps->value);
if (ps->remaining)
pfree((void *) ps->remaining);
if (ps->parser)
pfree((void *) ps->parser);
if (ps->packet)
free_array(ps->packet);
ps->name = ps->value = ps->remaining = ps->parser = ps->packet = NULL;
ps->oper = ps->name_len = ps->value_len = ps->remaining_len = 0;
if (!ps)
return;
if (ps->name)
pfree((void *) ps->name);
if (ps->value)
pfree((void *) ps->value);
if (ps->remaining)
pfree((void *) ps->remaining);
if (ps->parser)
pfree((void *) ps->parser);
if (ps->packet)
free_array(ps->packet);
ps->name = ps->value = ps->remaining = NULL;
ps->parser = NULL;
ps->packet = NULL;
ps->oper = ps->name_len = ps->value_len = ps->remaining_len = 0;
}
# define PKG_PSYC_H

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="Tue May 10 01:00:33 CEST 2011"
version_stamp="Tue May 10 14:07:26 CEST 2011"
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
version_major=4