Changeset f82e233


Ignore:
Timestamp:
Dec 1, 2003, 2:04:31 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
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:
3162c8a
Parents:
c1be0c6
Message:
Un-word-wrap text when sending AIM messages.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rc1be0c6 rf82e233  
    11$Id$
    22
    3 2.0.13-pre-2
     32.0.13-pre-3
    44        Changed startup message for new mailing list
    55        blist now prints AIM info even if .anyone is unreadable
     
    1111                although there is likely an underlying problem here
    1212                that would lead to this case.
    13         Print the username on aim login failure, not something random like the password.  ;)
     13        Print the username on aim login failure, not something random like
     14                the password.  ;)
     15        Un-word-wrap text when sending AIM messages.
    1416       
    15172.0.12
  • functions.c

    ra0a5179 rf82e233  
    432432{
    433433  int ret;
     434  char *msg, *format_msg;
     435
     436  /* make a formatted copy of the message */
     437  msg=owl_editwin_get_text(owl_global_get_typwin(&g));
     438  format_msg=owl_strdup(msg);
     439  owl_text_wordunwrap(format_msg);
    434440 
    435   /*  send the message */
    436   ret=owl_aim_send_im(to, owl_editwin_get_text(owl_global_get_typwin(&g)));
     441  /* send the message */
     442  ret=owl_aim_send_im(to, format_msg);
    437443  if (!ret) {
    438444    owl_function_makemsg("AIM message sent.");
     
    443449  /* display the message as an outgoing message in the receive window */
    444450  if (owl_global_is_displayoutgoing(&g)) {
    445     owl_function_make_outgoing_aim(owl_editwin_get_text(owl_global_get_typwin(&g)), to);
     451    owl_function_make_outgoing_aim(msg, to);
    446452  }
    447453
    448454  /* log it if we have logging turned on */
    449455  if (owl_global_is_logging(&g)) {
    450     owl_log_outgoing_aim(to, owl_editwin_get_text(owl_global_get_typwin(&g)));
    451   }
     456    owl_log_outgoing_aim(to, msg);
     457  }
     458
     459  owl_free(format_msg);
    452460}
    453461
  • text.c

    r995eb4b rf82e233  
    258258}
    259259
     260/* this modifies 'in' */
     261void owl_text_wordunwrap(char *in)
     262{
     263  int i, j;
     264
     265  j=strlen(in);
     266  for (i=0; i<j; i++) {
     267    if ( (in[i]=='\n') &&
     268         ((i>0) && (i<(j-1))) &&
     269         (in[i-1]!='\n') &&
     270         (in[i+1]!='\n') )
     271      in[i]=' ';
     272  }
     273}
     274
    260275/* exactly like strstr but case insensitive */
    261276char *stristr(char *a, char *b)
Note: See TracChangeset for help on using the changeset viewer.