summaryrefslogtreecommitdiffstats
path: root/lzcheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'lzcheck.c')
-rw-r--r--lzcheck.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lzcheck.c b/lzcheck.c
index 376c60b..15de75b 100644
--- a/lzcheck.c
+++ b/lzcheck.c
@@ -49,10 +49,10 @@ int lzcheck( FILE * const file, const int dictionary_size )
LZ_compress_close( encoder );
if( mem_error )
{
- fprintf( stderr, "lzcheck: Not enough memory.\n" );
+ fputs( "lzcheck: Not enough memory.\n", stderr );
return 1;
}
- fprintf( stderr, "lzcheck: internal error: Invalid argument to encoder.\n" );
+ fputs( "lzcheck: internal error: Invalid argument to encoder.\n", stderr );
return 3;
}
@@ -60,7 +60,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
if( !decoder || LZ_decompress_errno( decoder ) != LZ_ok )
{
LZ_decompress_close( decoder );
- fprintf( stderr, "lzcheck: Not enough memory.\n" );
+ fputs( "lzcheck: Not enough memory.\n", stderr );
return 1;
}
@@ -80,7 +80,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
mid_size = LZ_compress_read( encoder, mid_buffer, buffer_size );
if( mid_size < 0 )
{
- fprintf( stderr, "lzcheck: LZ_compress_read error: %s.\n",
+ fprintf( stderr, "lzcheck: LZ_compress_read error: %s\n",
LZ_strerror( LZ_compress_errno( encoder ) ) );
retval = 3; break;
}
@@ -88,7 +88,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
out_size = LZ_decompress_read( decoder, out_buffer, buffer_size );
if( out_size < 0 )
{
- fprintf( stderr, "lzcheck: LZ_decompress_read error: %s.\n",
+ fprintf( stderr, "lzcheck: LZ_decompress_read error: %s\n",
LZ_strerror( LZ_decompress_errno( decoder ) ) );
retval = 3; break;
}
@@ -117,7 +117,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
LZ_decompress_read( decoder, out_buffer, buffer_size ) != 0 ||
LZ_compress_restart_member( encoder, member_size ) < 0 )
{
- fprintf( stderr, "lzcheck: Can't finish member: %s.\n",
+ fprintf( stderr, "lzcheck: Can't finish member: %s\n",
LZ_strerror( LZ_decompress_errno( decoder ) ) );
retval = 3;
}
@@ -143,7 +143,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
buffer_size - leading_garbage );
if( mid_size < 0 )
{
- fprintf( stderr, "lzcheck: LZ_compress_read error: %s.\n",
+ fprintf( stderr, "lzcheck: LZ_compress_read error: %s\n",
LZ_strerror( LZ_compress_errno( encoder ) ) );
retval = 3; break;
}
@@ -159,7 +159,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
}
if( out_size < 0 )
{
- fprintf( stderr, "lzcheck: LZ_decompress_read error: %s.\n",
+ fprintf( stderr, "lzcheck: LZ_decompress_read error: %s\n",
LZ_strerror( LZ_decompress_errno( decoder ) ) );
retval = 3; break;
}
@@ -187,7 +187,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
LZ_decompress_reset( decoder ) < 0 ||
LZ_compress_restart_member( encoder, member_size ) < 0 )
{
- fprintf( stderr, "lzcheck: Can't restart member: %s.\n",
+ fprintf( stderr, "lzcheck: Can't restart member: %s\n",
LZ_strerror( LZ_decompress_errno( decoder ) ) );
retval = 3; break;
}
@@ -200,7 +200,7 @@ int lzcheck( FILE * const file, const int dictionary_size )
LZ_decompress_sync_to_member( decoder ) < 0 ||
LZ_compress_restart_member( encoder, member_size ) < 0 )
{
- fprintf( stderr, "lzcheck: Can't seek to next member: %s.\n",
+ fprintf( stderr, "lzcheck: Can't seek to next member: %s\n",
LZ_strerror( LZ_decompress_errno( decoder ) ) );
retval = 3; break;
}
@@ -219,7 +219,7 @@ int main( const int argc, const char * const argv[] )
if( argc < 2 )
{
- fprintf( stderr, "Usage: lzcheck filename.txt\n" );
+ fputs( "Usage: lzcheck filename.txt\n", stderr );
return 1;
}