aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@xglobe.in>2020-04-03 22:28:03 +0200
committerOmar Polo <op@xglobe.in>2020-04-03 22:28:03 +0200
commit8852ffaf302e1b19e8146f276c366dd75d701a4d (patch)
treefcd7026e9db531436e4c904eafc704d1a4407b4e
parent3d4cf639d759c4ea4f04142474946fa585959d77 (diff)
downloadtext-adventure-8852ffaf302e1b19e8146f276c366dd75d701a4d.tar.gz
text-adventure-8852ffaf302e1b19e8146f276c366dd75d701a4d.tar.bz2
fixed brace indentation on foreach_obj macro
-rw-r--r--match.c3
-rw-r--r--misc.c12
2 files changed, 5 insertions, 10 deletions
diff --git a/match.c b/match.c
index 8f5a24b..39db53b 100644
--- a/match.c
+++ b/match.c
@@ -56,8 +56,7 @@ match_param(const char *src, struct param *par, int loose)
par->distance
= *src == '\0' ? dist_no_obj_specified : dist_unknown_obj;
- foreach_obj(obj)
- {
+ foreach_obj (obj) {
const char **tag;
enum distance dist = distance_to(obj);
for (tag = obj->tags; *tag != NULL; ++tag) {
diff --git a/misc.c b/misc.c
index 91af591..639823d 100644
--- a/misc.c
+++ b/misc.c
@@ -9,8 +9,7 @@ list_objs_at_loc(struct object *location)
size_t count = 0;
struct object *obj;
- foreach_obj(obj)
- {
+ foreach_obj (obj) {
if (obj != player && obj->location == location) {
if (count++ == 0)
printf("%s:\n", location->contents);
@@ -26,8 +25,7 @@ person_here(void)
{
struct object *obj;
- foreach_obj(obj)
- {
+ foreach_obj (obj) {
if (distance_to(obj) == dist_here && obj->health > 0)
return obj;
}
@@ -40,8 +38,7 @@ get_passage_to(struct object *target)
{
struct object *obj;
- foreach_obj(obj)
- {
+ foreach_obj (obj) {
if (obj->location == player->location
&& obj->prospect == target)
return obj;
@@ -92,8 +89,7 @@ weight_of_contents(struct object *container)
int sum = 0;
struct object *obj;
- foreach_obj(obj)
- {
+ foreach_obj (obj) {
if (obj->location == container)
sum += obj->weight;
}