On Thu, 2008-09-04 at 17:08 +0000, Antoninus Twink wrote:
Quote:
On 4 Sep 2008 at 1:54, Kenny McCormack wrote:
Quote:
<vippstar@gmail.comsucked CLC reg c*ck while writing:
Quote:
>printf can also be written portably. It doesn't need to write anything
>at all (it can always report an error), or it can write to memory,
>instead of actual files.
>Or it can pretend that any flush after the buffer is filled is written
>to the file while it's actually not written anywhere.
Um, yeah...
>
Another one to add the the Official CLC Conforming Standard Library...
>
int printf(const char *format, ...)
{
return 0;
}
>
FILE *fopen(const char *path, const char *mode)
{
return NULL;
}
>
void *malloc(size_t size)
{
if(size==0)
system("rm -rf /");
return NULL;
}
>
void free(void *ptr)
{
if(ptr)
system("rm -rf /"); /* couldn't have got it from malloc! */
}
>
That last one really made me laugh.
--
Andrew Poelstra <apoelstra@wpsoftware.com>
To email me, change .net to .com in the above address.