[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Clipboard



Hello!

You mean char *scrap_rtxt(char *buf, long *len, long maxlen)?

Besides I can't get a call to scrap_rtxt to compile :

     long filelength;
     long maxlength = 65535;
     char *buf = NULL;
     char *p = NULL;
     *p = scrap_rtxt (&buf, &filelength, maxlength);

This is totally wrong anyway as you need to pass a valid buffer and not a pointer to a pointer:

long filelength;
long maxlength = 65535;
char *buf = malloc(maxlength);

if (buf)
{
	char *p = scrap_rtxt(buf, &filelength, maxlength);

	if (p)
	{
		/* found something */
	}

	free(buf);
}
else
{
	/* out of memory */
}


Regards,
Frank

--
ATARI FALCON 060 // MILAN 060
-----------------------------
http://sparemint.org/
e-Mail: fnaumann@boerde.de