Connecting Tech Pros Worldwide Help | Site Map

Re: printf

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 5th, 2008, 01:15 AM
Andrew Poelstra
Guest
 
Posts: n/a
Default Re: printf

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.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.