Changeset 2527615 for functions.c


Ignore:
Timestamp:
Oct 12, 2002, 11:14:41 AM (19 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
b12c219
Parents:
d023c25
Message:
The 'zlocate' command can now handle multiple users
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rb45293f r2527615  
    15881588}
    15891589
    1590 void owl_function_zlocate(char *user, int auth) {
    1591   char buff[LINE], myuser[LINE];
    1592   char *ptr;
    1593 
    1594   strcpy(myuser, user);
    1595   ptr=strchr(myuser, '@');
    1596   if (!ptr) {
    1597     strcat(myuser, "@");
    1598     strcat(myuser, ZGetRealm());
    1599   }
    1600 
    1601   owl_zephyr_zlocate(myuser, buff, auth);
    1602   owl_function_popless_text(buff);
     1590void owl_function_zlocate(int argc, char **argv, int auth) {
     1591  owl_fmtext fm;
     1592  char *ptr, buff[LINE];
     1593  int i;
     1594
     1595  owl_fmtext_init_null(&fm);
     1596
     1597  for (i=0; i<argc; i++) {
     1598    ptr=long_zuser(argv[i]);
     1599    owl_zephyr_zlocate(ptr, buff, auth);
     1600    owl_fmtext_append_normal(&fm, buff);
     1601    owl_free(ptr);
     1602  }
     1603
     1604  owl_function_popless_fmtext(&fm);
     1605  owl_fmtext_free(&fm);
    16031606}
    16041607
Note: See TracChangeset for help on using the changeset viewer.