Path: utzoo!bnr-vpa!bnr-fos!bmerh202!klash From: klash@bmerh202.UUCP (Karl Klashinsky) Newsgroups: comp.lang.c Subject: Re: Silly C code ? Keywords: silly C Message-ID: <573@bnr-fos.UUCP> Date: 12 Jun 89 01:48:03 GMT References: <4530@ncrcae.Columbia.NCR.COM> <121@tridom.uucp> <10328@socslgw.csl.sony.JUNET> Sender: news@bnr-fos.UUCP Reply-To: klash@hobbes.UUCP (Karl Klashinsky) Organization: Bell-Northern Research Ltd, Ottawa, Canada Lines: 46 This is a humourous program to run through lint -- a friend gave it to me, I don't know where she got it, but someone seems to be getting credit for it. PS: The version of lint on my HP 9000/360 doesn't do this program justice, but the Sun version of lint does (or did -- Sun 3.5). ---8<--------------- /* human.c -- run lint on this file. (Stolen from Gary Perlman, Wang Institute ) */ #define morals Y #define morals Z extern float allegiance; int principles (); main () { char *principles (); psyche; human (); bowels (); conscience (); moral_sense (); religion (principles ()); marriage (allegiance); } extern float allegiance; human () { int appendix; struct brain {short intelligence; long pride;} brain; marriage (allegiance,principles(),allegiance); return; religion (brain); happiness (); } bowels () { return (1); } conscience () { return (0); } common_sense () { exit (moral_sense ()); } moral_sense () { return (1); } double entendre () {return (entendre ());} religion (based_on_data) {int devil;} Karl Klashinsky "I shall endeavour to Bell-Northern Research, Ltd. function adequately." utgpu!bnr-vpa!bnr-fos!hobbes!klash Lt. Data