RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
FCEU Programmer Humor
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Fri Jun 05, 2009 9:47 am    Post subject: FCEU Programmer Humor [quote]

Okay, so if you send a SIGNAL to the fceu (a great cross-platform NES/Famicom Emulator) program while its running, you will get rather funny messages!

Code:

static void CloseStuff(int signum)
{
   DriverKill();
        printf("\nSignal %d has been caught and dealt with...\n",signum);
        switch(signum)
        {
         case SIGINT:printf("How DARE you interrupt me!\n");break;
         case SIGTERM:printf("MUST TERMINATE ALL HUMANS\n");break;
         case SIGHUP:printf("Reach out and hang-up on someone.\n");break;
         case SIGPIPE:printf("The pipe has broken!  Better watch out for floods...\n");break;
         case SIGSEGV:printf("Iyeeeeeeeee!!!  A segmentation fault has occurred.  Have a fluffy day.\n");break;
    /* So much SIGBUS evil. */
    #ifdef SIGBUS
    #if(SIGBUS!=SIGSEGV)
         case SIGBUS:printf("I told you to be nice to the driver.\n");break;
    #endif
    #endif
         case SIGFPE:printf("Those darn floating points.  Ne'er know when they'll bite!\n");break;
         case SIGALRM:printf("Don't throw your clock at the meowing cats!\n");break;
         case SIGABRT:printf("Abort, Retry, Ignore, Fail?\n");break;
         case SIGUSR1:
         case SIGUSR2:printf("Killing your processes is not nice.\n");break;
        }
        exit(1);
}


To test, I used the htop program on linux ..funny. truly funny.

I love when programmer's put these kind of things into their programs.

Reading source code for various programs will yield in some cool finds!
I challenge you to one-up this by finding a hidden gem (and showing the code that implements said gem) in a game, or application of your choosing. :D
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum