|
|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1415 (0x587)
Types: TextFile
Notes: UNIX file
Names: »jl18.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
└─⟦2d53db1df⟧ UNIX Filesystem
└─⟦this⟧ »hr/src/jlib/jl18.c«
#include <jlib.h>
extern int myfd;
extern struct jqueue sendq,
runq,
s_replyq;
static struct jqueue wingrq;
static int l_wingrq;
int G_SetGraph(wid, g, gflags)
int wid;
GRAPH *g;
unsigned gflags;
{
static GRAPH graph;
S_wingrq();
graph = *g;
MsgReceiver = SMGR;
MsgCmd = SM_SETGRAPH;
MsgWid = wid;
MsgBytL0 = gflags;
MsgPtr = (char *)&graph;
sendmess( );
jdoze(&s_replyq);
Msg = runq.jq_head->j_m;
S_fwingrq();
if ( MsgWid != wid )
warn("Bad wid from SM_SetGraph %d, %d\n", MsgWid, wid);
if ( MsgPtr != (char *) &graph )
warn("Bad ptr from SM_SetGraph\n");
return(0);
}
int G_GetGraph(wid, g)
int wid;
GRAPH *g;
{
struct xfer xfer;
S_wingrq();
MsgReceiver = SMGR;
MsgCmd = SM_GETGRAPH;
MsgWid = wid;
sendmess( );
jdoze(&s_replyq);
Msg = runq.jq_head->j_m;
if ( MsgCmd != WM_REPLY )
warn("Bad reply from SM_GetGraph\n");
if ( MsgWid != wid )
warn("Bad wid from SM_GetGraph\n");
if ( MsgBytL0 != sizeof(GRAPH) )
warn("Bad count from SM_GetGraph\n");
xfer.x_count = sizeof(GRAPH);
xfer.x_src = SMGR;
xfer.x_dstp = (char *) g;
xfer.x_srcp = (char *) MsgPtr;
ioctl(myfd, CIOGETD, &xfer);
return(0);
}
int G_RstGraph(wid)
int wid;
{
MsgReceiver = SMGR;
MsgCmd = SM_RSTGRAPH;
MsgWid = wid;
sendmess( );
return(0);
}
static
S_wingrq()
{
if ( l_wingrq )
jdoze( &wingrq );
l_wingrq = 1;
}
static
S_fwingrq()
{
l_wingrq = 0;
jalert( &wingrq );
}