Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/ccmd/cmkey.cnf
There is 1 other file named cmkey.cnf in the archive. Click here to see a list.
_ Author: Andrew Lowry
_
_ Columbia University Center for Computing Activities, July 1986.
_ Copyright (C) 1986, 1987, Trustees of Columbia University in the
_ City of New York.  Permission is granted to any individual or
_ institution to use, copy, or redistribute this software so long as
_ it is not sold for profit, provided this copyright notice is
_ retained.
_

/* keyword parse errors */

fnerror(NM,`Does not match keyword')
fnerror(AMB,`Ambiguous')
fnerror(ABR,`Invalid abbreviation chain in keyword table')

/*
 * KEYWRD structure specifies one entry in a keyword table.  KEYTAB
 * structure describes a table of keywords.
 */

/*
 * we want to return "anything" as the value of a keyword,
 * so we need to know what is the 'largest' type in a machine independent 
 * way.   I can't figure out a way to do this at compile time, so we'll use a 
 * generated include file.
 */


#ifdef CMDDEBUG
#include "cmkeyval.h"		/* this defines the keyval type */
#else
#include <local/cmkeyval.h>	/* this defines the keyval type */
#endif

typedef struct KEYWRD {
	char *	_kwkwd;		/* keyword string */
	short	_kwflg;		/* flags (see below) */
	keyval	_kwval;		/* arbitrary value, not used internally */
				/*  except for abbreviations... see KEY_ABR */
				/*  flag below */
} keywrd;

typedef struct KEYTAB {
	int	_ktcnt;		/* number of keywords in table */
	keywrd * _ktwds;	/* array of keyword entries */
} keytab;

/* Flags that can be present in a keyword entry */

fnflag(ABR)			/* keyword is an abbreviation for the */
				/* keyword indexed by this entry's _kwval */
				/* value */
fnflag(NOR)			/* Ignore this keyword (do not recognize */
				/*  any prefix, or even an exact match) */
fnflag(INV)			/* Invisible keyword (not shown with help) */
fnflag(MAT)			/* This keyword matches current input (used */
				/*  internally) */

pvtype(keyval)_			/* KEY returns a keyval. */