/* * Routine to load program file pointed at by pfilespec, then create a * new process context for it. This is used to load a desk accessory. */ static void sndcli(BYTE *pfilespec) { WORD handle; WORD err_ret; LONG ldaddr, ret; KDEBUG(("sndcli(\"%s\")\n", (const char*)pfilespec)); strcpy(D.s_cmd, pfilespec); ret = dos_open(D.s_cmd, ROPEN); if (ret >= 0L) { handle = (WORD)ret; err_ret = pgmld(handle, D.s_cmd, (LONG **)&ldaddr); dos_close(handle); /* create process to execute it */ if (err_ret != -1) pstart(gotopgm, pfilespec, ldaddr); } }
static void sndcli(BYTE *pfilespec) { register WORD handle; WORD err_ret; LONG ldaddr; #if DBG_GEMINIT kprintf("sndcli(\"%s\")\n", (const char*)pfilespec); #endif strcpy(&D.s_cmd[0], pfilespec); handle = dos_open(D.s_cmd, ROPEN); if (!DOS_ERR) { err_ret = pgmld(handle, &D.s_cmd[0], (LONG **)&ldaddr); dos_close(handle); /* create process to */ /* execute it */ if (err_ret != -1) pstart(gotopgm, pfilespec, ldaddr); } }