home *** CD-ROM | disk | FTP | other *** search
-
- /* e4index.c (c)Copyright Sequiter Software Inc., 1987, 1988, 1989. All rights reserved.
-
- This is the example from routine 'n4pull_down' in the manual.
- */
-
- #include "d4base.h"
- #include "w4.h"
-
-
- main( int argc, char **argv )
- {
- d4initialize(1,1,1, 3000, 0 ) ;
- d4buf_init( 3000000L, 32000L, 64000L ) ;
-
- w4clear(-1) ;
-
- if ( argc < 4 )
- {
- w4(0,0, "e4index database_file_name new_index_file_name index_expr" ) ;
- w4exit(1) ;
- }
-
- if ( d4use( argv[1] ) < 0 ) w4exit(1) ;
-
- w4( 0,0, "Database: " ) ; w4out( argv[1] ) ;
- w4( w4row()+1,0, "Index: " ) ; w4out( argv[2] ) ;
- w4( w4row()+1,0, "Index Expr: " ) ; w4out( argv[3] ) ;
- w4( w4row()+1,0, "Working ..." ) ;
-
- if ( i4index( argv[2], argv[3], 0, 0 ) < 0 )
- w4( w4row()+2,0, "INDEX NOT CREATED" ) ;
- else
- w4( w4row()+1,0, "Index Created" ) ;
-
- d4close_all() ;
- w4exit(0) ;
- }
-