/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "pkglocale.h"
#include "pkgerr.h"
static void
{
exit(99);
}
char *
{
return (NULL);
"set_prog_name(): strdup(name) failed.\n");
exit(1);
}
if (!ProgName++)
return (ProgName);
}
char *
get_prog_name(void)
{
return (ProgName);
}
/*PRINTFLIKE1*/
void
{
else
}
void
{
int i;
for (i = 0; i < pkgerr_num(err); i++) {
}
}
/*
* set_memalloc_failure_func()
* Allows an appliation to specify the function to be called when
* a memory allocation function fails.
* Parameters:
* (*alloc_proc)(int) - specifies the function to call if fatal error
* (such as being unable to allocate memory) occurs.
* Return:
* none
* Status:
* Public
*/
void
{
if (alloc_proc != (void (*)())NULL)
}
/*
* xmalloc()
* Alloc 'size' bytes from heap using malloc()
* Parameters:
* size - number of bytes to malloc
* Return:
* NULL - malloc() failure
* void * - pointer to allocated structure
* Status:
* public
*/
void *
{
void *tmp;
return (NULL);
} else
return (tmp);
}
/*
* xrealloc()
* Calls realloc() with the specfied parameters. xrealloc()
* checks for realloc failures and adjusts the return value
* automatically.
* Parameters:
* ptr - pointer to existing data block
* size - number of bytes additional
* Return:
* NULL - realloc() failed
* void * - pointer to realloc'd structured
* Status:
* public
*/
void *
{
void *tmp;
return ((void *)NULL);
} else
return (tmp);
}
/*
* xstrdup()
* Allocate space for the string from the heap, copy 'str' into it,
* and return a pointer to it.
* Parameters:
* str - string to duplicate
* Return:
* NULL - duplication failed or 'str' was NULL
* char * - pointer to newly allocated/initialized structure
* Status:
* public
*/
char *
{
char *tmp;
return ((char *)NULL);
return ((char *)NULL);
} else
return (tmp);
}