Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/cmd/kshlib/cmdtst/lib.c
1810 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1995-2012 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Glenn Fowler <[email protected]> *
18
* Doug McIlroy <[email protected]> *
19
* *
20
***********************************************************************/
21
#pragma prototyped
22
23
#include <ast.h>
24
#include <shcmd.h>
25
26
#undef CMDLIST
27
#if __STDC__
28
#define CMDLIST(f) extern int b_##f(int, char**, Shbltin_t*);
29
#else
30
#define CMDLIST(f) extern int b_##f();
31
#endif
32
#include "cmdtstlist.h"
33
34
void
35
cmdtst_init(int flag, void* context)
36
{
37
if (!flag)
38
{
39
#undef CMDLIST
40
#define CMDLIST(f) sh_builtin(context, #f, b_##f, 0);
41
#include "cmdtstlist.h"
42
}
43
}
44
45
void
46
lib_init(int flags, void* context)
47
{
48
cmdtst_init(flags, context);
49
}
50
51
SHLIB(cmdtst)
52
53