Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

More Anonix Win

Name: Anonymous 2011-08-07 15:31

BEHOLD!



#ifndef __ANONIXWIN_H__
#define __ANONIXWIN_H__

/* Anonix.h - A set of common functions for the Anonix operating system. Copyright: none. Public Domain. Written by Anonymous. United by one. Divided by zero. We do not forgive nor forget. Expect us. */

const int ZERO = 0;

int isequalto(int x,int y){return x==y;}
int isnotequalto(int x,int y){return !isequalto(x, y);}
int islessthan(int x,int y){return x<y;}
int islessthanorequalto(int x,int y){return islessthan(x, y) || isequalto(x, y);}
int isgreaterthan(int x,int y){return x>y;}
int isgreaterthanorequalto(int x,int y){return isgreaterthan(x, y) || isequalto(x, y);}
int isnegative(int x){return islessthan(x, ZERO);}
int ispositive(int x){return isgreaterthanorequalto(x, ZERO);}
int iszero(int x){return isequalto(x, ZERO);}
int isnotzero(int x){return isnotequalto(x, ZERO);}
int dividebyzero(int x){return x/ZERO;}

#endif

Name: Anonymous 2011-08-07 15:47

>>2
Thanks anon.

#ifndef BOOLS_H
#define BOOLS_H
#define ZERO 0
/* ANONIX.H - version 1.01 - A set of common functions for the Anonix operating system. Copyright: none. Public Domain. Written by Anonymous. United by one. Divided by zero. We do not forgive nor forget. Expect us. CHANGELOG: deleted excessive whitespace, one of the known leading causes of bloat in the GNU coreutils. Removed symbols starting with __ which are reserved for implementations. Made functions inline. The functions are now useful and productive. The last four sentences
 * in the comments are no longer silly. */
inline int isequalto(int x,int y){return x==y;}
inline int isnotequalto(int x,int y){return !isequalto(x,y);}
inline int islessthan(int x,int y){return x<y;}
inline int islessthanorequalto(int x,int y){return islessthan(x,y)||isequalto(x,y);}
inline int isgreaterthan(int x,int y){return x>y;}
inline int isgreaterthanorequalto(int x,int y){return isgreaterthan(x,y)||isequalto(x,y);}
inline int isnegative(int x){return islessthan(x,ZERO);}
inline int ispositive(int x){return isgreaterthanorequalto(x,ZERO);}
inline int iszero(int x){return isequalto(x,ZERO);}
inline int isnotzero(int x){return isnotequalto(x,ZERO);}
inline int dividebyzero(int x){const int Z=ZERO;return x/Z;}
#endif

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List