~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to lib/strcasestr.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- buffer-read-only: t -*- vi: set ro: */
 
2
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
1
3
/* Case-insensitive searching in a string.
2
 
   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
3
 
   Inc.
 
4
   Copyright (C) 2005-2011 Free Software Foundation, Inc.
4
5
   Written by Bruno Haible <bruno@clisp.org>, 2005.
5
6
 
6
7
   This program is free software; you can redistribute it and/or modify
30
31
 
31
32
/* Two-Way algorithm.  */
32
33
#define RETURN_TYPE char *
33
 
#define AVAILABLE(h, h_l, j, n_l)                       \
34
 
  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
 
34
#define AVAILABLE(h, h_l, j, n_l)                       \
 
35
  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
35
36
   && ((h_l) = (j) + (n_l)))
36
37
#define CANON_ELEMENT(c) TOLOWER (c)
37
 
#define CMP_FUNC(p1, p2, l)                             \
 
38
#define CMP_FUNC(p1, p2, l)                             \
38
39
  strncasecmp ((const char *) (p1), (const char *) (p2), l)
39
40
#include "str-two-way.h"
40
41
 
56
57
  while (*haystack && *needle)
57
58
    {
58
59
      ok &= (TOLOWER ((unsigned char) *haystack)
59
 
             == TOLOWER ((unsigned char) *needle));
 
60
             == TOLOWER ((unsigned char) *needle));
60
61
      haystack++;
61
62
      needle++;
62
63
    }
73
74
     ISO C 99 section 6.2.6.1.  */
74
75
  if (needle_len < LONG_NEEDLE_THRESHOLD)
75
76
    return two_way_short_needle ((const unsigned char *) haystack,
76
 
                                 haystack_len,
77
 
                                 (const unsigned char *) needle_start,
78
 
                                 needle_len);
 
77
                                 haystack_len,
 
78
                                 (const unsigned char *) needle_start,
 
79
                                 needle_len);
79
80
  return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
80
 
                              (const unsigned char *) needle_start,
81
 
                              needle_len);
 
81
                              (const unsigned char *) needle_start,
 
82
                              needle_len);
82
83
}
83
84
 
84
85
#undef LONG_NEEDLE_THRESHOLD