Changeset afbf668 for viewwin.c


Ignore:
Timestamp:
Mar 1, 2004, 12:42:56 PM (17 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
948b942
Parents:
c61918e
Message:
	pexec will now incrimentally display data as it is output
	  by the child process.  Additionally, commands running under
	  pexec may now be killed by quitting out of the popless window.
	Added muxevents select loop dispatcher.  File descriptors may
	  be registered with muxevents and handlers will be dispatched
	  to when data is available for non-blocking read/write/except.
	Switched the stderr_redir stuff to use muxevents.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • viewwin.c

    rb2b0773 rafbf668  
    1414  if (text) {
    1515    owl_fmtext_append_normal(&(v->fmtext), text);
    16     if (text[strlen(text)-1]!='\n') {
     16    if (text[strlen(text)-1]!='\n' && text[0]!='\0') {
    1717      owl_fmtext_append_normal(&(v->fmtext), "\n");
    1818    }
     
    2424  v->wincols=wincols;
    2525  v->curswin=win;
     26  v->onclose_hook = NULL;
     27}
     28
     29void 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)); 
    2632}
    2733
     
    4551  v->winlines=winlines;
    4652  v->wincols=wincols;
     53}
     54
     55void 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;
    4758}
    4859
     
    135146void owl_viewwin_free(owl_viewwin *v)
    136147{
     148  if (v->onclose_hook) {
     149    v->onclose_hook(v, v->onclose_hook_data);
     150  }
    137151  owl_fmtext_free(&(v->fmtext));
    138152}
Note: See TracChangeset for help on using the changeset viewer.