source: global.c @ de03334

barnowl_perlaimdebianowlrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since de03334 was de03334, checked in by James M. Kretchmar <kretch@mit.edu>, 18 years ago
Idletimes now appear in the buddylist
  • Property mode set to 100644
File size: 16.5 KB
RevLine 
[7d4fbcd]1#include <stdio.h>
2#include <unistd.h>
3#include <stdlib.h>
4#include <string.h>
5#include <netdb.h>
6#include <termios.h>
7#include <sys/ioctl.h>
8#include <time.h>
9#include "owl.h"
10
[1aee7d9]11static const char fileIdent[] = "$Id$";
12
[7d4fbcd]13#ifndef MAXHOSTNAMELEN
14#define MAXHOSTNAMELEN 256
15#endif
16
17void owl_global_init(owl_global *g) {
18  struct hostent *hent;
19  char hostname[MAXHOSTNAMELEN];
20
[8262340]21  g->malloced=0;
22  g->freed=0;
23
[7d4fbcd]24  gethostname(hostname, MAXHOSTNAMELEN);
25  hent=gethostbyname(hostname);
26  if (!hent) {
[a8938c7]27    g->thishost=owl_strdup("localhost");
[7d4fbcd]28  } else {
[a8938c7]29    g->thishost=owl_strdup(hent->h_name);
[7d4fbcd]30  }
31
32  owl_context_init(&g->ctx);
33  owl_context_set_startup(&g->ctx);
34  g->curmsg=0;
35  g->topmsg=0;
36  g->needrefresh=1;
[a8938c7]37  g->startupargs=NULL;
[7d4fbcd]38
39  owl_variable_dict_setup(&(g->vars));
40  owl_cmddict_setup(&(g->cmds));
41
42  g->lines=LINES;
43  g->cols=COLS;
44
45  g->rightshift=0;
46
[10b866d]47  owl_editwin_init(&(g->tw), NULL, owl_global_get_typwin_lines(g), g->cols, OWL_EDITWIN_STYLE_ONELINE, NULL);
[7d4fbcd]48
49  owl_keyhandler_init(&g->kh);
50  owl_keys_setup_keymaps(&g->kh);
51
52  owl_list_create(&(g->filterlist));
53  owl_list_create(&(g->puntlist));
[d09e5a1]54  owl_list_create(&(g->messagequeue));
[bd3f232]55  owl_list_create(&(g->stylelist));
[7d4fbcd]56  g->curmsg_vert_offset=0;
57  g->resizepending=0;
58  g->typwinactive=0;
59  g->direction=OWL_DIRECTION_DOWNWARDS;
60  g->zaway=0;
61  if (has_colors()) {
62    g->hascolors=1;
63  }
64  g->colorpairs=COLOR_PAIRS;
65  g->debug=OWL_DEBUG;
[1fd0b25]66  g->searchactive=0;
67  g->searchstring=NULL;
[7d4fbcd]68  g->starttime=time(NULL); /* assumes we call init only a start time */
[a8938c7]69  g->buffercommand=NULL;
[700c712]70  g->newmsgproc_pid=0;
[61e79a9]71 
[7d4fbcd]72  owl_global_set_config_format(g, 0);
73  owl_global_set_userclue(g, OWL_USERCLUE_NONE);
74  owl_global_set_no_have_config(g);
[10b866d]75  owl_history_init(&(g->msghist));
76  owl_history_init(&(g->cmdhist));
[7d4fbcd]77  g->nextmsgid=0;
78
79  owl_filterelement_create_true(&(g->fe_true));
80  owl_filterelement_create_false(&(g->fe_false));
81  owl_filterelement_create_null(&(g->fe_null));
82
83  _owl_global_setup_windows(g);
84
85  /* Fill in some variables which don't have constant defaults */
86  /* TODO: come back later and check passwd file first */
[a8938c7]87  g->homedir=owl_strdup(getenv("HOME"));
[7d4fbcd]88
89  owl_messagelist_create(&(g->msglist));
90  owl_mainwin_init(&(g->mw));
91  owl_popwin_init(&(g->pw));
[d09e5a1]92
93  g->aim_screenname=NULL;
94  g->aim_loggedin=0;
[6a415e9]95  owl_timer_create_countdown(&(g->aim_noop_timer), 30);
96  owl_timer_create_countdown(&(g->aim_ignorelogin_timer), 0);
[de03334]97  owl_timer_create_countdown(&(g->aim_buddyinfo_timer), 60);
[aa5f725]98  owl_buddylist_init(&(g->buddylist));
[cf83b7a]99  g->response=NULL;
[09489b89]100  g->havezephyr=0;
101  g->haveaim=0;
[7d4fbcd]102}
103
104void _owl_global_setup_windows(owl_global *g) {
[ecd5dc5]105  int cols, typwin_lines;
[7d4fbcd]106
107  cols=g->cols;
[ecd5dc5]108  typwin_lines=owl_global_get_typwin_lines(g);
[7d4fbcd]109
110  /* set the new window sizes */
111  g->recwinlines=g->lines-(typwin_lines+2);
[ecd5dc5]112  if (g->recwinlines<1) {
113    /* this will screw things up.  I'm not sure what to do yet,
114       but this is better than nothing */
115    /* g->recwinlines=1; */
116  }
[7d4fbcd]117
118  /* create the new windows */
119  g->recwin=newwin(g->recwinlines, cols, 0, 0);
[ecd5dc5]120  if (g->recwin==NULL) {
121    owl_function_debugmsg("\n\nI just received an error on creating a new receive window\n");
122    owl_function_debugmsg("newwin was called with arguments (%i, %i, 0, 0) and returned NULL\n",
123           g->recwinlines, cols);
124    endwin();
125
126    exit(50);
127  }
128     
[7d4fbcd]129  g->sepwin=newwin(1, cols, g->recwinlines, 0);
130  g->msgwin=newwin(1, cols, g->recwinlines+1, 0);
131  g->typwin=newwin(typwin_lines, cols, g->recwinlines+2, 0);
132
133  owl_editwin_set_curswin(&(g->tw), g->typwin, typwin_lines, g->cols);
134
135  idlok(g->typwin, FALSE);
136  idlok(g->recwin, FALSE);
137  idlok(g->sepwin, FALSE);
138  idlok(g->msgwin, FALSE);
139
140  nodelay(g->typwin, 1);
141  keypad(g->typwin, TRUE);
142  wmove(g->typwin, 0, 0);
143
144  meta(g->typwin, TRUE);
145}
146
147owl_context *owl_global_get_context(owl_global *g) {
148  return(&g->ctx);
149}
150                         
151int owl_global_get_lines(owl_global *g) {
152  return(g->lines);
153}
154
155int owl_global_get_cols(owl_global *g) {
156  return(g->cols);
157}
158
159int owl_global_get_recwin_lines(owl_global *g) {
160  return(g->recwinlines);
161}
162
163/* curmsg */
164
165int owl_global_get_curmsg(owl_global *g) {
166  return(g->curmsg);
167}
168
169void owl_global_set_curmsg(owl_global *g, int i) {
170  g->curmsg=i;
171  /* we will reset the vertical offset from here */
172  /* we might want to move this out to the functions later */
173  owl_global_set_curmsg_vert_offset(g, 0);
174}
175
176/* topmsg */
177
178int owl_global_get_topmsg(owl_global *g) {
179  return(g->topmsg);
180}
181
182void owl_global_set_topmsg(owl_global *g, int i) {
183  g->topmsg=i;
184}
185
186/* windows */
187
188owl_mainwin *owl_global_get_mainwin(owl_global *g) {
189  return(&(g->mw));
190}
191
192owl_popwin *owl_global_get_popwin(owl_global *g) {
193  return(&(g->pw));
194}
195
196/* msglist */
197
198owl_messagelist *owl_global_get_msglist(owl_global *g) {
199  return(&(g->msglist));
200}
201
202/* keyhandler */
203
204owl_keyhandler *owl_global_get_keyhandler(owl_global *g) {
205  return(&(g->kh));
206}
207
208/* curses windows */
209
210WINDOW *owl_global_get_curs_recwin(owl_global *g) {
211  return(g->recwin);
212}
213
214WINDOW *owl_global_get_curs_sepwin(owl_global *g) {
215  return(g->sepwin);
216}
217
218WINDOW *owl_global_get_curs_msgwin(owl_global *g) {
219  return(g->msgwin);
220}
221
222WINDOW *owl_global_get_curs_typwin(owl_global *g) {
223  return(g->typwin);
224}
225
226/* typwin */
227
228owl_editwin *owl_global_get_typwin(owl_global *g) {
229  return(&(g->tw));
230}
231
232/* buffercommand */
233
234void owl_global_set_buffercommand(owl_global *g, char *command) {
[a8938c7]235  if (g->buffercommand) owl_free(g->buffercommand);
236  g->buffercommand=owl_strdup(command);
[7d4fbcd]237}
238
239char *owl_global_get_buffercommand(owl_global *g) {
[a8938c7]240  if (g->buffercommand) return(g->buffercommand);
241  return("");
[7d4fbcd]242}
243
244/* refresh */
245
246int owl_global_is_needrefresh(owl_global *g) {
247  if (g->needrefresh==1) return(1);
248  return(0);
249}
250
251void owl_global_set_needrefresh(owl_global *g) {
252  g->needrefresh=1;
253}
254
255void owl_global_set_noneedrefresh(owl_global *g) {
256  g->needrefresh=0;
257}
258
259/* variable dictionary */
260
261owl_vardict *owl_global_get_vardict(owl_global *g) {
262  return &(g->vars);
263}
264
265/* command dictionary */
266
267owl_cmddict *owl_global_get_cmddict(owl_global *g) {
268  return &(g->cmds);
269}
270
271/* rightshift */
272
273void owl_global_set_rightshift(owl_global *g, int i) {
274  g->rightshift=i;
275}
276
277int owl_global_get_rightshift(owl_global *g) {
278  return(g->rightshift);
279}
280
281/* typwin */
282
283int owl_global_is_typwin_active(owl_global *g) {
284  if (g->typwinactive==1) return(1);
285  return(0);
286}
287
288void owl_global_set_typwin_active(owl_global *g) {
289  g->typwinactive=1;
290}
291
292void owl_global_set_typwin_inactive(owl_global *g) {
293  g->typwinactive=0;
294}
295
296/* resize */
297
298void owl_global_set_resize_pending(owl_global *g) {
299  g->resizepending=1;
300}
301
302char *owl_global_get_homedir(owl_global *g) {
[a8938c7]303  if (g->homedir) return(g->homedir);
304  return("/");
[7d4fbcd]305}
306
307int owl_global_get_direction(owl_global *g) {
308  return(g->direction);
309}
310
311void owl_global_set_direction_downwards(owl_global *g) {
312  g->direction=OWL_DIRECTION_DOWNWARDS;
313}
314
315void owl_global_set_direction_upwards(owl_global *g) {
316  g->direction=OWL_DIRECTION_UPWARDS;
317}
318
319/* perl stuff */
320
321void owl_global_set_perlinterp(owl_global *g, void *p) {
322  g->perl=p;
323}
324
325void *owl_global_get_perlinterp(owl_global *g) {
326  return(g->perl);
327}
328
329int owl_global_is_config_format(owl_global *g) {
330  if (g->config_format) return(1);
331  return(0);
332}
333
334void owl_global_set_config_format(owl_global *g, int state) {
335  if (state==1) {
336    g->config_format=1;
337  } else {
338    g->config_format=0;
339  }
340}
341
342void owl_global_set_have_config(owl_global *g) {
343  g->haveconfig=1;
344}
345
346void owl_global_set_no_have_config(owl_global *g) {
347  g->haveconfig=0;
348}
349
350int owl_global_have_config(owl_global *g) {
351  if (g->haveconfig) return(1);
352  return(0);
353}
354
355void owl_global_resize(owl_global *g, int x, int y) {
356  /* resize the screen.  If x or y is 0 use the terminal size */
357  struct winsize size;
358   
359  if (!g->resizepending) return;
360
361  /* delete the current windows */
362  delwin(g->recwin);
363  delwin(g->sepwin);
364  delwin(g->msgwin);
365  delwin(g->typwin);
366  if (!isendwin()) {
367    endwin();
368  }
369
370  refresh();
371
372  /* get the new size */
373  ioctl(STDIN_FILENO, TIOCGWINSZ, &size);
374  if (x==0) {
375    g->lines=size.ws_row;
376  } else {
377    g->lines=x;
378  }
379
380  if (y==0) {
381    g->cols=size.ws_col;
382  } else {
383    g->cols=y;
384  }
385
386  /* resizeterm(size.ws_row, size.ws_col); */
387
388  /* re-initialize the windows */
389  _owl_global_setup_windows(g);
390
391  /* refresh stuff */
392  g->needrefresh=1;
393  owl_mainwin_redisplay(&(g->mw));
394  sepbar(NULL);
395
396  if (owl_global_is_typwin_active(g)) {
397    owl_editwin_redisplay(&(g->tw), 0);
398  }     
399  /* TODO: this should handle other forms of popwins */
400  if (owl_popwin_is_active(owl_global_get_popwin(g)) 
401      && owl_global_get_viewwin(g)) {
402    owl_popwin_refresh(owl_global_get_popwin(g));
403    owl_viewwin_redisplay(owl_global_get_viewwin(g), 0);
404  }
405
[ecd5dc5]406  owl_function_debugmsg("New size is %i lines, %i cols.", size.ws_row, size.ws_col);
[7d4fbcd]407  owl_function_makemsg("");
408  g->resizepending=0;
409}
410
411/* debug */
412
413int owl_global_is_debug_fast(owl_global *g) {
414  if (g->debug) return(1);
415  return(0);
416}
417
418/* starttime */
419
420time_t owl_global_get_starttime(owl_global *g) {
421  return(g->starttime);
422}
423
424time_t owl_global_get_runtime(owl_global *g) {
425  return(time(NULL)-g->starttime);
426}
427
428void owl_global_get_runtime_string(owl_global *g, char *buff) {
429  time_t diff;
430
431  diff=time(NULL)-owl_global_get_starttime(g);
432
433  /* print something nicer later */   
434  sprintf(buff, "%i seconds", (int) diff);
435}
436
[61e79a9]437char *owl_global_get_hostname(owl_global *g) {
[a8938c7]438  if (g->thishost) return(g->thishost);
439  return("");
[61e79a9]440}
441
[7d4fbcd]442/* userclue */
443
444void owl_global_set_userclue(owl_global *g, int clue) {
445  g->userclue=clue;
446}
447
448void owl_global_add_userclue(owl_global *g, int clue) {
449  g->userclue|=clue;
450}
451
452int owl_global_get_userclue(owl_global *g) {
453  return(g->userclue);
454}
455
456int owl_global_is_userclue(owl_global *g, int clue) {
457  if (g->userclue & clue) return(1);
458  return(0);
459}
460
461/* viewwin */
462
463owl_viewwin *owl_global_get_viewwin(owl_global *g) {
464  return(&(g->vw));
465}
466
467
468/* vert offset */
469
470int owl_global_get_curmsg_vert_offset(owl_global *g) {
471  return(g->curmsg_vert_offset);
472}
473
474void owl_global_set_curmsg_vert_offset(owl_global *g, int i) {
475  g->curmsg_vert_offset=i;
476}
477
478/* startup args */
479
480void owl_global_set_startupargs(owl_global *g, int argc, char **argv) {
[a8938c7]481  int i, len;
482
483  if (g->startupargs) owl_free(g->startupargs);
484 
485  len=0;
486  for (i=0; i<argc; i++) {
[591e6aa7]487    len+=strlen(argv[i])+5;
[a8938c7]488  }
489  g->startupargs=malloc(len+5);
[7d4fbcd]490
491  strcpy(g->startupargs, "");
492  for (i=0; i<argc; i++) {
493    sprintf(g->startupargs, "%s%s ", g->startupargs, argv[i]);
494  }
495  g->startupargs[strlen(g->startupargs)-1]='\0';
496}
497
498char *owl_global_get_startupargs(owl_global *g) {
[a8938c7]499  if (g->startupargs) return(g->startupargs);
500  return("");
[7d4fbcd]501}
502
503/* history */
504
[10b866d]505owl_history *owl_global_get_msg_history(owl_global *g) {
506  return(&(g->msghist));
507}
508
509owl_history *owl_global_get_cmd_history(owl_global *g) {
510  return(&(g->cmdhist));
[7d4fbcd]511}
512
513/* filterlist */
514
515owl_list *owl_global_get_filterlist(owl_global *g) {
516  return(&(g->filterlist));
517}
518
519owl_filter *owl_global_get_filter(owl_global *g, char *name) {
520  int i, j;
521  owl_filter *f;
522
523  j=owl_list_get_size(&(g->filterlist));
524  for (i=0; i<j; i++) {
525    f=owl_list_get_element(&(g->filterlist), i);
526    if (!strcmp(name, owl_filter_get_name(f))) {
527      return(f);
528    }
529  }
530  return(NULL);
531}
532
533void owl_global_add_filter(owl_global *g, owl_filter *f) {
534  owl_list_append_element(&(g->filterlist), f);
535}
536
537void owl_global_remove_filter(owl_global *g, char *name) {
538  int i, j;
539  owl_filter *f;
540
541  j=owl_list_get_size(&(g->filterlist));
542  for (i=0; i<j; i++) {
543    f=owl_list_get_element(&(g->filterlist), i);
544    if (!strcmp(name, owl_filter_get_name(f))) {
545      owl_filter_free(f);
546      owl_list_remove_element(&(g->filterlist), i);
547      break;
548    }
549  }
550}
551
552/* nextmsgid */
553
554int owl_global_get_nextmsgid(owl_global *g) {
555  return(g->nextmsgid++);
556}
557
558/* current view */
559
560owl_view *owl_global_get_current_view(owl_global *g) {
561  return(&(g->current_view));
562}
563
564owl_filterelement *owl_global_get_filterelement_true(owl_global *g) {
565  return(&(g->fe_true));
566}
567
568owl_filterelement *owl_global_get_filterelement_false(owl_global *g) {
569  return(&(g->fe_false));
570}
571
572owl_filterelement *owl_global_get_filterelement_null(owl_global *g) {
573  return(&(g->fe_null));
574}
575
576/* has colors */
577
578int owl_global_get_hascolors(owl_global *g) {
579  if (g->hascolors) return(1);
580  return(0);
581}
582
583/* color pairs */
584
585int owl_global_get_colorpairs(owl_global *g) {
586  return(g->colorpairs);
587}
588
589/* puntlist */
590
591owl_list *owl_global_get_puntlist(owl_global *g) {
592  return(&(g->puntlist));
593}
594
595int owl_global_message_is_puntable(owl_global *g, owl_message *m) {
596  owl_list *pl;
597  int i, j;
598
599  pl=owl_global_get_puntlist(g);
600  j=owl_list_get_size(pl);
601  for (i=0; i<j; i++) {
602    if (owl_filter_message_match(owl_list_get_element(pl, i), m)) return(1);
603  }
604  return(0);
605}
606
607int owl_global_should_followlast(owl_global *g) {
608  owl_view *v;
609 
610  if (!owl_global_is__followlast(g)) return(0);
611 
612  v=owl_global_get_current_view(g);
613 
614  if (owl_global_get_curmsg(g)==owl_view_get_size(v)-1) return(1);
615  return(0);
616}
[1fd0b25]617
618int owl_global_is_search_active(owl_global *g) {
619  if (g->searchactive) return(1);
620  return(0);
621}
622
623void owl_global_set_search_active(owl_global *g, char *string) {
624  g->searchactive=1;
625  if (g->searchstring != NULL) owl_free(g->searchstring);
626  g->searchstring=owl_strdup(string);
627}
628
629void owl_global_set_search_inactive(owl_global *g) {
630  g->searchactive=0;
631}
632
633char *owl_global_get_search_string(owl_global *g) {
634  if (g->searchstring==NULL) return("");
635  return(g->searchstring);
636}
[700c712]637
638void owl_global_set_newmsgproc_pid(owl_global *g, int i) {
639  g->newmsgproc_pid=i;
640}
641
642int owl_global_get_newmsgproc_pid(owl_global *g) {
643  return(g->newmsgproc_pid);
644}
645
[8262340]646void owl_global_add_to_malloced(owl_global *g, int i) {
647  g->malloced+=i;
648}
649
650void owl_global_add_to_freed(owl_global *g, int i) {
651  g->freed+=1;
652}
653
654int owl_global_get_malloced(owl_global *g) {
655  return(g->malloced);
656}
657
658int owl_global_get_freed(owl_global *g) {
659  return(g->freed);
660}
661
662int owl_global_get_meminuse(owl_global *g) {
663  return(g->malloced-g->freed);
664}
[d09e5a1]665
666/* AIM stuff */
667
[6a415e9]668int owl_global_is_aimloggedin(owl_global *g)
669{
[d09e5a1]670  if (g->aim_loggedin) return(1);
671  return(0);
672}
673
[6a415e9]674char *owl_global_get_aim_screenname(owl_global *g)
675{
[d09e5a1]676  return (g->aim_screenname);
677}
678
[6a415e9]679void owl_global_set_aimloggedin(owl_global *g, char *screenname)
680{
[d09e5a1]681  g->aim_loggedin=1;
682  if (g->aim_screenname) owl_free(g->aim_screenname);
683  g->aim_screenname=owl_strdup(screenname);
684}
685
[6a415e9]686void owl_global_set_aimnologgedin(owl_global *g)
687{
[d09e5a1]688  g->aim_loggedin=0;
689}
690
[6a415e9]691aim_session_t *owl_global_get_aimsess(owl_global *g)
692{
[d09e5a1]693  return(&(g->aimsess));
694}
695
[6a415e9]696aim_conn_t *owl_global_get_waitingconn(owl_global *g)
697{
[d09e5a1]698  return(&(g->waitingconn));
699}
700
[6a415e9]701int owl_global_is_aimnop_time(owl_global *g)
702{
703  if (owl_timer_is_expired(&(g->aim_noop_timer))) return(1);
[d09e5a1]704  return(0);
705}
706
[6a415e9]707void owl_global_aimnop_sent(owl_global *g)
708{
709  owl_timer_reset(&(g->aim_noop_timer));
710}
[d09e5a1]711
[6a415e9]712owl_timer *owl_global_get_aim_login_timer(owl_global *g)
713{
714  return(&(g->aim_ignorelogin_timer));
[d09e5a1]715}
716
717/* message queue */
718
[6a415e9]719void owl_global_messagequeue_addmsg(owl_global *g, owl_message *m)
720{
[d09e5a1]721  owl_list_append_element(&(g->messagequeue), m);
722}
723
724/* pop off the first message and return it.  Return NULL if the queue
725 * is empty.  The caller should free the message after using it, if
726 * necessary.
727 */
[6a415e9]728owl_message *owl_global_messageuque_popmsg(owl_global *g)
729{
[d09e5a1]730  owl_message *out;
731
732  if (owl_list_get_size(&(g->messagequeue))==0) return(NULL);
733  out=owl_list_get_element(&(g->messagequeue), 0);
734  owl_list_remove_element(&(g->messagequeue), 0);
735  return(out);
736}
737
[6a415e9]738int owl_global_messagequeue_pending(owl_global *g)
739{
[d09e5a1]740  if (owl_list_get_size(&(g->messagequeue))==0) return(0);
741  return(1);
742}
[aa5f725]743
[6a415e9]744owl_buddylist *owl_global_get_buddylist(owl_global *g)
745{
[aa5f725]746  return(&(g->buddylist));
747}
748 
[bd3f232]749/* style */
750
751/* Return the style with name 'name'.  If it does not exist return
752 * NULL */
753owl_style *owl_global_get_style_by_name(owl_global *g, char *name)
754{
755  int i, j;
756  owl_style *s;
757 
758  j=owl_list_get_size(&(g->stylelist));
759  for (i=0; i<j; i++) {
760    s=owl_list_get_element(&(g->stylelist), i);
761    if (owl_style_matches_name(s, name)) {
762      return(s);
763    }
764  }
765  return(NULL);
766}
767
[cf83b7a]768void owl_global_add_style(owl_global *g, owl_style *s)
769{
[bd3f232]770  owl_list_append_element(&(g->stylelist), s);
771}
[cf83b7a]772
773char *owl_global_get_response(owl_global *g)
774{
775  if (g->response==NULL) return("");
776  return(g->response);
777}
778
779void owl_global_set_response(owl_global *g, char *resp)
780{
781  if (g->response) owl_free(g->response);
[210c261]782  g->response=owl_strdup(resp);
[cf83b7a]783}
[09489b89]784
785
786void owl_global_set_haveaim(owl_global *g)
787{
788  g->haveaim=1;
789}
790
791int owl_global_is_haveaim(owl_global *g)
792{
793  if (g->haveaim) return(1);
794  return(0);
795}
796
797void owl_global_set_havezephyr(owl_global *g)
798{
799  g->havezephyr=1;
800}
801
802int owl_global_is_havezephyr(owl_global *g)
803{
804  if (g->havezephyr) return(1);
805  return(0);
806}
[de03334]807
808owl_timer *owl_global_get_aim_buddyinfo_timer(owl_global *g)
809{
810  return(&(g->aim_buddyinfo_timer));
811}
Note: See TracBrowser for help on using the repository browser.