From b4c20b3cc1f5429650f79a6fd95b5e3d5bc4d4e5 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Mon, 11 May 2015 18:40:30 -0400 Subject: lots of stuff, buying mostly works --- src/globals.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/globals.h') 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 +#include #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; }; -- cgit v1.1