int count; //negative for roll
long int limit;
};
-typedef struct xbt_log_append2_file_s* xbt_log_append2_file_t;
+using xbt_log_append2_file_t = xbt_log_append2_file_s*;
static constexpr const char* APPEND2_END_TOKEN = "\n[End of log]\n";
static constexpr const char* APPEND2_END_TOKEN_CLEAR = "\n ";
char* sep=strchr(pre,'%');
if(!sep)
sep=pre+strlen(pre);
- char* post=sep+1;
- *sep='\0';
+ const char* post = sep + 1;
+ *sep = '\0';
std::string newname = pre + std::to_string(data->count) + post;
data->count++;
data->file = fopen(newname.c_str(), "w");