40 #include <visp3/core/vpConfig.h> 42 #ifndef DOXYGEN_SHOULD_SKIP_THIS 45 #include "vpRfstack.h" 51 static int stack[STACKSIZE] = {vpDEFAULT_REMOVE};
52 static int *sp = stack;
60 void fprintf_rfstack(FILE *fp)
65 if (*sp == IS_INSIDE) {
66 fprintf(fp,
"(null)\n");
102 fprintf(fp,
"front");
113 int *get_rfstack(
void) {
return (sp); }
121 void load_rfstack(
int i) { *sp = i; }
127 void pop_rfstack(
void)
130 static char proc_name[] =
"pop_rfstack";
131 fprintf(stderr,
"%s: stack underflow\n", proc_name);
141 void push_rfstack(
void)
143 if (sp == stack + STACKSIZE - 1) {
144 static char proc_name[] =
"push_rfstack";
145 fprintf(stderr,
"%s: stack overflow\n", proc_name);
156 void swap_rfstack(
void)
160 ip = (sp == stack) ? sp + 1 : sp - 1;
172 void add_rfstack(
int i) { *sp |= i; }
178 void sub_rfstack(
int i) { *sp &= ~i; }