Mercurial > mercurial > hgweb_xdwtools.cgi
changeset 3:edfa39292d78
small fix.
author | pyon@macmini |
---|---|
date | Tue, 24 Oct 2017 19:29:36 +0900 |
parents | f96c40f7aeae |
children | af8f454d20ed |
files | xdwgrep2.cpp xdwsort.cpp |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/xdwgrep2.cpp Mon Oct 23 20:15:22 2017 +0900 +++ b/xdwgrep2.cpp Tue Oct 24 19:29:36 2017 +0900 @@ -139,7 +139,7 @@ unmatch = 1; break; default: - printf("error: illegal option '%c'.\n", c ); + fprintf( stderr, "error: illegal option '%c'.\n", c ); exit( 1 ); } }
--- a/xdwsort.cpp Mon Oct 23 20:15:22 2017 +0900 +++ b/xdwsort.cpp Tue Oct 24 19:29:36 2017 +0900 @@ -1,14 +1,14 @@ /* Makefile -debug: xdwsort.cpp +debug: xdwsort.c #rm -rf tempXXXX #cls - gcc -g -O0 -I. xdwsort.cpp xdwapi.lib + gcc -g -O0 -I. xdwsort.c xdwapi.lib #date #./a.exe target.xdw #date -release: xdwsort.cpp - gcc -I. xdwsort.cpp xdwapi.lib -static -o xdwsort.exe +release: xdwsort.c + gcc -I. xdwsort.c xdwapi.lib -static -o xdwsort.exe strip xdwsort.exe clean: @@ -84,7 +84,7 @@ case 'l': /* now writing... */ break; default: - printf("error: illegal option '%c'.\n", c ); + fprintf( stderr, "error: illegal option '%c'.\n", c ); exit( 1 ); } } @@ -220,7 +220,7 @@ } sprintf( buf, "tempXXXX/%04d.xdw", p + 1 ); _fullpath( in_path, buf, _MAX_PATH ); - strncpy( &blk_path[ m * _MAX_PATH ], buf, _MAX_PATH ); + strncpy( &blk_path[ m * _MAX_PATH ], in_path, _MAX_PATH ); blk_path_addr[m] = &blk_path[ m * _MAX_PATH ]; } if ( last_page % BLOCKSZ != 0 ) { @@ -237,7 +237,7 @@ for ( int b = 0; b < bn; b++ ) { sprintf( buf, "tempXXXX/b%04d.xdw", b + 1 ); _fullpath( in_path, buf, _MAX_PATH ); - strncpy( &blk_path[ b * _MAX_PATH ], buf, _MAX_PATH ); + strncpy( &blk_path[ b * _MAX_PATH ], in_path, _MAX_PATH ); blk_path_addr[b] = &blk_path[ b * _MAX_PATH ]; } _fullpath( in_path, "tempXXXX/temp.xdw", _MAX_PATH );