return 1;
}
-extern int
-onig_bbuf_init(BBuf* buf, int size)
-{
- if (size <= 0) {
- size = 0;
- buf->p = NULL;
- }
- else {
- buf->p = (UChar* )xmalloc(size);
- if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
- }
-
- buf->alloc = size;
- buf->used = 0;
- return 0;
-}
-
-
#ifdef USE_CALL
static int
unsigned int alloc;
} BBuf;
-#define BB_INIT(buf,size) onig_bbuf_init((BBuf* )(buf), (size))
+#define BB_INIT(buf,size) bbuf_init((BBuf* )(buf), (size))
#define BB_SIZE_INC(buf,inc) do{\
(buf)->alloc += (inc);\
extern void onig_warning(const char* s);
extern UChar* onig_error_code_to_format P_((int code));
extern void onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...));
-extern int onig_bbuf_init P_((BBuf* buf, int size));
extern int onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
extern void onig_transfer P_((regex_t* to, regex_t* from));
extern int onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, void* /* CClassNode* */ cc));
return 0;
}
+static int
+bbuf_init(BBuf* buf, int size)
+{
+ if (size <= 0) {
+ size = 0;
+ buf->p = NULL;
+ }
+ else {
+ buf->p = (UChar* )xmalloc(size);
+ if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
+ }
+
+ buf->alloc = size;
+ buf->used = 0;
+ return 0;
+}
+
static void
bbuf_free(BBuf* bbuf)
{