Mercurial > hg > dmlib
comparison src/dmtimelinew.c @ 2586:9807ae37ad69
Require stdbool.h, we require C11 now.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Dec 2022 15:59:22 +0200 |
parents | 862a943afff4 |
children |
comparison
equal
deleted
inserted
replaced
2585:ef6c826c5b7a | 2586:9807ae37ad69 |
---|---|
5 * (C) Copyright 2012-2015 Tecnic Software productions (TNSP) | 5 * (C) Copyright 2012-2015 Tecnic Software productions (TNSP) |
6 */ | 6 */ |
7 #include "dmengine.h" | 7 #include "dmengine.h" |
8 | 8 |
9 | 9 |
10 static BOOL dmSaveFloatValue(DMResource *res, const DMFloat val) | 10 static bool dmSaveFloatValue(DMResource *res, const DMFloat val) |
11 { | 11 { |
12 char tmp[DT_FLOAT_STORE_SIZE]; | 12 char tmp[DT_FLOAT_STORE_SIZE]; |
13 snprintf(tmp, DT_FLOAT_STORE_SIZE, "%f", val); | 13 snprintf(tmp, DT_FLOAT_STORE_SIZE, "%f", val); |
14 return !dmf_write_str(res, tmp, DT_FLOAT_STORE_SIZE); | 14 return !dmf_write_str(res, tmp, DT_FLOAT_STORE_SIZE); |
15 } | 15 } |
227 | 227 |
228 if ((*ptrack = track = dmMalloc0(sizeof(DMTimelineTrack))) == NULL) | 228 if ((*ptrack = track = dmMalloc0(sizeof(DMTimelineTrack))) == NULL) |
229 return DMERR_MALLOC; | 229 return DMERR_MALLOC; |
230 | 230 |
231 track->name = dm_strdup(name); | 231 track->name = dm_strdup(name); |
232 track->enabled = TRUE; | 232 track->enabled = true; |
233 | 233 |
234 if (tl->ntracks + 1 >= tl->nallocated) | 234 if (tl->ntracks + 1 >= tl->nallocated) |
235 { | 235 { |
236 void *ptmp = dmRealloc(tl->tracks, sizeof(DMTimelineTrack *) * (tl->nallocated + 16)); | 236 void *ptmp = dmRealloc(tl->tracks, sizeof(DMTimelineTrack *) * (tl->nallocated + 16)); |
237 if (ptmp == NULL) | 237 if (ptmp == NULL) |