+/* --- @name__get@ --- *
+ *
+ * Arguments: @const char *p@ = pointer to the name we want
+ * @unsigned type@ = type of class it should have
+ *
+ * Returns: A pointer to a name ready to use, or zero if there's a type
+ * conflict.
+ *
+ * Use: Creates a name of the appropriate type all ready to use.
+ */
+
+static name *name__get(const char *p, unsigned type)
+{
+ unsigned f;
+ name *n = sym_find(&name__table, p, -1, sizeof(*n), &f);
+ if (!f)
+ n->c = 0;
+ return ((n->c && !(n->c->type & type)) ? 0 : n);
+}
+
+/* --- @name__sanitise@ --- *
+ *
+ * Arguments: @const char *n@ = pointer to a name
+ * @char *buf@ = pointer to a buffer of space
+ * @size_t sz@ = size of the buffer
+ *
+ * Returns: A pointer to the transformed name in the buffer, or null
+ * if there wasn't enough space.
+ *
+ * Use: Transforms a name so that it only contains nice characters.
+ */
+
+static char *name__sanitise(const char *n, char *buf, size_t sz)
+{
+ char *p = buf;
+
+ if (strlen(n) + 1 > sz)
+ return (0);
+
+ while (*n) {
+ if (isalnum((unsigned char)*n))
+ *p++ = *n;
+ else
+ *p++ = '_';
+ n++;
+ }
+ *p++ = 0;
+ return (buf);
+}
+
+/* --- @name__users@ --- *