#ifndef CYAML_H
#define CYAML_H
+#include <inttypes.h>
#include <stdbool.h>
enum cYAML_object_type {
/* The item's string, if type==CYAML_TYPE_STRING */
char *cy_valuestring;
/* The item's number, if type==CYAML_TYPE_NUMBER */
- int cy_valueint;
+ int64_t cy_valueint;
/* The item's number, if type==CYAML_TYPE_NUMBER */
double cy_valuedouble;
/* The item's name string, if this item is the child of,
if (cpi->array_first_elem)
fprintf(f, "%*s- ", INDENT * level, "");
- fprintf(f, "%*s""%s: %d\n", (cpi->array_first_elem) ? 0 :
+ fprintf(f, "%*s""%s: %" PRId64 "\n", (cpi->array_first_elem) ? 0 :
INDENT * level + ind, "", node->cy_string,
node->cy_valueint);
}
if ((fabs(((double)node->cy_valueint) - d) <= DBL_EPSILON) &&
(d <= INT_MAX) && (d >= INT_MIN))
- fprintf(f, "%*s""%s: %d\n", (cpi->array_first_elem) ? 0 :
+ fprintf(f, "%*s""%s: %" PRId64 "\n", (cpi->array_first_elem) ? 0 :
INDENT * level + ind, "",
node->cy_string, node->cy_valueint);
else {