home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************
- *
- * Copyright (c) 1993 Ke Jin
- *
- * Permission to use, copy, modify, and distribute
- * this software and its documentation without fee
- * is granted, provided that the author's name and
- * this copyright notice are retained.
- *
- * -------------------------------------------------------------
- *
- * defunc.h -- public interface of defunc high level module
- *
- *
- * external function : namefnct();
- * namecnst();
- * nameargu();
- * getarguname();
- *
- * clrfnct();
- * clrfnctall();
- * clrcnst();
- * clrcnstall();
- *
- * matha2z();
- *
- * dfopen();
- * dfclose();
- * dfcloseall();
- *
- * external variable : exparserror;
- *
- ***************************************************************/
-
- #ifndef _DEFUNC_H
- #define _DEFUNC_H
-
- #ifndef NeedFunctionPrototypes
- #if defined(__STDC__)||defined(__cplusplus)
- #define NeedFunctionPrototypes 1 /* for ANSI */
- #else
- #define NeedFunctionPrototypes 0 /* for K&R */
- #endif /* __STDC__ */
- #endif /* NeedFunctionPrototypes */
-
- #ifdef __cplusplus
- extern "C" { /* for c++ */
- #endif
-
- #if NeedFunctionPrototypes
- extern int namefnct(char* name, double (*fnctptr)());
- extern int namecnst(char* name, double const_expression);
- extern int nameargu(char* name4arg1, char* name4arg2);
- extern char* getarguname(int argidx);
- extern int clrfnct(char* name);
- extern int clrfnctall(void);
- extern int clrcnst(char* name);
- extern int clrcnstall(void);
-
- extern double (*dfopen(char* exprbody))(double x, double y);
- extern int dfclose(double (*fnctptr)());
- extern int dfcloseall(void);
-
- extern int matha2z(void);
-
- extern char* exparserror;
-
- #else /* for K&R */
- extern int namefnct(); /* set/delete alias name for function */
- extern int namecnst(); /* set/delete alias name for constant */
- extern int nameargu(); /* set symbol for function arguments */
- extern char* getarguname(); /* retrive argument names */
- extern int clrfnct(); /* clear a function token */
- extern int clrfnctall(); /* clear all function tokens */
- extern int clrcnst(); /* clear a constant token */
- extern int clrcnstall(); /* clear all constant tokens */
-
- extern double (*dfopen())(); /* open function of an expression */
- extern int dfclose(); /* close a opened function */
- extern int dfcloseall(); /* close all opened functions */
-
- extern int matha2z(); /* install math symtable */
-
- extern char* exparserror; /* point to a error message string */
- #endif /* NeedFunctionPrototypes */
-
- #ifdef __cplusplus
- } /* end for c++ */
- #endif
-
- #endif /* _DEFUNC_H */
-