- SCStore store now also context and macro state

This commit is contained in:
zolliker
2008-01-18 07:49:03 +00:00
parent 1b0d8bd46d
commit 7240cecbc5

View File

@ -169,16 +169,25 @@ typedef int (*writeFunc)(struct __SConnection *pCon,
int ConSicsAction(SConnection *pCon, SicsInterp *pSics, void *pData, int ConSicsAction(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]); int argc, char *argv[]);
/******************************** Store ************************************/ /******************************** Store ************************************/
typedef struct { typedef struct SCStore *SCStore;
SConnection *pCon;
long ident;
} SCStore;
void SCSave(SCStore *con, SConnection *pCon); SCStore SCSave(SConnection *pCon, SCStore oldStore);
/* save a connection for later use. */ /* save a connection and its context for later use. */
SConnection *SCLoad(SCStore *con); SConnection *SCLoad(SCStore conStore);
/* check con and return SConnection if still valid or NULL otherwise. */ /* check con and return SConnection if still valid or a dummy connection otherwise. */
SConnection *SCStorePush(SCStore conStore);
/* load connection and push stored context. Must be paired with an SCStorePop command */
void SCStorePop(SCStore conStore);
/* pop context */
int SCStoreConnected(SCStore conStore);
/* check if a stored connection is not closed */
void SCStoreFree(SCStore conStore);
/* free an SCStore */
void KillFreeConnections(void); void KillFreeConnections(void);