source: trunk/essentials/app-shells/bash/examples/loadables/perl/bperl.c@ 3506

Last change on this file since 3506 was 3228, checked in by bird, 19 years ago

bash 3.1

File size: 616 bytes
Line 
1/*
2 * perl builtin
3 */
4#include <config.h>
5
6#include <fcntl.h>
7#include <errno.h>
8
9#include "builtins.h"
10#include "shell.h"
11
12#ifndef errno
13extern int errno;
14#endif
15
16extern char **make_builtin_argv ();
17extern char **export_env;
18
19extern int perl_main();
20
21bperl_builtin(list)
22WORD_LIST *list;
23{
24 char **v;
25 int c, r;
26
27 v = make_builtin_argv(list, &c);
28 r = perl_main(c, v, export_env);
29 free(v);
30
31 return r;
32}
33
34char *bperl_doc[] = {
35 "An interface to a perl5 interpreter.",
36 (char *)0
37};
38
39struct builtin bperl_struct = {
40 "bperl",
41 bperl_builtin,
42 BUILTIN_ENABLED,
43 bperl_doc,
44 "bperl [perl options] [file ...]",
45 0
46};
Note: See TracBrowser for help on using the repository browser.