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)
28 ** remove length elements from array starting at offset
29 ** All trailing elements will be left aligned
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);
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);
64 - cfg.serverc -= splice((void**)cfg.servers, cfg.serverc, i, 1);
65 + cfg.serverc -= array_splice((void**)cfg.servers, cfg.serverc, i, 1);
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);
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
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);
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);
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);