~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to gnulib/regex.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-02-08 11:39:26 UTC
  • mfrom: (17.6.26 experimental)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 104.
  • Revision ID: james.westby@ubuntu.com-20110208113926-clfs90haboyk9zip
Tags: 1.99~rc1-2
* Merge 1.98+20100804-13 and 1.98+20100804-14, updating translations:
  - Kazakh (Baurzhan Muftakhidinov / Timur Birsh).
* mkconfig_skip_dmcrypt.patch: Refer to GRUB_PRELOAD_MODULES rather than
  suggesting people write a /etc/grub.d/01_modules script (thanks, Jordan
  Uggla).
* Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes
  grub-mkrelpath on btrfs subvolumes (LP: #712029).
* Add rootflags=subvol=<name> if / is on a btrfs subvolume (LP: #712029).
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Extended regular expression matching and search library.
2
 
   Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
3
 
   Inc.
4
 
   This file is part of the GNU C Library.
5
 
   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
6
 
 
7
 
   This program is free software; you can redistribute it and/or modify
8
 
   it under the terms of the GNU General Public License as published by
9
 
   the Free Software Foundation; either version 2, or (at your option)
10
 
   any later version.
11
 
 
12
 
   This program is distributed in the hope that it will be useful,
13
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
   GNU General Public License for more details.
16
 
 
17
 
   You should have received a copy of the GNU General Public License along
18
 
   with this program; if not, write to the Free Software Foundation,
19
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
20
 
 
21
 
#include <config.h>
22
 
 
23
 
/* Make sure noone compiles this code with a C++ compiler.  */
24
 
#if defined __cplusplus && defined _LIBC
25
 
# error "This is C code, use a C compiler"
26
 
#endif
27
 
 
28
 
#ifdef _LIBC
29
 
/* We have to keep the namespace clean.  */
30
 
# define regfree(preg) __regfree (preg)
31
 
# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
32
 
# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
33
 
# define regerror(errcode, preg, errbuf, errbuf_size) \
34
 
        __regerror(errcode, preg, errbuf, errbuf_size)
35
 
# define re_set_registers(bu, re, nu, st, en) \
36
 
        __re_set_registers (bu, re, nu, st, en)
37
 
# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
38
 
        __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
39
 
# define re_match(bufp, string, size, pos, regs) \
40
 
        __re_match (bufp, string, size, pos, regs)
41
 
# define re_search(bufp, string, size, startpos, range, regs) \
42
 
        __re_search (bufp, string, size, startpos, range, regs)
43
 
# define re_compile_pattern(pattern, length, bufp) \
44
 
        __re_compile_pattern (pattern, length, bufp)
45
 
# define re_set_syntax(syntax) __re_set_syntax (syntax)
46
 
# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
47
 
        __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
48
 
# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
49
 
 
50
 
# include "../locale/localeinfo.h"
51
 
#endif
52
 
 
53
 
/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
54
 
   GNU regex allows.  Include it before <regex.h>, which correctly
55
 
   #undefs RE_DUP_MAX and sets it to the right value.  */
56
 
#include <limits.h>
57
 
 
58
 
#include <regex.h>
59
 
#include "regex_internal.h"
60
 
 
61
 
#include "regex_internal.c"
62
 
#include "regcomp.c"
63
 
#include "regexec.c"
64
 
 
65
 
/* Binary backward compatibility.  */
66
 
#if _LIBC
67
 
# include <shlib-compat.h>
68
 
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
69
 
link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
70
 
int re_max_failures = 2000;
71
 
# endif
72
 
#endif