/* file ifrilc.h * * declarations for Fril foreign language interface (C) * Copyright Fril Systems Ltd 1990-. * This code is part of the Fril Foreign Language Interface. * * */ #define TRUE 1 /* successful return */ #define FALSE 0 /* failure return */ #define FRIL_INTERRUPT -1 /* execution interrupted */ #define FRIL_TERMINATE -2 /* fril has terminated */ #define FRIL_REQUEST_INPUT -3 /* fril is trying to read the input buffer */ #define INTF_ATOM 1 /* return codes for getitemtype */ #define INTF_INT 2 #define INTF_FLOAT 3 #define INTF_LIST 4 #define INTF_VBLE 5 #define HLGOAL 0 /* to access the bound argument after query_fril */ #define HLARG 2 /* function declarations */ int getint(int list_id, int arg_num, int * ival); int putint(int list_id, int arg_num, int ival); int getfloat(int list_id, int arg_num, float * fval); int putfloat(int list_id, int arg_num, float fval); int getatom(int list_id, int arg_num, char * cval); int putatom(int list_id, int arg_num, char * cval); int getlist(int list_id, int arg_num, int * new_id); int putlist(int list_id, int arg_num, int put_id); int createlist(int* list_id, int len); int getlistlen(int list_id, int * plen); int putlistlen(int list_id, int len); int getitemtype(int list_id, int arg_num, int * item_type); int call_fril(char* InBuffer, int output_fn(char* OutBuffer)); int exec_fril(char* InBuffer, int output_fn(char* OutBuffer)); int putgoal(int listid); void initialise_interface(); int initialise_fril();