if (first == NULL) {
FirstColumn = 0;
SecondColumn = 0;
- first = (QUERY *) mem_calloc (1, sizeof (QUERY));
+ first = p_new(QUERY, 1);
cur = first;
}
else {
- cur->next = (QUERY *) mem_calloc (1, sizeof (QUERY));
+ cur->next = p_new(QUERY, 1);
cur = cur->next;
}
for (queryp = results; queryp; queryp = queryp->next)
menu->max++;
- menu->data = QueryTable =
- (ENTRY *) mem_calloc (menu->max, sizeof (ENTRY));
+ menu->data = QueryTable = p_new(ENTRY, menu->max);
for (i = 0, queryp = results; queryp; queryp = queryp->next, i++)
QueryTable[i].data = queryp;
menu->max++;
if (op == OP_QUERY) {
- menu->data = QueryTable =
- (ENTRY *) mem_calloc (menu->max, sizeof (ENTRY));
+ menu->data = QueryTable = p_new(ENTRY, menu->max);
for (i = 0, queryp = results; queryp;
queryp = queryp->next, i++)