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

void wpp_add_include_path ( const char path)

Definition at line 459 of file preproc.c.

{
    char *tok;
    char *cpy = pp_xstrdup(path);
    if(!cpy)
        return 1;

    tok = strtok(cpy, INCLUDESEPARATOR);
    while(tok)
    {
        if(*tok) {
            char *dir;
            char *cptr;
            char **new_path;

            dir = pp_xstrdup(tok);
            if(!dir)
            {
                free(cpy);
                return 1;
            }
            for(cptr = dir; *cptr; cptr++)
            {
                /* Convert to forward slash */
                if(*cptr == '\\')
                    *cptr = '/';
            }
            /* Kill eventual trailing '/' */
            if(*(cptr = dir + strlen(dir)-1) == '/')
                *cptr = '\0';

            /* Add to list */
            new_path = pp_xrealloc(includepath, (nincludepath+1) * sizeof(*includepath));
            if(!new_path)
            {
                free(dir);
                free(cpy);
                return 1;
            }
            includepath = new_path;
            includepath[nincludepath] = dir;
            nincludepath++;
        }
        tok = strtok(NULL, INCLUDESEPARATOR);
    }
    free(cpy);
    return 0;
}

Generated on Sat May 26 2012 05:35:16 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.