cmd.h revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1992-2007 AT&T Knowledge Ventures *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Knowledge Ventures *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
/*
* AT&T Research
*
* builtin cmd definitions
*/
#ifndef _CMD_H
#if !defined(__PROTO__)
#include <prototyped.h>
#endif
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
#define _CMD_H
#include <ast.h>
#include <error.h>
#include <stak.h>
#define cmdquit() 0
#if _BLD_cmd && defined(__EXPORT__)
#endif
#include <cmdext.h>
#define __MANGLE__ __LINKAGE__
#if defined(CMD_BUILTIN) && !defined(CMD_STANDALONE)
#define CMD_STANDALONE CMD_BUILTIN
#endif
#ifdef CMD_STANDALONE
#if CMD_DYNAMIC
#include <dlldefs.h>
#else
#endif
#ifndef CMD_BUILTIN
/*
* command initialization
*/
static int
cmdinit __PARAM__((int argc, register char** argv, __V_* context, const char* catalog, int flags), (argc, argv, context, catalog, flags)) __OTORP__(int argc; register char** argv; __V_* context; const char* catalog; int flags;){
register char* cp;
register char* pp;
cp++;
else
if (!error_info.catalog)
if (context)
return 0;
}
#endif
int
#if CMD_DYNAMIC
register char* s;
register char* t;
char buf[64];
s++;
else if (!(s = argv[0]))
return 127;
if ((t = strrchr(s, '_')) && *++t)
s = t;
buf[0] = '_';
*t = 0;
for (;;)
{
{
break;
break;
}
{
break;
break;
}
return 127;
}
#else
#endif
}
#else
#ifndef CMD_BUILTIN
#if _BLD_cmd && defined(__EXPORT__)
#endif
#if !_BLD_cmd && defined(__IMPORT__)
#endif
extern __MANGLE__ int _cmd_quit;
#define __MANGLE__ __LINKAGE__
#endif
#if _BLD_cmd && defined(__EXPORT__)
#endif
#define __MANGLE__ __LINKAGE__
#endif
#endif