Article View: alt.folklore.computers
Article #5142Re: Ugly source contest
From: etx... Thomas Grennefors TXDKI
Date: Thu, 11 Oct 1990 15:28
Date: Thu, 11 Oct 1990 15:28
29 lines
1795 bytes
1795 bytes
>>>>> On 10 Oct 90 20:08:33 GMT, cev...@airgun.wg.waii.com (C C Evert) said:
C> In article <15...@yunexus.YorkU.CA>, rre...@yunexus.YorkU.CA (Richard Reiner) writes:
> We've had stupid program names, stupid programmers errors, and so on;
> now how about getting right down to basics: stupid programs. The
C> A friend showed me this gem:
< source deleted>
I found this masterpiece in a piece of code i was looking through yesterday.
system("printenv PRINTER > /tmp/caption.tmp");
in = fopen("/tmp/caption.tmp","r");
fgets(default_printer,30,in);
if(strlen(default_printer)>0)
strncpy(defpr,default_printer,
strlen(default_printer)-1);
else strcpy(defpr,"lw");
system("rm /tmp/caption.tmp");
and the rest of the code isn't in much better shape.
--
!Thomas Grennefors ! proud member off THHS krfc (tlps)
!Ericsson Telecom,Karlstad ! Three shalt be the number thou shalt count..
!Email:...@solsta.ericsson.se ! Armaments 2:9-21
-------------------------------------------------------------------------------
What do you mean? An African or European swallow?
Technical Details
Message-ID:
<ETXTSG.90Oct11162836@solsta-c6.solsta.ericsson.se>Path:
mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!sunic!ericom!solsta!etxtsgReferences:
<15827@yunexus.YorkU.CA> <892@airgun.wg.waii.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!sunic!ericom!solsta!etxtsg From: etx...@solsta.ericsson.se (Thomas Grennefors TX/DKI) Newsgroups: alt.folklore.computers Subject: Re: Ugly source contest Message-ID: <ETXTSG.90Oct11162836@solsta-c6.solsta.ericsson.se> Date: 11 Oct 90 15:28:36 GMT References: <15827@yunexus.YorkU.CA> <892@airgun.wg.waii.com> Sender: ne...@ericsson.se Distribution: alt Organization: Ericsson Telecom AB, Karlstad, Sweden. Lines: 29 Posted: Thu Oct 11 16:28:36 1990 In-Reply-To: cevert@airgun.wg.waii.com's message of 10 Oct 90 20:08:33 GMT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit