00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _H_bsave
00025 #define _H_bsave
00026
00027 struct BinaryItem;
00028
00029 #ifndef _STDIO_INCLUDED_
00030 #define _STDIO_INCLUDED_
00031 #include <stdio.h>
00032 #endif
00033
00034 #ifndef _H_expressn
00035 #include "expressn.h"
00036 #endif
00037
00038 #ifdef LOCALE
00039 #undef LOCALE
00040 #endif
00041
00042 #ifdef _BSAVE_SOURCE_
00043 #define LOCALE
00044 #else
00045 #define LOCALE extern
00046 #endif
00047
00048 struct BinaryItem
00049 {
00050 char *name;
00051 void (*findFunction)(void *);
00052 void (*bloadStorageFunction)(void *);
00053 void (*bloadFunction)(void *);
00054 void (*clearFunction)(void *);
00055 void (*expressionFunction)(void *,FILE *);
00056 void (*bsaveStorageFunction)(void *,FILE *);
00057 void (*bsaveFunction)(void *,FILE *);
00058 int priority;
00059 struct BinaryItem *next;
00060 };
00061
00062 #if BLOAD_AND_BSAVE
00063 typedef struct bloadcntsv
00064 {
00065 long val;
00066 struct bloadcntsv *nxt;
00067 } BLOADCNTSV;
00068 #endif
00069
00070 typedef struct bsave_expr
00071 {
00072 unsigned short type;
00073 long value,arg_list,next_arg;
00074 } BSAVE_EXPRESSION;
00075
00076 #define CONSTRUCT_HEADER_SIZE 20
00077
00078 #define BSAVE_DATA 39
00079
00080 struct bsaveData
00081 {
00082 struct BinaryItem *ListOfBinaryItems;
00083 #if BLOAD_AND_BSAVE
00084 BLOADCNTSV *BloadCountSaveTop;
00085 #endif
00086 };
00087
00088 #define BsaveData(theEnv) ((struct bsaveData *) GetEnvironmentData(theEnv,BSAVE_DATA))
00089
00090 #define Bsave(a) EnvBsave(GetCurrentEnvironment(),a)
00091
00092 LOCALE void InitializeBsaveData(void *);
00093 LOCALE int BsaveCommand(void *);
00094 #if BLOAD_AND_BSAVE
00095 LOCALE intBool EnvBsave(void *,char *);
00096 LOCALE void MarkNeededItems(void *,struct expr *);
00097 LOCALE void SaveBloadCount(void *,long);
00098 LOCALE void RestoreBloadCount(void *,long *);
00099 #endif
00100 LOCALE intBool AddBinaryItem(void *,char *,int,
00101 void (*)(void *),
00102 void (*)(void *,FILE *),
00103 void (*)(void *,FILE *),
00104 void (*)(void *,FILE *),
00105 void (*)(void *),
00106 void (*)(void *),
00107 void (*)(void *));
00108
00109 #ifndef _BSAVE_SOURCE_
00110 extern struct BinaryItem *ListOfBinaryItems;
00111 #endif
00112
00113 #endif
00114
00115
00116
00117
00118
00119
00120