~ubuntu-branches/debian/experimental/parted/experimental

« back to all changes in this revision

Viewing changes to gnulib/tests/test-vsnprintf-posix.c

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador, Otavio Salvador, Colin Watson, Xavier Oswald, Xavier Oswald, Colin Watson
  • Date: 2010-02-06 16:39:19 UTC
  • mfrom: (1.1.4 upstream) (7.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100206163919-rt7jssmitulmp010
Tags: 2.1-1
* New upstream release

[ Otavio Salvador ]
* control.in: bump preferred soname for libreadline (closes: #553824).

[ Colin Watson ]
* control.in: Remove copy-and-paste error from libparted1.8-i18n
  description (closes: #497626).
* copyright: Document parted.info's licence, namely GFDL 1.1 with no
  invariant sections, front-cover texts, or back-cover texts (closes:
  #500201).
* rules: Cell partition tables are misdetected as pc98, so disable pc98
  support on powerpc (closes: #487833).
* control.in: Don't build-depend on libdevmapper-dev on hurd-i386.
* control.in: Build-depend on libdevmapper-dev (>= 1.02.33), for
  dm_task_set_major_minor.

[ Xavier Oswald ]
* debian/control.in: 
  - Change my mail address
  - Bump Standards-Version to 3.8.3
  - Update Build-Depends on debhelper 7
* debian/compat: update version to 7
* Parted not informing the kernel of changes to the partition table 
  (Closes: #557044), fixed upstream

[ Otavio Salvador ]
* debian/watch: fix URL to download
* Switch to quilt to manage patches
  - unpartitioned-disks.dpatch, drop (merged upstream)
  - unblacklist-md.dpatch, drop (merged upstream)
  - amiga-raid-lvm-fix.dpatch, drop (not used for ages)
  - devfs.dpatch, drop (devfs is not used)
  - reiserfs-libname.dpatch, drop (referenced library is unavailable)

[ Xavier Oswald, Colin Watson ]
* Refresh update-ext4-code.patch

[ Otavio Salvador ]
* Fix parted-doc info files installation
* Add lintian overrides for parted package
* Use soname in libparted udeb name

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Test of POSIX compatible vsnprintf() function.
2
 
   Copyright (C) 2007 Free Software Foundation, Inc.
3
 
 
4
 
   This program is free software; you can redistribute it and/or modify
5
 
   it under the terms of the GNU General Public License as published by
6
 
   the Free Software Foundation; either version 2, or (at your option)
7
 
   any later version.
8
 
 
9
 
   This program is distributed in the hope that it will be useful,
10
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
   GNU General Public License for more details.
13
 
 
14
 
   You should have received a copy of the GNU General Public License
15
 
   along with this program; if not, write to the Free Software Foundation,
16
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
17
 
 
18
 
/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
19
 
 
20
 
#include <config.h>
21
 
 
22
 
#include <stdio.h>
23
 
 
24
 
#include <float.h>
25
 
#include <stdarg.h>
26
 
#include <stddef.h>
27
 
#include <stdio.h>
28
 
#include <stdint.h>
29
 
#include <stdlib.h>
30
 
#include <string.h>
31
 
 
32
 
#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
33
 
#define ASSERT(expr) \
34
 
  do                                                                         \
35
 
    {                                                                        \
36
 
      if (!(expr))                                                           \
37
 
        {                                                                    \
38
 
          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
39
 
          abort ();                                                          \
40
 
        }                                                                    \
41
 
    }                                                                        \
42
 
  while (0)
43
 
 
44
 
static int
45
 
my_snprintf (char *str, size_t size, const char *format, ...)
46
 
{
47
 
  va_list args;
48
 
  int ret;
49
 
 
50
 
  va_start (args, format);
51
 
  ret = vsnprintf (str, size, format, args);
52
 
  va_end (args);
53
 
  return ret;
54
 
}
55
 
 
56
 
#include "test-snprintf-posix.h"
57
 
 
58
 
int
59
 
main (int argc, char *argv[])
60
 
{
61
 
  test_function (my_snprintf);
62
 
  return 0;
63
 
}