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

OPTIMIZED ENTERPRISE ANONIX

Name: Anonymous 2011-07-07 0:31

#ifndef OMG_OPTIMIZED_CTYPE_H_
#define OMG_OPTIMIZED_CTYPE_H_

/**
 *                        __ _   _  ____  _   _ _ _  _
 *                       /  |  \| |/ __ \|  \| | | \/ /
 *                      /   |   \ | |  | |   \ | |\  /
 *                     /  . | |\  | |__| | |\  | |/  \
 *                    /__/|_|_| \_|\____/|_| \_|_|_/\_\
 *       
 *                       OPTIMIZED ANONIX INTERFACES
 *
 *  -------------------------------------------------------------------------
 *
 *  Optimized branchless ctype facilities using bitwise operations. Assumes a
 *  fixed ASCII (ANSI_X3.110-1983) code page. Functions are ISO/IEC 9899:1999
 *  (C99) compliant. Requires an ISO/IEC 9899:1999 (C99) compliant compiler.
 * 
 *  Version: 1.666alpha
 *  Bug Reports: strawberryshake [at] 1337 [dot] jp
 */
 
inline int isblank(int c) { return (c == ' ') | (c == '\t') | (c == '\v'); }
inline int iscntrl(int c) { return (c <= 0x1F) | (c == 0x7F); }
inline int isdigit(int c) { return (((unsigned int)c) - ((unsigned int)'0')) <= ((unsigned int)('9' - '0')); }
inline int isgraph(int c) { return (((unsigned int)c) - ((unsigned int)'!')) <= ((unsigned int)('~' - '!')); }
inline int islower(int c) { return (((unsigned int)c) - ((unsigned int)'a')) <= ((unsigned int)('z' - 'a')); }
inline int isprint(int c) { return (((unsigned int)c) - ((unsigned int)' ')) <= ((unsigned int)('~' - ' ')); }
inline int isupper(int c) { return (((unsigned int)c) - ((unsigned int)'A')) <= ((unsigned int)('Z' - 'A')); }
inline int isalpha(int c) { return ::hrc::islower(c) | ::hrc::isupper(c); }
inline int isalnum(int c) { return ::hrc::islower(c) | ::hrc::isupper(c) | ::hrc::isdigit(c); }
inline int ispunct(int c) { return ~(::hrc::islower(c) | ::hrc::isupper(c) | ::hrc::isdigit(c)); }
inline int isspace(int c) { return ::hrc::isblank(c) | (c == '\f') | (c == '\n') | (c == '\r'); }

inline int isxdigit(int c) {
    return ::hrc::isdigit(c) |
        ((((unsigned int)c) - ((unsigned int)'a')) <= ((unsigned int)('f' - 'a'))) |
        ((((unsigned int)c) - ((unsigned int)'A')) <= ((unsigned int)('F' - 'A')));
}

inline int tolower(int c) {
    unsigned int upper = (unsigned int)::hrc::isupper(c);
    return (int)((((~upper) + 1) & ((unsigned int)(c - 'A' + 'a'))) | ((~(upper - 1)) & ((unsigned int)c)));
}

inline int toupper(int c) {
    unsigned int lower = (unsigned int)::hrc::islower(c);
    return (int)((((~lower) + 1) & ((unsigned int)(c - 'a' + 'A'))) | ((~(lower - 1)) & ((unsigned int)c)));
}

#endif

Name: Anonymous 2011-07-07 8:43

>>17
Not really. Kinect sold a lot of units but not a lot of software. Besides the pack-in game and that dancing game what sold a lot? What is the killer app for the system? And I doubt it's that atrocious Star Wars game that they showed at E3. The Wii is successful because the motion controls work reasonably well in some games and you can still have traditional games with the control scheme like the 3 Mario games on the system for example. For Kinect it seems like it's only some cool tech demos done by hobbyists and shitty games.

And I don't have a lot of faith in that Xbox 360 emulator they're allegedly working on seeing how half-assed the Xbox emulator on the 360 is. I want my Jet Set Radio Future at a constant 60 FPS DAMN IT!

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