From 5e309426990f6d9d5ff2d05135448e4f3edc9aa1 Mon Sep 17 00:00:00 2001
From: cancel <cancel@cancel.fm>
Date: Tue, 27 Nov 2018 13:03:55 +0900
Subject: [PATCH] Cleanup port macro naming

---
 sim.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sim.c b/sim.c
index cc96e79..ff54b64 100644
--- a/sim.c
+++ b/sim.c
@@ -157,7 +157,7 @@ static inline void oper_move_relative_or_explode(Gbuffer gbuf, Mbuffer mbuf,
   if (!Dual_is_active)                                                         \
   return
 
-#define INPUT_PORT(_delta_y, _delta_x, _flags)                                 \
+#define I_PORT(_delta_y, _delta_x, _flags)                                     \
   mbuffer_poke_relative_flags_or(                                              \
       mbuffer, height, width, y, x, _delta_y, _delta_x,                        \
       Mark_flag_input | ((_flags)&Mark_flag_haste_input) |                     \
@@ -165,7 +165,7 @@ static inline void oper_move_relative_or_explode(Gbuffer gbuf, Mbuffer mbuf,
                    (cell_flags & (Mark_flag_lock | Mark_flag_sleep))           \
                ? Mark_flag_none                                                \
                : (_flags)))
-#define OUTPUT_PORT(_delta_y, _delta_x, _flags)                                \
+#define O_PORT(_delta_y, _delta_x, _flags)                                     \
   mbuffer_poke_relative_flags_or(                                              \
       mbuffer, height, width, y, x, _delta_y, _delta_x,                        \
       Mark_flag_input | ((_flags)&Mark_flag_haste_input) |                     \
@@ -218,9 +218,9 @@ OPER_DEFINE_DIRECTIONAL(west, 0, -1)
 BEGIN_DUAL_PHASE_0(add)
   REALIZE_DUAL;
   BEGIN_DUAL_PORTS
-    INPUT_PORT(0, 1, PORT_LOCKED);
-    INPUT_PORT(0, 2, PORT_LOCKED);
-    OUTPUT_PORT(1, 0, PORT_LOCKED);
+    I_PORT(0, 1, PORT_LOCKED);
+    I_PORT(0, 2, PORT_LOCKED);
+    O_PORT(1, 0, PORT_LOCKED);
   END_PORTS
 END_PHASE
 BEGIN_DUAL_PHASE_1(add)
@@ -235,9 +235,9 @@ END_PHASE
 BEGIN_DUAL_PHASE_0(modulo)
   REALIZE_DUAL;
   BEGIN_DUAL_PORTS
-    INPUT_PORT(0, 1, PORT_LOCKED);
-    INPUT_PORT(0, 2, PORT_LOCKED);
-    OUTPUT_PORT(1, 0, PORT_LOCKED);
+    I_PORT(0, 1, PORT_LOCKED);
+    I_PORT(0, 2, PORT_LOCKED);
+    O_PORT(1, 0, PORT_LOCKED);
   END_PORTS
 END_PHASE
 BEGIN_DUAL_PHASE_1(modulo)
@@ -252,9 +252,9 @@ END_PHASE
 BEGIN_DUAL_PHASE_0(increment)
   REALIZE_DUAL;
   BEGIN_DUAL_PORTS
-    INPUT_PORT(0, 1, PORT_LOCKED);
-    INPUT_PORT(0, 2, PORT_LOCKED);
-    OUTPUT_PORT(1, 0, PORT_LOCKED);
+    I_PORT(0, 1, PORT_LOCKED);
+    I_PORT(0, 2, PORT_LOCKED);
+    O_PORT(1, 0, PORT_LOCKED);
   END_PORTS
 END_PHASE
 BEGIN_DUAL_PHASE_1(increment)