Changeset 632 for trunk/dll/systemf.c


Ignore:
Timestamp:
Apr 23, 2007, 1:01:43 AM (18 years ago)
Author:
Gregg Young
Message:

Move RunFM2Util from systemf.c to srchpath.c added error includes and header to srchpath.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/systemf.c

    r630 r632  
    4040static PSZ pszSrcFile = __FILE__;
    4141
    42 #pragma alloc_text(SYSTEMF,ShowSession,ExecOnList,runemf2,RunFM2Util)
     42#pragma alloc_text(SYSTEMF,ShowSession,ExecOnList,runemf2)
    4343
    4444#define MAXSTRG (4096)                  /* used to build command line strings */
    45 
    46 //== RunFM2Util() Find and run an app from the FM2utilities ==
    47 //== Search PATH plus 2 default install dirs ==
    48 
    49 INT RunFM2Util(CHAR *appname, CHAR *filename)
    50 {
    51     CHAR fbuf[CCHMAXPATH];
    52     APIRET rc, ret = -1;
    53 
    54     rc = DosSearchPath(SEARCH_IGNORENETERRS |SEARCH_ENVIRONMENT |
    55                        SEARCH_CUR_DIRECTORY,"PATH",
    56                        appname, fbuf, CCHMAXPATH - 1);
    57       if (rc != 0) {
    58         if (rc != 2){
    59         Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    60                   "DosSearchPath", appname);
    61         return ret;
    62         }
    63         else {
    64         rc = DosSearchPath(0, "UTILS;..\\FM2Utils",
    65                            appname, fbuf, CCHMAXPATH - 1);
    66             if (rc != 0 && rc != 2){
    67               Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    68                         "DosSearchPath", appname);
    69               return ret;
    70             }
    71       }
    72     }
    73     ret = runemf2(SEPARATE | WINDOWED,
    74                   HWND_DESKTOP,
    75                   NULL,
    76                   NULL,
    77                   "%s \"%s\"",
    78                   fbuf, filename);
    79     return ret;
    80 }
    8145
    8246//== ShowSession() bring session for foreground ==
Note: See TracChangeset for help on using the changeset viewer.