/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* pfmt_print() - format and print
*/
#include "lint.h"
#include "mtlib.h"
#include <pfmt.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <thread.h>
#include <ctype.h>
#include "pfmt_data.h"
/* Catalogue for local messages */
/* Table of default severities */
static const char *sev_list[] = {
"SEV = %d",
"TO FIX",
"ERROR",
"HALT",
"WARNING",
"INFO"
};
int
{
const char *ptr;
int i, status;
int length = 0;
int txtmsgnum = 0;
char c;
i++)
catbuf[i] = c;
/* Extract the message number */
if (i != DB_NAME_LEN - 1 && c) {
catbuf[i] = '\0';
txtmsgnum *= 10;
txtmsgnum += c - '0';
}
if (c != ':')
txtmsgnum = -1;
}
else
txtmsgnum = -1;
}
if (text_ptr)
if (dofmt) {
return (-1);
return (-1);
}
if (doact) {
} else {
int i;
for (i = 0; i < __pfmt_nsev; i++) {
break;
}
}
if (i == __pfmt_nsev)
}
if (sev >= 0) {
}
if (sev_ptr)
if (stream) {
return (-1);
return (-1);
} else
return (-1);
} else if (sev_ptr)
if (stream) {
return (-1);
} else
return (-1);
return (length);
}