Compile as C++
This commit is contained in:
parent
e8cde870de
commit
e1f5381c2d
18
gb.h
18
gb.h
|
@ -1,4 +1,4 @@
|
||||||
/* gb.h - v0.12 - Ginger Bill's C Helper Library - public domain
|
/* gb.h - v0.12a - Ginger Bill's C Helper Library - public domain
|
||||||
- no warranty implied; use at your own risk
|
- no warranty implied; use at your own risk
|
||||||
|
|
||||||
This is a single header file with a bunch of useful stuff
|
This is a single header file with a bunch of useful stuff
|
||||||
|
@ -26,6 +26,7 @@ Conventions used:
|
||||||
|
|
||||||
|
|
||||||
Version History:
|
Version History:
|
||||||
|
0.12a - Compile as C++
|
||||||
0.12 - New File Handing System! No stdio or stdlib! (WIN32 Only)
|
0.12 - New File Handing System! No stdio or stdlib! (WIN32 Only)
|
||||||
0.11a - Add string precision and width (experimental)
|
0.11a - Add string precision and width (experimental)
|
||||||
0.11 - Started making stdio & stdlib optional (Not tested much)
|
0.11 - Started making stdio & stdlib optional (Not tested much)
|
||||||
|
@ -2080,17 +2081,17 @@ gb_sprintf_va(char const *fmt, va_list va)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
enum {
|
||||||
|
GB__LETTER_CASE_NO_CHANGE,
|
||||||
|
GB__LETTER_CASE_LOWER,
|
||||||
|
GB__LETTER_CASE_UPPER,
|
||||||
|
};
|
||||||
typedef struct {
|
typedef struct {
|
||||||
b8 left_justify;
|
b8 left_justify;
|
||||||
b8 force_sign;
|
b8 force_sign;
|
||||||
b8 force_type;
|
b8 force_type;
|
||||||
b8 pad_zeroes;
|
b8 pad_zeroes;
|
||||||
enum {
|
i32 force_case;
|
||||||
GB__LETTER_CASE_NO_CHANGE,
|
|
||||||
GB__LETTER_CASE_LOWER,
|
|
||||||
GB__LETTER_CASE_UPPER,
|
|
||||||
} force_case;
|
|
||||||
|
|
||||||
isize width;
|
isize width;
|
||||||
i32 base, precision;
|
i32 base, precision;
|
||||||
|
@ -2268,7 +2269,8 @@ gb_snprintf_va(char *text, isize max_len, char const *fmt, va_list va)
|
||||||
DO_INT,
|
DO_INT,
|
||||||
DO_LONG,
|
DO_LONG,
|
||||||
DO_I64
|
DO_I64
|
||||||
} int_type = DO_INT;
|
};
|
||||||
|
isize int_type = DO_INT;
|
||||||
|
|
||||||
gb__FmtInfo info = {0};
|
gb__FmtInfo info = {0};
|
||||||
info.base = 10;
|
info.base = 10;
|
||||||
|
|
Loading…
Reference in New Issue