filters.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * CDDL HEADER START
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * The contents of this file are subject to the terms of the
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Common Development and Distribution License, Version 1.0 only
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * (the "License"). You may not use this file except in compliance
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * with the License.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * See the License for the specific language governing permissions
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * and limitations under the License.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * When distributing Covered Code, include this CDDL HEADER in each
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * If applicable, add the following below this CDDL HEADER, with the
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * fields enclosed by brackets "[]" replaced with your own identifying
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * information: Portions Copyright [yyyy] [name of copyright owner]
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * CDDL HEADER END
d62bc4badc1c1f1549c961cfb8b420e650e1272byz/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
634e26ec75c89095090605284938356a3145f2b8Casper H.S. Dik/* All Rights Reserved */
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Use is subject to license terms.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz#pragma ident "%Z%%M% %I% %E% SMI"
d62bc4badc1c1f1549c961cfb8b420e650e1272byz/* EMACS_MODES: !fill, lnumb, !overwrite, !nodelete, !picture */
b9e076dcc05b713d74073c0d692dfbb0f6f2c594yz ** The disk copy of the filter table:
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * There are 9 fields in the filter table (the first one is ignored).
b9e076dcc05b713d74073c0d692dfbb0f6f2c594yz * Various strings.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz ** The internal copy of a filter as seen by the rest of the world:
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy * A (char **) list is an array of string pointers (char *) with
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy * a null pointer after the last item.
4ac67f0276a8313b5cefec38af347b94b7bfb526Anurag S. Maskeytypedef struct FILTER {
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy char ** printers; /* list of valid printers */
d62bc4badc1c1f1549c961cfb8b420e650e1272byz ** The internal copy of a filter as seen by the filter routines:
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * To speed up processing the filter table, FL_MAX_GUESS slots
4ac67f0276a8313b5cefec38af347b94b7bfb526Anurag S. Maskey * will be preallocated for the internal copy. If filter tables
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * are expected to be substantially larger than this, bump it up.
d62bc4badc1c1f1549c961cfb8b420e650e1272byztypedef struct TYPE {
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy unsigned short info; /* 1 iff "name" is in Terminfo */
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roytypedef struct TEMPLATE {
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy * A (TYPE *) list is an array of content-types (TYPE) with a null
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy * "name" element. A (TEMPLATE *) list is an array of templates (TEMPLATE)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy * with a null "keyword" element.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roytypedef struct _FILTER {
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy struct _FILTER * next; /* for linking several */
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy TYPE * input_types; /* all possible choices */
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy TYPE * output_types; /* all possible choices */
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy unsigned char mark,
d62bc4badc1c1f1549c961cfb8b420e650e1272byz ** Various routines.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy * Null terminated list (filters[i].name == NULL).
d62bc4badc1c1f1549c961cfb8b420e650e1272byz#if defined(__STDC__)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyFILTERTYPE insfilter ( char ** , char * , char * , char * , char * , char ** , unsigned short * );
b9e076dcc05b713d74073c0d692dfbb0f6f2c594yzint open_filtertable ( char * , char * );
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Royint delfilter ( char * );
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Royint loadfilters ( char * );
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Royextern char **typel_to_sl(),