X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fcontrol%2Fcontrol-stack.c;h=4b57bdeceb473e1b2d48872ac25beb2ed2fabd8f;hb=fe3a0a8896cc9f099196f0d0228bb0cfa688c34a;hp=43f90e33bd24efb442c4462a768ce934a1a0e834;hpb=2322678e8fddbbf158b01b2720db2636404bba3b;p=pspp diff --git a/src/language/control/control-stack.c b/src/language/control/control-stack.c index 43f90e33bd..4b57bdeceb 100644 --- a/src/language/control/control-stack.c +++ b/src/language/control/control-stack.c @@ -2,8 +2,8 @@ #include "control-stack.h" #include #include -#include "compiler.h" -#include "message.h" +#include +#include #include "xalloc.h" #include "gettext.h" @@ -11,12 +11,12 @@ 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) @@ -31,7 +31,7 @@ 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; @@ -44,7 +44,7 @@ ctl_stack_push (struct ctl_class *class, void *private) } 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) @@ -61,7 +61,7 @@ ctl_stack_top (struct ctl_class *class) } void * -ctl_stack_search (struct ctl_class *class) +ctl_stack_search (const struct ctl_class *class) { struct ctl_struct *ctl; @@ -75,7 +75,7 @@ ctl_stack_search (struct ctl_class *class) } void -ctl_stack_pop (void *private UNUSED) +ctl_stack_pop (void *private) { struct ctl_struct *top = ctl_stack;