Changeset 3f6555d
- Timestamp:
- May 16, 2010, 1:15:25 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- c314f39
- Parents:
- f034ac0
- git-author:
- David Benjamin <davidben@mit.edu> (05/15/10 17:38:31)
- git-committer:
- David Benjamin <davidben@mit.edu> (05/16/10 01:15:25)
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
rae333f0 r3f6555d 48 48 keypress.c keymap.c keybinding.c cmd.c context.c \ 49 49 aim.c buddy.c buddylist.c style.c errqueue.c \ 50 zbuddylist.c popexec.c obarray.cselect.c wcwidth.c \50 zbuddylist.c popexec.c select.c wcwidth.c \ 51 51 glib_compat.c filterproc.c 52 52 -
global.c
r0881cdd r3f6555d 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)); … … 1012 1010 } 1013 1011 1014 const char * owl_global_intern(owl_global *g, const char * string)1015 {1016 return owl_obarray_insert(&(g->obarray), string);1017 }1018 1019 1012 owl_list *owl_global_get_io_dispatch_list(owl_global *g) 1020 1013 { -
message.c
r9a7b4f2 r3f6555d 74 74 if(pair == NULL) { 75 75 pair = owl_malloc(sizeof(owl_pair)); 76 owl_pair_create(pair, owl_global_intern(&g,attrname), NULL);76 owl_pair_create(pair, g_intern_string(attrname), NULL); 77 77 owl_list_append_element(&(m->attributes), pair); 78 78 } … … 496 496 void owl_message_set_hostname(owl_message *m, const char *hostname) 497 497 { 498 m->hostname =owl_global_intern(&g,hostname);498 m->hostname = g_intern_string(hostname); 499 499 } 500 500 -
owl.h
r7ba9e0de r3f6555d 521 521 short **pairs; 522 522 } owl_colorpair_mgr; 523 524 typedef struct _owl_obarray {525 owl_list strings;526 } owl_obarray;527 523 528 524 typedef struct _owl_io_dispatch { … … 623 619 int pseudologin_notify; 624 620 struct termios startup_tio; 625 owl_obarray obarray;626 621 owl_list io_dispatch_list; 627 622 owl_list psa_list; -
tester.c
rf034ac0 r3f6555d 33 33 numfailures += owl_variable_regtest(); 34 34 numfailures += owl_filter_regtest(); 35 numfailures += owl_obarray_regtest();36 35 numfailures += owl_editwin_regtest(); 37 36 if (numfailures) { … … 301 300 } 302 301 303 304 int owl_obarray_regtest(void) {305 int numfailed = 0;306 const char *p,*p2;307 308 owl_obarray oa;309 owl_obarray_init(&oa);310 311 printf("# BEGIN testing owl_obarray\n");312 313 p = owl_obarray_insert(&oa, "test");314 FAIL_UNLESS("returned string is equal", p && !strcmp(p, "test"));315 p2 = owl_obarray_insert(&oa, "test");316 FAIL_UNLESS("returned string is equal", p2 && !strcmp(p2, "test"));317 FAIL_UNLESS("returned the same string", p2 && p == p2);318 319 p = owl_obarray_insert(&oa, "test2");320 FAIL_UNLESS("returned string is equal", p && !strcmp(p, "test2"));321 p2 = owl_obarray_find(&oa, "test2");322 FAIL_UNLESS("returned the same string", p2 && !strcmp(p2, "test2"));323 324 p = owl_obarray_find(&oa, "nothere");325 FAIL_UNLESS("Didn't find a string that isn't there", p == NULL);326 327 printf("# END testing owl_obarray (%d failures)\n", numfailed);328 329 return numfailed;330 }331 332 302 int owl_editwin_regtest(void) { 333 303 int numfailed = 0;
Note: See TracChangeset
for help on using the changeset viewer.