~ubuntu-branches/ubuntu/trusty/wget/trusty-updates

« back to all changes in this revision

Viewing changes to src/cmpt.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Replacements for routines missing on some systems.
2
2
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3
 
   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
3
   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4
4
 
5
5
This file is part of GNU Wget.
6
6
 
28
28
shall include the source code for the parts of OpenSSL used as well
29
29
as that of the covered work.  */
30
30
 
31
 
#include <config.h>
 
31
#include "wget.h"
32
32
 
33
33
#include <stdio.h>
34
34
#include <stdlib.h>
41
41
 
42
42
#include <errno.h>
43
43
 
44
 
#include "wget.h"
45
 
 
46
44
/* Some systems lack certain functions normally taken for granted.
47
45
   For example, Windows doesn't have strptime, and some systems don't
48
46
   have a usable fnmatch.  This file should contain fallback
74
72
 
75
73
  do
76
74
    {
77
 
      c1 = TOLOWER (*p1++);
78
 
      c2 = TOLOWER (*p2++);
 
75
      c1 = c_tolower (*p1++);
 
76
      c2 = c_tolower (*p2++);
79
77
      if (c1 == '\0')
80
78
        break;
81
79
    }
103
101
 
104
102
  do
105
103
    {
106
 
      c1 = TOLOWER (*p1++);
107
 
      c2 = TOLOWER (*p2++);
 
104
      c1 = c_tolower (*p1++);
 
105
      c2 = c_tolower (*p2++);
108
106
      if (c1 == '\0' || c1 != c2)
109
107
        return c1 - c2;
110
108
    } while (--n > 0);
433
431
    {
434
432
      /* A white space in the format string matches 0 more or white
435
433
         space in the input string.  */
436
 
      if (ISSPACE (*fmt))
 
434
      if (c_isspace (*fmt))
437
435
        {
438
 
          while (ISSPACE (*rp))
 
436
          while (c_isspace (*rp))
439
437
            ++rp;
440
438
          ++fmt;
441
439
          continue;
655
653
        case 'n':
656
654
        case 't':
657
655
          /* Match any white space.  */
658
 
          while (ISSPACE (*rp))
 
656
          while (c_isspace (*rp))
659
657
            ++rp;
660
658
          break;
661
659
        case 'p':
1368
1366
          nptr += 2;
1369
1367
          /* "0x" must be followed by at least one hex char.  If not,
1370
1368
             return 0 and place ENDPTR on 'x'. */
1371
 
          if (!ISXDIGIT (*nptr))
 
1369
          if (!c_isxdigit (*nptr))
1372
1370
            {
1373
1371
              --nptr;
1374
1372
              goto out;