DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦022a3ff85⟧ TextFile

    Length: 986 (0x3da)
    Types: TextFile
    Notes: UNIX file
    Names: »jl11.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »hr/src/jlib/jl11.c« 

TextFile

#include	<jlib.h>

extern	int	myfd;
extern	struct	jqueue	sendq,
			runq,
			s_replyq;

int	S_OpenFont(wid, nlen, name)
int	wid;
int	nlen;
char	*name;
{
	MsgReceiver = SMGR;
	MsgCmd	  = SM_OPENFONT;
	MsgWid	  = wid;
	MsgBytL0  = nlen;
	MsgPtr	  = name;
	sendmess( );
	jdoze( &s_replyq );
	Msg = runq.jq_head->j_m;
	if ( MsgWid != wid )
		warn("Bad wid from S_OpenFont\n");
	return MsgData1;
}

int	S_CloseFont(wid, fid)
int	wid;
int	fid;
{
	MsgReceiver = SMGR;
	MsgCmd	  = SM_CLOSEFONT;
	MsgWid	  = wid;
	MsgData1  = fid;
	sendmess( );
	return(0);
}

int	S_GetFont(wid, fid, fdata)
int	wid;
int	fid;
GETPTR	*fdata;
{
	struct xfer	xfer;

	MsgReceiver = SMGR;
	MsgCmd	  = SM_GETFONTPARAM;
	MsgWid	  = wid;
	sendmess( );
	jdoze( &s_replyq );
	Msg = runq.jq_head->j_m;
	if ( MsgWid != wid )
		warn("Bad wid from S_OpenFont\n");

	xfer.x_count = sizeof( GETPTR );
	xfer.x_src = SMGR;
	xfer.x_srcp = (char *) MsgPtr;
	xfer.x_dstp = (char *) fdata;
	ioctl(myfd, CIOGETD, &xfer);
	return(0);
}