summaryrefslogtreecommitdiffstats
path: root/hw3/xwrap.h
blob: f02867f9def5fb87c3064e12f102f1f505b538e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef X_GENERAL_WRAPPER
#define X_GENERAL_WRAPPER

#include <stddef.h>

#define STATIC_STRLEN(x) (sizeof(x)/sizeof(char) - 1)
#define ARRAY_LEN(x,t)   (sizeof(x)/sizeof(t))

int     xatol (const char* str, long* result);
void*   xmalloc (size_t size);

#endif /* X_GENERAL_WRAPPER */