source: global.c @ f1e629d

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