| 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 | |
| 29 | /*----- Revision history --------------------------------------------------* |
| 30 | * |
| 31 | * $Log: rxglue.h,v $ |
| 32 | * Revision 1.1 2002/01/25 19:34:45 mdw |
| 33 | * Initial revision |
| 34 | * |
| 35 | */ |
| 36 | |
| 37 | #ifndef RXGLUE_H |
| 38 | #define RXGLUE_H |
| 39 | |
| 40 | #ifdef __cplusplus |
| 41 | extern "C" { |
| 42 | #endif |
| 43 | |
| 44 | /*----- Header files ------------------------------------------------------*/ |
| 45 | |
| 46 | #ifdef HAVE_CONFIG_H |
| 47 | # include "config.h" |
| 48 | #endif |
| 49 | |
| 50 | #include <stddef.h> |
| 51 | |
| 52 | /*----- Functions provided ------------------------------------------------*/ |
| 53 | |
| 54 | /* --- @rx_run@ --- * |
| 55 | * |
| 56 | * Arguments: @const char *name@ = pointer to filename (or null) |
| 57 | * @const void *p@ = pointer to program text |
| 58 | * @size_t sz@ = size of program text |
| 59 | * @int ac@ = number of arguments |
| 60 | * @const char *const *av@ = vector of command-line arguments |
| 61 | * |
| 62 | * Returns: Exit code from program. |
| 63 | * |
| 64 | * Use: Runs a REXX script from memory. |
| 65 | */ |
| 66 | |
| 67 | extern int rx_run(const char */*name*/, const void */*p*/, size_t /*sz*/, |
| 68 | int /*ac*/, const char *const */*av*/); |
| 69 | |
| 70 | /* --- @rx_runfile@ --- * |
| 71 | * |
| 72 | * Arguments: @const char *name@ = pointer to filename |
| 73 | * @int ac@ = number of command-line arguments |
| 74 | * @const char *const *av@ = vector of command-line arguments |
| 75 | * |
| 76 | * Returns: Exit code from program. |
| 77 | * |
| 78 | * Use: Runs a REXX script from a file, given its name. |
| 79 | */ |
| 80 | |
| 81 | extern int rx_runfile(const char */*name*/, |
| 82 | int /*ac*/, const char *const */*av*/); |
| 83 | |
| 84 | /* --- @rx_init@ --- * |
| 85 | * |
| 86 | * Arguments: --- |
| 87 | * |
| 88 | * Returns: --- |
| 89 | * |
| 90 | * Use: Initializes the REXX external functions. |
| 91 | */ |
| 92 | |
| 93 | extern void rx_init(void); |
| 94 | |
| 95 | /*----- That's all, folks -------------------------------------------------*/ |
| 96 | |
| 97 | #ifdef __cplusplus |
| 98 | } |
| 99 | #endif |
| 100 | |
| 101 | #endif |