2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A "set_prog_name(): strdup(name) failed.\n");
2N/A * set_memalloc_failure_func() 2N/A * Allows an appliation to specify the function to be called when 2N/A * a memory allocation function fails. 2N/A * (*alloc_proc)(int) - specifies the function to call if fatal error 2N/A * (such as being unable to allocate memory) occurs. 2N/A * Alloc 'size' bytes from heap using malloc() 2N/A * size - number of bytes to malloc 2N/A * NULL - malloc() failure 2N/A * void * - pointer to allocated structure 2N/A * Calls realloc() with the specfied parameters. xrealloc() 2N/A * checks for realloc failures and adjusts the return value 2N/A * ptr - pointer to existing data block 2N/A * size - number of bytes additional 2N/A * NULL - realloc() failed 2N/A * void * - pointer to realloc'd structured 2N/A * Allocate space for the string from the heap, copy 'str' into it, 2N/A * and return a pointer to it. 2N/A * str - string to duplicate 2N/A * NULL - duplication failed or 'str' was NULL