diff structures.h @ 16:a2a81589380d default tip

Reformat the whole source via clang-format for better consistency.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 14 Oct 2021 01:53:20 +0300
parents 89183953bddc
children
line wrap: on
line diff
--- a/structures.h	Thu Oct 14 01:40:24 2021 +0300
+++ b/structures.h	Thu Oct 14 01:53:20 2021 +0300
@@ -68,12 +68,10 @@
 
 /* The table consists of bit pairs with the following values: */
 
-#define MEM_UNPROCESSED 0 /* the memory place has not been processed yet */
-#define MEM_INSTRUCTION 1 /* a machine language instruction starts at
-                             this memory place */
-#define MEM_DATA        2 /* the memory place contains data */
-#define MEM_PARAMETER   3 /* a parameter of a machine language
-                             instruction is at this place */
+#define MEM_UNPROCESSED  0 /* the memory place has not been processed yet */
+#define MEM_INSTRUCTION  1 /* a machine language instruction starts at this memory place */
+#define MEM_DATA         2 /* the memory place contains data */
+#define MEM_PARAMETER    3 /* a parameter of a machine language instruction is at this place */
 
 /*************************\
 * Memory place flag table *
@@ -115,24 +113,24 @@
 
 static inline void DOPutLabel(unsigned int address, const char *name, const int line)
 {
-  (void) name;
-  (void) line;
+    (void)name;
+    (void)line;
 
-  MemLabel[((ADDR_T)address) / (8 * sizeof *MemLabel)] |= (1 << (address % (8 * sizeof *MemLabel)));
+    MemLabel[((ADDR_T)address) / (8 * sizeof *MemLabel)] |= (1 << (address % (8 * sizeof *MemLabel)));
 }
 
 static inline unsigned char IsReferenced(unsigned int address)
 {
-  return MemReferenced[address];
+    return MemReferenced[address];
 }
 
 
 static inline void DOPutReference(unsigned int address, const char *name, const int line)
 {
-  (void) name;
-  (void) line;
+    (void)name;
+    (void)line;
 
-  MemReferenced[address]++;
+    MemReferenced[address]++;
 }
 
 #define PutReference(address) DOPutReference(address, __func__, __LINE__)
@@ -166,9 +164,9 @@
 
 typedef struct table
 {
-  ADDR_T address;
-  ADDR_T parent;
-  unsigned char type;
+    ADDR_T address;
+    ADDR_T parent;
+    unsigned char type;
 } table;
 
 /* The table.type byte has the following format: */
@@ -226,9 +224,9 @@
 
 typedef struct label
 {
-  int is_range;
-  ADDR_T address, len;
-  char *name;
+    int is_range;
+    ADDR_T address, len;
+    char *name;
 } label;
 
 /********************\
@@ -237,7 +235,7 @@
 
 typedef struct words
 {
-  ADDR_T start, end;
+    ADDR_T start, end;
 } words;
 
 #ifndef _MAIN_C_