From f141404c89df4d4ee7d63bbefbd0e01c870b2498 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Tue, 11 Jul 2017 15:32:02 +0900 Subject: [PATCH] refactoring --- src/regparse.c | 6 +++--- src/regparse.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/regparse.c b/src/regparse.c index 1ad17bb..46a3c3f 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1521,9 +1521,9 @@ onig_node_str_cat(Node* node, const UChar* s, const UChar* end) if (addlen > 0) { int len = STR_(node)->end - STR_(node)->s; - if (STR_(node)->capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) { + if (STR_(node)->capa > 0 || (len + addlen > NODE_STRING_BUF_SIZE - 1)) { UChar* p; - int capa = len + addlen + NODE_STR_MARGIN; + int capa = len + addlen + NODE_STRING_MARGIN; if (capa <= STR_(node)->capa) { onig_strcpy(STR_(node)->s + len, s, end); @@ -1668,7 +1668,7 @@ str_node_can_be_split(StrNode* sn, OnigEncoding enc) static int node_str_head_pad(StrNode* sn, int num, UChar val) { - UChar buf[NODE_STR_BUF_SIZE]; + UChar buf[NODE_STRING_BUF_SIZE]; int i, len; len = sn->end - sn->s; diff --git a/src/regparse.h b/src/regparse.h index 1e6bca8..09133e5 100644 --- a/src/regparse.h +++ b/src/regparse.h @@ -102,8 +102,8 @@ enum GimmickType { #define ENCLOSURE_STOP_BACKTRACK (1<<2) #define ENCLOSURE_IF_ELSE (1<<3) -#define NODE_STR_MARGIN 16 -#define NODE_STR_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */ +#define NODE_STRING_MARGIN 16 +#define NODE_STRING_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */ #define NODE_BACKREFS_SIZE 6 #define STRING_RAW (1<<0) /* by backslashed number */ @@ -192,7 +192,7 @@ typedef struct { UChar* end; unsigned int flag; int capa; /* (allocated size - 1) or 0: use buf[] */ - UChar buf[NODE_STR_BUF_SIZE]; + UChar buf[NODE_STRING_BUF_SIZE]; } StrNode; typedef struct { -- 2.40.0