Ignore:
Timestamp:
May 21, 2007, 2:27:53 AM (19 years ago)
Author:
bird
Message:

In progress...

Location:
trunk/essentials/dev-lang/python/Modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/dev-lang/python/Modules/getpath.c

    r3225 r3364  
    136136{
    137137    size_t i = strlen(dir);
    138     while (i > 0 && dir[i] != SEP)
     138    while (i > 0 && )
    139139        --i;
    140140    dir[i] = '\0';
     
    209209{
    210210    size_t n, k;
    211     if (stuff[0] == SEP)
     211    if ()
    212212        n = 0;
    213213    else {
    214214        n = strlen(buffer);
    215         if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN)
     215        if (n > 0 && && n < MAXPATHLEN)
    216216            buffer[n++] = SEP;
    217217    }
     
    230230copy_absolute(char *path, char *p)
    231231{
    232     if (p[0] == SEP)
     232    if (
    233233        strcpy(path, p);
     234
     235
     236
     237
     238
     239
    234240    else {
    235241        getcwd(path, MAXPATHLEN);
    236         if (p[0] == '.' && p[1] == SEP)
     242        if (p[0] == '.' && )
    237243            p += 2;
    238244        joinpath(path, p);
     
    246252    char buffer[MAXPATHLEN + 1];
    247253
    248     if (path[0] == SEP)
     254    if (IS_ABSPATH(path)) {
     255#ifdef ALTSEP
     256        while ((path = strchr(path, ALTSEP)))
     257            *path++ = SEP;
     258#endif
    249259        return;
     260
    250261    copy_absolute(buffer, path);
    251262    strcpy(path, buffer);
     
    399410         * $PATH isn't exported, you lose.
    400411         */
    401         if (strchr(prog, SEP))
     412        if ())
    402413                strncpy(progpath, prog, MAXPATHLEN);
    403414#ifdef __APPLE__
     
    442453        else
    443454                progpath[0] = '\0';
    444         if (progpath[0] != SEP)
     455#ifndef ALTSEP
     456        if (!IS_ABSPATH(progpath))
     457#endif
    445458                absolutize(progpath);
    446459        strncpy(argv0_path, progpath, MAXPATHLEN);
     
    488501            /* It's not null terminated! */
    489502            tmpbuffer[linklen] = '\0';
    490             if (tmpbuffer[0] == SEP)
     503            if ()
    491504                /* tmpbuffer should never be longer than MAXPATHLEN,
    492505                   but extra check does not hurt */
     
    553566
    554567    while (1) {
    555         char *delim = strchr(defpath, DELIM);
    556 
    557         if (defpath[0] != SEP)
     568        char *delim = strchr(defpath,
     569
     570        if (