/*
* 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 (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*LINTLIBRARY*/
#include <stdlib.h>
#include "utility.h"
typedef struct {
char *leftarg;
char *rightarg;
}
LINK;
/*
* default fieldtype
*/
{
0, /* status */
0, /* ref */
(FIELDTYPE *) 0, /* left */
(FIELDTYPE *) 0, /* right */
(PTF_charP) 0, /* makearg */
(PTF_charP) 0, /* copyarg */
(PTF_void) 0, /* freearg */
(PTF_int) 0, /* fcheck */
(PTF_int) 0, /* ccheck */
(PTF_int) 0, /* next */
(PTF_int) 0, /* prev */
};
/* new_fieldtype - field & character validation function */
{
*t = *_DEFAULT_FIELDTYPE;
}
return (t);
}
{
*t = *_DEFAULT_FIELDTYPE;
}
return (t);
}
int
{
if (!t)
return (E_BAD_ARGUMENT);
if (Ref(t))
return (E_CONNECTED);
}
Free(t);
return (E_OK);
}
int
{
return (E_OK);
}
return (E_BAD_ARGUMENT);
}
/* set_fieldtype_choice next & prev choice function */
int
{
return (E_OK);
}
return (E_BAD_ARGUMENT);
}
char *
{
/*
* invoke make_arg function associated with field type t.
* return pointer to argument information or null if none.
* increment err if an error is encountered.
*/
char *p = (char *)0;
return (p);
p = (char *)n;
} else
++(*err); /* out of space */
} else
++(*err); /* make_arg had problem */
return (p);
}
char *
{
/*
* invoke copy_arg function associated with field type t.
* return pointer to argument information or null if none.
* increment err if an error is encountered.
*/
char *p = (char *)0;
return (p);
p = (char *)n;
} else
++(*err); /* out of space */
} else
++(*err); /* copy_arg had problem */
return (p);
}
/* _freearg - invoke free_arg function associated with field type t. */
void
{
return;
} else
}
/* _checkfield - invoke check_field function associated with field type t. */
int
{
if (!t)
return (TRUE);
char *v = Buf(f);
while (*v && *v == ' ')
++v;
if (!*v)
return (TRUE); /* empty field */
}
else
if (Fcheck(t))
return (TRUE);
}
/* _checkchar - invoke check_char function associated with field type t. */
int
{
if (!t)
return (TRUE);
else
if (Ccheck(t))
return (TRUE);
}
/* _nextchoice - invoke next_choice function associated with field type t. */
int
{
return (FALSE);
else
}
/* _prevchoice - invoke prev_choice function associated with field type t. */
int
{
return (FALSE);
else
}