Lines Matching defs:old
152 copyIndex(__nis_index_t *old, __nis_index_t *new, int *err) {
156 if (old == 0 || new == 0) {
161 for (i = 0; i < old->numIndexes; i++) {
162 new->name[i] = sdup(myself, T, old->name[i]);
163 if (new->name[i] == 0 && old->name[i] != 0) {
167 new->value[i] = cloneMappingFormat(old->value[i]);
168 if (new->value[i] == 0 && old->value[i] != 0) {
174 new->numIndexes = old->numIndexes;
178 cloneIndex(__nis_index_t *old) {
183 if (old == 0)
187 copyIndex(old, new, &err);
198 freeIndex(__nis_index_t *old, bool_t doFree) {
201 if (old == 0)
204 for (i = 0; i < old->numIndexes; i++) {
205 sfree(old->name[i]);
206 freeMappingFormat(old->value[i]);
210 free(old);
499 /* Free the old value, and replace it with the decoded one */
1323 copyObjSpec(__nis_obj_spec_t *old, __nis_obj_spec_t *new, int *err) {
1326 if (old == 0 || new == 0) {
1332 new->index.name = am(myself, old->index.numIndexes *
1334 if (old->index.numIndexes > 0 && new->index.name == 0) {
1338 new->index.value = am(myself, old->index.numIndexes *
1340 if (old->index.numIndexes > 0 && new->index.value == 0) {
1345 new->name = sdup(myself, T, old->name);
1346 if (new->name == 0 && old->name != 0) {
1350 copyIndex(&old->index, &new->index, err);
1354 cloneObjSpec(__nis_obj_spec_t *old) {
1360 copyObjSpec(old, new, &err);
1371 freeObjSpec(__nis_obj_spec_t *old, bool_t doFree) {
1373 if (old == 0)
1376 sfree(old->name);
1377 freeIndex(&old->index, FALSE);
1379 free(old);
1383 copySearchTriple(__nis_search_triple_t *old, __nis_search_triple_t *new,
1389 if (old == 0 || new == 0) {
1394 if (old->base != NULL)
1395 new->base = sdup(myself, T, old->base);
1398 if (old->attrs != NULL)
1399 new->attrs = sdup(myself, T, old->attrs);
1402 if ((new->base == 0 && old->base != 0) ||
1403 (new->attrs == 0 && old->attrs != 0)) {
1411 new->scope = old->scope;
1418 new->element = old->element;
1422 cloneSearchTriple(__nis_search_triple_t *old) {
1428 copySearchTriple(old, new, &err);
1439 freeSearchTriple(__nis_search_triple_t *old, bool_t doFree) {
1441 if (old == 0)
1444 sfree(old->base);
1445 sfree(old->attrs);
1448 * was created, we don't free old->element.
1451 free(old);
1456 __nis_triple_or_obj_t *old, __nis_triple_or_obj_t *new,
1461 if (old == 0 || new == 0) {
1467 copyObjSpec(&old->obj, &new->obj, err);
1469 copySearchTriple(&old->triple, &new->triple, err);
1474 cloneTripleOrObj(__nis_mapping_item_type_t type, __nis_triple_or_obj_t *old) {
1480 copyTripleOrObj(type, old, new, &err);
1491 freeTripleOrObj(__nis_mapping_item_type_t type, __nis_triple_or_obj_t *old,
1494 if (old == 0)
1498 freeObjSpec(&old->obj, doFree);
1500 freeSearchTriple(&old->triple, doFree);
1503 free(old);
1507 copyItem(__nis_mapping_item_t *old, __nis_mapping_item_t *new, int *err) {
1511 if (old == 0 || new == 0) {
1516 new->type = old->type;
1517 new->repeat = old->repeat;
1518 if (old->name != 0) {
1519 new->name = strdup(old->name);
1527 if (old->type == mit_nisplus || old->type == mit_ldap)
1528 copyTripleOrObj(old->type, &old->searchSpec, &new->searchSpec,
1535 cloneItem(__nis_mapping_item_t *old) {
1540 if (old == 0)
1547 copyItem(old, new, &err);
1571 concatenateMappingItem(__nis_mapping_item_t *old, int numItems,
1577 if (old == 0 || numItems < 1)
1585 copyItem(&old[i], &new[i], &err);