/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* jcl symbol support
*/
#include "jcllib.h"
/*
* add symbol name=value to the current step
* value==0 => name==name=value, got it?
* no diagnostic if value==0 and name!=name=value
*/
{
register Jclsym_t* v;
register int n;
int imported;
const char* set;
char* e;
Jclsym_t* o;
return 0;
else if (value)
else
return 0;
{
}
else
imported = 0;
{
return 0;
}
{
if (imported && (o->flags & JCL_SYM_IMPORT) || (flags & JCL_SYM_SET) && (o->flags & JCL_SYM_READONLY))
{
v = o;
goto export;
}
}
{
{
return 0;
}
*v->value++ = 0;
v->flags |= JCL_SYM_IMPORT;
}
{
{
{
return 0;
}
}
sfprintf(sfstdout, "export %s=%s\n", v->name, fmtquote(v->value, "\"", "\"", strlen(v->value), FMT_SHELL));
}
return v;
}