home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
database
/
ezhelp14.arj
/
SPAWNHLP.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-02-01
|
1KB
|
60 lines
/* ======================================================================== */
/* FILE: SPAWNHLP.C */
#include <process.h>
#include <stdio.h>
#include <stdlib.h>
/* ======================================================================== */
/* FUNCTION: SpawnHelp
**
** This function can be linked into C programs and called to
** spawn the EZhelp Reference system.
**
** Parameters: iMenu - Menu to start EZhelp
** iHelp - Topic to jump directly into
** (or 0 to show the menu)
** fAuto - TRUE if automatic window sizing
** should be performed, FALSE otherwise
** fDisp - TRUE if errors should be displayed,
** FALSE otherwise
** fLoc - help window anchor (1 - 9)
**
**
**
** Returns: The result of the spawnv() call.
**
*/
/* int
SpawnHelp(int iMenu, int iHelp, int Auto,
int fDisp, int fLoc) { */
int
SpawnHelp(int iMenu, int iHelp) {
int iSize;
char *pArg;
char *path = "EZHELP.EXE";
char *args[] = { "EZHELP.EXE",
"EZSETUP.TXT",
"-M ",
"-J ",
0 };
pArg = args[2];
pArg += 2;
iSize = iMenu < 10 ? 1 : 2;
sprintf(pArg,"%*d", iSize, iMenu);
pArg = args[3];
pArg += 2;
iSize = iHelp < 10 ? 1 : 2;
sprintf(pArg,"%*d", iSize, iHelp);
return(spawnvp(P_WAIT, path, args));
}