#include "control-stack.h"
#include <assert.h>
#include <stdlib.h>
-#include "compiler.h"
-#include "message.h"
+#include <libpspp/compiler.h>
+#include <libpspp/message.h>
#include "xalloc.h"
#include "gettext.h"
struct ctl_struct
{
- struct ctl_class *class; /* Class of control structure. */
+ const struct ctl_class *class; /* Class of control structure. */
struct ctl_struct *down; /* Points toward the bottom of ctl_stack. */
void *private; /* Private data. */
};
-struct ctl_struct *ctl_stack;
+static struct ctl_struct *ctl_stack;
void
ctl_stack_clear (void)
}
void
-ctl_stack_push (struct ctl_class *class, void *private)
+ctl_stack_push (const struct ctl_class *class, void *private)
{
struct ctl_struct *ctl;
}
void *
-ctl_stack_top (struct ctl_class *class)
+ctl_stack_top (const struct ctl_class *class)
{
struct ctl_struct *top = ctl_stack;
if (top != NULL && top->class == class)
}
void *
-ctl_stack_search (struct ctl_class *class)
+ctl_stack_search (const struct ctl_class *class)
{
struct ctl_struct *ctl;