🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cu.slug
Article #141

Re: X-Server Background Stream.

#141
From: 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
Technical Details
Message-ID: <928685844.12706@news.Colorado.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10077e,a1b4ead7832721de
X-Google-Attributes: gid10077e,public
From: dworkin@village.org
Subject: Re: X-Server Background Stream.
Date: 1999/06/06
Message-ID: <928685844.12706@news.Colorado.EDU>
X-Deja-AN: 486348227
Distribution: cu
Sender: daemon@peabody.colorado.edu
X-Note1: message-id generated by recnews
X-Note2: mail msgid was   <199906061605.KAA05292@fountain.village.org>
Organization: University of Colorado at Boulder
Newsgroups: cu.slug
NNTP-Posting-User: daemon