/*
* 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 1990 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.13 */
/* EMACS_MODES: !fill, lnumb, !overwrite, !nodelete, !picture */
#include "string.h"
#include "errno.h"
#include "stdlib.h"
#include "regexpr.h"
#include "lp.h"
#include "filters.h"
static char *keyword_list[] = {
0
};
#if defined(__STDC__)
static char * q_strchr ( char * , char );
static char * q_strdup ( char * );
#else
static char *q_strchr(),
*q_strdup();
#endif
/**
** s_to_filtertype() - CONVERT (char *) TO (FILTERTYPE)
**/
#if defined(__STDC__)
char * str
)
#else
char *str;
#endif
{
/*
* The default type, if none is given, is ``slow''.
*/
return (fl_fast);
else
return (fl_slow);
}
/**
** s_to_type() - CONVERT (char *) TO (TYPE)
**/
#if defined(__STDC__)
char * str
)
#else
register char *str;
#endif
{
return (ret);
}
/**
** s_to_template() - CONVERT (char *) TO (TEMPLATE)
**/
#if defined(__STDC__)
char * str
)
#else
register char *str;
#endif
{
register char *p,
c;
goto Done;
}
goto Done;
}
c = *p;
*p = 0;
*p = c;
goto Done;
}
goto Done;
}
goto Done;
}
p--;
c = *p;
*p = 0;
*p = c;
goto Done;
}
goto Done;
}
goto Done;
}
goto Done;
}
}
}
/**
** sl_to_typel() - CONVERT (char **) LIST TO (TYPE *) LIST
**/
TYPE *
#if defined(__STDC__)
char ** src
)
#else
char **src;
#endif
{
register int nitems,
n;
return (0);
;
return (0);
}
for (n = 0; n < nitems; n++)
return (dst);
}
/**
** sl_to_templatel() - DUPLICATE A (char **) LIST AS (TEMPLATE *) LIST
**/
TEMPLATE *
#if defined(__STDC__)
char ** src
)
#else
register char **src;
#endif
{
register int nitems,
n;
return (0);
;
return (0);
}
for (n = 0; n < nitems; n++) {
return (0);
}
}
return (dst);
}
/**
** type_to_s() - CONVERT (TYPE) TO (char *)
**/
char *
#if defined(__STDC__)
TYPE t
)
#else
type_to_s (t)
TYPE t;
#endif
{
}
/**
** template_to_s() - CONVERT (TEMPLATE) TO (char *)
**/
char *
#if defined(__STDC__)
TEMPLATE t
)
#else
template_to_s (t)
TEMPLATE t;
#endif
{
register char *ret,
*p,
*r;
for (p = t.pattern; *p; p++) {
if (*p == '=')
len++;
len++;
}
if (!ret) {
return (0);
}
r = ret;
for (p = t.keyword; *p; )
*r++ = *p++;
*r++ = ' ';
for (p = t.pattern; *p; ) {
if (*p == '=')
*r++ = '\\';
*r++ = *p++;
}
*r++ = ' ';
*r++ = '=';
*r++ = ' ';
for (p = t.result; *p; )
*r++ = *p++;
*r = 0;
return (ret);
}
/**
** typel_to_sl() - DUPLICATE (TYPE *) LIST AS (char **) LIST
**/
char **
#if defined(__STDC__)
)
#else
#endif
{
register char **dst;
register int n;
return (0);
;
return (0);
}
for (n = 0; n < nitems; n++)
return (dst);
}
/**
** templatel_to_sl() - DUPLICATE A (TEMPLATE *) LIST AS (char **) LIST
**/
char **
#if defined(__STDC__)
)
#else
#endif
{
register char **dst;
register int n;
return (0);
;
return (0);
}
for (n = 0; n < nitems; n++)
return (dst);
}
/**
** q_strpbrk() - strpbrk() WITH BACKSLASH QUOTING
** q_strdup() - strdup() WITH BACKSLASHES OMITTED
**/
static char *
#if defined(__STDC__)
q_strchr (
char * sp,
char c
)
#else
register char *sp,
c;
#endif
{
do {
sp += 2;
if (*sp == c)
return (sp);
} while (*sp++);
return (0);
}
static char *
#if defined(__STDC__)
q_strdup (
char * str
)
#else
char *str;
#endif
{
char *ret;
register char *p,
*q;
register int len = 0;
for (p = str; *p; p++) {
if (*p == '\\' && p[1] == '=')
p++;
len++;
}
return (0);
for (p = str; *p; p++) {
if (*p == '\\' && p[1] == '=')
p++;
*q++ = *p;
}
*q = 0;
return (ret);
}