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;
61 void fprintf_rfstack(FILE *fp)
66 if (*sp == IS_INSIDE) {
67 fprintf(fp,
"(null)\n");
100 if (*sp & IS_FRONT) {
103 fprintf(fp,
"front");
114 int *get_rfstack(
void) {
return (sp); }
122 void load_rfstack(
int i) { *sp = i; }
128 void pop_rfstack(
void)
131 static char proc_name[] =
"pop_rfstack";
132 fprintf(stderr,
"%s: stack underflow\n", proc_name);
143 void push_rfstack(
void)
145 if (sp == stack + STACKSIZE - 1) {
146 static char proc_name[] =
"push_rfstack";
147 fprintf(stderr,
"%s: stack overflow\n", proc_name);
158 void swap_rfstack(
void)
162 ip = (sp == stack) ? sp + 1 : sp - 1;
174 void add_rfstack(
int i) { *sp |= i; }
180 void sub_rfstack(
int i) { *sp &= ~i; }