diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-08-08 17:10:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-08-08 17:10:15 +0000 |
commit | 3c320348b5b78d2a9923527f9eac089eb1e2778d (patch) | |
tree | d17322c3a703eb4683e689482c3dbd3041970180 /common.cc | |
parent | Adding upstream version 0.16. (diff) | |
download | tarlz-3c320348b5b78d2a9923527f9eac089eb1e2778d.tar.xz tarlz-3c320348b5b78d2a9923527f9eac089eb1e2778d.zip |
Adding upstream version 0.17.upstream/0.17
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'common.cc')
-rw-r--r-- | common.cc | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -1,18 +1,18 @@ -/* Tarlz - Archiver with multimember lzip compression - Copyright (C) 2013-2019 Antonio Diaz Diaz. +/* Tarlz - Archiver with multimember lzip compression + Copyright (C) 2013-2020 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 - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + 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 + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define _FILE_OFFSET_BITS 64 @@ -28,6 +28,7 @@ #include <stdint.h> #include <unistd.h> +#include "arg_parser.h" #include "tarlz.h" @@ -147,3 +148,9 @@ int writeblock( const int fd, const uint8_t * const buf, const int size ) } return sz; } + + +bool nonempty_arg( const Arg_parser & parser, const int i ) + { + return ( parser.code( i ) == 0 && !parser.argument( i ).empty() ); + } |