1 /* 2 * variable.h �ѿ����� 3 * 4 * Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp> 5 * 1998- <masaki-c@is.aist-nara.ac.jp> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * 21 */ 22 /* $Id: variable.h,v 1.11 2003/04/22 16:34:28 chikama Exp $ */ 23 24 #ifndef __VARIABLE__ 25 #define __VARIABLE__ 26 27 #include <sys/types.h> 28 #include "portab.h" 29 30 31 // #define SYSVAR_MAX 1024 32 //#define SYSVAR_MAX 8192# 33 #define SYSVAR_MAX 65536 34 #define SYSVARLONG_MAX 128 35 #define STRVAR_MAX 5000 36 #define STRVAR_LEN 101 37 #define ARRAYVAR_PAGEMAX 256 38 39 typedef struct { 40 int max; 41 boolean saveflag; 42 int *value; 43 } arrayVarBufferStruct; 44 45 typedef struct { 46 int *pointvar; 47 int page; 48 int offset; 49 } arrayVarStruct; 50 51 extern int *sysVar; 52 extern arrayVarStruct *sysVarAttribute; 53 extern arrayVarBufferStruct *arrayVarBuffer; 54 extern double longVar[]; 55 extern boolean v_allocateArrayBuffer(int , int , boolean ); 56 extern boolean v_defineArrayVar(int , int *, int , int ); 57 extern boolean v_releaseArrayVar(int ); 58 extern boolean v_releaseArrayVar(int datavar); 59 extern int v_getArrayBufferCnt(int page); 60 extern boolean v_getArrayBufferStatus(int page); 61 extern void v_initStringVars(int ,int ); 62 extern boolean v_initVars(); 63 extern char *v_strcpy(int no, const char *str); 64 extern char *v_strcat(int no, const char *str); 65 extern size_t v_strlen(int no); 66 extern char *v_str(int no); 67 68 #endif /* !__VARIABLE__ */ 69