Changeset 3472845 for zwrite.c


Ignore:
Timestamp:
Feb 11, 2011, 5:18:45 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
8a97586
Parents:
d4927a7
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:56:39)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 17:18:45)
Message:
Replace owl_sprintf with g_strdup_printf.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    rd4927a7 r3472845  
    176176  for (i=0; i<j; i++) {
    177177    if (strcmp(z->realm, "")) {
    178       to = owl_sprintf("%s@%s", (const char *) owl_list_get_element(&(z->recips), i), z->realm);
     178      to = g_strdup_printf("%s@%s", (const char *) owl_list_get_element(&(z->recips), i), z->realm);
    179179    } else {
    180180      to = g_strdup(owl_list_get_element(&(z->recips), i));
     
    207207      tmp = toline;
    208208      if (strcmp(z->realm, "")) {
    209         toline = owl_sprintf( "%s%s@%s ", toline, (const char *) owl_list_get_element(&(z->recips), i), z->realm);
     209        toline = g_strdup_printf( "%s%s@%s ", toline, (const char *) owl_list_get_element(&(z->recips), i), z->realm);
    210210      } else {
    211         toline = owl_sprintf( "%s%s ", toline, (const char *) owl_list_get_element(&(z->recips), i));
     211        toline = g_strdup_printf( "%s%s ", toline, (const char *) owl_list_get_element(&(z->recips), i));
    212212      }
    213213      g_free(tmp);
     
    216216    tmp = owl_validate_utf8(msg);
    217217    tmp2 = owl_text_expand_tabs(tmp);
    218     z->message=owl_sprintf("%s\n%s", toline, tmp2);
     218    z->message=g_strdup_printf("%s\n%s", toline, tmp2);
    219219    g_free(toline);
    220220    g_free(tmp);
     
    250250    for (i=0; i<j; i++) {
    251251      if (strcmp(z->realm, "")) {
    252         to = owl_sprintf("%s@%s", (const char *) owl_list_get_element(&(z->recips), i), z->realm);
     252        to = g_strdup_printf("%s@%s", (const char *) owl_list_get_element(&(z->recips), i), z->realm);
    253253      } else {
    254254        to = g_strdup( owl_list_get_element(&(z->recips), i));
     
    262262    }
    263263  } else {
    264     to = owl_sprintf( "@%s", z->realm);
     264    to = g_strdup_printf( "@%s", z->realm);
    265265    ret = send_zephyr(z->opcode, z->zsig, z->class, z->inst, to, z->message);
    266266  }
Note: See TracChangeset for help on using the changeset viewer.