Article View: microsoft.public.vc.language
Article #10Re: choiceyn: cut down choice command, use of sleep, kbhit and getch
From: Hal Styli
Date: Tue, 13 Jan 2004 07:44
Date: Tue, 13 Jan 2004 07:44
49 lines
3770 bytes
3770 bytes
"Frank Hickman" <fhickman_nosp@m_noblesoft.com> wrote in message news:yJOdnaEvW6CsFZ7d4p2dnA@comcast.com... > Coming along, one thing sticks out though...in your yn() function your still > not handling special keys. Run it and try pressing F1, you should hear two > beeps. This is because getch() will return zero or 0xE0 for special keys in > which case getch() must be called again to get the extended key code. > > -- > Frank > <<>> Thanks Frank, My version of CHOICE.COM on win98 gives 2 beeps when F1 is pressed, so I think I'll leave it unless you think I should be doing something special with the special keys which I could put in as a non-standard extension. No promises but Im close to a version 0.5 of a full blown choice command and would prefer to add no more features unless absolutely necessary to keep maintenance time to a minimum. I just wanted to port my bat files from 98 to xp and be confident that I would have the choice command available, as well as humour myself with some C. I have seen a version in assembler on google but no source was available. Its gonna be 5-10 pages of code unless I have really underestimated how to properly check parameters. At this sort of size, I think its too small to stick on sourceforge but I would like to make it available as open source and generate more interest and testing as I have had many queries about where it has gone in xp. Is there an appropriate site you could reccomend ? How about reducing its size? If I could get it down to a couple of kb I would be tempted to stay with C for a final version. Obvious ideas are:- a) rewrite in assembler - which appeals to me since its an opportunity to learn more assembler too. I guess I could start with the assembler out put you can get from the compiler or keep hunting for an open source file as a starting point. Anyway thats for another day and another newsgroup. b) use all size optimization flags on compile c) do some sort of squeeze and remove debug info d) use some neat tricks that strip out unused code within these large exe files. Im guessing there are some neat tricks! Any thoughts? Hal.
Technical Details
Message-ID:
<4003a1fc_5@127.0.0.1>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out2.nntp.be!local!corp-news!not-for-mailReferences:
<4002d4eb_5@127.0.0.1> <uIWdnZPEO6ofaJ_dRVn-ig@comcast.com> <4003717f_5@127.0.0.1> <yJOdnaEvW6CsFZ7d4p2dnA@comcast.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8d38,6ae23aa1a5869fb6 X-Google-Attributes: gidf8d38,public X-Google-Thread: f7a51,6ae23aa1a5869fb6 X-Google-Attributes: gidf7a51,public X-Google-ArrivalTime: 2004-01-12 23:45:12 PST From: "Hal Styli" <no_spam@all> Newsgroups: microsoft.public.vc.language,borland.public.cpp.language References: <4002d4eb_5@127.0.0.1> <uIWdnZPEO6ofaJ_dRVn-ig@comcast.com> <4003717f_5@127.0.0.1> <yJOdnaEvW6CsFZ7d4p2dnA@comcast.com> Subject: Re: choiceyn: cut down choice command, use of sleep, kbhit and getch Date: Tue, 13 Jan 2004 07:44:22 -0000 Lines: 57 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 Message-ID: <4003a1fc_5@127.0.0.1> X-Comments: This message was posted through Newsfeed.com X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings. X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!! X-Report: Please report illegal or inappropriate use to <abuse@newsfeed.com> You may also use our online abuse reporting from: http://www.newsfeed.com/abuseform.htm X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS) Organization: Newsfeed.com http://www.newsfeed.com 100,000+ UNCENSORED Newsgroups. Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out2.nntp.be!local!corp-news!not-for-mail