]> granicus.if.org Git - onig/commitdiff
refactoring
authorK.Kosako <kosako@sofnec.co.jp>
Thu, 11 Jan 2018 07:04:31 +0000 (16:04 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 11 Jan 2018 07:04:31 +0000 (16:04 +0900)
src/regcomp.c
src/regint.h

index a2a39c203f066d6bcf639b6bac893bb9354ebfa6..25528cc1e51fee894c4bc8a5313b3c3e9efc971c 100644 (file)
@@ -2,7 +2,7 @@
   regcomp.c -  Oniguruma (regular expression library)
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2017  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2018  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -6190,13 +6190,18 @@ onig_initialize(OnigEncoding encodings[], int n)
   return 0;
 }
 
-static OnigEndCallListItemType* EndCallTop;
+typedef struct EndCallListItem {
+  struct EndCallListItem* next;
+  void (*func)(void);
+} EndCallListItemType;
+
+static EndCallListItemType* EndCallTop;
 
 extern void onig_add_end_call(void (*func)(void))
 {
-  OnigEndCallListItemType* item;
+  EndCallListItemType* item;
 
-  item = (OnigEndCallListItemType* )xmalloc(sizeof(*item));
+  item = (EndCallListItemType* )xmalloc(sizeof(*item));
   if (item == 0) return ;
 
   item->next = EndCallTop;
@@ -6208,7 +6213,7 @@ extern void onig_add_end_call(void (*func)(void))
 static void
 exec_end_call_list(void)
 {
-  OnigEndCallListItemType* prev;
+  EndCallListItemType* prev;
   void (*func)(void);
 
   while (EndCallTop != 0) {
index c0422d25b56e21e7bb91bdd4bd410c980dcb6e98..60287c2f40b1b7c6e3032e3dc501ebd5928c1f45 100644 (file)
@@ -757,11 +757,6 @@ typedef struct {
 } MatchArg;
 
 
-typedef struct OnigEndCallListItem {
-  struct OnigEndCallListItem* next;
-  void (*func)(void);
-} OnigEndCallListItemType;
-
 extern void onig_add_end_call(void (*func)(void));