ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static int getbyte ( const char str) [static]

Definition at line 113 of file tmapldr.cpp.

Referenced by Fix_Tok(), and TMapLoader::LoadCharMap().

                                   {
    unsigned char retval = 0;
    int base = 10;
    int readed = 0;

    if ( (*str == 'x') || (*str == 'X') ) {
        base = 16;
        readed++;
    };

    while (readed != 3 && str[readed]) {
        unsigned char ch = toupper(str[readed]);
        if ( isdigit(ch) ) {
            retval = retval*base + (ch -'0');
        } else if (base == 16 && ch >= 'A' && ch <= 'F') {
            retval = retval*base + (ch-'A'+10);
        } else {
            return -1;
        };
        readed++;
    };
    // Ioannou: If we discard the 0x00 we can't undefine a key !!!
    //  if ( retval == 0 ) {
    //     return -1;
    //  };
    return retval;
};

Generated on Sat May 26 2012 04:41:34 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.