X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..40c6b59b6340a6fc459020c64f5ee35a842a02c7:/src/ircd_parser.y diff --git a/src/ircd_parser.y b/src/ircd_parser.y index 153dcfb..90f183a 100644 --- a/src/ircd_parser.y +++ b/src/ircd_parser.y @@ -25,9 +25,9 @@ #define YY_NO_UNPUT -int yyparse(); +int yyparse(void); int yyerror(const char *); -int yylex(); +int yylex(void); static time_t conf_find_time(char*); @@ -105,7 +105,7 @@ static void free_cur_list(conf_parm_t* list) { case CF_STRING: case CF_QSTRING: - MyFree(list->v.string); + rb_free(list->v.string); break; case CF_LIST: free_cur_list(list->v.list); @@ -124,7 +124,7 @@ static void add_cur_list_cpt(conf_parm_t *new) { if (cur_list == NULL) { - cur_list = MyMalloc(sizeof(conf_parm_t)); + cur_list = rb_malloc(sizeof(conf_parm_t)); cur_list->type |= CF_FLIST; cur_list->v.list = new; } @@ -139,7 +139,7 @@ static void add_cur_list(int type, char *str, int number) { conf_parm_t *new; - new = MyMalloc(sizeof(conf_parm_t)); + new = rb_malloc(sizeof(conf_parm_t)); new->next = NULL; new->type = type; @@ -152,7 +152,7 @@ static void add_cur_list(int type, char *str, int number) break; case CF_STRING: case CF_QSTRING: - DupString(new->v.string, str); + new->v.string = rb_strdup(str); break; } @@ -253,19 +253,19 @@ single: oneitem oneitem: qstring { - $$ = MyMalloc(sizeof(conf_parm_t)); + $$ = rb_malloc(sizeof(conf_parm_t)); $$->type = CF_QSTRING; - DupString($$->v.string, $1); + $$->v.string = rb_strdup($1); } | timespec { - $$ = MyMalloc(sizeof(conf_parm_t)); + $$ = rb_malloc(sizeof(conf_parm_t)); $$->type = CF_TIME; $$->v.number = $1; } | number { - $$ = MyMalloc(sizeof(conf_parm_t)); + $$ = rb_malloc(sizeof(conf_parm_t)); $$->type = CF_INT; $$->v.number = $1; } @@ -275,7 +275,7 @@ oneitem: qstring so pass it as that, if so */ int val = conf_get_yesno_value($1); - $$ = MyMalloc(sizeof(conf_parm_t)); + $$ = rb_malloc(sizeof(conf_parm_t)); if (val != -1) { @@ -285,7 +285,7 @@ oneitem: qstring else { $$->type = CF_STRING; - DupString($$->v.string, $1); + $$->v.string = rb_strdup($1); } } ; @@ -296,7 +296,7 @@ loadmodule: #ifndef STATIC_MODULES char *m_bn; - m_bn = irc_basename((char *) $2); + m_bn = rb_basename((char *) $2); if (findmodule_byname(m_bn) == -1) load_one_module($2, 0);