[7d4fbcd] | 1 | #ifndef INC_OWL_H |
---|
| 2 | #define INC_OWL_H |
---|
| 3 | |
---|
| 4 | #include <curses.h> |
---|
| 5 | #include <sys/param.h> |
---|
| 6 | #include <EXTERN.h> |
---|
| 7 | #include <netdb.h> |
---|
| 8 | #include <regex.h> |
---|
[d09e5a1] | 9 | #include <time.h> |
---|
| 10 | #include <libfaim/aim.h> |
---|
[7d4fbcd] | 11 | #include "config.h" |
---|
[be0a79f] | 12 | #ifdef HAVE_LIBZEPHYR |
---|
[373b7e7] | 13 | #include <zephyr/zephyr.h> |
---|
[be0a79f] | 14 | #endif |
---|
[e6449bc] | 15 | #ifdef HAVE_COM_ERR_H |
---|
| 16 | #include <com_err.h> |
---|
| 17 | #endif |
---|
| 18 | |
---|
[be0a79f] | 19 | |
---|
[7d4fbcd] | 20 | |
---|
[1aee7d9] | 21 | static const char owl_h_fileIdent[] = "$Id$"; |
---|
| 22 | |
---|
[c5f3b46] | 23 | #define OWL_VERSION 2.0.8 |
---|
| 24 | #define OWL_VERSION_STRING "2.0.8" |
---|
[7d4fbcd] | 25 | |
---|
| 26 | #define OWL_DEBUG 0 |
---|
| 27 | #define OWL_DEBUG_FILE "/var/tmp/owldebug" |
---|
| 28 | |
---|
[bd3f232] | 29 | #define OWL_CONFIG_DIR "/.owl" /* this is relative to the user's home directory */ |
---|
[38cf544c] | 30 | #define OWL_STARTUP_FILE "/.owl/startup" /* this is relative to the user's home directory */ |
---|
| 31 | |
---|
[7d4fbcd] | 32 | #define OWL_FMTEXT_ATTR_NONE 0 |
---|
| 33 | #define OWL_FMTEXT_ATTR_BOLD 1 |
---|
| 34 | #define OWL_FMTEXT_ATTR_REVERSE 2 |
---|
| 35 | #define OWL_FMTEXT_ATTR_UNDERLINE 4 |
---|
| 36 | |
---|
| 37 | #define OWL_COLOR_BLACK 0 |
---|
| 38 | #define OWL_COLOR_RED 1 |
---|
| 39 | #define OWL_COLOR_GREEN 2 |
---|
| 40 | #define OWL_COLOR_YELLOW 3 |
---|
| 41 | #define OWL_COLOR_BLUE 4 |
---|
| 42 | #define OWL_COLOR_MAGENTA 5 |
---|
| 43 | #define OWL_COLOR_CYAN 6 |
---|
| 44 | #define OWL_COLOR_WHITE 7 |
---|
| 45 | #define OWL_COLOR_DEFAULT 8 |
---|
| 46 | |
---|
| 47 | #define OWL_EDITWIN_STYLE_MULTILINE 0 |
---|
| 48 | #define OWL_EDITWIN_STYLE_ONELINE 1 |
---|
| 49 | |
---|
[f4d0975] | 50 | #define OWL_PROTOCOL_ZEPHYR 0 |
---|
| 51 | #define OWL_PROTOCOL_AIM 1 |
---|
| 52 | #define OWL_PROTOCOL_JABBER 2 |
---|
| 53 | #define OWL_PROTOCOL_ICQ 3 |
---|
| 54 | #define OWL_PROTOCOL_YAHOO 4 |
---|
| 55 | #define OWL_PROTOCOL_MSN 5 |
---|
| 56 | |
---|
[4b464a4] | 57 | #define OWL_MESSAGE_TYPE_ADMIN 0 |
---|
| 58 | #define OWL_MESSAGE_TYPE_GENERIC 1 |
---|
| 59 | #define OWL_MESSAGE_TYPE_ZEPHYR 2 |
---|
[d0d65df] | 60 | #define OWL_MESSAGE_TYPE_AIM 3 |
---|
| 61 | #define OWL_MESSAGE_TYPE_JABBER 4 |
---|
| 62 | #define OWL_MESSAGE_TYPE_ICQ 5 |
---|
| 63 | #define OWL_MESSAGE_TYPE_YAHOO 6 |
---|
| 64 | #define OWL_MESSAGE_TYPE_MSN 7 |
---|
[7d4fbcd] | 65 | |
---|
[4b464a4] | 66 | #define OWL_MESSAGE_DIRECTION_NONE 0 |
---|
| 67 | #define OWL_MESSAGE_DIRECTION_IN 1 |
---|
| 68 | #define OWL_MESSAGE_DIRECTION_OUT 2 |
---|
[7d4fbcd] | 69 | |
---|
| 70 | #define OWL_DIRECTION_NONE 0 |
---|
| 71 | #define OWL_DIRECTION_DOWNWARDS 1 |
---|
| 72 | #define OWL_DIRECTION_UPWARDS 2 |
---|
| 73 | |
---|
[88736cb] | 74 | #define OWL_SCROLLMODE_NORMAL 0 |
---|
| 75 | #define OWL_SCROLLMODE_TOP 1 |
---|
| 76 | #define OWL_SCROLLMODE_NEARTOP 2 |
---|
| 77 | #define OWL_SCROLLMODE_CENTER 3 |
---|
| 78 | #define OWL_SCROLLMODE_PAGED 4 |
---|
[aa2f33b3] | 79 | #define OWL_SCROLLMODE_PAGEDCENTER 5 |
---|
| 80 | |
---|
[bd3f232] | 81 | #define OWL_STYLE_TYPE_INTERNAL 0 |
---|
| 82 | #define OWL_STYLE_TYPE_PERL 1 |
---|
| 83 | |
---|
[7d4fbcd] | 84 | #define OWL_TAB 3 /* This *HAS* to be the size of TABSTR below */ |
---|
| 85 | #define OWL_TABSTR " " |
---|
| 86 | #define OWL_MSGTAB 7 |
---|
| 87 | #define OWL_TYPWIN_SIZE 8 |
---|
| 88 | #define OWL_HISTORYSIZE 50 |
---|
| 89 | |
---|
| 90 | /* Indicate current state, as well as what is allowed */ |
---|
| 91 | #define OWL_CTX_ANY 0xffff |
---|
| 92 | /* Only one of these may be active at a time... */ |
---|
| 93 | #define OWL_CTX_MODE_BITS 0x000f |
---|
| 94 | #define OWL_CTX_STARTUP 0x0001 |
---|
| 95 | #define OWL_CTX_READCONFIG 0x0002 |
---|
| 96 | #define OWL_CTX_INTERACTIVE 0x0004 |
---|
| 97 | /* Only one of these may be active at a time... */ |
---|
| 98 | #define OWL_CTX_ACTIVE_BITS 0xfff0 |
---|
| 99 | #define OWL_CTX_POPWIN 0x00f0 |
---|
| 100 | #define OWL_CTX_POPLESS 0x0010 |
---|
| 101 | #define OWL_CTX_RECWIN 0x0f00 |
---|
| 102 | #define OWL_CTX_RECV 0x0100 |
---|
| 103 | #define OWL_CTX_TYPWIN 0xf000 |
---|
[cf83b7a] | 104 | #define OWL_CTX_EDIT 0x7000 |
---|
[7d4fbcd] | 105 | #define OWL_CTX_EDITLINE 0x1000 |
---|
| 106 | #define OWL_CTX_EDITMULTI 0x2000 |
---|
[cf83b7a] | 107 | #define OWL_CTX_EDITRESPONSE 0x4000 |
---|
[7d4fbcd] | 108 | |
---|
| 109 | #define OWL_USERCLUE_NONE 0 |
---|
| 110 | #define OWL_USERCLUE_CLASSES 1 |
---|
| 111 | #define OWL_USERCLUE_FOOBAR 2 |
---|
| 112 | #define OWL_USERCLUE_BAZ 4 |
---|
| 113 | |
---|
| 114 | #define OWL_WEBBROWSER_NONE 0 |
---|
| 115 | #define OWL_WEBBROWSER_NETSCAPE 1 |
---|
| 116 | #define OWL_WEBBROWSER_GALEON 2 |
---|
[ae9e6be] | 117 | #define OWL_WEBBROWSER_OPERA 3 |
---|
[7d4fbcd] | 118 | |
---|
| 119 | #define OWL_VARIABLE_OTHER 0 |
---|
| 120 | #define OWL_VARIABLE_INT 1 |
---|
| 121 | #define OWL_VARIABLE_BOOL 2 |
---|
| 122 | #define OWL_VARIABLE_STRING 3 |
---|
| 123 | |
---|
| 124 | #define OWL_FILTER_MAX_DEPTH 300 |
---|
| 125 | |
---|
[4b464a4] | 126 | #define OWL_KEYMAP_MAXSTACK 20 |
---|
[7d4fbcd] | 127 | |
---|
[4b464a4] | 128 | #define OWL_KEYBINDING_COMMAND 1 /* command string */ |
---|
| 129 | #define OWL_KEYBINDING_FUNCTION 2 /* function taking no args */ |
---|
[7d4fbcd] | 130 | |
---|
[4b464a4] | 131 | #define OWL_DEFAULT_ZAWAYMSG "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n" |
---|
[7d4fbcd] | 132 | |
---|
[4b464a4] | 133 | #define OWL_INCLUDE_REG_TESTS 1 /* whether to build in regression tests */ |
---|
[7d4fbcd] | 134 | |
---|
[1c7a4e0] | 135 | #define OWL_CMD_ALIAS_SUMMARY_PREFIX "command alias to: " |
---|
[7d4fbcd] | 136 | |
---|
[e7cc1c3] | 137 | #define OWL_WEBZEPHYR_PRINCIPAL "daemon.webzephyr" |
---|
[1d3e925] | 138 | #define OWL_WEBZEPHYR_CLASS "webzephyr" |
---|
| 139 | #define OWL_WEBZEPHYR_OPCODE "webzephyr" |
---|
[e7cc1c3] | 140 | |
---|
[0435c7d] | 141 | #if defined(HAVE_DES_STRING_TO_KEY) && defined(HAVE_DES_KEY_SCHED) && defined(HAVE_DES_ECB_ENCRYPT) |
---|
[c86a35c] | 142 | #define OWL_ENABLE_ZCRYPT 1 |
---|
[c269e22] | 143 | #endif |
---|
| 144 | |
---|
[f87c490] | 145 | #define OWL_META(key) ((key)|0200) |
---|
| 146 | /* OWL_CTRL is definied in kepress.c */ |
---|
[7d4fbcd] | 147 | |
---|
| 148 | #define LINE 2048 |
---|
| 149 | |
---|
| 150 | typedef struct _owl_variable { |
---|
| 151 | char *name; |
---|
| 152 | int type; /* OWL_VARIABLE_* */ |
---|
| 153 | void *pval_default; /* for types other and string */ |
---|
| 154 | int ival_default; /* for types int and bool */ |
---|
| 155 | char *validsettings; /* documentation of valid settings */ |
---|
[aa2f33b3] | 156 | char *summary; /* summary of usage */ |
---|
| 157 | char *description; /* detailed description */ |
---|
[7d4fbcd] | 158 | void *val; /* current value */ |
---|
| 159 | int (*validate_fn)(struct _owl_variable *v, void *newval); |
---|
| 160 | /* returns 1 if newval is valid */ |
---|
| 161 | int (*set_fn)(struct _owl_variable *v, void *newval); |
---|
| 162 | /* sets the variable to a value |
---|
| 163 | * of the appropriate type. |
---|
| 164 | * unless documented, this |
---|
| 165 | * should make a copy. |
---|
| 166 | * returns 0 on success. */ |
---|
| 167 | int (*set_fromstring_fn)(struct _owl_variable *v, char *newval); |
---|
| 168 | /* sets the variable to a value |
---|
| 169 | * of the appropriate type. |
---|
| 170 | * unless documented, this |
---|
| 171 | * should make a copy. |
---|
| 172 | * returns 0 on success. */ |
---|
| 173 | void *(*get_fn)(struct _owl_variable *v); |
---|
| 174 | /* returns a reference to the current value. |
---|
| 175 | * WARNING: this approach is hard to make |
---|
| 176 | * thread-safe... */ |
---|
| 177 | int (*get_tostring_fn)(struct _owl_variable *v, |
---|
| 178 | char *buf, int bufsize, void *val); |
---|
| 179 | /* converts val to a string |
---|
| 180 | * and puts into buf */ |
---|
| 181 | void (*free_fn)(struct _owl_variable *v); |
---|
| 182 | /* frees val as needed */ |
---|
| 183 | } owl_variable; |
---|
| 184 | |
---|
| 185 | typedef struct _owl_fmtext { |
---|
| 186 | int textlen; |
---|
| 187 | char *textbuff; |
---|
| 188 | char *fmbuff; |
---|
| 189 | char *colorbuff; |
---|
| 190 | } owl_fmtext; |
---|
| 191 | |
---|
| 192 | typedef struct _owl_list { |
---|
| 193 | int size; |
---|
| 194 | int avail; |
---|
| 195 | void **list; |
---|
| 196 | } owl_list; |
---|
| 197 | |
---|
| 198 | typedef struct _owl_dict_el { |
---|
| 199 | char *k; /* key */ |
---|
| 200 | void *v; /* value */ |
---|
| 201 | } owl_dict_el; |
---|
| 202 | |
---|
| 203 | typedef struct _owl_dict { |
---|
| 204 | int size; |
---|
| 205 | int avail; |
---|
| 206 | owl_dict_el *els; /* invariant: sorted by k */ |
---|
| 207 | } owl_dict; |
---|
| 208 | typedef owl_dict owl_vardict; /* dict of variables */ |
---|
| 209 | typedef owl_dict owl_cmddict; /* dict of commands */ |
---|
| 210 | |
---|
| 211 | typedef struct _owl_context { |
---|
| 212 | int mode; |
---|
| 213 | void *data; /* determined by mode */ |
---|
| 214 | } owl_context; |
---|
| 215 | |
---|
| 216 | typedef struct _owl_cmd { /* command */ |
---|
| 217 | char *name; |
---|
| 218 | |
---|
| 219 | char *summary; /* one line summary of command */ |
---|
| 220 | char *usage; /* usage synopsis */ |
---|
| 221 | char *description; /* long description of command */ |
---|
| 222 | |
---|
| 223 | int validctx; /* bitmask of valid contexts */ |
---|
| 224 | |
---|
| 225 | /* we should probably have a type here that says which of |
---|
| 226 | * the following is valid, and maybe make the below into a union... */ |
---|
| 227 | |
---|
| 228 | /* Only one of these may be non-NULL ... */ |
---|
| 229 | |
---|
| 230 | char *cmd_aliased_to; /* what this command is aliased to... */ |
---|
| 231 | |
---|
| 232 | /* These don't take any context */ |
---|
| 233 | char *(*cmd_args_fn)(int argc, char **argv, char *buff); |
---|
| 234 | /* takes argv and the full command as buff. |
---|
| 235 | * caller must free return value if !NULL */ |
---|
| 236 | void (*cmd_v_fn)(void); /* takes no args */ |
---|
| 237 | void (*cmd_i_fn)(int i); /* takes an int as an arg */ |
---|
| 238 | |
---|
| 239 | /* The following also take the active context if it's valid */ |
---|
| 240 | char *(*cmd_ctxargs_fn)(void *ctx, int argc, char **argv, char *buff); |
---|
| 241 | /* takes argv and the full command as buff. |
---|
| 242 | * caller must free return value if !NULL */ |
---|
| 243 | void (*cmd_ctxv_fn)(void *ctx); /* takes no args */ |
---|
| 244 | void (*cmd_ctxi_fn)(void *ctx, int i); /* takes an int as an arg */ |
---|
| 245 | } owl_cmd; |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | typedef struct _owl_zwrite { |
---|
[ce7db4d] | 249 | char *class; |
---|
| 250 | char *inst; |
---|
| 251 | char *realm; |
---|
| 252 | char *opcode; |
---|
[56330ff] | 253 | char *zsig; |
---|
[ce7db4d] | 254 | char *message; |
---|
[7d4fbcd] | 255 | owl_list recips; |
---|
| 256 | int cc; |
---|
| 257 | int noping; |
---|
| 258 | } owl_zwrite; |
---|
| 259 | |
---|
[d0d65df] | 260 | typedef struct _owl_pair { |
---|
| 261 | void *key; |
---|
| 262 | void *value; |
---|
| 263 | } owl_pair; |
---|
| 264 | |
---|
[7d4fbcd] | 265 | typedef struct _owl_message { |
---|
| 266 | int id; |
---|
| 267 | int type; |
---|
[4b464a4] | 268 | int direction; |
---|
[be0a79f] | 269 | #ifdef HAVE_LIBZEPHYR |
---|
[7d4fbcd] | 270 | ZNotice_t notice; |
---|
[be0a79f] | 271 | #endif |
---|
[bd3f232] | 272 | owl_fmtext fmtext; /* this is now only a CACHED copy */ |
---|
| 273 | int invalid_format; /* indicates whether fmtext needs to be regenerated */ |
---|
[7d4fbcd] | 274 | int delete; |
---|
[6e05655] | 275 | char hostname[MAXHOSTNAMELEN+1]; |
---|
[65ad073] | 276 | owl_list attributes; /* this is a list of pairs */ |
---|
[7d4fbcd] | 277 | char *time; |
---|
| 278 | char *zwriteline; |
---|
| 279 | } owl_message; |
---|
| 280 | |
---|
[bd3f232] | 281 | typedef struct _owl_style { |
---|
| 282 | char *name; |
---|
[f1e629d] | 283 | char *description; |
---|
[bd3f232] | 284 | int type; |
---|
| 285 | char *perlfuncname; |
---|
| 286 | void (*formatfunc) (owl_fmtext *fm, owl_message *m); |
---|
| 287 | } owl_style; |
---|
| 288 | |
---|
[7d4fbcd] | 289 | typedef struct _owl_mainwin { |
---|
| 290 | int curtruncated; |
---|
[f2e36b5] | 291 | int lasttruncated; |
---|
[7d4fbcd] | 292 | int lastdisplayed; |
---|
| 293 | } owl_mainwin; |
---|
| 294 | |
---|
| 295 | typedef struct _owl_viewwin { |
---|
| 296 | owl_fmtext fmtext; |
---|
| 297 | int textlines; |
---|
| 298 | int topline; |
---|
| 299 | int rightshift; |
---|
| 300 | int winlines, wincols; |
---|
| 301 | WINDOW *curswin; |
---|
| 302 | } owl_viewwin; |
---|
| 303 | |
---|
| 304 | typedef struct _owl_popwin { |
---|
| 305 | WINDOW *borderwin; |
---|
| 306 | WINDOW *popwin; |
---|
| 307 | int lines; |
---|
| 308 | int cols; |
---|
| 309 | int active; |
---|
| 310 | int needsfirstrefresh; |
---|
| 311 | void (*handler) (int ch); |
---|
| 312 | } owl_popwin; |
---|
| 313 | |
---|
| 314 | typedef struct _owl_messagelist { |
---|
| 315 | owl_list list; |
---|
| 316 | } owl_messagelist; |
---|
| 317 | |
---|
| 318 | typedef struct _owl_regex { |
---|
| 319 | int negate; |
---|
| 320 | char *string; |
---|
| 321 | regex_t re; |
---|
| 322 | } owl_regex; |
---|
| 323 | |
---|
| 324 | typedef struct _owl_filterelement { |
---|
| 325 | int type; |
---|
| 326 | char *field; |
---|
| 327 | owl_regex re; |
---|
| 328 | } owl_filterelement; |
---|
| 329 | |
---|
| 330 | typedef struct _owl_filter { |
---|
| 331 | char *name; |
---|
| 332 | int polarity; |
---|
| 333 | owl_list fes; /* filterelements */ |
---|
| 334 | int color; |
---|
[59cf91c] | 335 | int cachedmsgid; /* cached msgid: should move into view eventually */ |
---|
[7d4fbcd] | 336 | } owl_filter; |
---|
| 337 | |
---|
| 338 | typedef struct _owl_view { |
---|
[c3ab155] | 339 | char *name; |
---|
[7d4fbcd] | 340 | owl_filter *filter; |
---|
| 341 | owl_messagelist ml; |
---|
[c3ab155] | 342 | owl_style *style; |
---|
[7d4fbcd] | 343 | } owl_view; |
---|
| 344 | |
---|
| 345 | typedef struct _owl_history { |
---|
| 346 | owl_list hist; |
---|
| 347 | int cur; |
---|
| 348 | int touched; |
---|
| 349 | int partial; |
---|
| 350 | } owl_history; |
---|
| 351 | |
---|
[10b866d] | 352 | typedef struct _owl_editwin { |
---|
| 353 | char *buff; |
---|
| 354 | owl_history *hist; |
---|
| 355 | int bufflen; |
---|
| 356 | int allocated; |
---|
| 357 | int buffx, buffy; |
---|
| 358 | int topline; |
---|
| 359 | int winlines, wincols, fillcol, wrapcol; |
---|
| 360 | WINDOW *curswin; |
---|
| 361 | int style; |
---|
| 362 | int lock; |
---|
| 363 | int dotsend; |
---|
[c9334b1] | 364 | int echochar; |
---|
[10b866d] | 365 | } owl_editwin; |
---|
| 366 | |
---|
[7d4fbcd] | 367 | typedef struct _owl_keybinding { |
---|
| 368 | int *j; /* keypress stack (0-terminated) */ |
---|
| 369 | int type; /* command or function? */ |
---|
| 370 | char *desc; /* description (or "*user*") */ |
---|
| 371 | char *command; /* command, if of type command */ |
---|
| 372 | void (*function_fn)(void); /* function ptr, if of type function */ |
---|
| 373 | } owl_keybinding; |
---|
| 374 | |
---|
| 375 | typedef struct _owl_keymap { |
---|
| 376 | char *name; /* name of keymap */ |
---|
| 377 | char *desc; /* description */ |
---|
| 378 | owl_list bindings; /* key bindings */ |
---|
| 379 | struct _owl_keymap *submap; /* submap */ |
---|
| 380 | void (*default_fn)(int j); /* default action (takes a keypress) */ |
---|
| 381 | void (*prealways_fn)(int j); /* always called before a keypress is received */ |
---|
| 382 | void (*postalways_fn)(int j); /* always called after keypress is processed */ |
---|
| 383 | } owl_keymap; |
---|
| 384 | |
---|
| 385 | typedef struct _owl_keyhandler { |
---|
| 386 | owl_dict keymaps; /* dictionary of keymaps */ |
---|
| 387 | owl_keymap *active; /* currently active keymap */ |
---|
| 388 | int in_esc; /* escape pressed? */ |
---|
| 389 | int kpstack[OWL_KEYMAP_MAXSTACK+1]; /* current stack of keypresses */ |
---|
| 390 | int kpstackpos; /* location in stack (-1 = none) */ |
---|
| 391 | } owl_keyhandler; |
---|
| 392 | |
---|
[f4d0975] | 393 | typedef struct _owl_buddy { |
---|
| 394 | int proto; |
---|
| 395 | char *name; |
---|
| 396 | int isidle; |
---|
| 397 | int idlesince; |
---|
| 398 | } owl_buddy; |
---|
| 399 | |
---|
[aa5f725] | 400 | typedef struct _owl_buddylist { |
---|
| 401 | owl_list buddies; |
---|
| 402 | } owl_buddylist; |
---|
| 403 | |
---|
[6a415e9] | 404 | typedef struct _owl_timer { |
---|
| 405 | int direction; |
---|
| 406 | time_t starttime; |
---|
| 407 | int start; |
---|
| 408 | } owl_timer; |
---|
[aa5f725] | 409 | |
---|
[7d4fbcd] | 410 | typedef struct _owl_global { |
---|
| 411 | owl_mainwin mw; |
---|
| 412 | owl_popwin pw; |
---|
[10b866d] | 413 | owl_history cmdhist; /* command history */ |
---|
| 414 | owl_history msghist; /* outgoing message history */ |
---|
[7d4fbcd] | 415 | owl_keyhandler kh; |
---|
| 416 | owl_list filterlist; |
---|
| 417 | owl_list puntlist; |
---|
| 418 | owl_vardict vars; |
---|
| 419 | owl_cmddict cmds; |
---|
| 420 | owl_context ctx; |
---|
| 421 | int lines, cols; |
---|
| 422 | int curmsg, topmsg; |
---|
| 423 | int curmsg_vert_offset; |
---|
| 424 | owl_view current_view; |
---|
| 425 | owl_messagelist msglist; |
---|
| 426 | WINDOW *recwin, *sepwin, *msgwin, *typwin; |
---|
| 427 | int needrefresh; |
---|
| 428 | int rightshift; |
---|
| 429 | int resizepending; |
---|
| 430 | int recwinlines; |
---|
| 431 | int typwinactive; |
---|
[a8938c7] | 432 | char *thishost; |
---|
| 433 | char *homedir; |
---|
[7d4fbcd] | 434 | int direction; |
---|
| 435 | int zaway; |
---|
| 436 | char *cur_zaway_msg; |
---|
| 437 | int haveconfig; |
---|
| 438 | int config_format; |
---|
[a8938c7] | 439 | char *buffercommand; |
---|
[7d4fbcd] | 440 | owl_editwin tw; |
---|
| 441 | owl_viewwin vw; |
---|
| 442 | void *perl; |
---|
| 443 | int debug; |
---|
| 444 | int starttime; |
---|
[a8938c7] | 445 | char *startupargs; |
---|
[7d4fbcd] | 446 | int userclue; |
---|
| 447 | int nextmsgid; |
---|
| 448 | int hascolors; |
---|
| 449 | int colorpairs; |
---|
[1fd0b25] | 450 | int searchactive; |
---|
[700c712] | 451 | int newmsgproc_pid; |
---|
[8262340] | 452 | int malloced, freed; |
---|
[1fd0b25] | 453 | char *searchstring; |
---|
[7d4fbcd] | 454 | owl_filterelement fe_true; |
---|
| 455 | owl_filterelement fe_false; |
---|
| 456 | owl_filterelement fe_null; |
---|
[d09e5a1] | 457 | aim_session_t aimsess; |
---|
| 458 | aim_conn_t waitingconn; |
---|
[6a415e9] | 459 | owl_timer aim_noop_timer; |
---|
| 460 | owl_timer aim_ignorelogin_timer; |
---|
[de03334] | 461 | owl_timer aim_buddyinfo_timer; |
---|
[bd3f232] | 462 | int aim_loggedin; /* true if currently logged into AIM */ |
---|
[a352335c] | 463 | int aim_doprocessing; /* true if we should process AIM events (like pending login) */ |
---|
[bd3f232] | 464 | char *aim_screenname; /* currently logged in AIM screen name */ |
---|
| 465 | owl_buddylist buddylist; /* list of logged in AIM buddies */ |
---|
| 466 | owl_list messagequeue; /* for queueing up aim and other messages */ |
---|
[f1e629d] | 467 | owl_dict styledict; /* global dictionary of available styles */ |
---|
[cf83b7a] | 468 | char *response; /* response to the last question asked */ |
---|
[09489b89] | 469 | int havezephyr; |
---|
| 470 | int haveaim; |
---|
[7d4fbcd] | 471 | } owl_global; |
---|
| 472 | |
---|
| 473 | /* globals */ |
---|
[b2b0773] | 474 | extern owl_global g; |
---|
[7d4fbcd] | 475 | |
---|
| 476 | #include "owl_prototypes.h" |
---|
| 477 | |
---|
| 478 | /* these are missing from the zephyr includes for some reason */ |
---|
[be0a79f] | 479 | #ifdef HAVE_LIBZEPHYR |
---|
[7d4fbcd] | 480 | int ZGetSubscriptions(ZSubscription_t *, int *); |
---|
| 481 | int ZGetLocations(ZLocations_t *,int *); |
---|
[be0a79f] | 482 | #endif |
---|
[7d4fbcd] | 483 | |
---|
| 484 | #endif /* INC_OWL_H */ |
---|