+#define SetType(n,t) \
+ if (is_user) \
+ name_table[n].ute_type |= (int)(1 << (t)); \
+ else \
+ name_table[n].ute_type = (t)
+
+#define GetType(n) \
+ (is_user \
+ ? get_type(name_table[n].ute_type) \
+ : typenames[name_table[n].ute_type])
+
+static char *
+get_type(int type_mask)
+{
+ static char result[80];
+ unsigned n;
+ _nc_STRCPY(result, L_PAREN, sizeof(result));
+ for (n = 0; n < 3; ++n) {
+ if ((1 << n) & type_mask) {
+ size_t want = 5 + strlen(typenames[n]);
+ if (want > sizeof(result)) {
+ fprintf(stderr, "Buffer is not large enough for %s + %s\n",
+ result, typenames[n]);
+ exit(EXIT_FAILURE);
+ }
+ if (result[1])
+ _nc_STRCAT(result, "|", sizeof(result));
+ _nc_STRCAT(result, "1<<", sizeof(result));
+ _nc_STRCAT(result, typenames[n], sizeof(result));
+ }
+ }
+ _nc_STRCAT(result, R_PAREN, sizeof(result));
+ return result;
+}
+