Changeset 888 for trunk/dll/misc.c


Ignore:
Timestamp:
Dec 22, 2007, 11:02:11 PM (18 years ago)
Author:
Gregg Young
Message:

runemf2 now quotes executable strings if needed (Ticket 180); it also reports where it was called from on errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/misc.c

    r882 r888  
    913913    }
    914914    fclose(fp);
    915     ret = runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, NULL, NULL,
     915    ret = runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__,
     916                  NULL, NULL,
    916917                  "VIEW.EXE \"%s\"", filename);
    917918  }
     
    945946  *cl = 0;
    946947  BldQuotedFileName(cl, filename);
    947   // *cl = 0;
    948   // if (needs_quoting(filename))
    949   //   strcat(cl, "\"");
    950   // strcat(cl, filename);
    951   // if (needs_quoting(filename))
    952   //   strcat(cl, "\"");
    953948  memset(&ex, 0, sizeof(ex));
    954949  ex.flags = lastflags;
     
    960955  if (ret == 1) {
    961956    lastflags = ex.flags;
    962     return runemf2(ex.flags, hwnd, path,
     957    return runemf2(ex.flags, hwnd, pszSrcFile, __LINE__, path,
    963958                   *ex.environment ? ex.environment : NULL,
    964959                   "%s", cl) != -1;
     
    14851480      list[0] = filename;
    14861481      list[1] = NULL;
    1487       ExecOnList(hwnd, binview, WINDOWED | SEPARATE, NULL, list, NULL);
     1482      ExecOnList(hwnd, binview, WINDOWED | SEPARATE, NULL, list, NULL,
     1483                 pszSrcFile, __LINE__);
    14881484      return;
    14891485    }
     
    14961492      ExecOnList(hwnd, viewer,
    14971493                 WINDOWED | SEPARATE | (fViewChild ? CHILD : 0),
    1498                  NULL, list, NULL);
     1494                 NULL, list, NULL, pszSrcFile, __LINE__);
    14991495      return;
    15001496    }
     
    15121508      list[0] = filename;
    15131509      list[1] = NULL;
    1514       ExecOnList(hwnd, bined, WINDOWED | SEPARATE, NULL, list, NULL);
     1510      ExecOnList(hwnd, bined, WINDOWED | SEPARATE, NULL, list, NULL,
     1511                 pszSrcFile, __LINE__);
    15151512      return;
    15161513    }
     
    15211518      list[0] = filename;
    15221519      list[1] = NULL;
    1523       ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, list, NULL);
     1520      ExecOnList(hwnd, editor, WINDOWED | SEPARATE, NULL, list, NULL,
     1521                 pszSrcFile, __LINE__);
    15241522      return;
    15251523    }
Note: See TracChangeset for help on using the changeset viewer.