From 64c85dfc1d3b546dd4b5f84168e9256817f3a741 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 20 Feb 2014 02:46:41 +0100 Subject: clean up source directory --- src/dumpindex2.c | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/dumpindex2.c (limited to 'src/dumpindex2.c') diff --git a/src/dumpindex2.c b/src/dumpindex2.c deleted file mode 100644 index f49a329..0000000 --- a/src/dumpindex2.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "mystdlib.h" -#include -#include - -static int indexed = -1; - -int main( int argc, char **argv ) { - MAP index = NULL; - int i,j; - char out[50]; - - if( argc != 3 ) - { fputs( "Syntax: sortindex ", stderr); exit( 1 ); } - - if( ( indexed = open( argv[1], O_RDONLY ) ) == -1 ) - { fprintf( stderr, "Could not open file: %s\n", argv[1] ); exit( 1 ); } - - if( !(index = map_file( argv[2], 0 ) ) ) exit( 1 ); - - for( i = 0; i < index->size; i+= 16 ) { - unsigned char *x = i + (unsigned char*)index->addr; - unsigned long p = *(unsigned long*)x; - - pread( indexed, out, 40, (off_t)p ); - for( j=0;j<40;++j) if( out[j] == '\t' || out[j] == '\n' ) out[j] = 0; out[j] = 0; - puts( out ); - } - - unmap_file( &index ); - close( indexed ); - - return 0; -} -- cgit v1.2.3