~ubuntu-branches/ubuntu/oneiric/openvpn/oneiric

« back to all changes in this revision

Viewing changes to buffer.h

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2008-10-07 16:30:44 UTC
  • mfrom: (1.1.11 upstream) (10.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081007163044-ixx04wg588z1972e
Tags: 2.1~rc11-1ubuntu1
* Merge with Debian (LP: #279655), remaining diffs:
  - debian/openvpn.init.d: Added 'status' action to init script, show
    per-VPN result messages and add "--script-security 2" by default for
    backwards compatibility
  - debian/control: Added lsb-base>=3.2-14 depend to allow status_of_proc()
* Fixes regression when calling commands with arguments (LP: #277447)

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 
61
61
/* used by argv_x functions */
62
62
struct argv {
 
63
  size_t capacity;
63
64
  size_t argc;
64
65
  char **argv;
65
66
};
293
294
    ;
294
295
 
295
296
/*
296
 
 * A printf-like function (that only recognizes a subset of standard printf
297
 
 * format operators) that prints arguments to an argv list instead
298
 
 * of a standard string.  This is used to build up argv arrays for passing
299
 
 * to execve.
300
 
 */
301
 
void argv_init (struct argv *a);
302
 
struct argv argv_new (void);
303
 
void argv_reset (struct argv *a);
304
 
size_t argv_argc (const char *format);
305
 
char *argv_term (const char **f);
306
 
const char *argv_str (const struct argv *a, struct gc_arena *gc, const unsigned int flags);
307
 
struct argv argv_insert_head (const struct argv *a, const char *head);
308
 
void argv_msg (const int msglev, const struct argv *a);
309
 
void argv_msg_prefix (const int msglev, const struct argv *a, const char *prefix);
310
 
 
311
 
#define APA_CAT (1<<0) /* concatentate onto existing struct argv list */
312
 
void argv_printf_arglist (struct argv *a, const char *format, const unsigned int flags, va_list arglist);
313
 
 
314
 
void argv_printf (struct argv *a, const char *format, ...)
315
 
#ifdef __GNUC__
316
 
  __attribute__ ((format (printf, 2, 3)))
317
 
#endif
318
 
  ;
319
 
 
320
 
void argv_printf_cat (struct argv *a, const char *format, ...)
321
 
#ifdef __GNUC__
322
 
  __attribute__ ((format (printf, 2, 3)))
323
 
#endif
324
 
  ;
325
 
 
326
 
/*
327
297
 * remove/add trailing characters
328
298
 */
329
299