aboutsummaryrefslogtreecommitdiff
path: root/test/regress.gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regress.gen.c')
-rw-r--r--test/regress.gen.c66
1 files changed, 40 insertions, 26 deletions
diff --git a/test/regress.gen.c b/test/regress.gen.c
index 09f4674..611ec8a 100644
--- a/test/regress.gen.c
+++ b/test/regress.gen.c
@@ -1,3 +1,4 @@
+
/*
* Automatically generated from ../test/regress.rpc
* by event_rpcgen.py/0.1. DO NOT EDIT THIS FILE.
@@ -91,7 +92,8 @@ msg_run_expand_to_hold_more(struct msg *msg)
return -1;
msg->run_data = new_data;
msg->run_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
struct run*
msg_run_add(struct msg *msg)
@@ -173,7 +175,7 @@ msg_attack_assign(struct msg *msg,
int
msg_run_assign(struct msg *msg, int off,
- const struct run* value)
+ const struct run* value)
{
if (!msg->run_set || off < 0 || off >= msg->run_length)
return (-1);
@@ -193,7 +195,8 @@ msg_run_assign(struct msg *msg, int off,
had_error = 1;
goto done;
}
- done:if (tmp != NULL)
+ done:
+ if (tmp != NULL)
evbuffer_free(tmp);
if (had_error) {
run_clear(msg->run_data[off]);
@@ -300,7 +303,7 @@ msg_free(struct msg *tmp)
}
void
-msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){
+msg_marshal(struct evbuffer *evbuf, const struct msg *tmp) {
evtag_marshal_string(evbuf, MSG_FROM_NAME, tmp->from_name_data);
evtag_marshal_string(evbuf, MSG_TO_NAME, tmp->to_name_data);
if (tmp->attack_set) {
@@ -317,7 +320,7 @@ msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){
}
int
-msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
+msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
{
ev_uint32_t tag;
while (evbuffer_get_length(evbuf) > 0) {
@@ -349,7 +352,8 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
tmp->attack_data = kill_new();
if (tmp->attack_data == NULL)
return (-1);
- if (evtag_unmarshal_kill(evbuf, MSG_ATTACK, tmp->attack_data) == -1) {
+ if (evtag_unmarshal_kill(evbuf, MSG_ATTACK,
+ tmp->attack_data) == -1) {
event_warnx("%s: failed to unmarshal attack", __func__);
return (-1);
}
@@ -364,7 +368,8 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
tmp->run_data[tmp->run_length] = run_new();
if (tmp->run_data[tmp->run_length] == NULL)
return (-1);
- if (evtag_unmarshal_run(evbuf, MSG_RUN, tmp->run_data[tmp->run_length]) == -1) {
+ if (evtag_unmarshal_run(evbuf, MSG_RUN,
+ tmp->run_data[tmp->run_length]) == -1) {
event_warnx("%s: failed to unmarshal run", __func__);
return (-1);
}
@@ -401,7 +406,8 @@ msg_complete(struct msg *msg)
}
int
-evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *msg)
+evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct msg *msg)
{
ev_uint32_t tag;
int res = -1;
@@ -422,13 +428,14 @@ evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *ms
}
void
-evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag, const struct msg *msg)
+evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct msg *msg)
{
struct evbuffer *buf_ = evbuffer_new();
assert(buf_ != NULL);
msg_marshal(buf_, msg);
evtag_marshal_buffer(evbuf, tag, buf_);
- evbuffer_free(buf_);
+ evbuffer_free(buf_);
}
/*
@@ -489,7 +496,8 @@ kill_how_often_expand_to_hold_more(struct kill *msg)
return -1;
msg->how_often_data = new_data;
msg->how_often_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
ev_uint32_t *
kill_how_often_add(struct kill *msg, const ev_uint32_t value)
@@ -532,7 +540,7 @@ kill_action_assign(struct kill *msg,
int
kill_how_often_assign(struct kill *msg, int off,
- const ev_uint32_t value)
+ const ev_uint32_t value)
{
if (!msg->how_often_set || off < 0 || off >= msg->how_often_length)
return (-1);
@@ -612,7 +620,7 @@ kill_free(struct kill *tmp)
}
void
-kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){
+kill_marshal(struct evbuffer *evbuf, const struct kill *tmp) {
evtag_marshal_string(evbuf, KILL_WEAPON, tmp->weapon_data);
evtag_marshal_string(evbuf, KILL_ACTION, tmp->action_data);
if (tmp->how_often_set) {
@@ -626,7 +634,7 @@ kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){
}
int
-kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
+kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
{
ev_uint32_t tag;
while (evbuffer_get_length(evbuf) > 0) {
@@ -686,7 +694,8 @@ kill_complete(struct kill *msg)
}
int
-evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *msg)
+evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct kill *msg)
{
ev_uint32_t tag;
int res = -1;
@@ -707,13 +716,14 @@ evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *
}
void
-evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag, const struct kill *msg)
+evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct kill *msg)
{
struct evbuffer *buf_ = evbuffer_new();
assert(buf_ != NULL);
kill_marshal(buf_, msg);
evtag_marshal_buffer(evbuf, tag, buf_);
- evbuffer_free(buf_);
+ evbuffer_free(buf_);
}
/*
@@ -794,7 +804,8 @@ run_notes_expand_to_hold_more(struct run *msg)
return -1;
msg->notes_data = new_data;
msg->notes_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
char * *
run_notes_add(struct run *msg, const char * value)
@@ -831,7 +842,8 @@ run_other_numbers_expand_to_hold_more(struct run *msg)
return -1;
msg->other_numbers_data = new_data;
msg->other_numbers_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
ev_uint32_t *
run_other_numbers_add(struct run *msg, const ev_uint32_t value)
@@ -884,7 +896,7 @@ run_fixed_bytes_assign(struct run *msg, const ev_uint8_t *value)
int
run_notes_assign(struct run *msg, int off,
- const char * value)
+ const char * value)
{
if (!msg->notes_set || off < 0 || off >= msg->notes_length)
return (-1);
@@ -911,7 +923,7 @@ run_large_number_assign(struct run *msg, const ev_uint64_t value)
int
run_other_numbers_assign(struct run *msg, int off,
- const ev_uint32_t value)
+ const ev_uint32_t value)
{
if (!msg->other_numbers_set || off < 0 || off >= msg->other_numbers_length)
return (-1);
@@ -1047,7 +1059,7 @@ run_free(struct run *tmp)
}
void
-run_marshal(struct evbuffer *evbuf, const struct run *tmp){
+run_marshal(struct evbuffer *evbuf, const struct run *tmp) {
evtag_marshal_string(evbuf, RUN_HOW, tmp->how_data);
if (tmp->some_bytes_set) {
evtag_marshal(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length);
@@ -1075,7 +1087,7 @@ run_marshal(struct evbuffer *evbuf, const struct run *tmp){
}
int
-run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
+run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
{
ev_uint32_t tag;
while (evbuffer_get_length(evbuf) > 0) {
@@ -1172,7 +1184,8 @@ run_complete(struct run *msg)
}
int
-evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *msg)
+evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct run *msg)
{
ev_uint32_t tag;
int res = -1;
@@ -1193,12 +1206,13 @@ evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *ms
}
void
-evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag, const struct run *msg)
+evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct run *msg)
{
struct evbuffer *buf_ = evbuffer_new();
assert(buf_ != NULL);
run_marshal(buf_, msg);
evtag_marshal_buffer(evbuf, tag, buf_);
- evbuffer_free(buf_);
+ evbuffer_free(buf_);
}