Changeset 3f82515 for functions.c
- Timestamp:
- Feb 10, 2011, 9:08:33 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- edd0be7
- Parents:
- 6965867
- git-author:
- David Benjamin <davidben@mit.edu> (01/24/11 17:33:31)
- git-committer:
- David Benjamin <davidben@mit.edu> (02/10/11 21:08:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r9de316d1 r3f82515 350 350 } 351 351 352 void owl_function_aimwrite_setup(const char *line) 353 { 352 void owl_function_aimwrite_setup(const char *to) 353 { 354 /* TODO: We probably actually want an owl_aimwrite object like 355 * owl_zwrite. */ 356 char *line = owl_sprintf("aimwrite %s", to); 354 357 owl_function_write_setup("message"); 355 358 owl_function_start_edit_win(line, 356 359 &owl_callback_aimwrite, 357 owl_strdup( line),360 owl_strdup(to), 358 361 owl_free); 359 362 owl_free(line); 360 363 } 361 364 … … 477 480 478 481 void owl_callback_aimwrite(owl_editwin *e) { 479 char *command = owl_editwin_get_cbdata(e); 480 owl_function_aimwrite(command, 481 owl_editwin_get_text(e)); 482 } 483 484 void owl_function_aimwrite(const char *line, const char *msg) 482 char *to = owl_editwin_get_cbdata(e); 483 owl_function_aimwrite(to, owl_editwin_get_text(e), true); 484 } 485 486 void owl_function_aimwrite(const char *to, const char *msg, bool unwrap) 485 487 { 486 488 int ret; 487 const char *to;488 489 char *format_msg; 489 490 owl_message *m; 490 491 491 to = line + 9;492 493 492 /* make a formatted copy of the message */ 494 format_msg=owl_strdup(msg); 495 owl_text_wordunwrap(format_msg); 493 format_msg = owl_strdup(msg); 494 if (unwrap) 495 owl_text_wordunwrap(format_msg); 496 496 497 497 /* send the message */
Note: See TracChangeset
for help on using the changeset viewer.