1 #ifndef ROLLING_H_
2 #define ROLLING_H_
3 
4 #ifdef __cplusplus
5 #include <string>
6 #endif
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 /* Removes all vector files in bwc's wdir (current directory, in fact,
13  * since bwc programs always run in the current directory) according to
14  * the rules specified by the parameters keep_rolling_checkpoints and
15  * checkpoint_precious.
16  *
17  * If v == 0, consider all checkpoints. Otherwise, restrict to those
18  * whose index is <= v
19  *
20  * The bal argument is used only to compose the filename according to the
21  * checksum of the current balancing permutation.
22  */
23 extern void keep_rolling_checkpoints(const char * stem, unsigned int v);
24 
25 #ifdef __cplusplus
26 }
27 #endif
28 
29 #ifdef __cplusplus
keep_rolling_checkpoints(std::string const & stem,unsigned int v)30 static inline void keep_rolling_checkpoints(std::string const & stem, unsigned int v)
31 {
32     keep_rolling_checkpoints(stem.c_str(), v);
33 }
34 #endif
35 
36 #endif	/* ROLLING_H_ */
37