~ubuntu-branches/ubuntu/maverick/exim4/maverick-updates

« back to all changes in this revision

Viewing changes to exim_monitor/em_xs.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2010-01-01 16:28:19 UTC
  • mfrom: (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100101162819-htn71my7yj4v1vkr
Tags: 4.71-3ubuntu1
* Merge with Debian unstable (lp: #501657). Remaining changes:
  + debian/patches/71_exiq_grep_error_on_messages_without_size.dpatch:
    Improve handling of broken messages when "exim4 -bp" (mailq) reports
    lines without size info.
  + Don't declare a Provides: default-mta; in Ubuntu, we want postfix to be
    the default.
  + debian/control: Change build dependencies to MySQL 5.1.
  + debian/{control,rules}: add and enable hardened build for PIE
    (Debian bug 542726).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Cambridge: exim/exim-src/exim_monitor/em_xs.c,v 1.4 2007/01/08 10:50:17 ph10 Exp $ */
 
2
 
 
3
/*************************************************
 
4
*               Exim Monitor                     *
 
5
*************************************************/
 
6
 
 
7
/* Copyright (c) University of Cambridge, 1995 - 2007 */
 
8
/* See the file NOTICE for conditions of use and distribution. */
 
9
 
 
10
/* This file contains a number of subroutines that are in effect
 
11
just alternative packaging for calls to various X functions that
 
12
happen to be convenient for this program. */
 
13
 
 
14
#include "em_hdr.h"
 
15
 
 
16
 
 
17
 
 
18
/*************************************************
 
19
*                  xs_SetValues                  *
 
20
*************************************************/
 
21
 
 
22
/* Unpick a variable-length argument list and set up an
 
23
appropriate call to XtSetValues. To make it reasonably
 
24
efficient, we keep a working Arg structure of length 15;
 
25
the largest call in eximon sets 11 values. The code uses
 
26
malloc/free if more, just in case there is ever a longer
 
27
one that gets overlooked. */
 
28
 
 
29
static Arg xs_temparg[15];
 
30
 
 
31
void xs_SetValues(Widget w, Cardinal num_args, ...)
 
32
{
 
33
int i;
 
34
va_list ap;
 
35
Arg *aa = (num_args > 15)? (Arg *)malloc(num_args*sizeof(Arg)) : xs_temparg;
 
36
va_start(ap, num_args);
 
37
for (i = 0; i < num_args; i++)
 
38
  {
 
39
  aa[i].name = va_arg(ap, String);
 
40
  aa[i].value = va_arg(ap, XtArgVal);
 
41
  }
 
42
XtSetValues(w, aa, num_args);
 
43
if (num_args > 15) free(aa);
 
44
}
 
45
 
 
46
/* End of em_xs.c */