source:
trunk/essentials/app-shells/bash/examples/loadables/perl/bperl.c@
3230
| Last change on this file since 3230 was 3228, checked in by , 19 years ago | |
|---|---|
| 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 |
| 13 | extern int errno; |
| 14 | #endif |
| 15 | |
| 16 | extern char **make_builtin_argv (); |
| 17 | extern char **export_env; |
| 18 | |
| 19 | extern int perl_main(); |
| 20 | |
| 21 | bperl_builtin(list) |
| 22 | WORD_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 | |
| 34 | char *bperl_doc[] = { |
| 35 | "An interface to a perl5 interpreter.", |
