1 /* 2 BAREOS® - Backup Archiving REcovery Open Sourced 3 4 Copyright (C) 2018-2020 Bareos GmbH & Co. KG 5 6 This program is Free Software; you can redistribute it and/or 7 modify it under the terms of version three of the GNU Affero General Public 8 License as published by the Free Software Foundation and included 9 in the file LICENSE. 10 11 This program is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Affero General Public License for more details. 15 16 You should have received a copy of the GNU Affero General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301, USA. 20 */ 21 #ifndef BAREOS_LIB_SCAN_H_ 22 #define BAREOS_LIB_SCAN_H_ 23 24 void StripLeadingSpace(char* str); 25 void StripTrailingJunk(char* str); 26 void StripTrailingNewline(char* str); 27 void StripTrailingSlashes(char* dir); 28 bool SkipSpaces(char** msg); 29 bool SkipNonspaces(char** msg); 30 int fstrsch(const char* a, const char* b); 31 char* next_arg(char** s); 32 int ParseArgs(const POOLMEM* cmd, 33 POOLMEM*& args, 34 int* argc, 35 char** argk, 36 char** argv, 37 int max_args); 38 int ParseArgsOnly(const POOLMEM* cmd, 39 POOLMEM*& args, 40 int* argc, 41 char** argk, 42 char** argv, 43 int max_args); 44 void SplitPathAndFilename(const char* fname, 45 POOLMEM*& path, 46 int* pnl, 47 POOLMEM*& file, 48 int* fnl); 49 int bsscanf(const char* buf, const char* fmt, ...); 50 51 #endif // BAREOS_LIB_SCAN_H_ 52