Changeset 8dfb59c for functions.c


Ignore:
Timestamp:
Mar 23, 2010, 5:23:43 PM (14 years ago)
Author:
Nelson Elhage <nelhage@ksplice.com>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
38cc669
Parents:
1b1cd2c
git-author:
Nelson Elhage <nelhage@mit.edu> (03/04/10 09:41:04)
git-committer:
Nelson Elhage <nelhage@ksplice.com> (03/23/10 17:23:43)
Message:
Nuke the editwin buffercommand.

This was really just an alternate name for callback data that was
known to be a string. Now that we can safely pass callback data that
needs to be destroyed, it's redundant.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r1b1cd2c r8dfb59c  
    296296
    297297  owl_editwin_set_cbdata(owl_global_get_typwin(&g), data, cleanup);
    298   owl_global_set_buffercallback(&g, callback);
     298  owl_editwin_set_callback(owl_global_get_typwin(&g), callback);
    299299  owl_global_push_context(&g, OWL_CTX_EDITMULTI, e, "editmulti");
    300300}
     
    312312                         noun);
    313313
    314   owl_function_start_edit_win(line, callback, NULL, NULL);
    315   owl_global_set_buffercommand(&g, line);
     314  owl_function_start_edit_win(line, callback,
     315                              owl_strdup(line),
     316                              owl_free);
    316317}
    317318
     
    349350
    350351void owl_callback_zwrite(owl_editwin *e) {
    351   owl_function_zwrite(owl_editwin_get_command(e),
     352  char *command = owl_editwin_get_cbdata(e);
     353  owl_function_zwrite(command,
    352354                      owl_editwin_get_text(e));
    353355}
     
    447449
    448450void owl_callback_aimwrite(owl_editwin *e) {
    449   owl_function_aimwrite(owl_editwin_get_command(e),
     451  char *command = owl_editwin_get_cbdata(e);
     452  owl_function_aimwrite(command,
    450453                        owl_editwin_get_text(e));
    451454}
     
    882885
    883886void owl_callback_aimlogin(owl_editwin *e) {
    884   owl_function_aimlogin(owl_editwin_get_command(e),
     887  char *user = owl_editwin_get_cbdata(e);
     888  owl_function_aimlogin(user,
    885889                        owl_editwin_get_text(e));
    886890}
Note: See TracChangeset for help on using the changeset viewer.