Changeset 99b50a5 for functions.c


Ignore:
Timestamp:
Feb 11, 2009, 12:20:21 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
3538bc8
Parents:
c894c15
git-author:
Nelson Elhage <nelhage@mit.edu> (02/10/09 18:46:13)
git-committer:
Nelson Elhage <nelhage@mit.edu> (02/11/09 12:20:21)
Message:
owl_function_buddylist: Replace sprintf() usages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rc894c15 r99b50a5  
    31003100  owl_buddy *b;
    31013101  owl_list anyone;
    3102   char *foo, *timestr;
     3102  char *timestr;
    31033103#ifdef HAVE_LIBZEPHYR
    3104   char *tmp, *user, *line;
     3104  char *tmp, *user;
    31053105  ZLocations_t location[200];
    31063106  int numlocs, ret;
     
    31243124        timestr=owl_strdup("");
    31253125      }
    3126       foo=owl_sprintf("  %-20.20s %-12.12s\n", owl_buddy_get_name(b), timestr);
    3127       owl_fmtext_append_normal(&fm, foo);
     3126      owl_fmtext_appendf_normal(&fm, "  %-20.20s %-12.12s\n", owl_buddy_get_name(b), timestr);
    31283127      owl_free(timestr);
    3129       owl_free(foo);
    31303128    }
    31313129  }
     
    31553153          if (ret==0) {
    31563154            for (x=0; x<numlocs; x++) {
    3157               line=owl_malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
    31583155              tmp=short_zuser(user);
    3159               sprintf(line, "  %-10.10s %-24.24s %-12.12s  %20.20s\n",
    3160                       tmp,
    3161                       location[x].host,
    3162                       location[x].tty,
    3163                       location[x].time);
    3164               owl_fmtext_append_normal(&fm, line);
     3156              owl_fmtext_appendf_normal(&fm, "  %-10.10s %-24.24s %-12.12s  %20.20s\n",
     3157                                        tmp,
     3158                                        location[x].host,
     3159                                        location[x].tty,
     3160                                        location[x].time);
    31653161              owl_free(tmp);
    3166               owl_free(line);
    31673162            }
    31683163            if (numlocs>=200) {
Note: See TracChangeset for help on using the changeset viewer.