diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 11:13:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 11:13:28 +0000 |
commit | bfe1c9e528f1db429020e40e15b2483d1ec32b75 (patch) | |
tree | 36aee5c76f09362bad7adc8d4163e902fae81a39 /common.h | |
parent | Releasing debian version 1.23-5. (diff) | |
download | lziprecover-bfe1c9e528f1db429020e40e15b2483d1ec32b75.tar.xz lziprecover-bfe1c9e528f1db429020e40e15b2483d1ec32b75.zip |
Merging upstream version 1.24~pre1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* Lziprecover - Data recovery tool for the lzip format - Copyright (C) 2009-2022 Antonio Diaz Diaz. + Copyright (C) 2009-2023 Antonio Diaz Diaz. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,11 +19,14 @@ struct Bad_byte { enum Mode { literal, delta, flip }; long long pos; + const char * argument; const char * option_name; Mode mode; uint8_t value; - Bad_byte() : pos( -1 ), option_name( 0 ), mode( literal ), value( 0 ) {} + Bad_byte() : + pos( -1 ), argument( 0 ), option_name( 0 ), mode( literal ), value( 0 ) {} + uint8_t operator()( const uint8_t old_value ) const { if( mode == delta ) return old_value + value; @@ -35,6 +38,8 @@ struct Bad_byte }; +const char * const mem_msg = "Not enough memory."; + // defined in main_common.cc void show_error( const char * const msg, const int errcode = 0, const bool help = false ); |