www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/15/15:43:33

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: THE -O2 PROBLEM - PART II
Date: Sat, 15 Apr 2000 22:56:45 +0400
Organization: MTU-Intel ISP
Lines: 41
Message-ID: <38F8BB6D.22C2064@mtu-net.ru>
References: <38F20E7A DOT 3330E9A4 AT mtu-net DOT ru> <38F6C64E DOT C7753C6C AT mtu-net DOT ru> <8d7l3g$j3i$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <38F76B94 DOT 5E968BA7 AT mtu-net DOT ru> <38F7A6FE DOT ED9B3E59 AT mtu-net DOT ru> <38F82ABA DOT FEBEB2B0 AT is DOT elta DOT co DOT il> <38F82569 DOT 817316A6 AT mtu-net DOT ru>
NNTP-Posting-Host: ppp104-242.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 955827078 57496 212.188.104.242 (15 Apr 2000 19:31:18 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 15 Apr 2000 19:31:18 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: en,ru
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

the only solution I see is something like this:

----------8<----------
int keymap (int key) {
  return KeyMap[key];
}

int main() {
  do_something();
  if (keymap(sTab)) {
    do_something();
    while (keymap(sTab)) {};
  }
  do_something();
}
----------8<----------

But is it a nice solution? It isn't. It's a bit ugly.

bye.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror:   http://members.xoom.com/alexfru

"Alexei A. Frounze" wrote:
> 
> it eliminates C code but not inline asembly.
> 
> For example:
> 
> if (KeyMap[sTab]) {             // key is pressed
>   do_something();
>   while (KeyMap[sTab]) {};      // this line is replaced with infinite loop
> }
> 
> But I need that line AS-IS.
> 
> thanks.
> Alexei A. Frounze

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019