mirror of
https://github.com/roytam1/mozilla45esr.git
synced 2026-05-26 15:39:48 +00:00
706b4d3150
- #565: M1367219 (6f63dc2cc) - more adblock hosts (8cf4190e2) - #565: implement nsASCIIMask from M1358297 (41b1fc937) (with vc2013 fix by replacing constexpr to MOZ_CONSTEXPR and MOZ_CONSTEXPR_VAR) - #565: M1358225 with fix for M1548306 applied (8eed11298) (with vc2013 fix by replacing constexpr to MOZ_CONSTEXPR and MOZ_CONSTEXPR_VAR) - even more adblock hosts (5d005926f) - #565: M1347737 (9ab5bb0ed) - #565: M1358297 parts 3 and 4 (3fd15a87a) - #521: baseline parser support for async/await, with toggle, without bytecode (passes tests) (0e5746aaf) - #521: fix yield handling (includes M1305566 pts 4-7) (2d25f717b) - #521: make async functions throw for compatibility when enabled (46b01b5d4) - #569: M1204714 (c45b2e8b5) - #568: M1560495 (adapted for 45) M1562033+M1466449 M1559715 M1564449 M1573160 (d019bd3dc) - #568: update certs, pins, TLDs, miners (ed3129eeb) - #570: oops (dd79a9f75) and added -bigobj compile switch to ssl/moz.build.
56 lines
1.4 KiB
C++
56 lines
1.4 KiB
C++
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsASCIIMask.h"
|
|
|
|
namespace mozilla {
|
|
|
|
MOZ_CONSTEXPR bool TestWhitespace(char c)
|
|
{
|
|
return c == '\f' || c == '\t' || c == '\r' || c == '\n' || c == ' ';
|
|
}
|
|
MOZ_CONSTEXPR_VAR ASCIIMaskArray sWhitespaceMask = CreateASCIIMask(TestWhitespace);
|
|
|
|
MOZ_CONSTEXPR bool TestCRLF(char c)
|
|
{
|
|
return c == '\r' || c == '\n';
|
|
}
|
|
MOZ_CONSTEXPR_VAR ASCIIMaskArray sCRLFMask = CreateASCIIMask(TestCRLF);
|
|
|
|
MOZ_CONSTEXPR bool TestCRLFTab(char c)
|
|
{
|
|
return c == '\r' || c == '\n' || c == '\t';
|
|
}
|
|
MOZ_CONSTEXPR_VAR ASCIIMaskArray sCRLFTabMask = CreateASCIIMask(TestCRLFTab);
|
|
|
|
MOZ_CONSTEXPR bool TestZeroToNine(char c)
|
|
{
|
|
return c == '0' || c == '1' || c == '2' || c == '3' || c == '4' ||
|
|
c == '5' || c == '6' || c == '7' || c == '8' || c == '9';
|
|
}
|
|
MOZ_CONSTEXPR_VAR ASCIIMaskArray sZeroToNineMask = CreateASCIIMask(TestZeroToNine);
|
|
|
|
const ASCIIMaskArray& ASCIIMask::MaskWhitespace()
|
|
{
|
|
return sWhitespaceMask;
|
|
}
|
|
|
|
const ASCIIMaskArray& ASCIIMask::MaskCRLF()
|
|
{
|
|
return sCRLFMask;
|
|
}
|
|
|
|
const ASCIIMaskArray& ASCIIMask::MaskCRLFTab()
|
|
{
|
|
return sCRLFTabMask;
|
|
}
|
|
|
|
const ASCIIMaskArray& ASCIIMask::Mask0to9()
|
|
{
|
|
return sZeroToNineMask;
|
|
}
|
|
|
|
} // namespace mozilla
|