Changeset 1545 for trunk/dll/arccnrs.c


Ignore:
Timestamp:
Oct 24, 2010, 12:00:47 AM (15 years ago)
Author:
Gregg Young
Message:

Added ForwardslashToBackslash function to streamline code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1544 r1545  
    8383  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    8484  15 Apr 10 JBS Ticket 422: Stop hang when open archive gets deleted or moved
     85  23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code
    8586
    8687***********************************************************************/
     
    16241625            memmove(s, p + 1, strlen(p + 1));
    16251626        }
    1626         sprintf(WaitChild->filename, "%s\\%s", dcd->workdir, s);
    1627         p = WaitChild->filename;
    1628         while (*p) {
    1629           if (*p == '/')
    1630             *p = '\\';
    1631           p++;
    1632         }
     1627        sprintf(WaitChild->filename, "%s\\%s", dcd->workdir, s);
     1628        ForwardslashToBackslash(WaitChild->filename);
    16331629        free(s);
    16341630        WaitChild->RunFlags = SEPARATE | ASYNCHRONOUS | WAIT |
     
    19231919                CHAR *temp, *p;
    19241920
    1925                 temp = li->list[x];
    1926                 p = temp;
    1927                 while (*p) {
    1928                   if (*p == '/')
    1929                     *p = '\\';
    1930                   p++;
    1931                 }
     1921                temp = li->list[x];
     1922                ForwardslashToBackslash(temp);
    19321923                p = xmalloc(strlen(temp) + strlen(li->targetpath) + 2,
    19331924                            pszSrcFile, __LINE__);
     
    21612152            CHAR **list2 = NULL, fullname[CCHMAXPATH * 2], *p;
    21622153
    2163             for (x = 0; li->list[x]; x++) {
    2164               p = li->list[x];
    2165               while (*p) {
    2166                 if (*p == '/')
    2167                   *p = '\\';
    2168                 p++;
    2169               }
     2154            for (x = 0; li->list[x]; x++) {
     2155              ForwardslashToBackslash(li->list[x]);
    21702156              BldFullPathName(fullname, dcd->directory, li->list[x]);
    21712157              if (IsFile(fullname) != -1)
     
    36223608                         FIL_QUERYFULLNAME, fullname, sizeof(fullname)))
    36233609      strcpy(fullname, arcname);
    3624     p = fullname;
    3625     while (*p) {
    3626       if (*p == '/')
    3627         *p = '\\';
    3628       p++;
    3629     }
     3610    ForwardslashToBackslash(fullname);
    36303611    if (!info)
    36313612      info = find_type(fullname, arcsighead);
Note: See TracChangeset for help on using the changeset viewer.