home *** CD-ROM | disk | FTP | other *** search
-
- /* d4init_u.c (c)Copyright Sequiter Software Inc., 1987-1990. All rights reserved. */
-
- #include "d4all.h"
- #ifndef NOIO
- #include "w4.h"
- #endif
- #include "h4memory.h"
-
- extern int v4first ;
-
- extern BASE *v4base ;
- extern BLOCK *v4block ;
-
- extern X4FILTER *v4filter ;
- extern X4RELATE *v4relate ;
-
-
- d4init_undo()
- {
- if ( v4first ) return 0 ;
-
- v4first = 1 ;
-
- if ( d4close_all() < 0 ) return -1 ;
- if ( d4buf_init(0L,0L,0L) < 0 ) return -1 ;
-
- #ifndef SMALL
- {
- extern char *v4eval_space ;
- extern INDEX *v4index ;
-
- h4free_memory( v4eval_space ) ;
- v4eval_space = (char *) 0 ;
-
- h4free_memory( (char *) v4index - sizeof(MEMORY) ) ;
- v4index = (INDEX *) 0 ;
- }
- #endif
-
- h4free_memory( (char *) v4base - sizeof(MEMORY) ) ;
- v4base = (BASE *) 0 ;
-
- h4free_memory( (char *) v4block - sizeof(MEMORY) ) ;
- v4block = (BLOCK *) 0 ;
-
- if ( v4filter != (X4FILTER *) 0 )
- {
- h4free_memory( (char *) v4filter - sizeof(MEMORY) ) ;
- v4filter = (X4FILTER *) 0 ;
- }
-
- if ( v4relate != (X4RELATE *) 0 )
- {
- h4free_memory( (char *) v4relate - sizeof(MEMORY) ) ;
- v4relate = (X4RELATE *) 0 ;
- }
-
- #ifndef NOIO
- w4init_undo() ;
- #endif
-
- return 0 ;
- }
-
-
-