far pointers

id for use with uunet/usenet jbayer at ispi.UUCP
Tue Oct 11 02:43:32 AEST 1988


I have a question regarding the usage of far pointers on Xenix (and
probable the available Unixs) on the 286 processer.  I have the following
problem which needs to be resolved:

struct abc far *alloc_abc()
{
	.
	.
		This allocates a block of memory which consists of
		of about 100 elements of the structure abc
		It then returns a far pointer to the block of memory
	.
	.
}


struct abc far *find_abc(ptr,x)
struct abc far *ptr;
int	x;
{
	.
	.
		This is supposed to return a pointer to the x(th) item in
		the list pointed to by ptr.  However, the following code:

	return (&ptr[x]);

		gives the following error

	warning 49: 'return' : indirection to different types.

	.
	.
}


My question is this:  Is this a problem, and if so, how do I return a 
far pointer to an array like this?

Please e-mail answers to me;  I will summarize all pertinant info to the
net.

Thank you

Jonathan Bayer
Intelligent Software Products, Inc.



More information about the Comp.unix.xenix mailing list