Lines Matching defs:new

47 	__nis_mapping_format_t	*new;
57 new = am(myself, nf * sizeof (new[0]));
58 if (new == 0)
62 memcpy(new, m, nf * sizeof (new[0]));
68 new[i].match.string = sdup(myself, T,
70 if (new[i].match.string == 0 && m[i].match.string != 0)
74 new[i].match.single.lo =
76 sizeof (new[i].match.single.lo[0]));
77 new[i].match.single.hi =
79 sizeof (new[i].match.single.hi[0]));
80 if (new[i].match.single.lo != 0)
81 memcpy(new[i].match.single.lo,
86 if (new[i].match.single.hi != 0)
87 memcpy(new[i].match.single.hi,
94 new[i].match.berString = sdup(myself, T,
96 if (new[i].match.berString == 0 &&
112 freeMappingFormat(new);
113 new = 0;
116 return (new);
153 copyIndex(__nis_index_t *old, __nis_index_t *new, int *err) {
157 if (old == 0 || new == 0) {
163 new->name[i] = sdup(myself, T, old->name[i]);
164 if (new->name[i] == 0 && old->name[i] != 0) {
168 new->value[i] = cloneMappingFormat(old->value[i]);
169 if (new->value[i] == 0 && old->value[i] != 0) {
175 new->numIndexes = old->numIndexes;
182 __nis_index_t *new = am(myself, sizeof (*new));
187 if (new != 0) {
188 copyIndex(old, new, &err);
190 freeIndex(new, 1);
191 new = 0;
195 return (new);
216 char **new;
223 new = am(myself, numNames * sizeof (new[0]));
224 if (new == 0)
229 new[i] = sdup(myself, T, name[i]);
230 if (new[i] == 0) {
232 sfree(new[i]);
234 sfree(new);
238 new[i] = 0;
242 return (new);
881 * resulting in N*M new values (if 'v1' had N values, and 'v2'
1079 __nis_value_t *new = explodeValues(v, val);
1083 if (new == 0)
1086 v = new;
1324 copyObjSpec(__nis_obj_spec_t *old, __nis_obj_spec_t *new, int *err) {
1327 if (old == 0 || new == 0) {
1332 if (new->index.name == 0) {
1333 new->index.name = am(myself, old->index.numIndexes *
1334 sizeof (new->index.name[0]));
1335 if (old->index.numIndexes > 0 && new->index.name == 0) {
1339 new->index.value = am(myself, old->index.numIndexes *
1340 sizeof (new->index.value[0]));
1341 if (old->index.numIndexes > 0 && new->index.value == 0) {
1346 new->name = sdup(myself, T, old->name);
1347 if (new->name == 0 && old->name != 0) {
1351 copyIndex(&old->index, &new->index, err);
1358 __nis_obj_spec_t *new = am(myself, sizeof (*new));
1360 if (new != 0) {
1361 copyObjSpec(old, new, &err);
1363 freeObjSpec(new, 1);
1364 new = 0;
1368 return (new);
1384 copySearchTriple(__nis_search_triple_t *old, __nis_search_triple_t *new,
1390 if (old == 0 || new == 0) {
1396 new->base = sdup(myself, T, old->base);
1398 new->base = NULL;
1400 new->attrs = sdup(myself, T, old->attrs);
1402 new->attrs = NULL;
1403 if ((new->base == 0 && old->base != 0) ||
1404 (new->attrs == 0 && old->attrs != 0)) {
1405 sfree(new->base);
1406 new->base = 0;
1407 sfree(new->attrs);
1408 new->attrs = 0;
1412 new->scope = old->scope;
1419 new->element = old->element;
1426 __nis_search_triple_t *new = am(myself, sizeof (*new));
1428 if (new != 0) {
1429 copySearchTriple(old, new, &err);
1431 freeSearchTriple(new, 1);
1432 new = 0;
1436 return (new);
1457 __nis_triple_or_obj_t *old, __nis_triple_or_obj_t *new,
1462 if (old == 0 || new == 0) {
1468 copyObjSpec(&old->obj, &new->obj, err);
1470 copySearchTriple(&old->triple, &new->triple, err);
1478 __nis_triple_or_obj_t *new = am(myself, sizeof (*new));
1480 if (new != 0) {
1481 copyTripleOrObj(type, old, new, &err);
1483 freeTripleOrObj(type, new, 1);
1484 new = 0;
1488 return (new);
1508 copyItem(__nis_mapping_item_t *old, __nis_mapping_item_t *new, int *err) {
1512 if (old == 0 || new == 0) {
1517 new->type = old->type;
1518 new->repeat = old->repeat;
1520 new->name = strdup(old->name);
1521 if (new->name == 0) {
1526 new->name = 0;
1529 copyTripleOrObj(old->type, &old->searchSpec, &new->searchSpec,
1532 memset(&new->searchSpec, 0, sizeof (new->searchSpec));
1537 __nis_mapping_item_t *new;
1544 new = am(myself, sizeof (*new));
1545 if (new == 0)
1548 copyItem(old, new, &err);
1550 freeMappingItem(new, 1);
1554 return (new);
1574 __nis_mapping_item_t *new;
1581 new = am(myself, (numItems + 1) * sizeof (*new));
1582 if (new == 0)
1586 copyItem(&old[i], &new[i], &err);
1588 freeMappingItem(new, i);
1592 copyItem(cat, &new[numItems], &err);
1594 freeMappingItem(new, numItems);
1595 new = 0;
1598 return (new);
2076 * array being the new value of the first matched item, element one the