~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to grub-core/gnulib/printf-args.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Decomposed printf argument list.
 
2
   Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software
 
3
   Foundation, Inc.
 
4
 
 
5
   This program is free software; you can redistribute it and/or modify
 
6
   it under the terms of the GNU General Public License as published by
 
7
   the Free Software Foundation; either version 3, or (at your option)
 
8
   any later version.
 
9
 
 
10
   This program is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
   GNU General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU General Public License along
 
16
   with this program; if not, write to the Free Software Foundation,
 
17
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
18
 
 
19
#ifndef _PRINTF_ARGS_H
 
20
#define _PRINTF_ARGS_H
 
21
 
 
22
/* This file can be parametrized with the following macros:
 
23
     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
 
24
     PRINTF_FETCHARGS   Name of the function to be declared.
 
25
     STATIC             Set to 'static' to declare the function static.  */
 
26
 
 
27
/* Default parameters.  */
 
28
#ifndef PRINTF_FETCHARGS
 
29
# define PRINTF_FETCHARGS printf_fetchargs
 
30
#endif
 
31
 
 
32
/* Get size_t.  */
 
33
#include <stddef.h>
 
34
 
 
35
/* Get wchar_t.  */
 
36
#if HAVE_WCHAR_T
 
37
# include <stddef.h>
 
38
#endif
 
39
 
 
40
/* Get wint_t.  */
 
41
#if HAVE_WINT_T
 
42
# include <wchar.h>
 
43
#endif
 
44
 
 
45
/* Get va_list.  */
 
46
#include <stdarg.h>
 
47
 
 
48
 
 
49
/* Argument types */
 
50
typedef enum
 
51
{
 
52
  TYPE_NONE,
 
53
  TYPE_SCHAR,
 
54
  TYPE_UCHAR,
 
55
  TYPE_SHORT,
 
56
  TYPE_USHORT,
 
57
  TYPE_INT,
 
58
  TYPE_UINT,
 
59
  TYPE_LONGINT,
 
60
  TYPE_ULONGINT,
 
61
#if HAVE_LONG_LONG_INT
 
62
  TYPE_LONGLONGINT,
 
63
  TYPE_ULONGLONGINT,
 
64
#endif
 
65
  TYPE_DOUBLE,
 
66
  TYPE_LONGDOUBLE,
 
67
  TYPE_CHAR,
 
68
#if HAVE_WINT_T
 
69
  TYPE_WIDE_CHAR,
 
70
#endif
 
71
  TYPE_STRING,
 
72
#if HAVE_WCHAR_T
 
73
  TYPE_WIDE_STRING,
 
74
#endif
 
75
  TYPE_POINTER,
 
76
  TYPE_COUNT_SCHAR_POINTER,
 
77
  TYPE_COUNT_SHORT_POINTER,
 
78
  TYPE_COUNT_INT_POINTER,
 
79
  TYPE_COUNT_LONGINT_POINTER
 
80
#if HAVE_LONG_LONG_INT
 
81
, TYPE_COUNT_LONGLONGINT_POINTER
 
82
#endif
 
83
#if ENABLE_UNISTDIO
 
84
  /* The unistdio extensions.  */
 
85
, TYPE_U8_STRING
 
86
, TYPE_U16_STRING
 
87
, TYPE_U32_STRING
 
88
#endif
 
89
} arg_type;
 
90
 
 
91
/* Polymorphic argument */
 
92
typedef struct
 
93
{
 
94
  arg_type type;
 
95
  union
 
96
  {
 
97
    signed char                 a_schar;
 
98
    unsigned char               a_uchar;
 
99
    short                       a_short;
 
100
    unsigned short              a_ushort;
 
101
    int                         a_int;
 
102
    unsigned int                a_uint;
 
103
    long int                    a_longint;
 
104
    unsigned long int           a_ulongint;
 
105
#if HAVE_LONG_LONG_INT
 
106
    long long int               a_longlongint;
 
107
    unsigned long long int      a_ulonglongint;
 
108
#endif
 
109
    float                       a_float;
 
110
    double                      a_double;
 
111
    long double                 a_longdouble;
 
112
    int                         a_char;
 
113
#if HAVE_WINT_T
 
114
    wint_t                      a_wide_char;
 
115
#endif
 
116
    const char*                 a_string;
 
117
#if HAVE_WCHAR_T
 
118
    const wchar_t*              a_wide_string;
 
119
#endif
 
120
    void*                       a_pointer;
 
121
    signed char *               a_count_schar_pointer;
 
122
    short *                     a_count_short_pointer;
 
123
    int *                       a_count_int_pointer;
 
124
    long int *                  a_count_longint_pointer;
 
125
#if HAVE_LONG_LONG_INT
 
126
    long long int *             a_count_longlongint_pointer;
 
127
#endif
 
128
#if ENABLE_UNISTDIO
 
129
    /* The unistdio extensions.  */
 
130
    const uint8_t *             a_u8_string;
 
131
    const uint16_t *            a_u16_string;
 
132
    const uint32_t *            a_u32_string;
 
133
#endif
 
134
  }
 
135
  a;
 
136
}
 
137
argument;
 
138
 
 
139
typedef struct
 
140
{
 
141
  size_t count;
 
142
  argument *arg;
 
143
}
 
144
arguments;
 
145
 
 
146
 
 
147
/* Fetch the arguments, putting them into a. */
 
148
#ifdef STATIC
 
149
STATIC
 
150
#else
 
151
extern
 
152
#endif
 
153
int PRINTF_FETCHARGS (va_list args, arguments *a);
 
154
 
 
155
#endif /* _PRINTF_ARGS_H */