Changeset 925

Show
Ignore:
Timestamp:
05/17/08 10:59:02 (4 months ago)
Author:
takkaria
Message:

Sort out whitespace and fix two OS X warnings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/util.c

    r918 r925  
    10581058        ui_event_data kk; 
    10591059        ui_event_data ke; 
    1060          
     1060 
    10611061        bool done = FALSE; 
    1062          
     1062 
    10631063        term *old = Term; 
    1064          
    1065          
     1064 
    10661065        /* Initialise keypress */ 
    10671066        ke.key = 0; 
    10681067        ke.type = EVT_NONE; 
    1069          
     1068 
    10701069        /* Hack -- Use the "inkey_next" pointer */ 
    10711070        if (inkey_next && *inkey_next && !inkey_xtra) 
     
    10741073                ke.key = *inkey_next++; 
    10751074                ke.type = EVT_KBRD; 
    1076                  
     1075 
    10771076                /* Cancel the various "global parameters" */ 
    1078                 inkey_base = inkey_xtra = inkey_flag = inkey_scan = FALSE; 
    1079                  
     1077                inkey_base = inkey_xtra = inkey_flag = FALSE; 
     1078                inkey_scan = 0; 
     1079 
    10801080                /* Accept result */ 
    10811081                return (ke); 
    10821082        } 
    1083          
     1083 
    10841084        /* Forget pointer */ 
    10851085        inkey_next = NULL; 
    1086          
    1087          
     1086 
    10881087#ifdef ALLOW_BORG 
    1089          
     1088 
    10901089        /* Mega-Hack -- Use the special hook */ 
    10911090        if (inkey_hack && ((ch = (*inkey_hack)(inkey_xtra)) != 0)) 
    10921091        { 
    10931092                /* Cancel the various "global parameters" */ 
    1094                 inkey_base = inkey_xtra = inkey_flag = inkey_scan = FALSE; 
     1093                inkey_base = inkey_xtra = inkey_flag = FALSE; 
     1094                inkey_scan = 0; 
    10951095                ke.type = EVT_KBRD; 
    1096                  
     1096 
    10971097                /* Accept result */ 
    10981098                return (ke); 
    10991099        } 
    1100          
     1100 
    11011101#endif /* ALLOW_BORG */ 
    1102          
    1103          
     1102 
    11041103        /* Hack -- handle delayed "flush()" */ 
    11051104        if (inkey_xtra) 
     
    11071106                /* End "macro action" */ 
    11081107                parse_macro = FALSE; 
    1109                  
     1108 
    11101109                /* End "macro trigger" */ 
    11111110                parse_under = FALSE; 
    1112                  
     1111 
    11131112                /* Forget old keypresses */ 
    11141113                Term_flush(); 
    11151114        } 
    1116          
    1117          
     1115 
     1116 
    11181117        /* Get the cursor state */ 
    11191118        (void)Term_get_cursor(&cursor_state); 
    1120          
     1119 
    11211120        /* Show the cursor if waiting, except sometimes in "command" mode */ 
    11221121        if (!inkey_scan && (!inkey_flag || hilite_player || character_icky)) 
     
    11251124                (void)Term_set_cursor(TRUE); 
    11261125        } 
    1127          
    1128          
     1126 
     1127 
    11291128        /* Hack -- Activate main screen */ 
    11301129        Term_activate(term_screen); 
    1131          
    1132          
     1130 
     1131 
    11331132        /* Get a key */ 
    11341133        while (ke.type == EVT_NONE) 
     
    11411140                        break; 
    11421141                } 
    1143                  
     1142 
    11441143 
    11451144                /* Hack -- Flush output once when no key ready */ 
     
    11581157                        /* Mega-Hack -- reset saved flag */ 
    11591158                        character_saved = FALSE; 
    1160                  
     1159 
    11611160                        /* Mega-Hack -- reset signal counter */ 
    11621161                        signal_count = 0; 
    1163                  
     1162 
    11641163                        /* Only once */ 
    11651164                        done = TRUE; 
    11661165                } 
    1167                  
    1168                  
     1166 
     1167 
    11691168                /* Hack -- Handle "inkey_base" */ 
    11701169                if (inkey_base) 
     
    12521251                        continue; 
    12531252                } 
    1254                  
    1255                  
     1253 
     1254 
    12561255                /* Treat back-quote as escape */ 
    12571256                if (ke.key == '`') ke.key = ESCAPE; 
    1258                  
    1259                  
     1257 
     1258 
    12601259                /* End "macro trigger" */ 
    12611260                if (parse_under && (ke.key >=0 && ke.key <= 32)) 
     
    12641263                        ke.type = EVT_NONE; 
    12651264                        ke.key = 0; 
    1266                  
     1265 
    12671266                        /* End "macro trigger" */ 
    12681267                        parse_under = FALSE; 
     
    12961295                } 
    12971296        } 
    1298          
    1299          
     1297 
     1298 
    13001299        /* Hack -- restore the term */ 
    13011300        Term_activate(old); 
    1302          
    1303          
     1301 
     1302 
    13041303        /* Restore the cursor */ 
    13051304        Term_set_cursor(cursor_state); 
    1306          
    1307          
     1305 
     1306 
    13081307        /* Cancel the various "global parameters" */ 
    13091308        inkey_base = inkey_xtra = inkey_flag = inkey_scan = FALSE; 
    1310          
    1311          
     1309 
     1310 
    13121311        /* Return the keypress */ 
    13131312        return (ke);