oeu.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1985 AT&T
* All Rights Reserved
*/
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "wish.h"
#include "io.h"
#include "retcds.h"
#include "parse.h"
#include "smdef.h"
#include "typetab.h"
#include "mail.h"
#include "partabdefs.h"
#include "terror.h"
#include "sizes.h"
#define NOFIELDS 20
#define PARTFIELDS 13
static int look_ahead = 0;
char *uptokwd();
long getnum();
int skipspace();
static int stopit();
extern int skip(); /* >>>> CHANGED FROM "static" <<<< */
static int obj_num();
static int obj_name();
static int obj_type();
static int encrytest();
static int par_count();
static struct parsetab {
char *testring;
int (*func)();
{
{ "type:", obj_type },
{ "application:", skip },
{ "format:", skip },
{ "product-id:", skip },
{ "object-number:", obj_num },
{ "count:", par_count },
{ "name:", obj_name },
{ "cdate:", skip },
{ "moddate:", skip },
{ "author:", skip },
{ "folder:", skip },
{ "keywords:", skip },
{ "subject:", skip },
{ "product-info:", skip },
{ "part-type:", stopit },
{ "encrypted:", stopit },
{ "encryption-test:", stopit },
{ "part-encoding:", stopit },
{ "encoding-algorithm:",stopit },
{ "part-length:", stopit }
};
static int
struct oeh *p;
{
look_ahead = TRUE;
}
#ifndef JUSTCHECK
#else
#endif /* JUSTCHECK */
char *from;
struct oeh *p;
int unpack;
{
long length;
return(OEH_BAD);
}
p->count = 1;
return(OEH_BAD);
}
return(OEH_NOT);
}
look_ahead = FALSE;
for (i = 0; i < NOFIELDS; i++)
break;
}
if (i == NOFIELDS)
if (i > PARTFIELDS)
break;
}
return(OBJ_UNK);
}
return(OBJ_OEU);
}
if (!look_ahead)
return(OEH_BAD);
}
}
}
}
return(ENC_BAD);
}
}
char *encod;
return(ENC_BAD);
}
}
break;
#ifndef JUSTCHECK
if (!parts) {
else {
return(OEH_BAD);
};
}
continue;
}
if (type)
return(PART_BAD);
}
}
else
}
else {
return(OEH_BAD);
}
}
#endif /* JUSTCHECK */
}
else {
}
}
return(0);
}
static int
struct oeh *p;
{
}
static int
struct oeh *p;
{
else
return(KEYWORD);
}
static int
struct oeh *p;
{
else
return(KEYWORD);
}
static int
struct oeh *p;
{
else
return(KEYWORD);
}
static int
struct oeh *p;
{
return(KEYWORD);
}