forked from totalspectrum/spin2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfmt.h
More file actions
40 lines (29 loc) · 723 Bytes
/
Copy pathfmt.h
File metadata and controls
40 lines (29 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <stdint.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#define INCLUDE_FLOATS
//#undef _SIMPLE_IO
#ifdef __FLEXC__
#define SMALL_INT
#define strlen __builtin_strlen
#define strcpy __builtin_strcpy
#ifdef _SIMPLE_IO
#define THROW_RETURN(err) return -1
#else
#define THROW_RETURN(x) do { __throwifcaught(x); return -1; } while (0)
#endif
#include <compiler.h>
#else
#define THROW_RETURN(x) return -1
#include <string.h>
#endif
#define alloca(x) __builtin_alloca(x)
#include <sys/fmt.h>
#define DEFAULT_PREC 6
#define DEFAULT_BASIC_FLOAT_FMT ((1<<UPCASE_BIT)|((4+1)<<PREC_BIT))
#define DEFAULT_FLOAT_FMT ((1<<UPCASE_BIT))