@@ -4,9 +4,9 @@ * * ord has no dependencies except for libc. * ? ord converts integers to ascii characters * and back. written because the only fucking * way to do this in shell is FUCKING PRINTF. - * $ cc ord.c -o ord [-D_IO=(LIBC|POSIX)] + * $ cc ord.c -o ord [-D_(POSIX|LIBC)_IO] * - the flag D_IO will instruct ord.c whether * to use POSIX io primitives (write and read) * instead of libc primitives (printf). if * you're on a UNIX system, POSIX primitives @@ -19,9 +19,9 @@ TODO: take full advantage of write(2) by storing output in single string & making single write call */ -#if (defined(__unix__) && _IO != LIBC) || (_IO == POSIX) +#if (defined(__unix__) && !defined(_POSIX_IO)) && !defined(_LIBC_IO) # define _POSIX_IO #endif #ifdef _POSIX_IO @@ -32,9 +32,9 @@ # define forlibc(x) #else # include # define say(x) (fprintf(stderr, (x))) -# define print(x) (printf("%s",(x))) +# define print(sz,x) (printf("%s",(x))) # define forposix(x) # define forlibc(x) x #endif #include