} cntr;
} item_t;
-#define STACK_PAGE_SIZE 256
+#define B_STACK_PAGE_SIZE 256
#define NUM_REGISTERS 256
/* A 'page' of stack items. */
typedef struct item_page_t {
- item_t items[STACK_PAGE_SIZE];
+ item_t items[B_STACK_PAGE_SIZE];
struct item_page_t *prev;
struct item_page_t *next;
} item_page_t;
struct {
/* index into the current page. If index == 0 and you need
* to pop an item, move to the previous page and set index
- * = STACK_PAGE_SIZE - 1. Otherwise decrement index to
- * push a page. If index == STACK_PAGE_SIZE and you need
+ * = B_STACK_PAGE_SIZE - 1. Otherwise decrement index to
+ * push a page. If index == B_STACK_PAGE_SIZE and you need
* to push a page move to the next page and set index =
* 0. If there is no new next page, allocate a new page
* and link it in. Otherwise, increment index to push a
if (stack.current->prev == NULL) \
on_error; \
stack.current = stack.current->prev; \
- stack.index += STACK_PAGE_SIZE; \
+ stack.index += B_STACK_PAGE_SIZE; \
}
/* Store a pointer to the previous item on the stack. Used to pop an
if (stack.current->prev == NULL) \
on_error; \
stack.current = stack.current->prev; \
- stack.index = STACK_PAGE_SIZE - 1; \
+ stack.index = B_STACK_PAGE_SIZE - 1; \
} \
else \
{ \
* on to the stack. */
#define STACK_NEXT(stack, top, on_error) \
-if (stack.index == STACK_PAGE_SIZE) \
+if (stack.index == B_STACK_PAGE_SIZE) \
{ \
if (stack.current->next == NULL) \
{ \
if (current->prev == NULL) \
on_error; \
current = current->prev; \
- index += STACK_PAGE_SIZE; \
+ index += B_STACK_PAGE_SIZE; \
} \
top = &(current->items[index]); \
}
{ \
if (stack.current->prev == NULL) \
on_error; \
- top = &(stack.current->prev->items[STACK_PAGE_SIZE - 1]); \
+ top = &(stack.current->prev->items[B_STACK_PAGE_SIZE - 1]); \
} \
else \
{ \
#include "bacula.h"
-#define PAGE_SIZE 4096
+#define B_PAGE_SIZE 4096
#define MIN_PAGES 32
#define MAX_PAGES 2400
-#define MIN_BUF_SIZE (MIN_PAGES * PAGE_SIZE) /* 128 Kb */
-#define MAX_BUF_SIZE (MAX_PAGES * PAGE_SIZE) /* approx 10MB */
+#define MIN_BUF_SIZE (MIN_PAGES * B_PAGE_SIZE) /* 128 Kb */
+#define MAX_BUF_SIZE (MAX_PAGES * B_PAGE_SIZE) /* approx 10MB */
static const int dbglvl = 500;
#ifdef HAVE_GETPAGESIZE
pagesize = getpagesize();
#else
- pagesize = PAGE_SIZE;
+ pagesize = B_PAGE_SIZE;
#endif
if (nr_pages == 0) {
buffer_size = MAX_BUF_SIZE;