- Timestamp:
- Mar 1, 2004, 12:42:56 PM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 948b942
- Parents:
- c61918e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
viewwin.c
rb2b0773 rafbf668 14 14 if (text) { 15 15 owl_fmtext_append_normal(&(v->fmtext), text); 16 if (text[strlen(text)-1]!='\n' ) {16 if (text[strlen(text)-1]!='\n' && text[0]!='\0') { 17 17 owl_fmtext_append_normal(&(v->fmtext), "\n"); 18 18 } … … 24 24 v->wincols=wincols; 25 25 v->curswin=win; 26 v->onclose_hook = NULL; 27 } 28 29 void owl_viewwin_append_text(owl_viewwin *v, char *text) { 30 owl_fmtext_append_normal(&(v->fmtext), text); 31 v->textlines=owl_fmtext_num_lines(&(v->fmtext)); 26 32 } 27 33 … … 45 51 v->winlines=winlines; 46 52 v->wincols=wincols; 53 } 54 55 void owl_viewwin_set_onclose_hook(owl_viewwin *v, void (*onclose_hook) (owl_viewwin *vwin, void *data), void *onclose_hook_data) { 56 v->onclose_hook = onclose_hook; 57 v->onclose_hook_data = onclose_hook_data; 47 58 } 48 59 … … 135 146 void owl_viewwin_free(owl_viewwin *v) 136 147 { 148 if (v->onclose_hook) { 149 v->onclose_hook(v, v->onclose_hook_data); 150 } 137 151 owl_fmtext_free(&(v->fmtext)); 138 152 }
Note: See TracChangeset
for help on using the changeset viewer.