-static void append2_file(xbt_log_appender_t this_, char *str) {
- xbt_log_append2_file_t d=(xbt_log_append2_file_t) this_->data;
- xbt_assert(d->file);
- if(ftell(d->file)>=d->limit) {
- open_append2_file(d);
- }
- fputs(str, d->file);
- if(d->count<0){
- fputs(APPEND2_END_TOKEN,d->file);
- fseek(d->file,-((signed long)strlen(APPEND2_END_TOKEN)),SEEK_CUR);
- }
+static void append2_file(const s_xbt_log_appender_t* this_, const char* str)
+{
+ auto* d = static_cast<xbt_log_append2_file_t>(this_->data);
+ xbt_assert(d->file);
+ if (ftell(d->file) >= d->limit) {
+ open_append2_file(d);
+ }
+ fputs(str, d->file);
+ if (d->count < 0) {
+ fputs(APPEND2_END_TOKEN, d->file);
+ fseek(d->file, -((signed long)strlen(APPEND2_END_TOKEN)), SEEK_CUR);
+ }