2ec1e693 |
1 | /* -*-c-*- |
2 | * |
3 | * $Id: rxglue.h,v 1.1 2002/01/25 19:34:45 mdw Exp $ |
4 | * |
5 | * REXX glue for C core functionality |
6 | * |
7 | * (c) 2001 Mark Wooding |
8 | */ |
9 | |
10 | /*----- Licensing notice --------------------------------------------------* |
11 | * |
12 | * This file is part of Jog: Programming for a jogging machine. |
13 | * |
14 | * Jog is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License as published by |
16 | * the Free Software Foundation; either version 2 of the License, or |
17 | * (at your option) any later version. |
18 | * |
19 | * Jog is distributed in the hope that it will be useful, |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22 | * GNU General Public License for more details. |
23 | * |
24 | * You should have received a copy of the GNU General Public License |
25 | * along with Jog; if not, write to the Free Software Foundation, |
26 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
27 | */ |
28 | |
2ec1e693 |
29 | #ifndef RXGLUE_H |
30 | #define RXGLUE_H |
31 | |
32 | #ifdef __cplusplus |
33 | extern "C" { |
34 | #endif |
35 | |
36 | /*----- Header files ------------------------------------------------------*/ |
37 | |
38 | #ifdef HAVE_CONFIG_H |
39 | # include "config.h" |
40 | #endif |
41 | |
42 | #include <stddef.h> |
43 | |
44 | /*----- Functions provided ------------------------------------------------*/ |
45 | |
46 | /* --- @rx_run@ --- * |
47 | * |
48 | * Arguments: @const char *name@ = pointer to filename (or null) |
49 | * @const void *p@ = pointer to program text |
50 | * @size_t sz@ = size of program text |
51 | * @int ac@ = number of arguments |
52 | * @const char *const *av@ = vector of command-line arguments |
53 | * |
54 | * Returns: Exit code from program. |
55 | * |
56 | * Use: Runs a REXX script from memory. |
57 | */ |
58 | |
59 | extern int rx_run(const char */*name*/, const void */*p*/, size_t /*sz*/, |
60 | int /*ac*/, const char *const */*av*/); |
61 | |
62 | /* --- @rx_runfile@ --- * |
63 | * |
64 | * Arguments: @const char *name@ = pointer to filename |
65 | * @int ac@ = number of command-line arguments |
66 | * @const char *const *av@ = vector of command-line arguments |
67 | * |
68 | * Returns: Exit code from program. |
69 | * |
70 | * Use: Runs a REXX script from a file, given its name. |
71 | */ |
72 | |
73 | extern int rx_runfile(const char */*name*/, |
74 | int /*ac*/, const char *const */*av*/); |
75 | |
76 | /* --- @rx_init@ --- * |
77 | * |
78 | * Arguments: --- |
79 | * |
80 | * Returns: --- |
81 | * |
82 | * Use: Initializes the REXX external functions. |
83 | */ |
84 | |
85 | extern void rx_init(void); |
86 | |
87 | /*----- That's all, folks -------------------------------------------------*/ |
88 | |
89 | #ifdef __cplusplus |
90 | } |
91 | #endif |
92 | |
93 | #endif |