Changeset f87c490 for keypress.c


Ignore:
Timestamp:
Apr 20, 2003, 3:48:31 PM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e51b410
Parents:
aaf6071
Message:
CTRL and META are now OWL_CTRL and OWL_META.  OWL_CTRL moved to keypress.c
do_encrypt declaired static
File:
1 edited

Legend:

Unmodified
Added
Removed
  • keypress.c

    rac70242 rf87c490  
    127127};
    128128
     129#define OWL_CTRL(key) ((key)&037)
     130/* OWL_META is definied in owl.h */
     131
    129132/* returns 0 on success */
    130133int owl_keypress_tostring(int j, int esc, char *buff, int bufflen) {
     
    134137  *kb = '\0';
    135138  for (sm = specialmap; sm->kj!=0; sm++) {
    136     if (j == META(sm->kj) || (esc && j == sm->kj)) {
     139    if (j == OWL_META(sm->kj) || (esc && j == sm->kj)) {
    137140      strcat(kb, "M-");
    138141      strcat(kb, sm->ks);
     
    144147  }
    145148  if (!*kb) {
    146     if (j&META(0)) {
     149    if (j&OWL_META(0)) {
    147150      strcat(kb, "M-");
    148       j &= ~META(0);
    149     }
    150     if ((CTRL(j) == j)) {
     151      j &= ~OWL_META(0);
     152    }
     153    if ((OWL_CTRL(j) == j)) {
    151154      strcat(kb, "C-");
    152155      j |= 0x60;
     
    196199  if (j==ERR) return(ERR);
    197200  if (isctrl) {
    198     j = CTRL(j);
     201    j = OWL_CTRL(j);
    199202  }
    200203  if (ismeta) {
    201     j = META(j);
     204    j = OWL_META(j);
    202205  }
    203206  return(j);
Note: See TracChangeset for help on using the changeset viewer.