Changeset 1545 for trunk/dll/draglist.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/draglist.c

    r1533 r1545  
    2626                items from a pmmail mail message (PMERR_INVALID_PARAMETER)
    2727  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     28  23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code
    2829
    2930***********************************************************************/
     
    4950#include "wrappers.h"                   // xrealloc
    5051#include "fortify.h"
     52#include "pathutil.h"                   // ForwardslashToBackslash
    5153
    5254// Data definitions
     
    158160        !DosQueryPathInfo(filename, FIL_STANDARD, &fs3, sizeof(fs3))) {
    159161      strcpy(szDir, filename);
    160       p = szDir;
    161       while (*p) {
    162         if (*p == '/')
    163           *p = '\\';
    164         p++;
    165       }
     162      ForwardslashToBackslash(szDir);
    166163      p = strrchr(szDir, '\\');
    167164      if (p) {
     
    814811        pdinfoCurrent = pdinfoOld = DrgAllocDraginfo(1);
    815812      if (pdinfoCurrent) {
    816         strcpy(szDir, pci->pszFileName);
    817         p = szDir;
    818         while (*p) {
    819           if (*p == '/')
    820             *p = '\\';
    821           p++;
    822         }
     813        strcpy(szDir, pci->pszFileName);
     814        ForwardslashToBackslash(szDir);
    823815        p = strrchr(szDir, '\\');
    824816        if (p) {
Note: See TracChangeset for help on using the changeset viewer.