/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
/*LINTLIBRARY*/
#include <stdio.h>
#include <ctype.h>
#include <stdarg.h>
#include <errno.h>
#include <string.h>
#include <malloc.h>
#define OFF 0
extern int _doscan();
static int format_arg(unsigned char *, unsigned char *, unsigned char *);
int
{
char *nf;
int ret_val;
== ON) {
return(ret_val);
}
== ON) {
}
return (ret_val);
}
int
{
char *nf;
int ret_val;
#ifdef POSIX
return (EOF);
}
#endif /* POSIX */
== ON) {
return(ret_val);
}
== ON) {
}
return (ret_val);
}
int
{
char *nf;
int ret_val;
== ON) {
return(ret_val);
}
== ON) {
}
return (ret_val);
}
/*
* This function reorganises the format string and argument list.
*/
#ifndef NL_ARGMAX
#endif
struct al {
};
static int
{
unsigned char *fmtsav;
#ifdef VTEST
{
int fd;
}
#endif
nl_fmt = 0;
i = j = 1;
while (*format) {
break;
case 'l':
case 'h':
goto charswitch;
case '0': case '1': case '2':
case '3': case '4': case '5':
case '6': case '7': case '8':
case '9':
format++;
}
if (*format == '$') {
nl_fmt++;
}
goto charswitch;
/* now have arg type only to parse */
case 'd': case 'u': case 'o':
case 'x': case 'e': case 'f':
case 'g': case 'c': case '[':
case 's':
if (nl_fmt == 0)
return(OFF);
}
i++;
break;
case '*':
case '%':
break;
default:
format--;
break;
}
}
length = i;
if (nl_fmt == 0)
return (OFF);
/*
* Reformat the format string
*/
do {
if (i == length)
while (*cptr++);
else
} while (i < length);
/*
* Create arglist
* assuming that pointer to all variable type have
* same size.
*/
for (i = 1; i < length; i++)
for (i = 1; i < length; i++) {
int **ptr;
newlist += sizeof(int *);
}
return(ON);
}