Re: how to macro define these "ESC" charset like "\n" and compare with char?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


key9 wrote:
Hi all

I want to use

#define KEY_RETU "\n"
#define KEY_BKS "\b"

No, you don't. You've already discovered why.

and use

int ch_;

switch(ch_){
case KEY_RETU :
[snip]
so how to define it?


Try

#define KEY_RETU '\n'
...
int ch;
switch(ch)
{
case KEY_RETU:
...

HTH

- --
Lew Pitcher

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12

iD8DBQFEmDjZagVFX4UWr64RAjIsAKDAEVQoLrUfrf18gZ6T9DTHBVllKgCgnDTY
Rp9LYXGGDURpAOvmKLAFmXk=
=85fO
-----END PGP SIGNATURE-----

.



Relevant Pages

  • [PATCH 2/2] Futex non-page-pinning fix
    ... it hashes on mapping + offset, ... The hash table is usually fairly empty. ... long do_futex(unsigned long uaddr, int op, int val, ... ret = -EWOULDBLOCK; ...
    (Linux-Kernel)
  • Re: [PATCH 2/2] Futex non-page-pinning fix
    ... Yes, it's effectively segmenting your hash table, which reduces the ... based on the "struct page *"). ... long do_futex(unsigned long uaddr, int op, int val, ... if (++ret <= nr_wake) { ...
    (Linux-Kernel)
  • how to verify signature with DSACryptoServiceProvider
    ... computer) and DSACryptoServideProvider for signature of the hash (my ... signed hash to the end of the encrypted file. ... int securedSaltLength = bReader.ReadInt32; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: hash table - simple implementation
    ... I tried to look for as much as simple implementation of a hash table in "c". ... typedef struct entry entry_t; ... int hashfn ...
    (comp.lang.c)
  • Re: hash two keys to one index
    ... What goes into the map are pairs of (reference to key, ... When I insert an object into the hash table, I pass in ... void insert(Object obj, int hash) throws HashTableFull ... int probe = 0; ...
    (comp.lang.java.programmer)