Article View: comp.sys.amiga.tech
Article #10433Re: problems with forkv (lattice)
From: Chuck McManis
Date: Tue, 29 Nov 1988 17:40
Date: Tue, 29 Nov 1988 17:40
48 lines
1965 bytes
1965 bytes
In article <AXYMTny00Uka0DRGpH@andrew.cmu.edu> (Miles Bader) writes:
>So my question (why doesn't forkv work?) still stands...
>-Miles
The following source (which is from my Life program) works fine :
/*
* Function NewColors()
*
* Using Carolyn's Pallette requester this lets the user change the colors
* around, later you can save them with the Save Defaults menu option.
*
* The interesting thing about this routine is that it uses a separate
* program (Palette) to set the colors on the screen. It uses the Lattice
* routine forkv() to start it up, the program itself opens a window on
* the frontmost screen (the life screen) and lets the user twiddle the
* colors. Note that I do not go back to the main event loop so you can't
* continue to add cells etc.
*/
static char *palette_argv[] = {"Palette", NULL}; /* Program's argv[] */
NewColors(opt, f)
int opt;
{
struct ProcID child;
ULONG l;
l = Lock("Palette", ACCESS_READ);
if (l)
{
/* default environment */
forkv(palette_argv[0], palette_argv, NULL, &child);
if (wait(&child))
DisplayBeep(MyScreen); /* if they click
'cancel' */
UnLock(l);
} else {
ShowWarning("Couldn't find the Palette program.", "OK", NULL);
}
return (TRUE);
}
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
Technical Details
Message-ID:
<79233@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!decwrl!sun!pepper!cmcmanisReferences:
<wXY38Sy00Uka8=Ac5B@andrew.cmu.edu> <167@fishpond.UUCP> <AXYMTny00Uka0DRGpH@andrew.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!decwrl!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: problems with forkv (lattice) Message-ID: <79233@sun.uucp> Date: 29 Nov 88 17:40:47 GMT References: <wXY38Sy00Uka8=Ac5B@andrew.cmu.edu> <167@fishpond.UUCP> <AXYMTny00Uka0DRGpH@andrew.cmu.edu> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 48