X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=rln.h;h=cec6409b2096ed07f97e6316157926d23963bcdb;hb=6d62efb30e15070d75d110e7dbeb82e79bbfd170;hp=3d379c7acee1e26c3cf41df9c8ea6f91b6cab951;hpb=7748e5d5171798fdf89f9c4e0a545d80bcc70b85;p=rln diff --git a/rln.h b/rln.h index 3d379c7..cec6409 100644 --- a/rln.h +++ b/rln.h @@ -16,7 +16,7 @@ #ifdef WIN32 //#define _OPEN_FLAGS _O_BINARY|_O_RDWR #define _OPEN_FLAGS _O_BINARY|_O_RDONLY -#define _BACKSLASH '\\' +#define PATH_DELIMITER '\\' #ifdef _MSC_VER #if _MSC_VER > 1000 #pragma warning(disable:4996) @@ -38,7 +38,7 @@ #ifdef __GCCUNIX__ //#define _OPEN_FLAGS O_RDWR #define _OPEN_FLAGS O_RDONLY -#define _BACKSLASH '/' +#define PATH_DELIMITER '/' #include #include #include @@ -68,9 +68,9 @@ #define warn(x, f) printf("Warning: repeated flag `%c'%s\n", x, f ? "; previous one(s) ignored." : ".") // Macro for max: good because longs, shorts, or pointers can be compared -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif // max +#ifndef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif // Macro to swap the 16-bit words of a 32-bit integer #define _SWAPWORD(x) (((unsigned)(x) >> 16) | ((unsigned)(x) << 16)) @@ -254,9 +254,9 @@ complete, total, and utter failure. :-) // This macro is used to compare two symbols for equality. It depends on // symcopy remaining as it is (copies two longs plus a null) -//#define symcmp(a,b) ((*(uint32_t *)(a) == *(uint32_t *)(b)) && \ -// (*(uint32_t *)((a) + sizeof(uint32_t)) == \ -// *(uint32_t *)((b) + sizeof(uint32_t)))) +//#define symcmp(a,b) ((*(long *)(a) == *(long *)(b)) && \ +// (*(long *)((a) + sizeof(long)) == \ +// *(long *)((b) + sizeof(long)))) // Function Prototypes