From mint-bounce@lists.fishpool.fi  Thu Aug 20 02:15:23 2009
Date: Thu, 20 Aug 2009 08:08:06 +0200 (CEST)
From: Frank Naumann <fnaumann@boerde.de>
X-X-Sender: fnaumann@localhost
To: Peter Slegg <p.slegg@scubadivers.co.uk>
Cc: mint@fishpool.com
Subject: Re: [MiNT] Clipboard
In-Reply-To: <00239611.01b456d6333e@smtp.freeola.net>
Message-ID: <alpine.LFD.2.00.0908200803550.15508@localhost>
References: <200908192024.p37696@b.maus.de> <00239611.01b456d6333e@smtp.freeola.net>
User-Agent: Alpine 2.00 (LFD 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Virus-Scanned: by amavisd-new at relay.boerde.de
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de
X-Spam-Status: No, hits=- tagged_above=-50.5 required=7.0 WHITELISTED 
X-Spam-Level: 
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: fnaumann@boerde.de
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>

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


