+/* A count of cases or the index of a case within a collection of
+ them. */
+#define CASENUMBER_MAX LONG_MAX
+typedef long int casenumber;
+
+/* Reference-counted case implementation.
+
+ A newly created case has a single owner (the code that created
+ it), represented by an initial reference count of 1. Other
+ code that receives the case may keep a virtual copy of it by
+ calling case_ref, which increments the case's reference count.
+ When this is done, the case becomes shared between its
+ original owner and each piece of code that incremented the
+ reference count.
+
+ A shared case (one whose reference count is greater than 1)
+ must not be modified, because this would make the case change
+ in the view of every reference count holder, not just the one
+ that intended to change the case. Because the purpose of
+ keeping the reference count is to make a virtual copy of the
+ case, this is undesirable behavior. The case_unshare function
+ provides a solution, by making a new, unshared copy of a
+ shared case. */
+struct ccase