🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by dworkin Sun, 06 Jun 1999 00:00
Re: X-Server Background Stream.
#141
Author: dworkin
Date: Sun, 06 Jun 1999 00:00
72 lines
2855 bytes
cbarry@2xtreme.net (Christopher R. Barry) wrote:
:  To recap; the error is that function X-SERVER:|bzero| is undefined. I
:  decided to see if I could locate the definition and compile/load it
:  manually. I searched all files in CDROM0:>SYS>X11>**>*.*;NEWEST for
:  the string "bzero" and got a number of calls to it in C code but no
:  function definition. The last match returned was:

Well, bzero, bcopy, and bcmp are expected to be provided by the host
system.  If you don't have one, I suspect you don't have any.  Here
are thumbnail versions, not particularly optimized for anything:

void bzero(void *b, size_t len)
{
	unsigned char *t = (unsigned char *)b;

	do {
		t[--len] = '\0';
	} while (len != 0);
}

/* Copies src to dst, taking overlap into account */
void bcopy(const void *src, void *dst, size_t len)
{
	unsigned char *csrc = (unsigned char *)src;
	unsigned char *cdst = (unsigned char *)dst;

	if (src > dst) {
		do {
			len--;
			cdst[len] = csrc[len];
		} while (len != 0);
	} else {
		size_t count;
		for (count = 0; count < len; count++) {
			cdst[count] = csrc[count];
		}
	}
}

/* Compares len bytes starting at b1 to the len bytes starting at b2.
 * Returns < 0 for b1 < b2, == 0 for b1 == b2, and > 0 for b1 > b2.
 */
int bcmp(const void *b1, const void *b2, size_t len)
{
	unsigned char *left = (unsigned char *)b1;
	unsigned char *right = (unsigned char *)b2;
	int retval;
	size_t count;

	for (count = 0; count < len; count++) {
		retval = *left - *right;
		if (retval != 0)
			return (retval);
	}

	return 0;
}

:  I'm not sure how to proceed. I tried Compile System X Server but there
:  were compile errors that begat compile errors and it looks like I'll
:  have to learn a good bit more about the environment and tools before I
:  can do compiles of large software systems. If it turns out that some
:  source needed to do a full compile was accidentally or otherwise
:  omitted from the CD; I suppose I could grab an archived copy of X11R4
:  from the MIT ftp and see what I could do....

Bleah.  Not knowing anything about the C environment on a LispM, my
suggestion would be that, if there's a way to compile the above and
link it with what you've already got, that'd be the way to go.

	Dworkin
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads