From 88ba1d04480e5350476291aaa9a400dc571bbc75 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Tue, 12 Jul 2005 13:46:47 +0000 Subject: sync --- src/backen.c | 4 ++-- src/decompress.c | 4 ++-- src/mystdlib.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/backen.c b/src/backen.c index d97f743..434f3d5 100644 --- a/src/backen.c +++ b/src/backen.c @@ -56,7 +56,7 @@ int main( int argc, char **argv ) { printf( "%s\t%s\t", streets[sid], end+1 ); end = lookup + 6 + sprintf( lookup+6, "%s\t%s", streets[sid], end + 1 ); while( isalpha( (int)end[-1] )) *--end = 0; - *++end = '\t'; *++end = 0; + *end++ = '\t'; *end = 0; } else { printf( "\t\t" ); lookup[6] = lookup[7] = '\t'; lookup[8] = 0; } @@ -73,7 +73,7 @@ int main( int argc, char **argv ) { break; case 7: memcpy( lookup, ".....\t", 6 ); - sprintf( lookup, "%s", maps[k]->addr+mapoffs[k] ); + snprintf( lookup, 5, "%s", maps[k]->addr+mapoffs[k] ); lookup[5] = '\t'; default: printf( "%s\t", maps[k]->addr+mapoffs[k] ); diff --git a/src/decompress.c b/src/decompress.c index dea2bca..0efd82c 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -7,9 +7,9 @@ #define HUGEBLOCK (1024*1024) int main(int argc, char **argv) { -// int infile = open("/Volumes/DasTelefonbuch/atb/phonebook.db", O_RDONLY); + int infile = open("/Volumes/DasTelefonbuch/atb/phonebook.db", O_RDONLY); - int infile = open( argv[1], O_RDONLY); +// int infile = open( argv[1], O_RDONLY); printf( "%i\n", infile ); unsigned const char xorkey [XORLEN] = "Just for Fun. Linus Torvalds."; diff --git a/src/mystdlib.c b/src/mystdlib.c index 2deda22..9d73293 100644 --- a/src/mystdlib.c +++ b/src/mystdlib.c @@ -20,7 +20,7 @@ MAP map_file( char *filename, int readonly ) { fstat( map->fh, &fstatus ); if( ( map->addr = mmap( NULL, map->size = (size_t)fstatus.st_size, - PROT_READ | ( readonly ? 0 : PROT_WRITE), MAP_NOCORE | (readonly ? 0 : MAP_SHARED), map->fh, 0) ) == MAP_FAILED ) + PROT_READ | ( readonly ? 0 : PROT_WRITE), (readonly ? 0 : MAP_SHARED), map->fh, 0) ) == MAP_FAILED ) { fprintf( stderr, "Mapping file '%s' failed\n", filename ); close( map->fh ); free( map ); map = NULL; -- cgit v1.2.3