Changeset bdbec0a for perlglue.xs


Ignore:
Timestamp:
Oct 23, 2009, 3:49:11 PM (12 years ago)
Author:
Karl Ramm <kcr@1ts.org>
Branches:
master, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
b644688
Parents:
fb7742c
git-author:
Karl Ramm <kcr@1ts.org> (09/25/09 11:18:41)
git-committer:
Karl Ramm <kcr@1ts.org> (10/23/09 15:49:11)
Message:
refactor and clean owl editwin startup functions

Take function.c:owl_function_{z,aim}write_setup and perlglue.xs:start_edit_win,
and collide at .8c producing owl_function_write_setup which calls
owl_function_start_edit_win.

(Also ditching another three fugly char[1024]s)

Really, this ought to be in perl.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    rdcc3f80 rbdbec0a  
    203203        const char *line
    204204        SV *callback
    205         PREINIT:
    206                 owl_editwin * e;
    207                 char buff[1024];
    208205        CODE:
    209206        {
     
    211208                        croak("Callback must be a subref");
    212209
    213                 e = owl_global_get_typwin(&g);
    214                 owl_editwin_new_style(e, OWL_EDITWIN_STYLE_MULTILINE,
    215                                       owl_global_get_msg_history(&g));
    216                 owl_editwin_clear(e);
    217                 owl_editwin_set_dotsend(e);
    218                 snprintf(buff, 1023, "----> %s\n", line);
    219                 owl_editwin_set_locktext(e, buff);
    220 
    221                 owl_global_set_typwin_active(&g);
    222 
    223                 owl_editwin_set_cbdata(owl_global_get_typwin(&g), SvREFCNT_inc(callback));
    224                 owl_editwin_set_callback(owl_global_get_typwin(&g), owl_perlconfig_edit_callback);
     210                owl_function_start_edit_win(line, owl_perlconfig_edit_callback, SvREFCNT_inc(callback));
    225211        }
    226212
Note: See TracChangeset for help on using the changeset viewer.