MALOC
0.1
|
00001 /* 00002 * *************************************************************************** 00003 * MALOC = < Minimal Abstraction Layer for Object-oriented C > 00004 * Copyright (C) 1994--2000 Michael Holst 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU General Public License as published by the 00008 * Free Software Foundation; either version 2 of the License, or (at your 00009 * option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00014 * See the GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License along 00017 * with this program; if not, write to the Free Software Foundation, Inc., 00018 * 675 Mass Ave, Cambridge, MA 02139, USA. 00019 * 00020 * rcsid="$Id: vnm.h,v 1.12 2002/10/01 21:29:45 mholst Exp $" 00021 * *************************************************************************** 00022 */ 00023 00024 /* 00025 * *************************************************************************** 00026 * File: vnm.h < vnm.c > 00027 * 00028 * Purpose: Header file for an ISO C [V]irtual [N]umerical [M]achine. 00029 * 00030 * Author: Michael Holst 00031 * *************************************************************************** 00032 */ 00033 00034 #ifndef _VNM_H_ 00035 #define _VNM_H_ 00036 00037 #include <maloc/maloc_base.h> 00038 00039 /* 00040 * *************************************************************************** 00041 * Useful constants and functions (timers, epsilon, token generators, i/o) 00042 * *************************************************************************** 00043 */ 00044 00045 int Vnm_sigInt(void); 00046 void Vnm_sigIntSet(void); 00047 void Vnm_sigIntClear(void); 00048 00049 int Vnm_jmpOk(void); 00050 void Vnm_jmpOkSet(void); 00051 void Vnm_jmpOkClear(void); 00052 00053 jmp_buf *Vnm_signalInit(void); 00054 void Vnm_regHand(void); 00055 void Vnm_sigHand(int num); 00056 00057 #define VPOW_SAFE(x,y) (Vnm_powsafe(x,y)) 00058 double Vnm_powsafe(double x, double y); 00059 void Vnm_typeChk(void); 00060 double Vnm_epsmac(void); 00061 int Vnm_gentokens(char *buf, char **argv, 00062 const int argvmax, const char *white, const char *comment); 00063 00064 #define VTIMERS 100 00065 void Vnm_tstart(int timer, const char *name); 00066 void Vnm_tstop(int timer, const char *name); 00067 00068 char *Vnm_getuser(char *user, int usermax); 00069 char *Vnm_getos(char *os, int osmax); 00070 char *Vnm_gethost(char *host, int hostmax); 00071 char *Vnm_gethome(char *path, int pathmax); 00072 char *Vnm_getcwd(char *path, int pathmax); 00073 int Vnm_chdir(const char *path); 00074 int Vnm_mkdir(const char *path); 00075 00076 int Vnm_system(const char *cmd); 00077 int Vnm_systemBack(const char *cmd); 00078 int Vnm_systemKill(const char *cmd); 00079 int Vnm_exec(int argc, char **argv); 00080 void Vnm_sleep(int nusecs); 00081 00082 int Vnm_ioTag(void); 00083 int Vnm_nTags(void); 00084 void Vnm_setIoTag(int myTag, int numTags); 00085 FILE *Vnm_open(const int unit); 00086 int Vnm_close(const int unit); 00087 void Vnm_flush(const int unit); 00088 void Vnm_redirect(const int flag); 00089 void Vnm_print(const int unit, const char *format, ...); 00090 void Vnm_tprint(const int unit, const char *format, ...); 00091 00092 void Vnm_qsort(int *u, int size); 00093 void Vnm_qsortOrd(int *u, int *ord, int size); 00094 void Vnm_dqsort(double *u, int size); 00095 void Vnm_dqsortOrd(double *u, int *ord, int size); 00096 00097 #endif /* _VNM_H_ */ 00098 00099