Changes in global.c [719173c4:20aced3]
Legend:
- Unmodified
- Added
- Removed
-
global.c
r719173c4 r20aced3 53 53 g->filterlist = NULL; 54 54 owl_list_create(&(g->puntlist)); 55 owl_list_create(&(g->messagequeue));55 g->messagequeue = g_queue_new(); 56 56 owl_dict_create(&(g->styledict)); 57 57 g->curmsg_vert_offset=0; … … 113 113 g->pseudologin_notify = 0; 114 114 115 owl_obarray_init(&(g->obarray));116 117 115 owl_message_init_fmtext_cache(); 118 116 owl_list_create(&(g->io_dispatch_list)); … … 120 118 g->timerlist = NULL; 121 119 g->interrupted = FALSE; 120 121 /* set up a pad for input */ 122 g->input_pad = newpad(1, 1); 123 nodelay(g->input_pad, 1); 124 keypad(g->input_pad, 1); 125 meta(g->input_pad, 1); 122 126 } 123 127 … … 179 183 idlok(owl_global_get_curs_msgwin(g), FALSE); 180 184 181 nodelay(owl_global_get_curs_typwin(g), 1);182 keypad(owl_global_get_curs_typwin(g), TRUE);183 185 wmove(owl_global_get_curs_typwin(g), 0, 0); 184 185 meta(owl_global_get_curs_typwin(g), TRUE);186 186 } 187 187 … … 862 862 void owl_global_messagequeue_addmsg(owl_global *g, owl_message *m) 863 863 { 864 owl_list_append_element(&(g->messagequeue), m);864 g_queue_push_tail(g->messagequeue, m); 865 865 } 866 866 … … 873 873 owl_message *out; 874 874 875 if ( owl_list_get_size(&(g->messagequeue))==0) return(NULL);876 out=owl_list_get_element(&(g->messagequeue), 0);877 o wl_list_remove_element(&(g->messagequeue), 0);878 return (out);875 if (g_queue_is_empty(g->messagequeue)) 876 return NULL; 877 out = g_queue_pop_head(g->messagequeue); 878 return out; 879 879 } 880 880 881 881 int owl_global_messagequeue_pending(owl_global *g) 882 882 { 883 if (owl_list_get_size(&(g->messagequeue))==0) return(0); 884 return(1); 883 return !g_queue_is_empty(g->messagequeue); 885 884 } 886 885 … … 1010 1009 } 1011 1010 1012 const char * owl_global_intern(owl_global *g, const char * string)1013 {1014 return owl_obarray_insert(&(g->obarray), string);1015 }1016 1017 1011 owl_list *owl_global_get_io_dispatch_list(owl_global *g) 1018 1012 {
Note: See TracChangeset
for help on using the changeset viewer.