3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

adding handlers for dimacs for solver_from_file, and opb, wncf for opt_from_file, #1361

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-11-19 15:21:09 -08:00
parent 2f6283e1ed
commit bdbaf68f8b
8 changed files with 431 additions and 295 deletions

38
src/util/file_path.h Normal file
View file

@ -0,0 +1,38 @@
/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
file_path.h
Abstract:
File path functions.
Author:
Nikolaj Bjorner (nbjorner) 2017-11-19
Revision History:
--*/
#ifndef FILE_PATH_H_
#define FILE_PATH_H_
inline char const * get_extension(char const * file_name) {
if (file_name == 0)
return 0;
char const * last_dot = 0;
for (;;) {
char const * tmp = strchr(file_name, '.');
if (tmp == 0) {
return last_dot;
}
last_dot = tmp + 1;
file_name = last_dot;
}
}
#endif /* FILE_PATH_H_ */