10 ** Accepts a string argument converting all delimeters to nulls
11 ** Returns an allocated array pointer or NULL
13 ** str is not to be deallocated while using this array
16 -char** split(char* str, const char* del, int* cnt)
17 +char** array_split(char* str, const char* del, int* cnt)
21 @@ -53,7 +53,7 @@ char** split(char* str, const char* del,
28 ** remove length elements from array starting at offset
29 ** All trailing elements will be left aligned
30 @@ -70,7 +70,7 @@ char** split(char* str, const char* del,
31 ** Returns the number of elements removed
34 -int splice(void** array, int cnt, int offset, int length)
35 +int array_splice(void** array, int cnt, int offset, int length)
45 -char** split(char*, const char*, int*);
46 -int splice(void**, int, int, int);
47 +char** array_split(char*, const char*, int*);
48 +int array_splice(void**, int, int, int);
51 @@ -295,7 +295,7 @@ int DoUpdate(int check)
53 free(server->zones[j]);
55 - server->zonec -= splice((void**)server->zones, server->zonec, j, 1);
56 + server->zonec -= array_splice((void**)server->zones, server->zonec, j, 1);
60 @@ -317,7 +317,7 @@ int DoUpdate(int check)
64 - cfg.serverc -= splice((void**)cfg.servers, cfg.serverc, i, 1);
65 + cfg.serverc -= array_splice((void**)cfg.servers, cfg.serverc, i, 1);
69 @@ -414,7 +414,7 @@ int checkcname(int *s, struct server *se
70 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
73 - zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
74 + zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1);
78 @@ -446,7 +446,7 @@ int checkcname(int *s, struct server *se
79 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
82 - zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
83 + zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1);
86 //append the record to the packet
87 @@ -488,7 +488,7 @@ int checkcname(int *s, struct server *se
88 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
91 - zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
92 + zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1);
96 @@ -561,7 +561,7 @@ int checkip(int *s, struct server *serve
97 asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
100 - if (zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1))
101 + if (zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1))
103 *((unsigned short*)&pkt.data[8]) = htons(zone->hostc);
107 @@ -873,7 +873,7 @@ void cfg_zone(struct server *server, str
108 switch (cfg_readblock(data, &term, &ptr)) {
111 - zone->hosts = split(zone->hostp, ", \t\r\n", &zone->hostc);
112 + zone->hosts = array_split(zone->hostp, ", \t\r\n", &zone->hostc);
113 if (zone->hostc > 32767)
115 asprintf(&msg, "getconfig: zone \"%s\": there may not be more than 32767 hosts", zone->name);