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

    r1544 r1545  
    3737  12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini
    3838  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     39  23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code
    3940
    4041***********************************************************************/
     
    10021003        ininame = INSTDATA(hwnd);
    10031004        if (ininame && *ininame) {
    1004           strcpy(filename, ininame);
    1005           p = filename;
    1006           while (*p) {
    1007             if (*p == '/')
    1008               *p = '\\';
    1009             p++;
    1010           }
     1005          strcpy(filename, ininame);
     1006          ForwardslashToBackslash(filename);
    10111007          p = strrchr(filename, '\\');
    10121008          if (p) {
     
    11111107        ininame = INSTDATA(hwnd);
    11121108        if (ininame && *ininame) {
    1113           strcpy(filename, ininame);
    1114           p = filename;
    1115           while (*p) {
    1116             if (*p == '/')
    1117               *p = '\\';
    1118             p++;
    1119           }
     1109          strcpy(filename, ininame);
     1110          ForwardslashToBackslash(filename);
    11201111          p = strrchr(filename, '\\');
    11211112          if (p) {
     
    25122503        // 09 Jan 08 SHL fixme to complain
    25132504        CHAR filename[CCHMAXPATH], *p;
    2514 
    2515         strcpy(filename, inidata->ininame);
    2516         p = filename;
    2517         while (*p) {
    2518           if (*p == '/')
    2519             *p = '\\';
    2520           p++;
    2521         }
     2505        strcpy(filename, inidata->ininame);
     2506        ForwardslashToBackslash(filename);
    25222507        p = strrchr(filename, '\\');
    25232508        if (p) {
     
    26542639        HINI hINI;
    26552640
    2656         strcpy(filename, inidata->ininame);
    2657         p = filename;
    2658         while (*p) {
    2659           if (*p == '/')
    2660             *p = '\\';
    2661           p++;
    2662         }
     2641        strcpy(filename, inidata->ininame);
     2642        ForwardslashToBackslash(filename);
    26632643        p = strrchr(filename, '\\');
    26642644        if (p) {
Note: See TracChangeset for help on using the changeset viewer.