Changeset 2dd9c48


Ignore:
Timestamp:
Sep 30, 2011, 9:32:19 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
a962f5c
Parents:
d6c2e03
git-author:
David Benjamin <davidben@mit.edu> (09/30/11 20:58:39)
git-committer:
David Benjamin <davidben@mit.edu> (09/30/11 21:32:19)
Message:
Use the pre-parsed argc/argv in building owl_zwrites

When called programmatically, the buff argument is, unfortunately,
bogus. Quoting that correctly is somewhat more of a pain due to
skiptokens commands. (See e3c8332fa85642544dba1222912b77cf6e32ce8c and
6a7111370ea0e1de2c3eb86a85f34cd68848d4b1. Though we really should fix
that properly sometime.) This fixes programmatically sending zwrites
from perl with spaces and such. For instance,

  BarnOwl::zwrite('-c', 'barnowl', '-i', 'spaces yay?');

and

  BarnOwl::zwrite('davidben', '-m', "mangoes\nare\ntasty");

It also, as a side effect, brings us one small step closer to
eliminating the buff argument from C commands.

Reported-by: Alex Dehnert <adehnert@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rd953ede r2dd9c48  
    19851985  }
    19861986  /* check for a zwrite -m */
    1987   z = owl_zwrite_new_from_line(buff);
     1987  z = owl_zwrite_new(argc, argv);
    19881988  if (!z) {
    19891989    owl_function_error("Error in zwrite arguments");
Note: See TracChangeset for help on using the changeset viewer.