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 void set_target ( const char target) [static]

Definition at line 246 of file widl.c.

Referenced by main().

{
    static const struct
    {
        const char *name;
        syskind_t   kind;
    } cpu_names[] =
    {
        { "i386",    SYS_WIN32 },
        { "i486",    SYS_WIN32 },
        { "i586",    SYS_WIN32 },
        { "i686",    SYS_WIN32 },
        { "i786",    SYS_WIN32 },
        { "amd64",   SYS_WIN64 },
        { "x86_64",  SYS_WIN64 },
        { "sparc",   SYS_WIN32 },
        { "alpha",   SYS_WIN32 },
        { "powerpc", SYS_WIN32 },
        { "arm",     SYS_WIN32 }
    };

    unsigned int i;
    char *p, *spec = xstrdup( target );

    /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */

    if (!(p = strchr( spec, '-' ))) error( "Invalid target specification '%s'\n", target );
    *p++ = 0;
    for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++)
    {
        if (!strcmp( cpu_names[i].name, spec ))
        {
            typelib_kind = cpu_names[i].kind;
            free( spec );
            return;
        }
    }
    error( "Unrecognized CPU '%s'\n", spec );
}

Generated on Sat May 26 2012 06:08:44 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.