Miata Mailing List: June 1994, Message #184

sponsored by

[previous topic]           [index] [next] [next topic]


From: Jonathan Webb Subject: code Date: Thu, 9 Jun 1994 05:42:08 -0400
Dear all, sorry to introduce computers into this mailing list, but here's a program I knocked out the other day whilst I was daydreaming. It probably needs a little polish and tidying up and it needs linking against a few libraries.... - Jonathan --------- cut here ----------------------------- /* generic miata driving program */ #include #include #include #include #ifdef NEVER #include #include #endif #ifdef LUCKY #include #include #include #include #endif unsigned char day; #define D_MON 0x00 #define D_TUE 0x01 #define D_WED 0x02 #define D_THU 0x03 #define D_FRI 0x04 #define D_SAT 0x05 #define D_SUN 0x06 unsigned char day_type; #define DT_SLEET_SNOW 0x00 #define DT_RAIN 0x01 #define DT_DRIZZLE 0x02 #define DT_OVERCAST 0x03 #define DT_SUN 0x04 main() { if(day_type > DT_RAIN ){ hood_down(); big_grin(); stereo_on(volume); warm_engine(); play(); } else{ wish(W_SUNNY_DAY); stereo_on(volume); warm_engine(); play(); } put_to_bed(BABY); } play() { if(day <= D_FRI){ wish(W_WEEKEND); drive_to_work(); route(TUNNEL); route(TWISTY_ROAD); arrive_late(WHAT_THE_HELL); discuss(MIATA_VS_PORCHE); } else { /* weekend !!!!! */ switch(day_type){ case DT_SLEET_SNOW: find_empty_carpark(); tail_slide(LOTS); break; case DT_RAIN: case DT_DRIZZLE: wish(W_SUNNY_DAY); wish(SUPERCHARGER); wish(YOKOS); wish(NO_SQUEAKS); wish(MONSTER_MIATA); wish(BRG); drink(COFFEE); break; case DT_OVERCAST: clean(POLISH_BABY); wish(W_SUNNY_DAY); drink(COFFEE); /* no break intentional */ case DT_SUN: just_drive(ANYWHERE); care(NOT_A); while(GAS_IN_TANK){ route(TUNNEL); change_down(FOR_NOISE); route(TWISTY_ROAD); change_down(FOR_ACCN); route(FAST_ROAD); change_down(FOR_FUN); route(SCENIC_ROAD); change_down(FOR_SNICKY_GEARCHANGE); holler(YEEE_HAAA); if(see_miata()){ wave(); flash(); big_grin(); } } if(NUTTER) go_race(AUTOCROSS); be_glad(YOU_HAVE_ONE); break; } } }

[previous topic]           [index] [next] [next topic]