da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner* Copyright (c) 1982-2010 AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* http://www.opensource.org/licenses/cpl1.0.txt *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma prototyped
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifndef _NV_PRIVATE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This is the implementation header file for name-value pairs
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _NV_PRIVATE \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Namfun_t *nvfun; /* pointer to trap functions */ \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin union Value nvalue; /* value field */ \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin char *nvenv; /* pointer to environment name */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <ast.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <cdt.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "shtable.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* Nodes can have all kinds of values */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinunion Value
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin const char *cp;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int *ip;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin char c;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int i;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin unsigned int u;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int32_t *lp;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Sflong_t *llp; /* for long long arithmetic */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int16_t s;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin int16_t *sp;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin double *dp; /* for floating point arithmetic */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Sfdouble_t *ldp; /* for long floating point arithmetic */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct Namarray *array; /* for array node */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct Namval *np; /* for Namval_t node */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin union Value *up; /* for indirect node */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct Ufunction *rp; /* shell user defined functions */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct Namfun *funp; /* discipline pointer */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct Namref *nrp; /* name reference */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int (*bfp)(int,char*[],void*);/* builtin entry point function pointer */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "nval.h"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* used for arrays */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_MAX (1L<<ARRAY_BITS) /* maximum number of elements in an array */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_MASK (ARRAY_MAX-1) /* For index values */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_INCR 32 /* number of elements to grow when array
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin bound exceeded. Must be a power of 2 */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_FILL (8L<<ARRAY_BITS) /* used with nv_putsub() */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_NOCLONE (16L<<ARRAY_BITS) /* do not clone array disc */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_NOCHILD (32L<<ARRAY_BITS) /* skip compound arrays */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_SETSUB (64L<<ARRAY_BITS) /* set subscript */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define ARRAY_NOSCOPE (128L<<ARRAY_BITS) /* top level scope only */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define ARRAY_TREE (256L<<ARRAY_BITS) /* arrays of compound vars */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_ASETSUB 8 /* set subscript */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* These flags are used as options to array_get() */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_ASSIGN 0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_LOOKUP 1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ARRAY_DELETE 2
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstruct Namref
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Namval_t *np;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Namval_t *table;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Dt_t *root;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin char *sub;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* This describes a user shell function node */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstruct Ufunction
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin int *ptree; /* address of parse tree */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin int lineno; /* line number of function start */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin off_t hoffset; /* offset into source or history file */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Namval_t *nspace; /* pointer to name space */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin char *fname; /* file name where function defined */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin char *help; /* help string */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Dt_t *sdict; /* dictionary for statics */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Dt_t *fdict; /* dictionary node belongs to */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Namval_t *np; /* function node pointer */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifndef ARG_RAW
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct argnod;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* !ARG_RAW */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* attributes of Namval_t items */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* The following attributes are for internal use */
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#define NV_NOCHANGE (NV_EXPORT|NV_IMPORT|NV_RDONLY|NV_TAGGED|NV_NOFREE|NV_ARRAY)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define NV_ATTRIBUTES (~(NV_NOSCOPE|NV_ARRAY|NV_NOARRAY|NV_IDENT|NV_ASSIGN|NV_REF|NV_VARNAME|NV_STATIC))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_PARAM NV_NODISC /* expansion use positional params */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* This following are for use with nodes which are not name-values */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_TYPE 0x1000000
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define NV_STATIC 0x2000000
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define NV_COMVAR 0x4000000
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#define NV_UNJUST 0x8000000 /* clear justify attributes */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_FUNCTION (NV_RJUST|NV_FUNCT) /* value is shell function */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_FPOSIX NV_LJUST /* posix function semantics */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_FTMP NV_ZFILL /* function source in tmpfile */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_NOPRINT (NV_LTOU|NV_UTOL) /* do not print */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_NOALIAS (NV_NOPRINT|NV_IMPORT)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_NOEXPAND NV_RJUST /* do not expand alias */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_BLTIN (NV_NOPRINT|NV_EXPORT)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define BLT_ENV (NV_RDONLY) /* non-stoppable,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * can modify enviornment */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define BLT_SPC (NV_LJUST) /* special built-ins */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define BLT_EXIT (NV_RJUST) /* exit value can be > 255 */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define BLT_DCL (NV_TAGGED) /* declaration command */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define BLT_NOSFIO (NV_IMPORT) /* doesn't use sfio */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define NV_OPTGET (NV_BINARY) /* function calls getopts */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define nv_isref(n) (nv_isattr((n),NV_REF|NV_TAGGED|NV_FUNCT)==NV_REF)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define nv_istable(n) (nv_isattr((n),NV_TABLE|NV_LJUST|NV_RJUST|NV_INTEGER)==NV_TABLE)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define is_abuiltin(n) (nv_isattr(n,NV_BLTIN|NV_INTEGER)==NV_BLTIN)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define is_afunction(n) (nv_isattr(n,NV_FUNCTION|NV_REF)==NV_FUNCTION)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_funtree(n) ((n)->nvalue.rp->ptree)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define funptr(n) ((n)->nvalue.bfp)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define NV_SUBQUOTE (NV_ADD<<1) /* used with nv_endsubscript */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* NAMNOD MACROS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* ... for attributes */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_setattr(n,f) ((n)->nvflag = (f))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_context(n) ((void*)(n)->nvfun) /* for builtins */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* The following are for name references */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_refnode(n) ((n)->nvalue.nrp->np)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_reftree(n) ((n)->nvalue.nrp->root)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_reftable(n) ((n)->nvalue.nrp->table)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_refsub(n) ((n)->nvalue.nrp->sub)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* ... etc */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_setsize(n,s) ((n)->nvsize = (s))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#undef nv_size
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define nv_size(np) ((np)->nvsize)
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#define _nv_hasget(np) ((np)->nvfun && (np)->nvfun->disc && nv_hasget(np))
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#define nv_isnull(np) (!(np)->nvalue.cp && (nv_isattr(np,NV_SHORT|NV_INTEGER)!=(NV_SHORT|NV_INTEGER)) && !_nv_hasget(np))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* ... for arrays */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define array_elem(ap) ((ap)->nelem&ARRAY_MASK)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define array_assoc(ap) ((ap)->fun)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int array_maxindex(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern char *nv_endsubscript(Namval_t*, char*, int);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namfun_t *nv_cover(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namarr_t *nv_arrayptr(Namval_t*);
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern int nv_arrayisset(Namval_t*, Namarr_t*);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern int nv_arraysettype(Namval_t*, Namval_t*,const char*,int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern int nv_aimax(Namval_t*);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern int nv_atypeindex(Namval_t*, const char*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int nv_setnotify(Namval_t*,char **);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int nv_unsetnotify(Namval_t*,char **);
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern void nv_setlist(struct argnod*, int, Namval_t*);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern struct argnod* nv_onlist(struct argnod*, const char*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void nv_optimize(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void nv_outname(Sfio_t*,char*, int);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void nv_unref(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void _nv_unset(Namval_t*,int);
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulknerextern int nv_hasget(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int nv_clone(Namval_t*, Namval_t*, int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinvoid clone_all_disc(Namval_t*, Namval_t*, int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern Namfun_t *nv_clone_disc(Namfun_t*, int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern void *nv_diropen(Namval_t*, const char*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern char *nv_dirnext(void*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void nv_dirclose(void*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern char *nv_getvtree(Namval_t*, Namfun_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void nv_attribute(Namval_t*, Sfio_t*, char*, int);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namval_t *nv_bfsearch(const char*, Dt_t*, Namval_t**, char**);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namval_t *nv_mkclone(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namval_t *nv_mktype(Namval_t**, int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern Namval_t *nv_addnode(Namval_t*, int);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namval_t *nv_parent(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern char *nv_getbuf(size_t);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namval_t *nv_mount(Namval_t*, const char *name, Dt_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Namval_t *nv_arraychild(Namval_t*, Namval_t*, int);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int nv_compare(Dt_t*, Void_t*, Void_t*, Dtdisc_t*);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern void nv_outnode(Namval_t*,Sfio_t*, int, int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern int nv_subsaved(Namval_t*);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern void nv_typename(Namval_t*, Sfio_t*);
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern void nv_newtype(Namval_t*);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const Namdisc_t RESTRICTED_disc;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const Namdisc_t ENUM_disc;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern char nv_local;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern Dtdisc_t _Nvdisc;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const char *nv_discnames[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_subscript[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_nullset[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_notset[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_noparent[];
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const char e_notelem[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_readonly[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_badfield[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_restricted[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_ident[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_varname[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_noalias[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_noarray[];
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const char e_notenum[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_aliname[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_badexport[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_badref[];
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern const char e_badsubscript[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_noref[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_selfref[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_envmarker[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_badlocale[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_loop[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_redef[];
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const char e_required[];
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const char e_badappend[];
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern const char e_unknowntype[];
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern const char e_globalref[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _NV_PRIVATE */