diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 11:13:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 11:13:24 +0000 |
commit | d7c278fca708bc2c4badaeac041ecb136a4ef955 (patch) | |
tree | 5b163b83e6e3171a311f67187aa75c0f96f98f13 /common.h | |
parent | Adding upstream version 1.23. (diff) | |
download | lziprecover-d7c278fca708bc2c4badaeac041ecb136a4ef955.tar.xz lziprecover-d7c278fca708bc2c4badaeac041ecb136a4ef955.zip |
Adding upstream version 1.24~pre1.upstream/1.24_pre1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 ); |