diff options
| author | Franklin Wei <git@fwei.tk> | 2015-05-11 18:40:30 -0400 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2015-05-11 18:40:30 -0400 |
| commit | b4c20b3cc1f5429650f79a6fd95b5e3d5bc4d4e5 (patch) | |
| tree | 8c76e4f23f6f5e86fa41cd699df472228dafe6ff /src/globals.h | |
| parent | 1a2114628581838ab3821f0a2177f23665e20534 (diff) | |
| download | market-sim-b4c20b3cc1f5429650f79a6fd95b5e3d5bc4d4e5.zip market-sim-b4c20b3cc1f5429650f79a6fd95b5e3d5bc4d4e5.tar.gz market-sim-b4c20b3cc1f5429650f79a6fd95b5e3d5bc4d4e5.tar.bz2 market-sim-b4c20b3cc1f5429650f79a6fd95b5e3d5bc4d4e5.tar.xz | |
lots of stuff, buying mostly works
Diffstat (limited to 'src/globals.h')
| -rw-r--r-- | src/globals.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/globals.h b/src/globals.h index bb7f5cc..55c9994 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,19 +1,15 @@ #include <stdbool.h> +#include <stdint.h> #define ARRAYLEN(x) (sizeof(x) / sizeof(x[0])) -typedef unsigned long long ullong; -typedef unsigned long ulong; -typedef unsigned uint; -typedef unsigned short ushort; -typedef unsigned char uchar; +typedef uint64_t ullong; +typedef uint32_t ulong; +typedef uint32_t uint; +typedef uint16_t ushort; +typedef uint8_t uchar; -struct date_t { - ushort year; - ushort day; /* 0 = 1st jan, 364 = 31st dec */ -}; - -/* money is represented internally as dollars + cents */ +/* money is represented internally as cents */ struct money_t { ullong cents; }; @@ -27,6 +23,6 @@ struct stock_t { struct player_t { struct money_t cash; - struct stock_t *portfolio; uint portfolio_len; + struct stock_t *portfolio; }; |