Bug fix: tarring in Windows and untarring in Linux

Also updated depdencies
This commit is contained in:
Zack Scholl 2017-11-04 05:38:27 -06:00
parent bab9ceb1bb
commit 8ff1fe1d2a
100 changed files with 70424 additions and 502 deletions

22
Gopkg.lock generated
View File

@ -5,7 +5,7 @@
branch = "master"
name = "github.com/dustin/go-humanize"
packages = ["."]
revision = "77ed807830b4df581417e7f89eb81d4872832b72"
revision = "6d15c0ae71e55ed645c21ac4945aaadbc0e9a590"
[[projects]]
branch = "master"
@ -31,39 +31,39 @@
revision = "98649a7575ca56014cb102885f09f05bb2cccb49"
version = "v0.3.1"
[[projects]]
name = "github.com/schollz/tarinator-go"
packages = ["."]
revision = "835680f17d252bd7a6047e670079f35e5626dc1e"
version = "v0.1.0"
[[projects]]
name = "github.com/sirupsen/logrus"
packages = ["."]
revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e"
version = "v1.0.3"
[[projects]]
branch = "master"
name = "github.com/verybluebot/tarinator-go"
packages = ["."]
revision = "f75724675c91d0c731b69c81e0985de07663f007"
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["pbkdf2","scrypt","ssh/terminal"]
revision = "2509b142fb2b797aa7587dad548f113b2c0f20ce"
revision = "bd6f299fb381e4c3393d1c4b1f0b94f5e77650c8"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix","windows"]
revision = "0649f9fe46d917da5591af4d4784b6badd31d7e5"
revision = "4fe5d7925040acd225bf9c7cee65e82d07f06bff"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = ["transform"]
revision = "6eab0e8f74e86c598ec3b6fad4888e0c11482d48"
revision = "88f656faf3f37f690df1a32515b479415e1a6769"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "bdbf624014ff879def63602194ddf9c775d9d8461e0b2e687314dc8b855ffc50"
inputs-digest = "12bd97b8551ca41a157e3e1d8f42f1e0b1ee2e484b00d1eaec92e928e42f0244"
solver-name = "gps-cdcl"
solver-version = 1

View File

@ -15,7 +15,7 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/schollz/progressbar"
"github.com/verybluebot/tarinator-go"
"github.com/schollz/tarinator-go"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"

View File

@ -88,5 +88,37 @@ Example:
humanize.SI(0.00000000223, "M") // 2.23 nM
```
## English-specific functions
The following functions are in the `humanize/english` subpackage.
### Plurals
Simple English pluralization
```go
english.PluralWord(1, "object", "") // object
english.PluralWord(42, "object", "") // objects
english.PluralWord(2, "bus", "") // buses
english.PluralWord(99, "locus", "loci") // loci
english.Plural(1, "object", "") // 1 object
english.Plural(42, "object", "") // 42 objects
english.Plural(2, "bus", "") // 2 buses
english.Plural(99, "locus", "loci") // 99 loci
```
### Word series
Format comma-separated words lists with conjuctions:
```go
english.WordSeries([]string{"foo"}, "and") // foo
english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar
english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz
english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz
```
[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion
[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix

96
vendor/github.com/dustin/go-humanize/english/words.go generated vendored Normal file
View File

@ -0,0 +1,96 @@
// Package english provides utilities to generate more user-friendly English output.
package english
import (
"fmt"
"strings"
)
// These are included because they are common technical terms.
var specialPlurals = map[string]string{
"index": "indices",
"matrix": "matrices",
"vertex": "vertices",
}
var sibilantEndings = []string{"s", "sh", "tch", "x"}
var isVowel = map[byte]bool{
'A': true, 'E': true, 'I': true, 'O': true, 'U': true,
'a': true, 'e': true, 'i': true, 'o': true, 'u': true,
}
// PluralWord builds the plural form of an English word.
// The simple English rules of regular pluralization will be used
// if the plural form is an empty string (i.e. not explicitly given).
// The special cases are not guaranteed to work for strings outside ASCII.
func PluralWord(quantity int, singular, plural string) string {
if quantity == 1 {
return singular
}
if plural != "" {
return plural
}
if plural = specialPlurals[singular]; plural != "" {
return plural
}
// We need to guess what the English plural might be. Keep this
// function simple! It doesn't need to know about every possiblity;
// only regular rules and the most common special cases.
//
// Reference: http://en.wikipedia.org/wiki/English_plural
for _, ending := range sibilantEndings {
if strings.HasSuffix(singular, ending) {
return singular + "es"
}
}
l := len(singular)
if l >= 2 && singular[l-1] == 'o' && !isVowel[singular[l-2]] {
return singular + "es"
}
if l >= 2 && singular[l-1] == 'y' && !isVowel[singular[l-2]] {
return singular[:l-1] + "ies"
}
return singular + "s"
}
// Plural formats an integer and a string into a single pluralized string.
// The simple English rules of regular pluralization will be used
// if the plural form is an empty string (i.e. not explicitly given).
func Plural(quantity int, singular, plural string) string {
return fmt.Sprintf("%d %s", quantity, PluralWord(quantity, singular, plural))
}
// WordSeries converts a list of words into a word series in English.
// It returns a string containing all the given words separated by commas,
// the coordinating conjunction, and a serial comma, as appropriate.
func WordSeries(words []string, conjunction string) string {
switch len(words) {
case 0:
return ""
case 1:
return words[0]
default:
return fmt.Sprintf("%s %s %s", strings.Join(words[:len(words)-1], ", "), conjunction, words[len(words)-1])
}
}
// OxfordWordSeries converts a list of words into a word series in English,
// using an Oxford comma (https://en.wikipedia.org/wiki/Serial_comma). It
// returns a string containing all the given words separated by commas, the
// coordinating conjunction, and a serial comma, as appropriate.
func OxfordWordSeries(words []string, conjunction string) string {
switch len(words) {
case 0:
return ""
case 1:
return words[0]
case 2:
return strings.Join(words, fmt.Sprintf(" %s ", conjunction))
default:
return fmt.Sprintf("%s, %s %s", strings.Join(words[:len(words)-1], ", "), conjunction, words[len(words)-1])
}
}

View File

@ -0,0 +1,94 @@
package english
import (
"testing"
)
func TestPluralWord(t *testing.T) {
tests := []struct {
n int
singular, plural string
want string
}{
{0, "object", "", "objects"},
{1, "object", "", "object"},
{-1, "object", "", "objects"},
{42, "object", "", "objects"},
{2, "vax", "vaxen", "vaxen"},
// special cases
{2, "index", "", "indices"},
// ending in a sibilant sound
{2, "bus", "", "buses"},
{2, "bush", "", "bushes"},
{2, "watch", "", "watches"},
{2, "box", "", "boxes"},
// ending with 'o' preceded by a consonant
{2, "hero", "", "heroes"},
// ending with 'y' preceded by a consonant
{2, "lady", "", "ladies"},
{2, "day", "", "days"},
}
for _, tt := range tests {
if got := PluralWord(tt.n, tt.singular, tt.plural); got != tt.want {
t.Errorf("PluralWord(%d, %q, %q)=%q; want: %q", tt.n, tt.singular, tt.plural, got, tt.want)
}
}
}
func TestPlural(t *testing.T) {
tests := []struct {
n int
singular, plural string
want string
}{
{1, "object", "", "1 object"},
{42, "object", "", "42 objects"},
}
for _, tt := range tests {
if got := Plural(tt.n, tt.singular, tt.plural); got != tt.want {
t.Errorf("Plural(%d, %q, %q)=%q; want: %q", tt.n, tt.singular, tt.plural, got, tt.want)
}
}
}
func TestWordSeries(t *testing.T) {
tests := []struct {
words []string
conjunction string
want string
}{
{[]string{}, "and", ""},
{[]string{"foo"}, "and", "foo"},
{[]string{"foo", "bar"}, "and", "foo and bar"},
{[]string{"foo", "bar", "baz"}, "and", "foo, bar and baz"},
{[]string{"foo", "bar", "baz"}, "or", "foo, bar or baz"},
}
for _, tt := range tests {
if got := WordSeries(tt.words, tt.conjunction); got != tt.want {
t.Errorf("WordSeries(%q, %q)=%q; want: %q", tt.words, tt.conjunction, got, tt.want)
}
}
}
func TestOxfordWordSeries(t *testing.T) {
tests := []struct {
words []string
conjunction string
want string
}{
{[]string{}, "and", ""},
{[]string{"foo"}, "and", "foo"},
{[]string{"foo", "bar"}, "and", "foo and bar"},
{[]string{"foo", "bar", "baz"}, "and", "foo, bar, and baz"},
{[]string{"foo", "bar", "baz"}, "or", "foo, bar, or baz"},
}
for _, tt := range tests {
if got := OxfordWordSeries(tt.words, tt.conjunction); got != tt.want {
t.Errorf("OxfordWordSeries(%q, %q)=%q; want: %q", tt.words, tt.conjunction, got, tt.want)
}
}
}

148
vendor/github.com/schollz/tarinator-go/tarinator.go generated vendored Normal file
View File

@ -0,0 +1,148 @@
package tarinator
import (
"archive/tar"
"compress/gzip"
"io"
"log"
"os"
"path/filepath"
"strings"
)
func Tarinate(paths []string, tarPath string) error {
file, err := os.Create(tarPath)
if err != nil {
return err
}
defer file.Close()
var fileReader io.WriteCloser = file
if strings.HasSuffix(tarPath, ".gz") {
fileReader = gzip.NewWriter(file)
defer fileReader.Close()
}
tw := tar.NewWriter(fileReader)
defer tw.Close()
for _, i := range paths {
if err := tarwalk(i, "", tw); err != nil {
return err
}
}
return nil
}
func tarwalk(source, target string, tw *tar.Writer) error {
info, err := os.Stat(source)
if err != nil {
return nil
}
var baseDir string
if info.IsDir() {
baseDir = filepath.Base(source)
}
return filepath.Walk(source,
func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
header, err := tar.FileInfoHeader(info, info.Name())
if err != nil {
return err
}
if baseDir != "" {
header.Name = filepath.ToSlash(filepath.Join(baseDir, strings.TrimPrefix(path, source)))
}
if err := tw.WriteHeader(header); err != nil {
return err
}
if info.IsDir() {
return nil
}
if !info.Mode().IsRegular() {
return nil
}
file, err := os.Open(path)
if err != nil {
return err
}
defer file.Close()
_, err = io.Copy(tw, file)
return err
})
}
func UnTarinate(extractPath, sourcefile string) error {
file, err := os.Open(sourcefile)
if err != nil {
return err
}
defer file.Close()
var fileReader io.ReadCloser = file
if strings.HasSuffix(sourcefile, ".gz") {
if fileReader, err = gzip.NewReader(file); err != nil {
return err
}
defer fileReader.Close()
}
tarBallReader := tar.NewReader(fileReader)
for {
header, err := tarBallReader.Next()
if err != nil {
if err == io.EOF {
break
}
return err
}
filename := filepath.Join(extractPath, filepath.FromSlash(header.Name))
switch header.Typeflag {
case tar.TypeDir:
err = os.MkdirAll(filename, os.FileMode(header.Mode)) // or use 0755 if you prefer
if err != nil {
return err
}
case tar.TypeReg:
writer, err := os.Create(filename)
if err != nil {
return err
}
io.Copy(writer, tarBallReader)
err = os.Chmod(filename, os.FileMode(header.Mode))
if err != nil {
return err
}
writer.Close()
default:
log.Printf("Unable to untar type: %c in file %s", header.Typeflag, filename)
}
}
return nil
}

View File

@ -0,0 +1,57 @@
package tarinator
import (
"io/ioutil"
"os"
"testing"
)
func TestArchive(t *testing.T) {
paths := []string{
"somescript.sh",
"test_files/",
}
err := Tarinate(paths, "output_test.tar.gz")
if err != nil {
t.Errorf("Failed: %s\n", err)
return
}
}
func TestOpen(t *testing.T) {
if _, err := os.Stat("output_test.tar.gz"); os.IsNotExist(err) {
t.Error("No file for untaring dected")
return
}
err := os.Mkdir("testing", 0755)
if err != nil {
os.RemoveAll("testing")
os.Mkdir("testing", 0755)
}
err = UnTarinate("testing", "output_test.tar.gz")
if err != nil {
t.Errorf("Failed untaring: %s\n", err)
return
}
files, err := ioutil.ReadDir("testing")
if err != nil {
t.Error(err)
return
}
if len(files) != 2 {
t.Errorf("The directory wasn't actually written")
}
}
func isDir(pth string) (bool, error) {
fi, err := os.Stat(pth)
if err != nil {
return false, err
}
return fi.IsDir(), nil
}

View File

@ -1,148 +0,0 @@
package tarinator
import(
"archive/tar"
"os"
"io"
"log"
"path/filepath"
"strings"
"compress/gzip"
)
func Tarinate(paths []string, tarPath string) error {
file, err := os.Create(tarPath)
if err != nil {
return err
}
defer file.Close()
var fileReader io.WriteCloser = file
if strings.HasSuffix(tarPath, ".gz") {
fileReader = gzip.NewWriter(file)
defer fileReader.Close()
}
tw := tar.NewWriter(fileReader)
defer tw.Close()
for _,i := range paths {
if err := tarwalk(i, "", tw); err != nil {
return err
}
}
return nil
}
func tarwalk(source, target string, tw *tar.Writer) error {
info, err := os.Stat(source)
if err != nil {
return nil
}
var baseDir string
if info.IsDir() {
baseDir = filepath.Base(source)
}
return filepath.Walk(source,
func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
header, err := tar.FileInfoHeader(info, info.Name())
if err != nil {
return err
}
if baseDir != "" {
header.Name = filepath.Join(baseDir, strings.TrimPrefix(path, source))
}
if err := tw.WriteHeader(header); err != nil {
return err
}
if info.IsDir() {
return nil
}
if !info.Mode().IsRegular() {
return nil
}
file, err := os.Open(path)
if err != nil {
return err
}
defer file.Close()
_, err = io.Copy(tw, file)
return err
})
}
func UnTarinate(extractPath, sourcefile string) error {
file, err := os.Open(sourcefile)
if err != nil {
return err
}
defer file.Close()
var fileReader io.ReadCloser = file
if strings.HasSuffix(sourcefile, ".gz") {
if fileReader, err = gzip.NewReader(file); err != nil {
return err
}
defer fileReader.Close()
}
tarBallReader := tar.NewReader(fileReader)
for {
header, err := tarBallReader.Next()
if err != nil {
if err == io.EOF {
break
}
return err
}
filename := filepath.Join(extractPath, header.Name)
switch header.Typeflag {
case tar.TypeDir:
err = os.MkdirAll(filename, os.FileMode(header.Mode)) // or use 0755 if you prefer
if err != nil {
return err
}
case tar.TypeReg:
writer, err := os.Create(filename)
if err != nil {
return err
}
io.Copy(writer, tarBallReader)
err = os.Chmod(filename, os.FileMode(header.Mode))
if err != nil {
return err
}
writer.Close()
default:
log.Printf("Unable to untar type: %c in file %s", header.Typeflag, filename)
}
}
return nil
}

View File

@ -1,37 +0,0 @@
package tarinator
import(
"testing"
"os"
)
func TestTarGzFromFiles(t *testing.T) {
paths := []string{
"somescript.sh",
"test_files/",
}
err := Tarinate(paths, "output_test.tar.gz")
if err != nil {
t.Errorf("Failed: %s\n", err)
return
}
}
func TestUnTarGzFromFiles(t *testing.T) {
if _, err := os.Stat("output_test.tar.gz"); os.IsNotExist(err) {
t.Error("No file for untaring dected")
return
}
err := UnTarinate("/tmp", "output_test.tar.gz")
if err != nil {
t.Errorf("Failed untaring: %s\n", err)
return
}
}

View File

@ -6,7 +6,7 @@
// https://ed25519.cr.yp.to/.
//
// These functions are also compatible with the “Ed25519” function defined in
// https://tools.ietf.org/html/draft-irtf-cfrg-eddsa-05.
// RFC 8032.
package ed25519
// This code is a port of the public domain, “ref10” implementation of ed25519

View File

@ -17,10 +17,10 @@ RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/l
# GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this)
RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git
# Get Go 1.8 (https://github.com/docker-library/golang/blob/master/1.8/Dockerfile)
ENV GOLANG_VERSION 1.8
# Get Go 1.9.2
ENV GOLANG_VERSION 1.9.2
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca
ENV GOLANG_DOWNLOAD_SHA256 de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
@ -33,7 +33,7 @@ ENV PATH /usr/local/go/bin:$PATH
RUN apt-get update && apt-get install -y \
gawk make python \
gcc gcc-multilib \
gettext texinfo \
gettext texinfo \
&& rm -rf /var/lib/apt/lists/*
# Emulator and cross compilers
RUN apt-get update && apt-get install -y \

View File

@ -178,6 +178,7 @@ func main() {
for _, p := range ptracePairs {
if err := generatePtracePair(p.a1, p.a2); err != nil {
fmt.Printf("%v\n***** FAILURE: %s/%s *****\n\n", err, p.a1, p.a2)
ok = false
}
}
if ok {
@ -423,7 +424,7 @@ func generatePtracePair(arch1, arch2 string) error {
return err
}
buf := bufio.NewWriter(f)
fmt.Fprintf(buf, "// Code generated by linux/mkall.go generatePtracePair(%s, %s). DO NOT EDIT.\n", arch1, arch2)
fmt.Fprintf(buf, "// Code generated by linux/mkall.go generatePtracePair(%s, %s). DO NOT EDIT.\n", arch1, arch2)
fmt.Fprintf(buf, "\n")
fmt.Fprintf(buf, "// +build linux\n")
fmt.Fprintf(buf, "// +build %s %s\n", arch1, arch2)

View File

@ -38,6 +38,8 @@ includes_Darwin='
#define _DARWIN_C_SOURCE
#define KERNEL
#define _DARWIN_USE_64_BIT_INODE
#include <stdint.h>
#include <sys/attr.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/ptrace.h>
@ -423,6 +425,8 @@ ccflags="$@"
$2 ~ /^GENL_/ ||
$2 ~ /^UTIME_/ ||
$2 ~ /^XATTR_(CREATE|REPLACE)/ ||
$2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||
$2 ~ /^FSOPT_/ ||
$2 ~ /^WDIOC_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||

View File

@ -56,6 +56,11 @@ func main() {
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
// Convert [65]int8 to [65]byte in Utsname members to simplify
// conversion to string; see golang.org/issue/20753
convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`)
b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte"))
// We refuse to export private fields on s390x
if goarch == "s390x" && goos == "linux" {
// Remove cgo padding fields

View File

@ -49,19 +49,3 @@ func BytePtrFromString(s string) (*byte, error) {
// Single-word zero for use when we need a valid pointer to 0 bytes.
// See mkunix.pl.
var _zero uintptr
func (ts *Timespec) Unix() (sec int64, nsec int64) {
return int64(ts.Sec), int64(ts.Nsec)
}
func (tv *Timeval) Unix() (sec int64, nsec int64) {
return int64(tv.Sec), int64(tv.Usec) * 1000
}
func (ts *Timespec) Nano() int64 {
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
}
func (tv *Timeval) Nano() int64 {
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
}

View File

@ -570,7 +570,12 @@ func UtimesNano(path string, ts []Timespec) error {
if len(ts) != 2 {
return EINVAL
}
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
// Darwin setattrlist can set nanosecond timestamps
err := setattrlistTimes(path, ts, 0)
if err != ENOSYS {
return err
}
err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
if err != ENOSYS {
return err
}
@ -590,6 +595,10 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
if len(ts) != 2 {
return EINVAL
}
err := setattrlistTimes(path, ts, flags)
if err != ENOSYS {
return err
}
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
}
@ -607,6 +616,15 @@ func Futimes(fd int, tv []Timeval) error {
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
// TODO: wrap
// Acct(name nil-string) (err error)
// Gethostuuid(uuid *byte, timeout *Timespec) (err error)

View File

@ -187,6 +187,37 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
func setattrlistTimes(path string, times []Timespec, flags int) error {
_p0, err := BytePtrFromString(path)
if err != nil {
return err
}
var attrList attrList
attrList.bitmapCount = ATTR_BIT_MAP_COUNT
attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
// order is mtime, atime: the opposite of Chtimes
attributes := [2]Timespec{times[1], times[0]}
options := 0
if flags&AT_SYMLINK_NOFOLLOW != 0 {
options |= FSOPT_NOFOLLOW
}
_, _, e1 := Syscall6(
SYS_SETATTRLIST,
uintptr(unsafe.Pointer(_p0)),
uintptr(unsafe.Pointer(&attrList)),
uintptr(unsafe.Pointer(&attributes)),
uintptr(unsafe.Sizeof(attributes)),
uintptr(options),
0,
)
if e1 != 0 {
return e1
}
return nil
}
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
// Darwin doesn't support SYS_UTIMENSAT
return ENOSYS
@ -239,15 +270,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
return &value, err
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
/*
* Exposed directly
*/

View File

@ -125,13 +125,9 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
/*

View File

@ -120,6 +120,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
// Derive extattr namespace and attribute name
func xattrnamespace(fullattr string) (ns int, attr string, err error) {
@ -391,15 +396,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
return &value, err
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
/*
* Exposed directly
*/
@ -559,7 +555,6 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
// Searchfs
// Delete
// Copyfile
// Poll
// Watchevent
// Waitevent
// Modwatch

View File

@ -56,34 +56,6 @@ func TestIoctlGetInt(t *testing.T) {
t.Logf("%d bits of entropy available", v)
}
func TestPoll(t *testing.T) {
f, cleanup := mktmpfifo(t)
defer cleanup()
const timeout = 100
ok := make(chan bool, 1)
go func() {
select {
case <-time.After(10 * timeout * time.Millisecond):
t.Errorf("Poll: failed to timeout after %d milliseconds", 10*timeout)
case <-ok:
}
}()
fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}}
n, err := unix.Poll(fds, timeout)
ok <- true
if err != nil {
t.Errorf("Poll: unexpected error: %v", err)
return
}
if n != 0 {
t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0)
return
}
}
func TestPpoll(t *testing.T) {
f, cleanup := mktmpfifo(t)
defer cleanup()
@ -113,25 +85,6 @@ func TestPpoll(t *testing.T) {
}
}
// mktmpfifo creates a temporary FIFO and provides a cleanup function.
func mktmpfifo(t *testing.T) (*os.File, func()) {
err := unix.Mkfifo("fifo", 0666)
if err != nil {
t.Fatalf("mktmpfifo: failed to create FIFO: %v", err)
}
f, err := os.OpenFile("fifo", os.O_RDWR, 0666)
if err != nil {
os.Remove("fifo")
t.Fatalf("mktmpfifo: failed to open FIFO: %v", err)
}
return f, func() {
f.Close()
os.Remove("fifo")
}
}
func TestTime(t *testing.T) {
var ut unix.Time_t
ut2, err := unix.Time(&ut)
@ -225,12 +178,23 @@ func TestGetrlimit(t *testing.T) {
}
func TestSelect(t *testing.T) {
_, err := unix.Select(0, nil, nil, nil, &unix.Timeval{0, 0})
_, err := unix.Select(0, nil, nil, nil, &unix.Timeval{Sec: 0, Usec: 0})
if err != nil {
t.Fatalf("Select: %v", err)
}
}
func TestUname(t *testing.T) {
var utsname unix.Utsname
err := unix.Uname(&utsname)
if err != nil {
t.Fatalf("Uname: %v", err)
}
// conversion from []byte to string, golang.org/issue/20753
t.Logf("OS: %s/%s %s", string(utsname.Sysname[:]), string(utsname.Machine[:]), string(utsname.Release[:]))
}
// utilities taken from os/os_test.go
func touch(t *testing.T, name string) {

View File

@ -124,13 +124,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return -1, ENOSYS
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
/*

View File

@ -102,6 +102,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
func setattrlistTimes(path string, times []Timespec, flags int) error {
// used on Darwin for UtimesNano
return ENOSYS
}
/*
* Exposed directly
*/
@ -243,7 +248,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// nfssvc
// nnpfspioctl
// openat
// poll
// preadv
// profil
// pwritev

View File

@ -578,6 +578,15 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
return &value, err
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}
/*
* Exposed directly
*/

View File

@ -138,6 +138,9 @@ func TestPassFD(t *testing.T) {
uc.Close()
})
_, oobn, _, _, err := uc.ReadMsgUnix(buf, oob)
if err != nil {
t.Fatalf("ReadMsgUnix: %v", err)
}
closeUnix.Stop()
scms, err := unix.ParseSocketControlMessage(oob[:oobn])
@ -335,6 +338,9 @@ func TestDup(t *testing.T) {
t.Fatalf("Write to dup2 fd failed: %v", err)
}
_, err = unix.Seek(f, 0, 0)
if err != nil {
t.Fatalf("Seek failed: %v", err)
}
_, err = unix.Read(f, b2)
if err != nil {
t.Fatalf("Read back failed: %v", err)
@ -343,3 +349,50 @@ func TestDup(t *testing.T) {
t.Errorf("Dup: stdout write not in file, expected %v, got %v", string(b1), string(b2))
}
}
func TestPoll(t *testing.T) {
f, cleanup := mktmpfifo(t)
defer cleanup()
const timeout = 100
ok := make(chan bool, 1)
go func() {
select {
case <-time.After(10 * timeout * time.Millisecond):
t.Errorf("Poll: failed to timeout after %d milliseconds", 10*timeout)
case <-ok:
}
}()
fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}}
n, err := unix.Poll(fds, timeout)
ok <- true
if err != nil {
t.Errorf("Poll: unexpected error: %v", err)
return
}
if n != 0 {
t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0)
return
}
}
// mktmpfifo creates a temporary FIFO and provides a cleanup function.
func mktmpfifo(t *testing.T) (*os.File, func()) {
err := unix.Mkfifo("fifo", 0666)
if err != nil {
t.Fatalf("mktmpfifo: failed to create FIFO: %v", err)
}
f, err := os.OpenFile("fifo", os.O_RDWR, 0666)
if err != nil {
os.Remove("fifo")
t.Fatalf("mktmpfifo: failed to open FIFO: %v", err)
}
return f, func() {
f.Close()
os.Remove("fifo")
}
}

View File

@ -38,3 +38,25 @@ func NsecToTimeval(nsec int64) Timeval {
}
return setTimeval(sec, usec)
}
// Unix returns ts as the number of seconds and nanoseconds elapsed since the
// Unix epoch.
func (ts *Timespec) Unix() (sec int64, nsec int64) {
return int64(ts.Sec), int64(ts.Nsec)
}
// Unix returns tv as the number of seconds and nanoseconds elapsed since the
// Unix epoch.
func (tv *Timeval) Unix() (sec int64, nsec int64) {
return int64(tv.Sec), int64(tv.Usec) * 1000
}
// Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.
func (ts *Timespec) Nano() int64 {
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
}
// Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.
func (tv *Timeval) Nano() int64 {
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
}

View File

@ -17,6 +17,7 @@ package unix
#define KERNEL
#include <dirent.h>
#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <termios.h>
#include <stdio.h>
@ -249,3 +250,20 @@ const (
AT_FDCWD = C.AT_FDCWD
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)
// poll
type PollFd C.struct_pollfd
const (
POLLERR = C.POLLERR
POLLHUP = C.POLLHUP
POLLIN = C.POLLIN
POLLNVAL = C.POLLNVAL
POLLOUT = C.POLLOUT
POLLPRI = C.POLLPRI
POLLRDBAND = C.POLLRDBAND
POLLRDNORM = C.POLLRDNORM
POLLWRBAND = C.POLLWRBAND
POLLWRNORM = C.POLLWRNORM
)

View File

@ -24,6 +24,7 @@ package unix
#include <fcntl.h>
#include <netdb.h>
#include <limits.h>
#include <poll.h>
#include <signal.h>
#include <termios.h>
#include <termio.h>
@ -263,3 +264,20 @@ type Termios C.struct_termios
type Termio C.struct_termio
type Winsize C.struct_winsize
// poll
type PollFd C.struct_pollfd
const (
POLLERR = C.POLLERR
POLLHUP = C.POLLHUP
POLLIN = C.POLLIN
POLLNVAL = C.POLLNVAL
POLLOUT = C.POLLOUT
POLLPRI = C.POLLPRI
POLLRDBAND = C.POLLRDBAND
POLLRDNORM = C.POLLRDNORM
POLLWRBAND = C.POLLWRBAND
POLLWRNORM = C.POLLWRNORM
)

View File

@ -49,6 +49,86 @@ const (
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
ATTR_CMN_ACCTIME = 0x1000
ATTR_CMN_ADDEDTIME = 0x10000000
ATTR_CMN_BKUPTIME = 0x2000
ATTR_CMN_CHGTIME = 0x800
ATTR_CMN_CRTIME = 0x200
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
ATTR_CMN_DEVID = 0x2
ATTR_CMN_DOCUMENT_ID = 0x100000
ATTR_CMN_ERROR = 0x20000000
ATTR_CMN_EXTENDED_SECURITY = 0x400000
ATTR_CMN_FILEID = 0x2000000
ATTR_CMN_FLAGS = 0x40000
ATTR_CMN_FNDRINFO = 0x4000
ATTR_CMN_FSID = 0x4
ATTR_CMN_FULLPATH = 0x8000000
ATTR_CMN_GEN_COUNT = 0x80000
ATTR_CMN_GRPID = 0x10000
ATTR_CMN_GRPUUID = 0x1000000
ATTR_CMN_MODTIME = 0x400
ATTR_CMN_NAME = 0x1
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
ATTR_CMN_NAMEDATTRLIST = 0x100000
ATTR_CMN_OBJID = 0x20
ATTR_CMN_OBJPERMANENTID = 0x40
ATTR_CMN_OBJTAG = 0x10
ATTR_CMN_OBJTYPE = 0x8
ATTR_CMN_OWNERID = 0x8000
ATTR_CMN_PARENTID = 0x4000000
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
ATTR_CMN_SETMASK = 0x41c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
ATTR_CMN_VOLSETMASK = 0x6700
ATTR_FILE_ALLOCSIZE = 0x4
ATTR_FILE_CLUMPSIZE = 0x10
ATTR_FILE_DATAALLOCSIZE = 0x400
ATTR_FILE_DATAEXTENTS = 0x800
ATTR_FILE_DATALENGTH = 0x200
ATTR_FILE_DEVTYPE = 0x20
ATTR_FILE_FILETYPE = 0x40
ATTR_FILE_FORKCOUNT = 0x80
ATTR_FILE_FORKLIST = 0x100
ATTR_FILE_IOBLOCKSIZE = 0x8
ATTR_FILE_LINKCOUNT = 0x1
ATTR_FILE_RSRCALLOCSIZE = 0x2000
ATTR_FILE_RSRCEXTENTS = 0x4000
ATTR_FILE_RSRCLENGTH = 0x1000
ATTR_FILE_SETMASK = 0x20
ATTR_FILE_TOTALSIZE = 0x2
ATTR_FILE_VALIDMASK = 0x37ff
ATTR_VOL_ALLOCATIONCLUMP = 0x40
ATTR_VOL_ATTRIBUTES = 0x40000000
ATTR_VOL_CAPABILITIES = 0x20000
ATTR_VOL_DIRCOUNT = 0x400
ATTR_VOL_ENCODINGSUSED = 0x10000
ATTR_VOL_FILECOUNT = 0x200
ATTR_VOL_FSTYPE = 0x1
ATTR_VOL_INFO = 0x80000000
ATTR_VOL_IOBLOCKSIZE = 0x80
ATTR_VOL_MAXOBJCOUNT = 0x800
ATTR_VOL_MINALLOCATION = 0x20
ATTR_VOL_MOUNTEDDEVICE = 0x8000
ATTR_VOL_MOUNTFLAGS = 0x4000
ATTR_VOL_MOUNTPOINT = 0x1000
ATTR_VOL_NAME = 0x2000
ATTR_VOL_OBJCOUNT = 0x100
ATTR_VOL_QUOTA_SIZE = 0x10000000
ATTR_VOL_RESERVED_SIZE = 0x20000000
ATTR_VOL_SETMASK = 0x80002000
ATTR_VOL_SIGNATURE = 0x2
ATTR_VOL_SIZE = 0x4
ATTR_VOL_SPACEAVAIL = 0x10
ATTR_VOL_SPACEFREE = 0x8
ATTR_VOL_UUID = 0x40000
ATTR_VOL_VALIDMASK = 0xf007ffff
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -390,6 +470,11 @@ const (
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
FSOPT_ATTR_CMN_EXTENDED = 0x20
FSOPT_NOFOLLOW = 0x1
FSOPT_NOINMEMUPDATE = 0x2
FSOPT_PACK_INVAL_ATTRS = 0x8
FSOPT_REPORT_FULLSIZE = 0x4
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61

View File

@ -49,6 +49,86 @@ const (
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
ATTR_CMN_ACCTIME = 0x1000
ATTR_CMN_ADDEDTIME = 0x10000000
ATTR_CMN_BKUPTIME = 0x2000
ATTR_CMN_CHGTIME = 0x800
ATTR_CMN_CRTIME = 0x200
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
ATTR_CMN_DEVID = 0x2
ATTR_CMN_DOCUMENT_ID = 0x100000
ATTR_CMN_ERROR = 0x20000000
ATTR_CMN_EXTENDED_SECURITY = 0x400000
ATTR_CMN_FILEID = 0x2000000
ATTR_CMN_FLAGS = 0x40000
ATTR_CMN_FNDRINFO = 0x4000
ATTR_CMN_FSID = 0x4
ATTR_CMN_FULLPATH = 0x8000000
ATTR_CMN_GEN_COUNT = 0x80000
ATTR_CMN_GRPID = 0x10000
ATTR_CMN_GRPUUID = 0x1000000
ATTR_CMN_MODTIME = 0x400
ATTR_CMN_NAME = 0x1
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
ATTR_CMN_NAMEDATTRLIST = 0x100000
ATTR_CMN_OBJID = 0x20
ATTR_CMN_OBJPERMANENTID = 0x40
ATTR_CMN_OBJTAG = 0x10
ATTR_CMN_OBJTYPE = 0x8
ATTR_CMN_OWNERID = 0x8000
ATTR_CMN_PARENTID = 0x4000000
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
ATTR_CMN_SETMASK = 0x41c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
ATTR_CMN_VOLSETMASK = 0x6700
ATTR_FILE_ALLOCSIZE = 0x4
ATTR_FILE_CLUMPSIZE = 0x10
ATTR_FILE_DATAALLOCSIZE = 0x400
ATTR_FILE_DATAEXTENTS = 0x800
ATTR_FILE_DATALENGTH = 0x200
ATTR_FILE_DEVTYPE = 0x20
ATTR_FILE_FILETYPE = 0x40
ATTR_FILE_FORKCOUNT = 0x80
ATTR_FILE_FORKLIST = 0x100
ATTR_FILE_IOBLOCKSIZE = 0x8
ATTR_FILE_LINKCOUNT = 0x1
ATTR_FILE_RSRCALLOCSIZE = 0x2000
ATTR_FILE_RSRCEXTENTS = 0x4000
ATTR_FILE_RSRCLENGTH = 0x1000
ATTR_FILE_SETMASK = 0x20
ATTR_FILE_TOTALSIZE = 0x2
ATTR_FILE_VALIDMASK = 0x37ff
ATTR_VOL_ALLOCATIONCLUMP = 0x40
ATTR_VOL_ATTRIBUTES = 0x40000000
ATTR_VOL_CAPABILITIES = 0x20000
ATTR_VOL_DIRCOUNT = 0x400
ATTR_VOL_ENCODINGSUSED = 0x10000
ATTR_VOL_FILECOUNT = 0x200
ATTR_VOL_FSTYPE = 0x1
ATTR_VOL_INFO = 0x80000000
ATTR_VOL_IOBLOCKSIZE = 0x80
ATTR_VOL_MAXOBJCOUNT = 0x800
ATTR_VOL_MINALLOCATION = 0x20
ATTR_VOL_MOUNTEDDEVICE = 0x8000
ATTR_VOL_MOUNTFLAGS = 0x4000
ATTR_VOL_MOUNTPOINT = 0x1000
ATTR_VOL_NAME = 0x2000
ATTR_VOL_OBJCOUNT = 0x100
ATTR_VOL_QUOTA_SIZE = 0x10000000
ATTR_VOL_RESERVED_SIZE = 0x20000000
ATTR_VOL_SETMASK = 0x80002000
ATTR_VOL_SIGNATURE = 0x2
ATTR_VOL_SIZE = 0x4
ATTR_VOL_SPACEAVAIL = 0x10
ATTR_VOL_SPACEFREE = 0x8
ATTR_VOL_UUID = 0x40000
ATTR_VOL_VALIDMASK = 0xf007ffff
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -390,6 +470,11 @@ const (
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
FSOPT_ATTR_CMN_EXTENDED = 0x20
FSOPT_NOFOLLOW = 0x1
FSOPT_NOINMEMUPDATE = 0x2
FSOPT_PACK_INVAL_ATTRS = 0x8
FSOPT_REPORT_FULLSIZE = 0x4
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61

View File

@ -49,6 +49,86 @@ const (
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
ATTR_CMN_ACCTIME = 0x1000
ATTR_CMN_ADDEDTIME = 0x10000000
ATTR_CMN_BKUPTIME = 0x2000
ATTR_CMN_CHGTIME = 0x800
ATTR_CMN_CRTIME = 0x200
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
ATTR_CMN_DEVID = 0x2
ATTR_CMN_DOCUMENT_ID = 0x100000
ATTR_CMN_ERROR = 0x20000000
ATTR_CMN_EXTENDED_SECURITY = 0x400000
ATTR_CMN_FILEID = 0x2000000
ATTR_CMN_FLAGS = 0x40000
ATTR_CMN_FNDRINFO = 0x4000
ATTR_CMN_FSID = 0x4
ATTR_CMN_FULLPATH = 0x8000000
ATTR_CMN_GEN_COUNT = 0x80000
ATTR_CMN_GRPID = 0x10000
ATTR_CMN_GRPUUID = 0x1000000
ATTR_CMN_MODTIME = 0x400
ATTR_CMN_NAME = 0x1
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
ATTR_CMN_NAMEDATTRLIST = 0x100000
ATTR_CMN_OBJID = 0x20
ATTR_CMN_OBJPERMANENTID = 0x40
ATTR_CMN_OBJTAG = 0x10
ATTR_CMN_OBJTYPE = 0x8
ATTR_CMN_OWNERID = 0x8000
ATTR_CMN_PARENTID = 0x4000000
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
ATTR_CMN_SETMASK = 0x41c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
ATTR_CMN_VOLSETMASK = 0x6700
ATTR_FILE_ALLOCSIZE = 0x4
ATTR_FILE_CLUMPSIZE = 0x10
ATTR_FILE_DATAALLOCSIZE = 0x400
ATTR_FILE_DATAEXTENTS = 0x800
ATTR_FILE_DATALENGTH = 0x200
ATTR_FILE_DEVTYPE = 0x20
ATTR_FILE_FILETYPE = 0x40
ATTR_FILE_FORKCOUNT = 0x80
ATTR_FILE_FORKLIST = 0x100
ATTR_FILE_IOBLOCKSIZE = 0x8
ATTR_FILE_LINKCOUNT = 0x1
ATTR_FILE_RSRCALLOCSIZE = 0x2000
ATTR_FILE_RSRCEXTENTS = 0x4000
ATTR_FILE_RSRCLENGTH = 0x1000
ATTR_FILE_SETMASK = 0x20
ATTR_FILE_TOTALSIZE = 0x2
ATTR_FILE_VALIDMASK = 0x37ff
ATTR_VOL_ALLOCATIONCLUMP = 0x40
ATTR_VOL_ATTRIBUTES = 0x40000000
ATTR_VOL_CAPABILITIES = 0x20000
ATTR_VOL_DIRCOUNT = 0x400
ATTR_VOL_ENCODINGSUSED = 0x10000
ATTR_VOL_FILECOUNT = 0x200
ATTR_VOL_FSTYPE = 0x1
ATTR_VOL_INFO = 0x80000000
ATTR_VOL_IOBLOCKSIZE = 0x80
ATTR_VOL_MAXOBJCOUNT = 0x800
ATTR_VOL_MINALLOCATION = 0x20
ATTR_VOL_MOUNTEDDEVICE = 0x8000
ATTR_VOL_MOUNTFLAGS = 0x4000
ATTR_VOL_MOUNTPOINT = 0x1000
ATTR_VOL_NAME = 0x2000
ATTR_VOL_OBJCOUNT = 0x100
ATTR_VOL_QUOTA_SIZE = 0x10000000
ATTR_VOL_RESERVED_SIZE = 0x20000000
ATTR_VOL_SETMASK = 0x80002000
ATTR_VOL_SIGNATURE = 0x2
ATTR_VOL_SIZE = 0x4
ATTR_VOL_SPACEAVAIL = 0x10
ATTR_VOL_SPACEFREE = 0x8
ATTR_VOL_UUID = 0x40000
ATTR_VOL_VALIDMASK = 0xf007ffff
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -390,6 +470,11 @@ const (
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
FSOPT_ATTR_CMN_EXTENDED = 0x20
FSOPT_NOFOLLOW = 0x1
FSOPT_NOINMEMUPDATE = 0x2
FSOPT_PACK_INVAL_ATTRS = 0x8
FSOPT_REPORT_FULLSIZE = 0x4
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61

View File

@ -49,6 +49,86 @@ const (
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
ATTR_CMN_ACCTIME = 0x1000
ATTR_CMN_ADDEDTIME = 0x10000000
ATTR_CMN_BKUPTIME = 0x2000
ATTR_CMN_CHGTIME = 0x800
ATTR_CMN_CRTIME = 0x200
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
ATTR_CMN_DEVID = 0x2
ATTR_CMN_DOCUMENT_ID = 0x100000
ATTR_CMN_ERROR = 0x20000000
ATTR_CMN_EXTENDED_SECURITY = 0x400000
ATTR_CMN_FILEID = 0x2000000
ATTR_CMN_FLAGS = 0x40000
ATTR_CMN_FNDRINFO = 0x4000
ATTR_CMN_FSID = 0x4
ATTR_CMN_FULLPATH = 0x8000000
ATTR_CMN_GEN_COUNT = 0x80000
ATTR_CMN_GRPID = 0x10000
ATTR_CMN_GRPUUID = 0x1000000
ATTR_CMN_MODTIME = 0x400
ATTR_CMN_NAME = 0x1
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
ATTR_CMN_NAMEDATTRLIST = 0x100000
ATTR_CMN_OBJID = 0x20
ATTR_CMN_OBJPERMANENTID = 0x40
ATTR_CMN_OBJTAG = 0x10
ATTR_CMN_OBJTYPE = 0x8
ATTR_CMN_OWNERID = 0x8000
ATTR_CMN_PARENTID = 0x4000000
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
ATTR_CMN_SETMASK = 0x41c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
ATTR_CMN_VOLSETMASK = 0x6700
ATTR_FILE_ALLOCSIZE = 0x4
ATTR_FILE_CLUMPSIZE = 0x10
ATTR_FILE_DATAALLOCSIZE = 0x400
ATTR_FILE_DATAEXTENTS = 0x800
ATTR_FILE_DATALENGTH = 0x200
ATTR_FILE_DEVTYPE = 0x20
ATTR_FILE_FILETYPE = 0x40
ATTR_FILE_FORKCOUNT = 0x80
ATTR_FILE_FORKLIST = 0x100
ATTR_FILE_IOBLOCKSIZE = 0x8
ATTR_FILE_LINKCOUNT = 0x1
ATTR_FILE_RSRCALLOCSIZE = 0x2000
ATTR_FILE_RSRCEXTENTS = 0x4000
ATTR_FILE_RSRCLENGTH = 0x1000
ATTR_FILE_SETMASK = 0x20
ATTR_FILE_TOTALSIZE = 0x2
ATTR_FILE_VALIDMASK = 0x37ff
ATTR_VOL_ALLOCATIONCLUMP = 0x40
ATTR_VOL_ATTRIBUTES = 0x40000000
ATTR_VOL_CAPABILITIES = 0x20000
ATTR_VOL_DIRCOUNT = 0x400
ATTR_VOL_ENCODINGSUSED = 0x10000
ATTR_VOL_FILECOUNT = 0x200
ATTR_VOL_FSTYPE = 0x1
ATTR_VOL_INFO = 0x80000000
ATTR_VOL_IOBLOCKSIZE = 0x80
ATTR_VOL_MAXOBJCOUNT = 0x800
ATTR_VOL_MINALLOCATION = 0x20
ATTR_VOL_MOUNTEDDEVICE = 0x8000
ATTR_VOL_MOUNTFLAGS = 0x4000
ATTR_VOL_MOUNTPOINT = 0x1000
ATTR_VOL_NAME = 0x2000
ATTR_VOL_OBJCOUNT = 0x100
ATTR_VOL_QUOTA_SIZE = 0x10000000
ATTR_VOL_RESERVED_SIZE = 0x20000000
ATTR_VOL_SETMASK = 0x80002000
ATTR_VOL_SIGNATURE = 0x2
ATTR_VOL_SIZE = 0x4
ATTR_VOL_SPACEAVAIL = 0x10
ATTR_VOL_SPACEFREE = 0x8
ATTR_VOL_UUID = 0x40000
ATTR_VOL_VALIDMASK = 0xf007ffff
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -390,6 +470,11 @@ const (
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
FSOPT_ATTR_CMN_EXTENDED = 0x20
FSOPT_NOFOLLOW = 0x1
FSOPT_NOINMEMUPDATE = 0x2
FSOPT_PACK_INVAL_ATTRS = 0x8
FSOPT_REPORT_FULLSIZE = 0x4
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61

View File

@ -1277,7 +1277,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1187,7 +1187,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1278,7 +1278,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1282,7 +1282,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1188,7 +1188,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1268,7 +1268,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1279,7 +1279,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1187,7 +1187,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1279,7 +1279,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1187,7 +1187,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1279,7 +1279,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1279,7 +1279,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1189,7 +1189,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1335,7 +1335,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1189,7 +1189,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1335,7 +1335,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1186,7 +1186,7 @@ const (
PR_SET_NO_NEW_PRIVS = 0x26
PR_SET_PDEATHSIG = 0x1
PR_SET_PTRACER = 0x59616d61
PR_SET_PTRACER_ANY = -0x1
PR_SET_PTRACER_ANY = 0xffffffffffffffff
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
@ -1339,7 +1339,7 @@ const (
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RLIM_INFINITY = 0xffffffffffffffff
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7

View File

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(386, amd64). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair(386, amd64). DO NOT EDIT.
// +build linux
// +build 386 amd64

View File

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
// +build linux
// +build arm arm64

View File

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
// +build linux
// +build mips mips64

View File

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
// +build linux
// +build mipsle mips64le

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -412,17 +423,6 @@ func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -388,17 +399,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -388,17 +399,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -388,17 +399,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -395,17 +406,6 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -395,17 +406,6 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -395,17 +406,6 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {

View File

@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {

View File

@ -29,6 +29,7 @@ import (
//go:cgo_import_dynamic libc___major __major "libc.so"
//go:cgo_import_dynamic libc___minor __minor "libc.so"
//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
//go:cgo_import_dynamic libc_poll poll "libc.so"
//go:cgo_import_dynamic libc_access access "libc.so"
//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
//go:cgo_import_dynamic libc_chdir chdir "libc.so"
@ -153,6 +154,7 @@ import (
//go:linkname proc__major libc___major
//go:linkname proc__minor libc___minor
//go:linkname procioctl libc_ioctl
//go:linkname procpoll libc_poll
//go:linkname procAccess libc_access
//go:linkname procAdjtime libc_adjtime
//go:linkname procChdir libc_chdir
@ -278,6 +280,7 @@ var (
proc__major,
proc__minor,
procioctl,
procpoll,
procAccess,
procAdjtime,
procChdir,
@ -557,6 +560,15 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0)
n = int(r0)
if e1 != 0 {
err = e1
}
return
}
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)

View File

@ -621,12 +621,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -637,12 +637,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -609,12 +609,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]uint8
Nodename [65]uint8
Release [65]uint8
Version [65]uint8
Machine [65]uint8
Domainname [65]uint8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -615,12 +615,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -614,12 +614,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -618,12 +618,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -618,12 +618,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -614,12 +614,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -625,12 +625,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]uint8
Nodename [65]uint8
Release [65]uint8
Version [65]uint8
Machine [65]uint8
Domainname [65]uint8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -625,12 +625,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]uint8
Nodename [65]uint8
Release [65]uint8
Version [65]uint8
Machine [65]uint8
Domainname [65]uint8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -642,12 +642,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {

View File

@ -601,12 +601,12 @@ type Sysinfo_t struct {
}
type Utsname struct {
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {
@ -652,8 +652,6 @@ type Sigset_t struct {
X__val [16]uint64
}
const _SC_PAGESIZE = 0x1e
type Termios struct {
Iflag uint32
Oflag uint32

View File

@ -1,5 +1,5 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_openbsd.go
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build 386,openbsd
@ -444,3 +444,22 @@ const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x2
)
type PollFd struct {
Fd int32
Events int16
Revents int16
}
const (
POLLERR = 0x8
POLLHUP = 0x10
POLLIN = 0x1
POLLNVAL = 0x20
POLLOUT = 0x4
POLLPRI = 0x2
POLLRDBAND = 0x80
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
)

View File

@ -1,5 +1,5 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_openbsd.go
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,openbsd
@ -451,3 +451,22 @@ const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x2
)
type PollFd struct {
Fd int32
Events int16
Revents int16
}
const (
POLLERR = 0x8
POLLHUP = 0x10
POLLIN = 0x1
POLLNVAL = 0x20
POLLOUT = 0x4
POLLPRI = 0x2
POLLRDBAND = 0x80
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
)

View File

@ -1,5 +1,5 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_openbsd.go
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm,openbsd
@ -437,3 +437,22 @@ const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x2
)
type PollFd struct {
Fd int32
Events int16
Revents int16
}
const (
POLLERR = 0x8
POLLHUP = 0x10
POLLIN = 0x1
POLLNVAL = 0x20
POLLOUT = 0x4
POLLPRI = 0x2
POLLRDBAND = 0x80
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
)

View File

@ -263,11 +263,11 @@ type FdSet struct {
}
type Utsname struct {
Sysname [257]int8
Nodename [257]int8
Release [257]int8
Version [257]int8
Machine [257]int8
Sysname [257]byte
Nodename [257]byte
Release [257]byte
Version [257]byte
Machine [257]byte
}
type Ustat_t struct {
@ -438,3 +438,22 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
type PollFd struct {
Fd int32
Events int16
Revents int16
}
const (
POLLERR = 0x8
POLLHUP = 0x10
POLLIN = 0x1
POLLNVAL = 0x20
POLLOUT = 0x4
POLLPRI = 0x2
POLLRDBAND = 0x80
POLLRDNORM = 0x40
POLLWRBAND = 0x100
POLLWRNORM = 0x4
)

335
vendor/golang.org/x/text/date/data_test.go generated vendored Normal file
View File

@ -0,0 +1,335 @@
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
package date
var enumMap = map[string]uint16{
"": 0,
"calendars": 0,
"fields": 1,
"timeZoneNames": 2,
"buddhist": 0,
"chinese": 1,
"coptic": 2,
"dangi": 3,
"ethiopic": 4,
"ethiopic-amete-alem": 5,
"generic": 6,
"gregorian": 7,
"hebrew": 8,
"indian": 9,
"islamic": 10,
"islamic-civil": 11,
"islamic-rgsa": 12,
"islamic-tbla": 13,
"islamic-umalqura": 14,
"japanese": 15,
"persian": 16,
"roc": 17,
"months": 0,
"days": 1,
"quarters": 2,
"dayPeriods": 3,
"eras": 4,
"dateFormats": 5,
"timeFormats": 6,
"dateTimeFormats": 7,
"monthPatterns": 8,
"cyclicNameSets": 9,
"format": 0,
"stand-alone": 1,
"numeric": 2,
"widthAbbreviated": 0,
"widthNarrow": 1,
"widthWide": 2,
"widthAll": 3,
"widthShort": 4,
"leap7": 0,
"sun": 0,
"mon": 1,
"tue": 2,
"wed": 3,
"thu": 4,
"fri": 5,
"sat": 6,
"am": 0,
"pm": 1,
"midnight": 2,
"morning1": 3,
"afternoon1": 4,
"evening1": 5,
"night1": 6,
"noon": 7,
"morning2": 8,
"afternoon2": 9,
"night2": 10,
"evening2": 11,
"variant": 1,
"short": 0,
"long": 1,
"full": 2,
"medium": 3,
"dayPartsCycleType": 0,
"daysCycleType": 1,
"monthsCycleType": 2,
"solarTermsCycleType": 3,
"yearsCycleType": 4,
"zodiacsCycleType": 5,
"eraField": 0,
"era-shortField": 1,
"era-narrowField": 2,
"yearField": 3,
"year-shortField": 4,
"year-narrowField": 5,
"quarterField": 6,
"quarter-shortField": 7,
"quarter-narrowField": 8,
"monthField": 9,
"month-shortField": 10,
"month-narrowField": 11,
"weekField": 12,
"week-shortField": 13,
"week-narrowField": 14,
"weekOfMonthField": 15,
"weekOfMonth-shortField": 16,
"weekOfMonth-narrowField": 17,
"dayField": 18,
"day-shortField": 19,
"day-narrowField": 20,
"dayOfYearField": 21,
"dayOfYear-shortField": 22,
"dayOfYear-narrowField": 23,
"weekdayField": 24,
"weekday-shortField": 25,
"weekday-narrowField": 26,
"weekdayOfMonthField": 27,
"weekdayOfMonth-shortField": 28,
"weekdayOfMonth-narrowField": 29,
"sunField": 30,
"sun-shortField": 31,
"sun-narrowField": 32,
"monField": 33,
"mon-shortField": 34,
"mon-narrowField": 35,
"tueField": 36,
"tue-shortField": 37,
"tue-narrowField": 38,
"wedField": 39,
"wed-shortField": 40,
"wed-narrowField": 41,
"thuField": 42,
"thu-shortField": 43,
"thu-narrowField": 44,
"friField": 45,
"fri-shortField": 46,
"fri-narrowField": 47,
"satField": 48,
"sat-shortField": 49,
"sat-narrowField": 50,
"dayperiod-shortField": 51,
"dayperiodField": 52,
"dayperiod-narrowField": 53,
"hourField": 54,
"hour-shortField": 55,
"hour-narrowField": 56,
"minuteField": 57,
"minute-shortField": 58,
"minute-narrowField": 59,
"secondField": 60,
"second-shortField": 61,
"second-narrowField": 62,
"zoneField": 63,
"zone-shortField": 64,
"zone-narrowField": 65,
"displayName": 0,
"relative": 1,
"relativeTime": 2,
"relativePeriod": 3,
"before1": 0,
"current": 1,
"after1": 2,
"before2": 3,
"after2": 4,
"after3": 5,
"future": 0,
"past": 1,
"other": 0,
"one": 1,
"zero": 2,
"two": 3,
"few": 4,
"many": 5,
"zoneFormat": 0,
"regionFormat": 1,
"zone": 2,
"metaZone": 3,
"hourFormat": 0,
"gmtFormat": 1,
"gmtZeroFormat": 2,
"genericTime": 0,
"daylightTime": 1,
"standardTime": 2,
"Etc/UTC": 0,
"Europe/London": 1,
"Europe/Dublin": 2,
"Pacific/Honolulu": 3,
"Afghanistan": 0,
"Africa_Central": 1,
"Africa_Eastern": 2,
"Africa_Southern": 3,
"Africa_Western": 4,
"Alaska": 5,
"Amazon": 6,
"America_Central": 7,
"America_Eastern": 8,
"America_Mountain": 9,
"America_Pacific": 10,
"Anadyr": 11,
"Apia": 12,
"Arabian": 13,
"Argentina": 14,
"Argentina_Western": 15,
"Armenia": 16,
"Atlantic": 17,
"Australia_Central": 18,
"Australia_CentralWestern": 19,
"Australia_Eastern": 20,
"Australia_Western": 21,
"Azerbaijan": 22,
"Azores": 23,
"Bangladesh": 24,
"Bhutan": 25,
"Bolivia": 26,
"Brasilia": 27,
"Brunei": 28,
"Cape_Verde": 29,
"Chamorro": 30,
"Chatham": 31,
"Chile": 32,
"China": 33,
"Choibalsan": 34,
"Christmas": 35,
"Cocos": 36,
"Colombia": 37,
"Cook": 38,
"Cuba": 39,
"Davis": 40,
"DumontDUrville": 41,
"East_Timor": 42,
"Easter": 43,
"Ecuador": 44,
"Europe_Central": 45,
"Europe_Eastern": 46,
"Europe_Further_Eastern": 47,
"Europe_Western": 48,
"Falkland": 49,
"Fiji": 50,
"French_Guiana": 51,
"French_Southern": 52,
"Galapagos": 53,
"Gambier": 54,
"Georgia": 55,
"Gilbert_Islands": 56,
"GMT": 57,
"Greenland_Eastern": 58,
"Greenland_Western": 59,
"Gulf": 60,
"Guyana": 61,
"Hawaii_Aleutian": 62,
"Hong_Kong": 63,
"Hovd": 64,
"India": 65,
"Indian_Ocean": 66,
"Indochina": 67,
"Indonesia_Central": 68,
"Indonesia_Eastern": 69,
"Indonesia_Western": 70,
"Iran": 71,
"Irkutsk": 72,
"Israel": 73,
"Japan": 74,
"Kamchatka": 75,
"Kazakhstan_Eastern": 76,
"Kazakhstan_Western": 77,
"Korea": 78,
"Kosrae": 79,
"Krasnoyarsk": 80,
"Kyrgystan": 81,
"Line_Islands": 82,
"Lord_Howe": 83,
"Macquarie": 84,
"Magadan": 85,
"Malaysia": 86,
"Maldives": 87,
"Marquesas": 88,
"Marshall_Islands": 89,
"Mauritius": 90,
"Mawson": 91,
"Mexico_Northwest": 92,
"Mexico_Pacific": 93,
"Mongolia": 94,
"Moscow": 95,
"Myanmar": 96,
"Nauru": 97,
"Nepal": 98,
"New_Caledonia": 99,
"New_Zealand": 100,
"Newfoundland": 101,
"Niue": 102,
"Norfolk": 103,
"Noronha": 104,
"Novosibirsk": 105,
"Omsk": 106,
"Pakistan": 107,
"Palau": 108,
"Papua_New_Guinea": 109,
"Paraguay": 110,
"Peru": 111,
"Philippines": 112,
"Phoenix_Islands": 113,
"Pierre_Miquelon": 114,
"Pitcairn": 115,
"Ponape": 116,
"Pyongyang": 117,
"Reunion": 118,
"Rothera": 119,
"Sakhalin": 120,
"Samara": 121,
"Samoa": 122,
"Seychelles": 123,
"Singapore": 124,
"Solomon": 125,
"South_Georgia": 126,
"Suriname": 127,
"Syowa": 128,
"Tahiti": 129,
"Taipei": 130,
"Tajikistan": 131,
"Tokelau": 132,
"Tonga": 133,
"Truk": 134,
"Turkmenistan": 135,
"Tuvalu": 136,
"Uruguay": 137,
"Uzbekistan": 138,
"Vanuatu": 139,
"Venezuela": 140,
"Vladivostok": 141,
"Volgograd": 142,
"Vostok": 143,
"Wake": 144,
"Wallis": 145,
"Yakutsk": 146,
"Yekaterinburg": 147,
"Guam": 148,
"North_Mariana": 149,
"Acre": 150,
"Almaty": 151,
"Aqtau": 152,
"Aqtobe": 153,
"Casey": 154,
"Lanka": 155,
"Macau": 156,
"Qyzylorda": 157,
}
// Total table size 0 bytes (0KiB); checksum: 811C9DC5

329
vendor/golang.org/x/text/date/gen.go generated vendored Normal file
View File

@ -0,0 +1,329 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"flag"
"log"
"strconv"
"strings"
"golang.org/x/text/internal/cldrtree"
"golang.org/x/text/internal/gen"
"golang.org/x/text/language"
"golang.org/x/text/unicode/cldr"
)
var (
draft = flag.String("draft",
"contributed",
`Minimal draft requirements (approved, contributed, provisional, unconfirmed).`)
)
// TODO:
// - Compile format patterns.
// - Compress the large amount of redundancy in metazones.
// - Split trees (with shared buckets) with data that is enough for default
// formatting of Go Time values and and tables that are needed for larger
// variants.
// - zone to metaZone mappings (in supplemental)
// - Add more enum values and also some key maps for some of the elements.
func main() {
gen.Init()
r := gen.OpenCLDRCoreZip()
defer r.Close()
d := &cldr.Decoder{}
d.SetDirFilter("supplemental", "main")
d.SetSectionFilter("dates")
data, err := d.DecodeZip(r)
if err != nil {
log.Fatalf("DecodeZip: %v", err)
}
dates := cldrtree.New("dates")
buildCLDRTree(data, dates)
w := gen.NewCodeWriter()
if err := dates.Gen(w); err != nil {
log.Fatal(err)
}
gen.WriteCLDRVersion(w)
w.WriteGoFile("tables.go", "date")
w = gen.NewCodeWriter()
if err := dates.GenTestData(w); err != nil {
log.Fatal(err)
}
w.WriteGoFile("data_test.go", "date")
}
func buildCLDRTree(data *cldr.CLDR, dates *cldrtree.Builder) {
context := cldrtree.Enum("context")
widthMap := func(s string) string {
// Align era with width values.
if r, ok := map[string]string{
"eraAbbr": "abbreviated",
"eraNarrow": "narrow",
"eraNames": "wide",
}[s]; ok {
s = r
}
// Prefix width to disambiguate with some overlapping length values.
return "width" + strings.Title(s)
}
width := cldrtree.EnumFunc("width", widthMap, "abbreviated", "narrow", "wide")
length := cldrtree.Enum("length", "short", "long")
month := cldrtree.Enum("month", "leap7")
relTime := cldrtree.EnumFunc("relTime", func(s string) string {
x, err := strconv.ParseInt(s, 10, 8)
if err != nil {
log.Fatal("Invalid number:", err)
}
return []string{
"before2",
"before1",
"current",
"after1",
"after2",
"after3",
}[x+2]
})
// Disambiguate keys like 'months' and 'sun'.
cycleType := cldrtree.EnumFunc("cycleType", func(s string) string {
return s + "CycleType"
})
field := cldrtree.EnumFunc("field", func(s string) string {
return s + "Field"
})
timeType := cldrtree.EnumFunc("timeType", func(s string) string {
if s == "" {
return "genericTime"
}
return s + "Time"
}, "generic")
zoneType := []cldrtree.Option{cldrtree.SharedType(), timeType}
metaZoneType := []cldrtree.Option{cldrtree.SharedType(), timeType}
for _, lang := range data.Locales() {
tag := language.Make(lang)
ldml := data.RawLDML(lang)
if ldml.Dates == nil {
continue
}
x := dates.Locale(tag)
if x := x.Index(ldml.Dates.Calendars); x != nil {
for _, cal := range ldml.Dates.Calendars.Calendar {
x := x.IndexFromType(cal)
if x := x.Index(cal.Months); x != nil {
for _, mc := range cal.Months.MonthContext {
x := x.IndexFromType(mc, context)
for _, mw := range mc.MonthWidth {
x := x.IndexFromType(mw, width)
for _, m := range mw.Month {
x.SetValue(m.Yeartype+m.Type, m, month)
}
}
}
}
if x := x.Index(cal.MonthPatterns); x != nil {
for _, mc := range cal.MonthPatterns.MonthPatternContext {
x := x.IndexFromType(mc, context)
for _, mw := range mc.MonthPatternWidth {
// Value is always leap, so no need to create a
// subindex.
for _, m := range mw.MonthPattern {
x.SetValue(mw.Type, m, width)
}
}
}
}
if x := x.Index(cal.CyclicNameSets); x != nil {
for _, cns := range cal.CyclicNameSets.CyclicNameSet {
x := x.IndexFromType(cns, cycleType)
for _, cc := range cns.CyclicNameContext {
x := x.IndexFromType(cc, context)
for _, cw := range cc.CyclicNameWidth {
x := x.IndexFromType(cw, width)
for _, c := range cw.CyclicName {
x.SetValue(c.Type, c)
}
}
}
}
}
if x := x.Index(cal.Days); x != nil {
for _, dc := range cal.Days.DayContext {
x := x.IndexFromType(dc, context)
for _, dw := range dc.DayWidth {
x := x.IndexFromType(dw, width)
for _, d := range dw.Day {
x.SetValue(d.Type, d)
}
}
}
}
if x := x.Index(cal.Quarters); x != nil {
for _, qc := range cal.Quarters.QuarterContext {
x := x.IndexFromType(qc, context)
for _, qw := range qc.QuarterWidth {
x := x.IndexFromType(qw, width)
for _, q := range qw.Quarter {
x.SetValue(q.Type, q)
}
}
}
}
if x := x.Index(cal.DayPeriods); x != nil {
for _, dc := range cal.DayPeriods.DayPeriodContext {
x := x.IndexFromType(dc, context)
for _, dw := range dc.DayPeriodWidth {
x := x.IndexFromType(dw, width)
for _, d := range dw.DayPeriod {
x.IndexFromType(d).SetValue(d.Alt, d)
}
}
}
}
if x := x.Index(cal.Eras); x != nil {
opts := []cldrtree.Option{width, cldrtree.SharedType()}
if x := x.Index(cal.Eras.EraNames, opts...); x != nil {
for _, e := range cal.Eras.EraNames.Era {
x.IndexFromAlt(e).SetValue(e.Type, e)
}
}
if x := x.Index(cal.Eras.EraAbbr, opts...); x != nil {
for _, e := range cal.Eras.EraAbbr.Era {
x.IndexFromAlt(e).SetValue(e.Type, e)
}
}
if x := x.Index(cal.Eras.EraNarrow, opts...); x != nil {
for _, e := range cal.Eras.EraNarrow.Era {
x.IndexFromAlt(e).SetValue(e.Type, e)
}
}
}
if x := x.Index(cal.DateFormats); x != nil {
for _, dfl := range cal.DateFormats.DateFormatLength {
x := x.IndexFromType(dfl, length)
for _, df := range dfl.DateFormat {
for _, p := range df.Pattern {
x.SetValue(p.Alt, p)
}
}
}
}
if x := x.Index(cal.TimeFormats); x != nil {
for _, tfl := range cal.TimeFormats.TimeFormatLength {
x := x.IndexFromType(tfl, length)
for _, tf := range tfl.TimeFormat {
for _, p := range tf.Pattern {
x.SetValue(p.Alt, p)
}
}
}
}
if x := x.Index(cal.DateTimeFormats); x != nil {
for _, dtfl := range cal.DateTimeFormats.DateTimeFormatLength {
x := x.IndexFromType(dtfl, length)
for _, dtf := range dtfl.DateTimeFormat {
for _, p := range dtf.Pattern {
x.SetValue(p.Alt, p)
}
}
}
// TODO:
// - appendItems
// - intervalFormats
}
}
}
// TODO: this is a lot of data and is probably relatively little used.
// Store this somewhere else.
if x := x.Index(ldml.Dates.Fields); x != nil {
for _, f := range ldml.Dates.Fields.Field {
x := x.IndexFromType(f, field)
for _, d := range f.DisplayName {
x.Index(d).SetValue(d.Alt, d)
}
for _, r := range f.Relative {
x.Index(r).SetValue(r.Type, r, relTime)
}
for _, rt := range f.RelativeTime {
x := x.Index(rt).IndexFromType(rt)
for _, p := range rt.RelativeTimePattern {
x.SetValue(p.Count, p)
}
}
for _, rp := range f.RelativePeriod {
x.Index(rp).SetValue(rp.Alt, rp)
}
}
}
if x := x.Index(ldml.Dates.TimeZoneNames); x != nil {
format := x.IndexWithName("zoneFormat")
for _, h := range ldml.Dates.TimeZoneNames.HourFormat {
format.SetValue(h.Element(), h)
}
for _, g := range ldml.Dates.TimeZoneNames.GmtFormat {
format.SetValue(g.Element(), g)
}
for _, g := range ldml.Dates.TimeZoneNames.GmtZeroFormat {
format.SetValue(g.Element(), g)
}
for _, r := range ldml.Dates.TimeZoneNames.RegionFormat {
x.Index(r).SetValue(r.Type, r, timeType)
}
set := func(x *cldrtree.Index, e []*cldr.Common, zone string) {
for _, n := range e {
x.Index(n, zoneType...).SetValue(zone, n)
}
}
zoneWidth := []cldrtree.Option{length, cldrtree.SharedType()}
zs := x.IndexWithName("zone")
for _, z := range ldml.Dates.TimeZoneNames.Zone {
for _, l := range z.Long {
x := zs.Index(l, zoneWidth...)
set(x, l.Generic, z.Type)
set(x, l.Standard, z.Type)
set(x, l.Daylight, z.Type)
}
for _, s := range z.Short {
x := zs.Index(s, zoneWidth...)
set(x, s.Generic, z.Type)
set(x, s.Standard, z.Type)
set(x, s.Daylight, z.Type)
}
}
set = func(x *cldrtree.Index, e []*cldr.Common, zone string) {
for _, n := range e {
x.Index(n, metaZoneType...).SetValue(zone, n)
}
}
zoneWidth = []cldrtree.Option{length, cldrtree.SharedType()}
zs = x.IndexWithName("metaZone")
for _, z := range ldml.Dates.TimeZoneNames.Metazone {
for _, l := range z.Long {
x := zs.Index(l, zoneWidth...)
set(x, l.Generic, z.Type)
set(x, l.Standard, z.Type)
set(x, l.Daylight, z.Type)
}
for _, s := range z.Short {
x := zs.Index(s, zoneWidth...)
set(x, s.Generic, z.Type)
set(x, s.Standard, z.Type)
set(x, s.Daylight, z.Type)
}
}
}
}
}

241
vendor/golang.org/x/text/date/gen_test.go generated vendored Normal file
View File

@ -0,0 +1,241 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package date
import (
"strconv"
"strings"
"testing"
"golang.org/x/text/internal/cldrtree"
"golang.org/x/text/internal/gen"
"golang.org/x/text/internal/testtext"
"golang.org/x/text/language"
"golang.org/x/text/unicode/cldr"
)
func TestTables(t *testing.T) {
testtext.SkipIfNotLong(t)
r := gen.OpenCLDRCoreZip()
defer r.Close()
d := &cldr.Decoder{}
d.SetDirFilter("supplemental", "main")
d.SetSectionFilter("dates")
data, err := d.DecodeZip(r)
if err != nil {
t.Fatalf("DecodeZip: %v", err)
}
count := 0
for _, lang := range data.Locales() {
ldml := data.RawLDML(lang)
if ldml.Dates == nil {
continue
}
tag, _ := language.CompactIndex(language.MustParse(lang))
test := func(want cldrtree.Element, path ...string) {
if count > 30 {
return
}
t.Run(lang+"/"+strings.Join(path, "/"), func(t *testing.T) {
p := make([]uint16, len(path))
for i, s := range path {
if v, err := strconv.Atoi(s); err == nil {
p[i] = uint16(v)
} else if v, ok := enumMap[s]; ok {
p[i] = v
} else {
count++
t.Fatalf("Unknown key %q", s)
}
}
wantStr := want.GetCommon().Data()
if got := tree.Lookup(tag, p...); got != wantStr {
count++
t.Errorf("got %q; want %q", got, wantStr)
}
})
}
width := func(s string) string { return "width" + strings.Title(s) }
if ldml.Dates.Calendars != nil {
for _, cal := range ldml.Dates.Calendars.Calendar {
if cal.Months != nil {
for _, mc := range cal.Months.MonthContext {
for _, mw := range mc.MonthWidth {
for _, m := range mw.Month {
test(m, "calendars", cal.Type, "months", mc.Type, width(mw.Type), m.Yeartype+m.Type)
}
}
}
}
if cal.MonthPatterns != nil {
for _, mc := range cal.MonthPatterns.MonthPatternContext {
for _, mw := range mc.MonthPatternWidth {
for _, m := range mw.MonthPattern {
test(m, "calendars", cal.Type, "monthPatterns", mc.Type, width(mw.Type))
}
}
}
}
if cal.CyclicNameSets != nil {
for _, cns := range cal.CyclicNameSets.CyclicNameSet {
for _, cc := range cns.CyclicNameContext {
for _, cw := range cc.CyclicNameWidth {
for _, c := range cw.CyclicName {
test(c, "calendars", cal.Type, "cyclicNameSets", cns.Type+"CycleType", cc.Type, width(cw.Type), c.Type)
}
}
}
}
}
if cal.Days != nil {
for _, dc := range cal.Days.DayContext {
for _, dw := range dc.DayWidth {
for _, d := range dw.Day {
test(d, "calendars", cal.Type, "days", dc.Type, width(dw.Type), d.Type)
}
}
}
}
if cal.Quarters != nil {
for _, qc := range cal.Quarters.QuarterContext {
for _, qw := range qc.QuarterWidth {
for _, q := range qw.Quarter {
test(q, "calendars", cal.Type, "quarters", qc.Type, width(qw.Type), q.Type)
}
}
}
}
if cal.DayPeriods != nil {
for _, dc := range cal.DayPeriods.DayPeriodContext {
for _, dw := range dc.DayPeriodWidth {
for _, d := range dw.DayPeriod {
test(d, "calendars", cal.Type, "dayPeriods", dc.Type, width(dw.Type), d.Type, d.Alt)
}
}
}
}
if cal.Eras != nil {
if cal.Eras.EraNames != nil {
for _, e := range cal.Eras.EraNames.Era {
test(e, "calendars", cal.Type, "eras", "widthWide", e.Alt, e.Type)
}
}
if cal.Eras.EraAbbr != nil {
for _, e := range cal.Eras.EraAbbr.Era {
test(e, "calendars", cal.Type, "eras", "widthAbbreviated", e.Alt, e.Type)
}
}
if cal.Eras.EraNarrow != nil {
for _, e := range cal.Eras.EraNarrow.Era {
test(e, "calendars", cal.Type, "eras", "widthNarrow", e.Alt, e.Type)
}
}
}
if cal.DateFormats != nil {
for _, dfl := range cal.DateFormats.DateFormatLength {
for _, df := range dfl.DateFormat {
for _, p := range df.Pattern {
test(p, "calendars", cal.Type, "dateFormats", dfl.Type, p.Alt)
}
}
}
}
if cal.TimeFormats != nil {
for _, tfl := range cal.TimeFormats.TimeFormatLength {
for _, tf := range tfl.TimeFormat {
for _, p := range tf.Pattern {
test(p, "calendars", cal.Type, "timeFormats", tfl.Type, p.Alt)
}
}
}
}
if cal.DateTimeFormats != nil {
for _, dtfl := range cal.DateTimeFormats.DateTimeFormatLength {
for _, dtf := range dtfl.DateTimeFormat {
for _, p := range dtf.Pattern {
test(p, "calendars", cal.Type, "dateTimeFormats", dtfl.Type, p.Alt)
}
}
}
// TODO:
// - appendItems
// - intervalFormats
}
}
}
// TODO: this is a lot of data and is probably relatively little used.
// Store this somewhere else.
if ldml.Dates.Fields != nil {
for _, f := range ldml.Dates.Fields.Field {
field := f.Type + "Field"
for _, d := range f.DisplayName {
test(d, "fields", field, "displayName", d.Alt)
}
for _, r := range f.Relative {
i, _ := strconv.Atoi(r.Type)
v := []string{"before2", "before1", "current", "after1", "after2", "after3"}[i+2]
test(r, "fields", field, "relative", v)
}
for _, rt := range f.RelativeTime {
for _, p := range rt.RelativeTimePattern {
test(p, "fields", field, "relativeTime", rt.Type, p.Count)
}
}
for _, rp := range f.RelativePeriod {
test(rp, "fields", field, "relativePeriod", rp.Alt)
}
}
}
if ldml.Dates.TimeZoneNames != nil {
for _, h := range ldml.Dates.TimeZoneNames.HourFormat {
test(h, "timeZoneNames", "zoneFormat", h.Element())
}
for _, g := range ldml.Dates.TimeZoneNames.GmtFormat {
test(g, "timeZoneNames", "zoneFormat", g.Element())
}
for _, g := range ldml.Dates.TimeZoneNames.GmtZeroFormat {
test(g, "timeZoneNames", "zoneFormat", g.Element())
}
for _, r := range ldml.Dates.TimeZoneNames.RegionFormat {
s := r.Type
if s == "" {
s = "generic"
}
test(r, "timeZoneNames", "regionFormat", s+"Time")
}
testZone := func(zoneType, zoneWidth, zone string, a ...[]*cldr.Common) {
for _, e := range a {
for _, n := range e {
test(n, "timeZoneNames", zoneType, zoneWidth, n.Element()+"Time", zone)
}
}
}
for _, z := range ldml.Dates.TimeZoneNames.Zone {
for _, l := range z.Long {
testZone("zone", l.Element(), z.Type, l.Generic, l.Standard, l.Daylight)
}
for _, l := range z.Short {
testZone("zone", l.Element(), z.Type, l.Generic, l.Standard, l.Daylight)
}
}
for _, z := range ldml.Dates.TimeZoneNames.Metazone {
for _, l := range z.Long {
testZone("metaZone", l.Element(), z.Type, l.Generic, l.Standard, l.Daylight)
}
for _, l := range z.Short {
testZone("metaZone", l.Element(), z.Type, l.Generic, l.Standard, l.Daylight)
}
}
}
}
}

64522
vendor/golang.org/x/text/date/tables.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

351
vendor/golang.org/x/text/internal/cldrtree/cldrtree.go generated vendored Normal file
View File

@ -0,0 +1,351 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package cldrtree builds and generates a CLDR index file, including all
// inheritance.
//
package cldrtree
// cldrtree stores CLDR data in a tree-like structure called Tree. In the CLDR
// data each branch in the tree is indicated by either an element name or an
// attribute value. A Tree does not distinguish between these two cases, but
// rather assumes that all branches can be accessed by an enum with a compact
// range of positive integer values starting from 0.
//
// Each Tree consists of three parts:
// - a slice mapping compact language identifiers to an offset into a set of
// indices,
// - a set of indices, stored as a large blob of uint16 values that encode
// the actual tree structure of data, and
// - a set of buckets that each holds a collection of strings.
// each of which is explained in more detail below.
//
//
// Tree lookup
// A tree lookup is done by providing a locale and a "path", which is a
// sequence of enum values. The search starts with getting the index for the
// given locale and then incrementally jumping into the index using the path
// values. If an element cannot be found in the index, the search starts anew
// for the locale's parent locale. The path may change during lookup by means
// of aliasing, described below.
//
// Buckets
// Buckets hold the actual string data of the leaf values of the CLDR tree.
// This data is stored in buckets, rather than one large string, for multiple
// reasons:
// - it allows representing leaf values more compactly, by storing all leaf
// values in a single bucket and then needing only needing a uint16 to index
// into this bucket for all leaf values,
// - (TBD) allow multiple trees to share subsets of buckets, mostly to allow
// linking in a smaller amount of data if only a subset of the buckets is
// needed,
// - to be nice to go fmt and the compiler.
//
// indices
// An index is a slice of uint16 for which the values are interpreted in one of
// two ways: as a node or a set of leaf values.
// A set of leaf values has the following form:
// <max_size>, <bucket>, <offset>...
// max_size indicates the maximum enum value for which an offset is defined.
// An offset value of 0xFFFF (missingValue) also indicates an undefined value.
// If defined offset indicates the offset within the given bucket of the string.
// A node value has the following form:
// <max_size>, <offset_or_alias>...
// max_size indicates the maximum value for which an offset is defined.
// A missing offset may also be indicated with 0. If the high bit (0x8000, or
// inheritMask) is not set, the offset points to the offset within the index
// for the current locale.
// An offset with high bit set is an alias. In this case the uint16 has the form
// bits:
// 15: 1
// 14-12: negative offset into path relative to current position
// 0-11: new enum value for path element.
// On encountering an alias, the path is modified accordingly and the lookup is
// restarted for the given locale.
import (
"fmt"
"reflect"
"regexp"
"strings"
"unicode/utf8"
"golang.org/x/text/internal/gen"
"golang.org/x/text/language"
"golang.org/x/text/unicode/cldr"
)
// TODO:
// - allow two Trees to share the same set of buckets.
// A Builder allows storing CLDR data in compact form.
type Builder struct {
table []string
rootMeta *metaData
locales []locale
strToBucket map[string]stringInfo
buckets [][]byte
enums []*enum
err error
// Stats
size int
sizeAll int
bucketWaste int
}
const (
maxBucketSize = 8 * 1024 // 8K
maxStrlen = 254 // allow 0xFF sentinel
)
func (b *Builder) setError(err error) {
if b.err == nil {
b.err = err
}
}
func (b *Builder) addString(data string) stringInfo {
data = b.makeString(data)
info, ok := b.strToBucket[data]
if !ok {
b.size += len(data)
x := len(b.buckets) - 1
bucket := b.buckets[x]
if len(bucket)+len(data) < maxBucketSize {
info.bucket = uint16(x)
info.bucketPos = uint16(len(bucket))
b.buckets[x] = append(bucket, data...)
} else {
info.bucket = uint16(len(b.buckets))
info.bucketPos = 0
b.buckets = append(b.buckets, []byte(data))
}
b.strToBucket[data] = info
}
return info
}
func (b *Builder) addStringToBucket(data string, bucket uint16) stringInfo {
data = b.makeString(data)
info, ok := b.strToBucket[data]
if !ok || info.bucket != bucket {
if ok {
b.bucketWaste += len(data)
}
b.size += len(data)
bk := b.buckets[bucket]
info.bucket = bucket
info.bucketPos = uint16(len(bk))
b.buckets[bucket] = append(bk, data...)
b.strToBucket[data] = info
}
return info
}
func (b *Builder) makeString(data string) string {
if len(data) > maxStrlen {
b.setError(fmt.Errorf("string %q exceeds maximum length of %d", data, maxStrlen))
data = data[:maxStrlen]
for i := len(data) - 1; i > len(data)-4; i-- {
if utf8.RuneStart(data[i]) {
data = data[:i]
break
}
}
}
data = string([]byte{byte(len(data))}) + data
b.sizeAll += len(data)
return data
}
type stringInfo struct {
bufferPos uint32
bucket uint16
bucketPos uint16
}
// New creates a new Builder.
func New(tableName string) *Builder {
b := &Builder{
strToBucket: map[string]stringInfo{},
buckets: [][]byte{nil}, // initialize with first bucket.
}
b.rootMeta = &metaData{
b: b,
typeInfo: &typeInfo{},
}
return b
}
// Gen writes all the tables and types for the collected data.
func (b *Builder) Gen(w *gen.CodeWriter) error {
t, err := build(b)
if err != nil {
return err
}
return generate(b, t, w)
}
// GenTestData generates tables useful for testing data generated with Gen.
func (b *Builder) GenTestData(w *gen.CodeWriter) error {
return generateTestData(b, w)
}
type locale struct {
tag language.Tag
root *Index
}
// Locale creates an index for the given locale.
func (b *Builder) Locale(t language.Tag) *Index {
index := &Index{
meta: b.rootMeta,
}
b.locales = append(b.locales, locale{tag: t, root: index})
return index
}
// An Index holds a map of either leaf values or other indices.
type Index struct {
meta *metaData
subIndex []*Index
values []keyValue
}
func (i *Index) setError(err error) { i.meta.b.setError(err) }
type keyValue struct {
key enumIndex
value stringInfo
}
// Element is a CLDR XML element.
type Element interface {
GetCommon() *cldr.Common
}
// Index creates a subindex where the type and enum values are not shared
// with siblings by default. The name is derived from the elem. If elem is
// an alias reference, the alias will be resolved and linked. If elem is nil
// Index returns nil.
func (i *Index) Index(elem Element, opt ...Option) *Index {
if elem == nil || reflect.ValueOf(elem).IsNil() {
return nil
}
c := elem.GetCommon()
o := &options{
parent: i,
name: c.GetCommon().Element(),
}
o.fill(opt)
o.setAlias(elem)
return i.subIndexForKey(o)
}
// IndexWithName is like Section but derives the name from the given name.
func (i *Index) IndexWithName(name string, opt ...Option) *Index {
o := &options{parent: i, name: name}
o.fill(opt)
return i.subIndexForKey(o)
}
// IndexFromType creates a subindex the value of tye type attribute as key. It
// will also configure the Index to share the enumeration values with all
// sibling values. If elem is an alias, it will be resolved and linked.
func (i *Index) IndexFromType(elem Element, opts ...Option) *Index {
o := &options{
parent: i,
name: elem.GetCommon().Type,
}
o.fill(opts)
o.setAlias(elem)
useSharedType()(o)
return i.subIndexForKey(o)
}
// IndexFromAlt creates a subindex the value of tye alt attribute as key. It
// will also configure the Index to share the enumeration values with all
// sibling values. If elem is an alias, it will be resolved and linked.
func (i *Index) IndexFromAlt(elem Element, opts ...Option) *Index {
o := &options{
parent: i,
name: elem.GetCommon().Alt,
}
o.fill(opts)
o.setAlias(elem)
useSharedType()(o)
return i.subIndexForKey(o)
}
func (i *Index) subIndexForKey(opts *options) *Index {
key := opts.name
if len(i.values) > 0 {
panic(fmt.Errorf("cldrtree: adding Index for %q when value already exists", key))
}
meta := i.meta.sub(key, opts)
for _, x := range i.subIndex {
if x.meta == meta {
return x
}
}
if alias := opts.alias; alias != nil {
if a := alias.GetCommon().Alias; a != nil {
if a.Source != "locale" {
i.setError(fmt.Errorf("cldrtree: non-locale alias not supported %v", a.Path))
}
if meta.inheritOffset < 0 {
i.setError(fmt.Errorf("cldrtree: alias was already set %v", a.Path))
}
path := a.Path
for ; strings.HasPrefix(path, "../"); path = path[len("../"):] {
meta.inheritOffset--
}
m := aliasRe.FindStringSubmatch(path)
if m == nil {
i.setError(fmt.Errorf("cldrtree: could not parse alias %q", a.Path))
} else {
key := m[4]
if key == "" {
key = m[1]
}
meta.inheritIndex = key
}
}
}
x := &Index{meta: meta}
i.subIndex = append(i.subIndex, x)
return x
}
var aliasRe = regexp.MustCompile(`^([a-zA-Z]+)(\[@([a-zA-Z-]+)='([a-zA-Z-]+)'\])?`)
// SetValue sets the value, the data from a CLDR XML element, for the given key.
func (i *Index) SetValue(key string, value Element, opt ...Option) {
if len(i.subIndex) > 0 {
panic(fmt.Errorf("adding value for key %q when index already exists", key))
}
o := &options{parent: i}
o.fill(opt)
c := value.GetCommon()
if c.Alias != nil {
i.setError(fmt.Errorf("cldrtree: alias not supported for SetValue %v", c.Alias.Path))
}
i.setValue(key, c.Data(), o)
}
func (i *Index) setValue(key, data string, o *options) {
index, _ := i.meta.typeInfo.lookupSubtype(key, o)
kv := keyValue{key: index}
if len(i.values) > 0 {
// Add string to the same bucket as the other values.
bucket := i.values[0].value.bucket
kv.value = i.meta.b.addStringToBucket(data, bucket)
} else {
kv.value = i.meta.b.addString(data)
}
i.values = append(i.values, kv)
}

View File

@ -0,0 +1,456 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cldrtree
import (
"bytes"
"flag"
"io/ioutil"
"log"
"math/rand"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"testing"
"golang.org/x/text/internal/gen"
"golang.org/x/text/language"
"golang.org/x/text/unicode/cldr"
)
var genOutput = flag.Bool("gen", false, "generate output files")
func TestAliasRegexp(t *testing.T) {
testCases := []struct {
alias string
want []string
}{{
alias: "miscPatterns[@numberSystem='latn']",
want: []string{
"miscPatterns[@numberSystem='latn']",
"miscPatterns",
"[@numberSystem='latn']",
"numberSystem",
"latn",
},
}, {
alias: `calendar[@type='greg-foo']/days/`,
want: []string{
"calendar[@type='greg-foo']",
"calendar",
"[@type='greg-foo']",
"type",
"greg-foo",
},
}, {
alias: "eraAbbr",
want: []string{
"eraAbbr",
"eraAbbr",
"",
"",
"",
},
}, {
// match must be anchored at beginning.
alias: `../calendar[@type='gregorian']/days/`,
}}
for _, tc := range testCases {
t.Run(tc.alias, func(t *testing.T) {
got := aliasRe.FindStringSubmatch(tc.alias)
if !reflect.DeepEqual(got, tc.want) {
t.Errorf("got %v; want %v", got, tc.want)
}
})
}
}
func TestBuild(t *testing.T) {
tree1, _ := loadTestdata(t, "test1")
tree2, _ := loadTestdata(t, "test2")
// Constants for second test test
const (
calendar = iota
field
)
const (
month = iota
era
filler
cyclicNameSet
)
const (
abbreviated = iota
narrow
wide
)
testCases := []struct {
desc string
tree *Tree
locale string
path []uint16
isFeature bool
result string
}{{
desc: "und/chinese month format wide m1",
tree: tree1,
locale: "und",
path: path(calendar, 0, month, 0, wide, 1),
result: "cM01",
}, {
desc: "und/chinese month format wide m12",
tree: tree1,
locale: "und",
path: path(calendar, 0, month, 0, wide, 12),
result: "cM12",
}, {
desc: "und/non-existing value",
tree: tree1,
locale: "und",
path: path(calendar, 0, month, 0, wide, 13),
result: "",
}, {
desc: "und/dangi:chinese month format wide",
tree: tree1,
locale: "und",
path: path(calendar, 1, month, 0, wide, 1),
result: "cM01",
}, {
desc: "und/chinese month format abbreviated:wide",
tree: tree1,
locale: "und",
path: path(calendar, 0, month, 0, abbreviated, 1),
result: "cM01",
}, {
desc: "und/chinese month format narrow:wide",
tree: tree1,
locale: "und",
path: path(calendar, 0, month, 0, narrow, 1),
result: "cM01",
}, {
desc: "und/gregorian month format wide",
tree: tree1,
locale: "und",
path: path(calendar, 2, month, 0, wide, 2),
result: "gM02",
}, {
desc: "und/gregorian month format:stand-alone narrow",
tree: tree1,
locale: "und",
path: path(calendar, 2, month, 0, narrow, 1),
result: "1",
}, {
desc: "und/gregorian month stand-alone:format abbreviated",
tree: tree1,
locale: "und",
path: path(calendar, 2, month, 1, abbreviated, 1),
result: "gM01",
}, {
desc: "und/gregorian month stand-alone:format wide ",
tree: tree1,
locale: "und",
path: path(calendar, 2, month, 1, abbreviated, 1),
result: "gM01",
}, {
desc: "und/dangi:chinese month format narrow:wide ",
tree: tree1,
locale: "und",
path: path(calendar, 1, month, 0, narrow, 4),
result: "cM04",
}, {
desc: "und/field era displayname 0",
tree: tree2,
locale: "und",
path: path(field, 0, 0, 0),
result: "Era",
}, {
desc: "en/field era displayname 0",
tree: tree2,
locale: "en",
path: path(field, 0, 0, 0),
result: "era",
}, {
desc: "und/calendar hebrew format wide 7-leap",
tree: tree2,
locale: "und",
path: path(calendar, 7, month, 0, wide, 0),
result: "Adar II",
}, {
desc: "en-GB:en-001:en:und/calendar hebrew format wide 7-leap",
tree: tree2,
locale: "en-GB",
path: path(calendar, 7, month, 0, wide, 0),
result: "Adar II",
}, {
desc: "und/buddhist month format wide 11",
tree: tree2,
locale: "und",
path: path(calendar, 0, month, 0, wide, 12),
result: "genWideM12",
}, {
desc: "en-GB/gregorian month stand-alone narrow 2",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, month, 1, narrow, 3),
result: "gbNarrowM3",
}, {
desc: "en-GB/gregorian month format narrow 3/missing in en-GB",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, month, 0, narrow, 4),
result: "enNarrowM4",
}, {
desc: "en-GB/gregorian month format narrow 3/missing in en and en-GB",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, month, 0, narrow, 7),
result: "gregNarrowM7",
}, {
desc: "en-GB/gregorian month format narrow 3/missing in en and en-GB",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, month, 0, narrow, 7),
result: "gregNarrowM7",
}, {
desc: "en-GB/gregorian era narrow",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, era, abbreviated, 0, 1),
isFeature: true,
result: "AD",
}, {
desc: "en-GB/gregorian era narrow",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, era, narrow, 0, 0),
isFeature: true,
result: "BC",
}, {
desc: "en-GB/gregorian era narrow",
tree: tree2,
locale: "en-GB",
path: path(calendar, 6, era, wide, 1, 0),
isFeature: true,
result: "Before Common Era",
}, {
desc: "en-GB/dangi:chinese cyclicName, months, format, narrow:abbreviated 2",
tree: tree2,
locale: "en-GB",
path: path(calendar, 1, cyclicNameSet, 3, 0, 1, 2),
isFeature: true,
result: "year2",
}, {
desc: "en-GB/field era-narrow ",
tree: tree2,
locale: "en-GB",
path: path(field, 2, 0, 0),
result: "era",
}, {
desc: "en-GB/field month-narrow relativeTime future one",
tree: tree2,
locale: "en-GB",
path: path(field, 5, 2, 0, 1),
isFeature: true,
result: "001NarrowFutMOne",
}, {
// Don't fall back to the one of "en".
desc: "en-GB/field month-short relativeTime past one:other",
tree: tree2,
locale: "en-GB",
path: path(field, 4, 2, 1, 1),
isFeature: true,
result: "001ShortPastMOther",
}, {
desc: "en-GB/field month relativeTime future two:other",
tree: tree2,
locale: "en-GB",
path: path(field, 3, 2, 0, 2),
isFeature: true,
result: "enFutMOther",
}}
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
tag, _ := language.CompactIndex(language.MustParse(tc.locale))
s := tc.tree.lookup(tag, tc.isFeature, tc.path...)
if s != tc.result {
t.Errorf("got %q; want %q", s, tc.result)
}
})
}
}
func path(e ...uint16) []uint16 { return e }
func TestGen(t *testing.T) {
testCases := []string{"test1", "test2"}
for _, tc := range testCases {
t.Run(tc, func(t *testing.T) {
_, got := loadTestdata(t, tc)
// Remove sizes that may vary per architecture.
re := regexp.MustCompile("// Size: [0-9]*")
got = re.ReplaceAllLiteral(got, []byte("// Size: xxxx"))
re = regexp.MustCompile("// Total table size [0-9]*")
got = re.ReplaceAllLiteral(got, []byte("// Total table size: xxxx"))
file := filepath.Join("testdata", tc, "output.go")
if *genOutput {
ioutil.WriteFile(file, got, 0700)
t.SkipNow()
}
b, err := ioutil.ReadFile(file)
if err != nil {
t.Fatalf("failed to open file: %v", err)
}
if want := string(b); string(got) != want {
t.Log(string(got))
t.Errorf("files differ")
}
})
}
}
func loadTestdata(t *testing.T, test string) (tree *Tree, file []byte) {
b := New("test")
var d cldr.Decoder
data, err := d.DecodePath(filepath.Join("testdata", test))
if err != nil {
t.Fatalf("error decoding testdata: %v", err)
}
context := Enum("context")
widthMap := func(s string) string {
// Align era with width values.
if r, ok := map[string]string{
"eraAbbr": "abbreviated",
"eraNarrow": "narrow",
"eraNames": "wide",
}[s]; ok {
s = r
}
return "w" + strings.Title(s)
}
width := EnumFunc("width", widthMap, "abbreviated", "narrow", "wide")
month := Enum("month", "leap7")
relative := EnumFunc("relative", func(s string) string {
x, err := strconv.ParseInt(s, 10, 8)
if err != nil {
log.Fatal("Invalid number:", err)
}
return []string{
"before1",
"current",
"after1",
}[x+1]
})
cycleType := EnumFunc("cycleType", func(s string) string {
return "cyc" + strings.Title(s)
})
r := rand.New(rand.NewSource(0))
for _, loc := range data.Locales() {
ldml := data.RawLDML(loc)
x := b.Locale(language.Make(loc))
if x := x.Index(ldml.Dates.Calendars); x != nil {
for _, cal := range ldml.Dates.Calendars.Calendar {
x := x.IndexFromType(cal)
if x := x.Index(cal.Months); x != nil {
for _, mc := range cal.Months.MonthContext {
x := x.IndexFromType(mc, context)
for _, mw := range mc.MonthWidth {
x := x.IndexFromType(mw, width)
for _, m := range mw.Month {
x.SetValue(m.Yeartype+m.Type, m, month)
}
}
}
}
if x := x.Index(cal.CyclicNameSets); x != nil {
for _, cns := range cal.CyclicNameSets.CyclicNameSet {
x := x.IndexFromType(cns, cycleType)
for _, cc := range cns.CyclicNameContext {
x := x.IndexFromType(cc, context)
for _, cw := range cc.CyclicNameWidth {
x := x.IndexFromType(cw, width)
for _, c := range cw.CyclicName {
x.SetValue(c.Type, c)
}
}
}
}
}
if x := x.Index(cal.Eras); x != nil {
opts := []Option{width, SharedType()}
if x := x.Index(cal.Eras.EraNames, opts...); x != nil {
for _, e := range cal.Eras.EraNames.Era {
x.IndexFromAlt(e).SetValue(e.Type, e)
}
}
if x := x.Index(cal.Eras.EraAbbr, opts...); x != nil {
for _, e := range cal.Eras.EraAbbr.Era {
x.IndexFromAlt(e).SetValue(e.Type, e)
}
}
if x := x.Index(cal.Eras.EraNarrow, opts...); x != nil {
for _, e := range cal.Eras.EraNarrow.Era {
x.IndexFromAlt(e).SetValue(e.Type, e)
}
}
}
{
// Ensure having more than 2 buckets.
f := x.IndexWithName("filler")
b := make([]byte, maxStrlen)
opt := &options{parent: x}
r.Read(b)
f.setValue("0", string(b), opt)
}
}
}
if x := x.Index(ldml.Dates.Fields); x != nil {
for _, f := range ldml.Dates.Fields.Field {
x := x.IndexFromType(f)
for _, d := range f.DisplayName {
x.Index(d).SetValue("", d)
}
for _, r := range f.Relative {
x.Index(r).SetValue(r.Type, r, relative)
}
for _, rt := range f.RelativeTime {
x := x.Index(rt).IndexFromType(rt)
for _, p := range rt.RelativeTimePattern {
x.SetValue(p.Count, p)
}
}
for _, rp := range f.RelativePeriod {
x.Index(rp).SetValue("", rp)
}
}
}
}
tree, err = build(b)
if err != nil {
t.Fatal("error building tree:", err)
}
w := gen.NewCodeWriter()
generate(b, tree, w)
generateTestData(b, w)
buf := &bytes.Buffer{}
if _, err = w.WriteGo(buf, "test"); err != nil {
t.Log(buf.String())
t.Fatal("error generating code:", err)
}
return tree, buf.Bytes()
}

208
vendor/golang.org/x/text/internal/cldrtree/generate.go generated vendored Normal file
View File

@ -0,0 +1,208 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cldrtree
import (
"bytes"
"fmt"
"io"
"reflect"
"strconv"
"strings"
"golang.org/x/text/internal/gen"
)
func generate(b *Builder, t *Tree, w *gen.CodeWriter) error {
fmt.Fprintln(w, `import "golang.org/x/text/internal/cldrtree"`)
fmt.Fprintln(w)
fmt.Fprintf(w, "var tree = &cldrtree.Tree{locales, indices, buckets}\n\n")
w.WriteComment("Path values:\n" + b.stats())
fmt.Fprintln(w)
// Generate enum types.
for _, e := range b.enums {
// Build enum types.
w.WriteComment("%s specifies a property of a CLDR field.", e.name)
fmt.Fprintf(w, "type %s uint16\n", e.name)
}
d, err := getEnumData(b)
if err != nil {
return err
}
fmt.Fprintln(w, "const (")
for i, k := range d.keys {
fmt.Fprintf(w, "%s %s = %d // %s\n", toCamel(k), d.enums[i], d.m[k], k)
}
fmt.Fprintln(w, ")")
w.WriteVar("locales", t.Locales)
w.WriteVar("indices", t.Indices)
// Generate string buckets.
fmt.Fprintln(w, "var buckets = []string{")
for i := range t.Buckets {
fmt.Fprintf(w, "bucket%d,\n", i)
}
fmt.Fprint(w, "}\n\n")
w.Size += int(reflect.TypeOf("").Size()) * len(t.Buckets)
// Generate string buckets.
for i, bucket := range t.Buckets {
w.WriteVar(fmt.Sprint("bucket", i), bucket)
}
return nil
}
func generateTestData(b *Builder, w *gen.CodeWriter) error {
d, err := getEnumData(b)
if err != nil {
return err
}
fmt.Fprintln(w)
fmt.Fprintln(w, "var enumMap = map[string]uint16{")
fmt.Fprintln(w, `"": 0,`)
for _, k := range d.keys {
fmt.Fprintf(w, "%q: %d,\n", k, d.m[k])
}
fmt.Fprintln(w, "}")
return nil
}
func toCamel(s string) string {
p := strings.Split(s, "-")
for i, s := range p[1:] {
p[i+1] = strings.Title(s)
}
return strings.Replace(strings.Join(p, ""), "/", "", -1)
}
func (b *Builder) stats() string {
w := &bytes.Buffer{}
b.rootMeta.validate()
for _, es := range b.enums {
fmt.Fprintf(w, "<%s>\n", es.name)
printEnumValues(w, es, 1, nil)
}
fmt.Fprintln(w)
printEnums(w, b.rootMeta.typeInfo, 0)
fmt.Fprintln(w)
fmt.Fprintln(w, "Nr elem: ", len(b.strToBucket))
fmt.Fprintln(w, "uniqued size: ", b.size)
fmt.Fprintln(w, "total string size: ", b.sizeAll)
fmt.Fprintln(w, "bucket waste: ", b.bucketWaste)
return w.String()
}
func printEnums(w io.Writer, s *typeInfo, indent int) {
idStr := strings.Repeat(" ", indent) + "- "
e := s.enum
if e == nil {
if len(s.entries) > 0 {
panic(fmt.Errorf("has entries but no enum values: %#v", s.entries))
}
return
}
if e.name != "" {
fmt.Fprintf(w, "%s<%s>\n", idStr, e.name)
} else {
printEnumValues(w, e, indent, s)
}
if s.sharedKeys() {
for _, v := range s.entries {
printEnums(w, v, indent+1)
break
}
}
}
func printEnumValues(w io.Writer, e *enum, indent int, info *typeInfo) {
idStr := strings.Repeat(" ", indent) + "- "
for i := 0; i < len(e.keys); i++ {
fmt.Fprint(w, idStr)
k := e.keys[i]
if u, err := strconv.ParseUint(k, 10, 16); err == nil {
fmt.Fprintf(w, "%s", k)
// Skip contiguous integers
var v, last uint64
for i++; i < len(e.keys); i++ {
k = e.keys[i]
if v, err = strconv.ParseUint(k, 10, 16); err != nil {
break
}
last = v
}
if u < last {
fmt.Fprintf(w, `..%d`, last)
}
fmt.Fprintln(w)
if err != nil {
fmt.Fprintf(w, "%s%s\n", idStr, k)
}
} else if k == "" {
fmt.Fprintln(w, `""`)
} else {
fmt.Fprintf(w, "%s\n", k)
}
if info != nil && !info.sharedKeys() {
if e := info.entries[enumIndex(i)]; e != nil {
printEnums(w, e, indent+1)
}
}
}
}
func getEnumData(b *Builder) (*enumData, error) {
d := &enumData{m: map[string]int{}}
if errStr := d.insert(b.rootMeta.typeInfo); errStr != "" {
// TODO: consider returning the error.
return nil, fmt.Errorf("cldrtree: %s", errStr)
}
return d, nil
}
type enumData struct {
m map[string]int
keys []string
enums []string
}
func (d *enumData) insert(t *typeInfo) (errStr string) {
e := t.enum
if e == nil {
return ""
}
for i, k := range e.keys {
if _, err := strconv.ParseUint(k, 10, 16); err == nil {
// We don't include any enum that has integer values.
break
}
if v, ok := d.m[k]; ok {
if v != i {
return fmt.Sprintf("%q has value %d and %d", k, i, v)
}
} else {
d.m[k] = i
if k != "" {
d.keys = append(d.keys, k)
d.enums = append(d.enums, e.name)
}
}
}
for i := range t.enum.keys {
if e := t.entries[enumIndex(i)]; e != nil {
if errStr := d.insert(e); errStr != "" {
return fmt.Sprintf("%q>%v", t.enum.keys[i], errStr)
}
}
}
return ""
}

86
vendor/golang.org/x/text/internal/cldrtree/option.go generated vendored Normal file
View File

@ -0,0 +1,86 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cldrtree
import (
"reflect"
"golang.org/x/text/unicode/cldr"
)
// An Option configures an Index.
type Option func(*options)
type options struct {
parent *Index
name string
alias *cldr.Common
sharedType *typeInfo
sharedEnums *enum
}
func (o *options) fill(opt []Option) {
for _, f := range opt {
f(o)
}
}
// aliasOpt sets an alias from the given node, if the node defines one.
func (o *options) setAlias(n Element) {
if n != nil && !reflect.ValueOf(n).IsNil() {
o.alias = n.GetCommon()
}
}
// Enum defines a enumeration type. The resulting option may be passed for the
// construction of multiple Indexes, which they will share the same enum values.
// Calling Gen on a Builder will generate the Enum for the given name. The
// optional values fix the values for the given identifier to the argument
// position (starting at 0). Other values may still be added and will be
// assigned to subsequent values.
func Enum(name string, value ...string) Option {
return EnumFunc(name, nil, value...)
}
// EnumFunc is like Enum but also takes a function that allows rewriting keys.
func EnumFunc(name string, rename func(string) string, value ...string) Option {
enum := &enum{name: name, rename: rename, keyMap: map[string]enumIndex{}}
for _, e := range value {
enum.lookup(e)
}
return func(o *options) {
found := false
for _, e := range o.parent.meta.b.enums {
if e.name == enum.name {
found = true
break
}
}
if !found {
o.parent.meta.b.enums = append(o.parent.meta.b.enums, enum)
}
o.sharedEnums = enum
}
}
// SharedType returns an option which causes all Indexes to which this option is
// passed to have the same type.
func SharedType() Option {
info := &typeInfo{}
return func(o *options) { o.sharedType = info }
}
func useSharedType() Option {
return func(o *options) {
sub := o.parent.meta.typeInfo.keyTypeInfo
if sub == nil {
sub = &typeInfo{}
o.parent.meta.typeInfo.keyTypeInfo = sub
}
o.sharedType = sub
}
}

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
<identity>
<language type="root"/>
</identity>
<dates>
<calendars>
<calendar type="chinese">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">cM01</month>
<month type="2">cM02</month>
<month type="3">cM03</month>
<month type="4">cM04</month>
<month type="5">cM05</month>
<month type="6">cM06</month>
<month type="7">cM07</month>
<month type="8">cM08</month>
<month type="9">cM09</month>
<month type="10">cM10</month>
<month type="11">cM11</month>
<month type="12">cM12</month>
</monthWidth>
</monthContext>
</months>
</calendar>
<calendar type="dangi">
<months>
<alias source="locale" path="../../calendar[@type='chinese']/months"/>
</months>
</calendar>
<calendar type="gregorian">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">gM01</month>
<month type="2">gM02</month>
<month type="3">gM03</month>
<month type="4">gM04</month>
<month type="5">gM05</month>
<month type="6">gM06</month>
<month type="7">gM07</month>
<month type="8">gM08</month>
<month type="9">gM09</month>
<month type="10">gM10</month>
<month type="11">gM11</month>
<month type="12">gM12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">1</month>
<month type="2">2</month>
<month type="3">3</month>
<month type="4">4</month>
<month type="5">5</month>
<month type="6">6</month>
<month type="7">7</month>
<month type="8">8</month>
<month type="9">9</month>
<month type="10">10</month>
<month type="11">11</month>
<month type="12">12</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
</calendar>
</calendars>
</dates>
</ldml>

View File

@ -0,0 +1,347 @@
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
package test
import "golang.org/x/text/internal/cldrtree"
var tree = &cldrtree.Tree{locales, indices, buckets}
// Path values:
// <context>
// - format
// - stand-alone
// <width>
// - wAbbreviated
// - wNarrow
// - wWide
// <month>
// - leap7
// - 1..12
//
// - calendars
// - chinese
// - dangi
// - gregorian
// - months
// - <context>
// - <width>
// - <month>
// - filler
// - 0
//
// Nr elem: 39
// uniqued size: 912
// total string size: 912
// bucket waste: 0
// context specifies a property of a CLDR field.
type context uint16
// width specifies a property of a CLDR field.
type width uint16
// month specifies a property of a CLDR field.
type month uint16
const (
calendars = 0 // calendars
chinese = 0 // chinese
dangi = 1 // dangi
gregorian = 2 // gregorian
months = 0 // months
filler = 1 // filler
format context = 0 // format
standAlone context = 1 // stand-alone
wAbbreviated width = 0 // wAbbreviated
wNarrow width = 1 // wNarrow
wWide width = 2 // wWide
leap7 month = 0 // leap7
)
var locales = []uint32{ // 754 elements
// Entry 0 - 1F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 20 - 3F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 40 - 5F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 60 - 7F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 80 - 9F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry A0 - BF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry C0 - DF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry E0 - FF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 100 - 11F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 120 - 13F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 140 - 15F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 160 - 17F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 180 - 19F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 1A0 - 1BF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 1C0 - 1DF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 1E0 - 1FF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 200 - 21F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 220 - 23F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 240 - 25F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 260 - 27F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 280 - 29F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 2A0 - 2BF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 2C0 - 2DF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 2E0 - 2FF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000,
} // Size: xxxx bytes
var indices = []uint16{ // 86 elements
// Entry 0 - 3F
0x0001, 0x0002, 0x0003, 0x0006, 0x0021, 0x0027, 0x0002, 0x0009,
0x001e, 0x0001, 0x000b, 0x0003, 0x8002, 0x8002, 0x000f, 0x000d,
0x0000, 0xffff, 0x0000, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019,
0x001e, 0x0023, 0x0028, 0x002d, 0x0032, 0x0037, 0x0001, 0x0000,
0x003c, 0x0002, 0x9000, 0x0024, 0x0001, 0x0000, 0x013b, 0x0002,
0x002a, 0x0053, 0x0002, 0x002d, 0x0040, 0x0003, 0x8002, 0x9001,
0x0031, 0x000d, 0x0000, 0xffff, 0x023a, 0x023f, 0x0244, 0x0249,
0x024e, 0x0253, 0x0258, 0x025d, 0x0262, 0x0267, 0x026c, 0x0271,
// Entry 40 - 7F
0x0003, 0x9000, 0x0044, 0x9000, 0x000d, 0x0000, 0xffff, 0x0276,
0x0278, 0x027a, 0x027c, 0x027e, 0x0280, 0x0282, 0x0284, 0x0286,
0x0288, 0x028b, 0x028e, 0x0001, 0x0000, 0x0291,
} // Size: xxxx bytes
var buckets = []string{
bucket0,
}
var bucket0 string = "" + // Size: xxxx bytes
"\x04cM01\x04cM02\x04cM03\x04cM04\x04cM05\x04cM06\x04cM07\x04cM08\x04cM09" +
"\x04cM10\x04cM11\x04cM12\xfe\x01\x94\xfd\xc2\xfa/\xfc\xc0A\xd3\xff\x12" +
"\x04[s\xc8nO\xf9_\xf6b\xa5\xee\xe8*\xbd\xf4J-\x0bu\xfb\x18\x0d\xafH\xa7" +
"\x9e\xe0\xb1\x0d9FQ\x85\x0fԡx\x89.\xe2\x85\xec\xe1Q\x14Ux\x08u\xd6N\xe2" +
"\xd3\xd0\xd0\xdek\xf8\xf9\xb4L\xe8_\xf0DƱ\xf8;\x8e\x88;\xbf\x85z\xab\x99" +
"ŲR\xc7B\x9c2\U000e8bb7\x9e\xf8V\xf6Y\xc1\x8f\x0d\xce\xccw\xc7^z\x81\xbf" +
"\xde'_g\xcf\xe2B\xcf<\xc3T\xf3\xed\xe2־\xccN\xa3\xae^\x88Rj\x9fJW\x8b˞" +
"\xf2ԦS\x14v\x8dm)\x97a\xea\x9eOZ\xa6\xae\xc3\xfcxƪ\xe0\x81\xac\x81 \xc7 " +
"\xef\xcdlꄶ\x92^`{\xe0cqo\x96\xdd\xcd\xd0\x1du\x04\\?\x00\x0f\x8ayk\xcelQ" +
",8\x01\xaa\xca\xee߭[Pfd\xe8\xc0\xe4\xa7q\xecื\xc1\x96]\x91\x81%\x1b|\x9c" +
"\x9c\xa5 Z\xfc\x16\xa26\xa2\xef\xcd\xd2\xd1-*y\xd0\xfet\xa8(\x0a\xe9C" +
"\x9e\xb0֮\xca\x08#\xae\x02\xd6}\x86j\xc2\xc4\xfeJrPS\xda\x11\x9b\x9dOQQ@" +
"\xa2\xd7#\x9c@\xb4ZÕ\x0d\x94\x1f\xc4\xfe\x1c\x0c\xb9j\xd3\x22\xd6\x22" +
"\x82)_\xbf\xe1\x1e&\xa43\x07m\xb5\xc1DL:4\xd3*\\J\x7f\xfb\xe8с\xf7\xed;" +
"\x8c\xfe\x90O\x93\xf8\xf0m)\xbc\xd9\xed\x84{\x18.\x04d\x10\xf4Kİ\xf3\xf0" +
":\x0d\x06\x82\x0a0\xf2W\xf8\x11A0g\x8a\xc0E\x86\xc1\xe3\xc94,\x8b\x80U" +
"\xc4f؆D\x1d%\x99\x06͉֚K\x96\x8a\xe9\xf0띖\\\xe6\xa4i<N\xbe\x88\x15\x01" +
"\xb7لkf\xeb\x02\xb5~\\\xda{l\xbah\x91\xd6\x16\xbdhl7\xb84a:Ⱥ\xa2,\x00" +
"\x8f\xfeh\x83RsJ\xe4\xe3\xf1!z\xcd_\x83'\x08\x140\x18g\xb5\xd0g\x11\xb28" +
"\x00\x1cyW\xb2w\x19\xce?1\x88\xdf\xe5}\xee\xbfo\x82YZ\x10\xf7\xbbV,\xa0M" +
"\\='\x04gM01\x04gM02\x04gM03\x04gM04\x04gM05\x04gM06\x04gM07\x04gM08\x04" +
"gM09\x04gM10\x04gM11\x04gM12\x011\x012\x013\x014\x015\x016\x017\x018\x01" +
"9\x0210\x0211\x0212\xfe\x94)X\xc6\xdb2bg\x06I\xf3\xbc\x97٢1g5\xed悥\xdf" +
"\xe6\xf1\xa0\x11\xfbɊ\xd0\xfb\xe7\x90\x00<\x01\xe8\xe9\x96w\x03\xaff^" +
"\x9fr@\x7fK\x03\xd4\xfd\xb4t\xaa\xfe\x8a\x0d>\x05\x15\xddFP\xcfQ\x17+" +
"\x81$\x8b\xcb\x7f\x96\x9e@\x0bl[\x12wh\xb1\xc4\x12\xfa\xe9\x8c\xf5v1\xcf" +
"7\x03;KJ\xba}~\xd3\x19\xba\x14rI\xc9\x08\xacp\xd1\xc4\x06\xda\xde\x0e" +
"\x82\x8e\xb6\xba\x0dʨ\x82\x85T>\x10!<d?\xc8`;X`#fp\xba\xbc\xad\x0b\xd7" +
"\xf4\xc4\x19\x0e26#\xa8h\xd1\xea\xe1v\x9f@\xa2f1C\x1b;\xd5!V\x05\xd2\x08" +
"o\xeaԙ\xacc\xa4e=\x12(=V\x01\x9c7\x95\xa9\x8a\x12m\x09\xcf\xcb\xe3l\xdc" +
"\xc97\x88\xa5@\x9f\x8bnB\xc2݃\xaaFa\x18R\xad\x0bP(w\\w\x16\x90\xb6\x85N" +
"\x05\xb3w$\x1es\xa8\x83\xddw\xaf\xf00,m\xa8f\\B4\x1d\xdaJ\xda\xea"
var enumMap = map[string]uint16{
"": 0,
"calendars": 0,
"chinese": 0,
"dangi": 1,
"gregorian": 2,
"months": 0,
"filler": 1,
"format": 0,
"stand-alone": 1,
"wAbbreviated": 0,
"wNarrow": 1,
"wWide": 2,
"leap7": 0,
}
// Total table size: xxxx bytes (4KiB); checksum: DFE9E450

View File

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
<identity>
<language type="en"/>
</identity>
<dates>
<calendars>
<calendar type="buddhist">
<eras>
<eraAbbr>
<era type="0">BE</era>
</eraAbbr>
</eras>
</calendar>
<calendar type="chinese">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<month type="1">Mo1</month>
<month type="2">Mo2</month>
<month type="3">Mo3</month>
<month type="4">Mo4</month>
<month type="5">Mo5</month>
<month type="6">Mo6</month>
<month type="7">Mo7</month>
<month type="8">Mo8</month>
<month type="9">Mo9</month>
<month type="10">Mo10</month>
<month type="11">Mo11</month>
<month type="12">Mo12</month>
</monthWidth>
<monthWidth type="wide">
<month type="1">First Month</month>
<month type="2">Second Month</month>
<month type="3">Third Month</month>
<month type="4">Fourth Month</month>
<month type="5">Fifth Month</month>
<month type="6">Sixth Month</month>
<month type="7">Seventh Month</month>
<month type="8">Eighth Month</month>
<month type="9">Ninth Month</month>
<month type="10">Tenth Month</month>
<month type="11">Eleventh Month</month>
<month type="12">Twelfth Month</month>
</monthWidth>
</monthContext>
</months>
<cyclicNameSets>
<cyclicNameSet type="zodiacs">
<cyclicNameContext type="format">
<cyclicNameWidth type="abbreviated">
<cyclicName type="1">Rat</cyclicName>
<cyclicName type="2">Ox</cyclicName>
<cyclicName type="3">Tiger</cyclicName>
<cyclicName type="4">Rabbit</cyclicName>
<cyclicName type="5">Dragon</cyclicName>
<cyclicName type="6">Snake</cyclicName>
<cyclicName type="7">Horse</cyclicName>
<cyclicName type="8">Goat</cyclicName>
<cyclicName type="9">Monkey</cyclicName>
<cyclicName type="10">Rooster</cyclicName>
<cyclicName type="11">Dog</cyclicName>
<cyclicName type="12">Pig</cyclicName>
</cyclicNameWidth>
</cyclicNameContext>
</cyclicNameSet>
</cyclicNameSets>
</calendar>
<calendar type="generic">
</calendar>
<calendar type="gregorian">
<months>
<monthContext type="format">
<monthWidth type="wide">
<month type="1">enWideM1</month>
<month type="2">enWideM2</month>
<month type="3">enWideM3</month>
<month type="4">enWideM4</month>
<month type="5">enWideM5</month>
<month type="6">enWideM6</month>
<month type="7">enWideM7</month>
<month type="8">enWideM8</month>
<month type="9">enWideM9</month>
<month type="10">enWideM10</month>
<month type="11">enWideM11</month>
<month type="12">enWideM12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="narrow">
<month type="1">enNarrowM1</month>
<month type="2">enNarrowM2</month>
<month type="3">enNarrowM3</month>
<month type="4">enNarrowM4</month>
<month type="5">enNarrowM5</month>
<month type="6">enNarrowM6</month>
<!-- missing -->
<month type="8">enNarrowM8</month>
<month type="9">enNarrowM9</month>
<month type="10">enNarrowM10</month>
<month type="11">enNarrowM11</month>
<month type="12">enNarrowM12</month>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<era type="0">Before Christ</era>
<era type="0" alt="variant">Before Common Era</era>
<era type="1">Anno Domini</era>
<era type="1" alt="variant">Common Era</era>
</eraNames>
<eraAbbr>
<era type="0">BC</era>
<era type="0" alt="variant">BCE</era>
<era type="1">AD</era>
<era type="1" alt="variant">CE</era>
</eraAbbr>
<!-- nothing for eraNarrow -->
</eras>
</calendar>
<calendar type="hebrew">
<eras>
<eraAbbr>
<era type="0">AM</era>
</eraAbbr>
</eras>
</calendar>
<calendar type="islamic">
<eras>
<eraAbbr>
<era type="0">AH</era>
</eraAbbr>
</eras>
</calendar>
</calendars>
<fields>
<field type="era">
<displayName>era</displayName>
</field>
<field type="month">
<displayName>month</displayName>
<relative type="-1">last month</relative>
<relative type="0">this month</relative>
<relative type="1">next month</relative>
<relativeTime type="future">
<relativeTimePattern count="one">enFutMOne</relativeTimePattern>
<relativeTimePattern count="other">enFutMOther</relativeTimePattern>
</relativeTime>
<relativeTime type="past">
<relativeTimePattern count="one">enPastMOne</relativeTimePattern>
<relativeTimePattern count="other">enPastMOther</relativeTimePattern>
</relativeTime>
</field>
<field type="month-short">
<displayName>mo.</displayName>
<relative type="-1">last mo.</relative>
<relative type="0">this mo.</relative>
<relative type="1">next mo.</relative>
<relativeTime type="future">
<relativeTimePattern count="one">enShortFutMOne</relativeTimePattern>
<relativeTimePattern count="other">enShortFutMOther</relativeTimePattern>
</relativeTime>
<relativeTime type="past">
<relativeTimePattern count="one">enShortPastMOne</relativeTimePattern>
<relativeTimePattern count="other">enShortPastMOther</relativeTimePattern>
</relativeTime>
</field>
</fields>
</dates>
</ldml>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
<identity>
<language type="en"/>
<territory type="001"/>
</identity>
<dates>
<calendars>
<calendar type="chinese">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<month type="1">001AbbrMo1</month>
<month type="2">001AbbrMo2</month>
<month type="3">001AbbrMo3</month>
<month type="4">001AbbrMo4</month>
<month type="5">001AbbrMo5</month>
<month type="6">001AbbrMo6</month>
<month type="7">001AbbrMo7</month>
<month type="8">001AbbrMo8</month>
<month type="9">001AbbrMo9</month>
<month type="10">001AbbrMo10</month>
<month type="11">001AbbrMo11</month>
<month type="12">001AbbrMo12</month>
</monthWidth>
</monthContext>
</months>
</calendar>
<calendar type="generic">
</calendar>
<calendar type="gregorian">
</calendar>
</calendars>
<fields>
<field type="month-short">
<displayName>mo</displayName>
<relativeTime type="future">
<relativeTimePattern count="one">001ShortFutMOne</relativeTimePattern>
<relativeTimePattern count="other">001ShortFutMOther</relativeTimePattern>
</relativeTime>
<relativeTime type="past">
<!-- missing -->
<relativeTimePattern count="other">001ShortPastMOther</relativeTimePattern>
</relativeTime>
</field>
<field type="month-narrow">
<displayName>mo</displayName>
<relativeTime type="future">
<relativeTimePattern count="one">001NarrowFutMOne</relativeTimePattern>
<relativeTimePattern count="two">001NarrowFutMTwo</relativeTimePattern>
<relativeTimePattern count="other">001NarrowFutMOther</relativeTimePattern>
</relativeTime>
<relativeTime type="past">
<relativeTimePattern count="one">001NarrowPastMOne</relativeTimePattern>
<relativeTimePattern count="other">001NarrowPastMOther</relativeTimePattern>
</relativeTime>
</field>
</fields>
</dates>
</ldml>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
<identity>
<language type="en"/>
<territory type="GB"/>
</identity>
<dates>
<calendars>
<calendar type="gregorian">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<month type="1">gbAbbrM1</month>
<month type="2">gbAbbrM2</month>
<month type="3">gbAbbrM3</month>
<month type="4">gbAbbrM4</month>
<month type="5">gbAbbrM5</month>
<month type="6">gbAbbrM6</month>
<month type="7">gbAbbrM7</month>
<month type="8">gbAbbrM8</month>
<month type="9">gbAbbrM9</month>
<month type="10">gbAbbrM10</month>
<month type="11">gbAbbrM11</month>
<month type="12">gbAbbrM12</month>
</monthWidth>
<monthWidth type="wide">
<month type="1">gbWideM1</month>
<month type="2">gbWideM2</month>
<month type="3">gbWideM3</month>
<month type="4">gbWideM4</month>
<month type="5">gbWideM5</month>
<month type="6">gbWideM6</month>
<month type="7">gbWideM7</month>
<month type="8">gbWideM8</month>
<month type="9">gbWideM9</month>
<month type="10">gbWideM10</month>
<month type="11">gbWideM11</month>
<month type="12">gbWideM12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="narrow">
<month type="1">gbNarrowM1</month>
<month type="2">gbNarrowM2</month>
<month type="3">gbNarrowM3</month>
<!-- missing -->
<month type="5">gbNarrowM5</month>
<month type="6">gbNarrowM6</month>
<!-- missing -->
<month type="8">gbNarrowM8</month>
<month type="9">gbNarrowM9</month>
<month type="10">gbNarrowM10</month>
<month type="11">gbNarrowM11</month>
<month type="12">gbNarrowM12</month>
</monthWidth>
</monthContext>
</months>
</calendar>
<calendar type="islamic">
</calendar>
</calendars>
</dates>
</ldml>

View File

@ -0,0 +1,646 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
<identity>
<language type="root"/>
</identity>
<dates>
<calendars>
<calendar type="buddhist">
<months>
<alias source="locale" path="../../calendar[@type='generic']/months"/> <!-- gregorian in original -->
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">BE</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="chinese">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">chineseWideM01</month>
<month type="2">chineseWideM02</month>
<month type="3">chineseWideM03</month>
<month type="4">chineseWideM04</month>
<month type="5">chineseWideM05</month>
<month type="6">chineseWideM06</month>
<month type="7">chineseWideM07</month>
<month type="8">chineseWideM08</month>
<month type="9">chineseWideM09</month>
<month type="10">chineseWideM10</month>
<month type="11">chineseWideM11</month>
<month type="12">chineseWideM12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">chineseNarrowM1</month>
<month type="2">chineseNarrowM2</month>
<month type="3">chineseNarrowM3</month>
<month type="4">chineseNarrowM4</month>
<month type="5">chineseNarrowM5</month>
<month type="6">chineseNarrowM6</month>
<month type="7">chineseNarrowM7</month>
<month type="8">chineseNarrowM8</month>
<month type="9">chineseNarrowM9</month>
<month type="10">chineseNarrowM10</month>
<month type="11">chineseNarrowM11</month>
<month type="12">chineseNarrowM12</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<!-- chinese eras are computed, and don't fall back to gregorian -->
<cyclicNameSets>
<cyclicNameSet type="dayParts">
<cyclicNameContext type="format">
<cyclicNameWidth type="abbreviated">
<cyclicName type="1">dpAbbr1</cyclicName>
<cyclicName type="2">dpAbbr2</cyclicName>
<cyclicName type="3">dpAbbr3</cyclicName>
<cyclicName type="4">dpAbbr4</cyclicName>
<cyclicName type="5">dpAbbr5</cyclicName>
<cyclicName type="6">dpAbbr6</cyclicName>
<cyclicName type="7">dpAbbr7</cyclicName>
<cyclicName type="8">dpAbbr8</cyclicName>
<cyclicName type="9">dpAbbr9</cyclicName>
<cyclicName type="10">dpAbbr10</cyclicName>
<cyclicName type="11">dpAbbr11</cyclicName>
<cyclicName type="12">dpAbbr12</cyclicName>
</cyclicNameWidth>
<cyclicNameWidth type="narrow">
<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
<cyclicNameWidth type="wide">
<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
</cyclicNameContext>
</cyclicNameSet>
<cyclicNameSet type="days">
<alias source="locale" path="../cyclicNameSet[@type='years']"/>
</cyclicNameSet>
<cyclicNameSet type="months">
<alias source="locale" path="../cyclicNameSet[@type='years']"/>
</cyclicNameSet>
<cyclicNameSet type="years">
<cyclicNameContext type="format">
<cyclicNameWidth type="abbreviated">
<cyclicName type="1">year1</cyclicName>
<cyclicName type="2">year2</cyclicName>
<cyclicName type="3">year3</cyclicName>
<cyclicName type="4">year4</cyclicName>
<cyclicName type="5">year5</cyclicName>
<cyclicName type="6">year6</cyclicName>
<cyclicName type="7">year7</cyclicName>
<cyclicName type="8">year8</cyclicName>
<cyclicName type="9">year9</cyclicName>
<cyclicName type="10">year10</cyclicName>
<cyclicName type="11">year11</cyclicName>
<cyclicName type="12">year12</cyclicName>
<cyclicName type="13">year13</cyclicName>
<cyclicName type="14">year14</cyclicName>
<cyclicName type="15">year15</cyclicName>
<cyclicName type="16">year16</cyclicName>
<cyclicName type="17">year17</cyclicName>
<cyclicName type="18">year18</cyclicName>
<cyclicName type="19">year19</cyclicName>
<cyclicName type="20">year20</cyclicName>
<cyclicName type="21">year21</cyclicName>
<cyclicName type="22">year22</cyclicName>
<cyclicName type="23">year23</cyclicName>
<cyclicName type="24">year24</cyclicName>
<cyclicName type="25">year25</cyclicName>
<cyclicName type="26">year26</cyclicName>
<cyclicName type="27">year27</cyclicName>
<cyclicName type="28">year28</cyclicName>
<cyclicName type="29">year29</cyclicName>
<cyclicName type="30">year30</cyclicName>
<cyclicName type="31">year31</cyclicName>
<cyclicName type="32">year32</cyclicName>
<cyclicName type="33">year33</cyclicName>
<cyclicName type="34">year34</cyclicName>
<cyclicName type="35">year35</cyclicName>
<cyclicName type="36">year36</cyclicName>
<cyclicName type="37">year37</cyclicName>
<cyclicName type="38">year38</cyclicName>
<cyclicName type="39">year39</cyclicName>
<cyclicName type="40">year40</cyclicName>
<cyclicName type="41">year41</cyclicName>
<cyclicName type="42">year42</cyclicName>
<cyclicName type="43">year43</cyclicName>
<cyclicName type="44">year44</cyclicName>
<cyclicName type="45">year45</cyclicName>
<cyclicName type="46">year46</cyclicName>
<cyclicName type="47">year47</cyclicName>
<cyclicName type="48">year48</cyclicName>
<cyclicName type="49">year49</cyclicName>
<cyclicName type="50">year50</cyclicName>
<cyclicName type="51">year51</cyclicName>
<cyclicName type="52">year52</cyclicName>
<cyclicName type="53">year53</cyclicName>
<cyclicName type="54">year54</cyclicName>
<cyclicName type="55">year55</cyclicName>
<cyclicName type="56">year56</cyclicName>
<cyclicName type="57">year57</cyclicName>
<cyclicName type="58">year58</cyclicName>
<cyclicName type="59">year59</cyclicName>
<cyclicName type="60">year60</cyclicName>
</cyclicNameWidth>
<cyclicNameWidth type="narrow">
<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
<cyclicNameWidth type="wide">
<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
</cyclicNameContext>
</cyclicNameSet>
<cyclicNameSet type="zodiacs">
<cyclicNameContext type="format">
<cyclicNameWidth type="abbreviated">
<alias source="locale" path="../../../cyclicNameSet[@type='dayParts']/cyclicNameContext[@type='format']/cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
<cyclicNameWidth type="narrow">
<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
<cyclicNameWidth type="wide">
<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
</cyclicNameWidth>
</cyclicNameContext>
</cyclicNameSet>
</cyclicNameSets>
</calendar>
<calendar type="dangi">
<months>
<alias source="locale" path="../../calendar[@type='chinese']/months"/>
</months>
<cyclicNameSets>
<alias source="locale" path="../../calendar[@type='chinese']/cyclicNameSets"/>
</cyclicNameSets>
</calendar>
<calendar type="ethiopic">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">Meskerem</month>
<month type="2">Tekemt</month>
<month type="3">Hedar</month>
<month type="4">Tahsas</month>
<month type="5">Ter</month>
<month type="6">Yekatit</month>
<month type="7">Megabit</month>
<month type="8">Miazia</month>
<month type="9">Genbot</month>
<month type="10">Sene</month>
<month type="11">Hamle</month>
<month type="12">Nehasse</month>
<month type="13">Pagumen</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">1</month>
<month type="2">2</month>
<month type="3">3</month>
<month type="4">4</month>
<month type="5">5</month>
<month type="6">6</month>
<month type="7">7</month>
<month type="8">8</month>
<month type="9">9</month>
<month type="10">10</month>
<month type="11">11</month>
<month type="12">12</month>
<month type="13">13</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">ERA0</era>
<era type="1">ERA1</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="ethiopic-amete-alem">
<months>
<alias source="locale" path="../../calendar[@type='ethiopic']/months"/>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">ERA0</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="generic">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">genWideM01</month>
<month type="2">genWideM02</month>
<month type="3">genWideM03</month>
<month type="4">genWideM04</month>
<month type="5">genWideM05</month>
<month type="6">genWideM06</month>
<month type="7">genWideM07</month>
<month type="8">genWideM08</month>
<month type="9">genWideM09</month>
<month type="10">genWideM10</month>
<month type="11">genWideM11</month>
<month type="12">genWideM12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">genNarrowM1</month>
<month type="2">genNarrowM2</month>
<month type="3">genNarrowM3</month>
<month type="4">genNarrowM4</month>
<month type="5">genNarrowM5</month>
<month type="6">genNarrowM6</month>
<month type="7">genNarrowM7</month>
<month type="8">genNarrowM8</month>
<month type="9">genNarrowM9</month>
<month type="10">genNarrowM10</month>
<month type="11">genNarrowM11</month>
<month type="12">genNarrowM12</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">ERA0</era>
<era type="1">ERA1</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="gregorian">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">gregWideM01</month>
<month type="2">gregWideM02</month>
<month type="3">gregWideM03</month>
<month type="4">gregWideM04</month>
<month type="5">gregWideM05</month>
<month type="6">gregWideM06</month>
<month type="7">gregWideM07</month>
<month type="8">gregWideM08</month>
<month type="9">gregWideM09</month>
<month type="10">gregWideM10</month>
<month type="11">gregWideM11</month>
<month type="12">gregWideM12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">gregNarrowM1</month>
<month type="2">gregNarrowM2</month>
<month type="3">gregNarrowM3</month>
<month type="4">gregNarrowM4</month>
<month type="5">gregNarrowM5</month>
<month type="6">gregNarrowM6</month>
<month type="7">gregNarrowM7</month>
<month type="8">gregNarrowM8</month>
<month type="9">gregNarrowM9</month>
<month type="10">gregNarrowM10</month>
<month type="11">gregNarrowM11</month>
<month type="12">gregNarrowM12</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">BCE</era>
<era type="1">CE</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="hebrew">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">Tishri</month>
<month type="2">Heshvan</month>
<month type="3">Kislev</month>
<month type="4">Tevet</month>
<month type="5">Shevat</month>
<month type="6">Adar I</month>
<month type="7">Adar</month>
<month type="7" yeartype="leap">Adar II</month>
<month type="8">Nisan</month>
<month type="9">Iyar</month>
<month type="10">Sivan</month>
<month type="11">Tamuz</month>
<month type="12">Av</month>
<month type="13">Elul</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">1</month>
<month type="2">2</month>
<month type="3">3</month>
<month type="4">4</month>
<month type="5">5</month>
<month type="6">6</month>
<month type="7">7</month>
<month type="7" yeartype="leap">7</month>
<month type="8">8</month>
<month type="9">9</month>
<month type="10">10</month>
<month type="11">11</month>
<month type="12">12</month>
<month type="13">13</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">AM</era>
<!-- HY = Anno Mundi = -180799862400000 milliseconds since 1/1/1970 AD -->
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="islamic">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<month type="1">islAbbr1</month>
<month type="2">islAbbr2</month>
<month type="3">islAbbr3</month>
<month type="4">islAbbr4</month>
<month type="5">islAbbr5</month>
<month type="6">islAbbr6</month>
<month type="7">islAbbr7</month>
<month type="8">islAbbr8</month>
<month type="9">islAbbr9</month>
<month type="10">islAbbr10</month>
<month type="11">islAbbr11</month>
<month type="12">islAbbr12</month>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">islWide1</month>
<month type="2">islWide2</month>
<month type="3">islWide3</month>
<month type="4">islWide4</month>
<month type="5">islWide5</month>
<month type="6">islWide6</month>
<month type="7">islWide7</month>
<month type="8">islWide8</month>
<month type="9">islWide9</month>
<month type="10">islWide10</month>
<month type="11">islWide11</month>
<month type="12">islWide12</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">1</month>
<month type="2">2</month>
<month type="3">3</month>
<month type="4">4</month>
<month type="5">5</month>
<month type="6">6</month>
<month type="7">7</month>
<month type="8">8</month>
<month type="9">9</month>
<month type="10">10</month>
<month type="11">11</month>
<month type="12">12</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">AH</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
<calendar type="islamic-civil">
<months>
<alias source="locale" path="../../calendar[@type='islamic']/months"/>
</months>
<eras>
<alias source="locale" path="../../calendar[@type='islamic']/eras"/>
</eras>
</calendar>
<calendar type="islamic-rgsa">
<months>
<alias source="locale" path="../../calendar[@type='islamic']/months"/>
</months>
<eras>
<alias source="locale" path="../../calendar[@type='islamic']/eras"/>
</eras>
</calendar>
<calendar type="islamic-tbla">
<months>
<alias source="locale" path="../../calendar[@type='islamic']/months"/>
</months>
</calendar>
<calendar type="islamic-umalqura">
<months>
<alias source="locale" path="../../calendar[@type='islamic']/months"/>
</months>
</calendar>
<calendar type="persian">
<months>
<monthContext type="format">
<monthWidth type="abbreviated">
<alias source="locale" path="../monthWidth[@type='wide']"/>
</monthWidth>
<monthWidth type="narrow">
<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
</monthWidth>
<monthWidth type="wide">
<month type="1">Farvardin</month>
<month type="2">Ordibehesht</month>
<month type="3">Khordad</month>
<month type="4">Tir</month>
<month type="5">Mordad</month>
<month type="6">Shahrivar</month>
<month type="7">Mehr</month>
<month type="8">Aban</month>
<month type="9">Azar</month>
<month type="10">Dey</month>
<month type="11">Bahman</month>
<month type="12">Esfand</month>
</monthWidth>
</monthContext>
<monthContext type="stand-alone">
<monthWidth type="abbreviated">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
</monthWidth>
<monthWidth type="narrow">
<month type="1">1</month>
<month type="2">2</month>
<month type="3">3</month>
<month type="4">4</month>
<month type="5">5</month>
<month type="6">6</month>
<month type="7">7</month>
<month type="8">8</month>
<month type="9">9</month>
<month type="10">10</month>
<month type="11">11</month>
<month type="12">12</month>
</monthWidth>
<monthWidth type="wide">
<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
</monthWidth>
</monthContext>
</months>
<eras>
<eraNames>
<alias source="locale" path="../eraAbbr"/>
</eraNames>
<eraAbbr>
<era type="0">AP</era>
</eraAbbr>
<eraNarrow>
<alias source="locale" path="../eraAbbr"/>
</eraNarrow>
</eras>
</calendar>
</calendars>
<fields>
<field type="era">
<displayName>Era</displayName>
</field>
<field type="era-short">
<alias source="locale" path="../field[@type='era']"/>
</field>
<field type="era-narrow">
<alias source="locale" path="../field[@type='era-short']"/>
</field>
<field type="month">
<displayName>Month</displayName>
<relative type="-1">last month</relative>
<relative type="0">this month</relative>
<relative type="1">next month</relative>
<relativeTime type="future">
<relativeTimePattern count="other">+{0} m</relativeTimePattern>
</relativeTime>
<relativeTime type="past">
<relativeTimePattern count="other">-{0} m</relativeTimePattern>
</relativeTime>
</field>
<field type="month-short">
<alias source="locale" path="../field[@type='month']"/>
</field>
<field type="month-narrow">
<alias source="locale" path="../field[@type='month-short']"/>
</field>
</fields>
</dates>
</ldml>

View File

@ -0,0 +1,886 @@
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
package test
import "golang.org/x/text/internal/cldrtree"
var tree = &cldrtree.Tree{locales, indices, buckets}
// Path values:
// <width>
// - wAbbreviated
// - wNarrow
// - wWide
// <context>
// - format
// - stand-alone
// <month>
// - leap7
// - 1..13
// <cycleType>
// - cycDayParts
// - cycDays
// - cycMonths
// - cycYears
// - cycZodiacs
// <relative>
// - before1
// - current
// - after1
//
// - calendars
// - buddhist
// - chinese
// - dangi
// - ethiopic
// - ethiopic-amete-alem
// - generic
// - gregorian
// - hebrew
// - islamic
// - islamic-civil
// - islamic-rgsa
// - islamic-tbla
// - islamic-umalqura
// - persian
// - months
// - <context>
// - <width>
// - <month>
// - eras
// - <width>
// - ""
// - variant
// - 0..1
// - filler
// - 0
// - cyclicNameSets
// - <cycleType>
// - <context>
// - <width>
// - 0..60
// - fields
// - era
// - era-short
// - era-narrow
// - month
// - month-short
// - month-narrow
// - displayName
// - ""
// - relative
// - <relative>
// - relativeTime
// - future
// - past
// - other
// - one
// - two
//
// Nr elem: 394
// uniqued size: 9778
// total string size: 9931
// bucket waste: 0
// width specifies a property of a CLDR field.
type width uint16
// context specifies a property of a CLDR field.
type context uint16
// month specifies a property of a CLDR field.
type month uint16
// cycleType specifies a property of a CLDR field.
type cycleType uint16
// relative specifies a property of a CLDR field.
type relative uint16
const (
calendars = 0 // calendars
fields = 1 // fields
buddhist = 0 // buddhist
chinese = 1 // chinese
dangi = 2 // dangi
ethiopic = 3 // ethiopic
ethiopicAmeteAlem = 4 // ethiopic-amete-alem
generic = 5 // generic
gregorian = 6 // gregorian
hebrew = 7 // hebrew
islamic = 8 // islamic
islamicCivil = 9 // islamic-civil
islamicRgsa = 10 // islamic-rgsa
islamicTbla = 11 // islamic-tbla
islamicUmalqura = 12 // islamic-umalqura
persian = 13 // persian
months = 0 // months
eras = 1 // eras
filler = 2 // filler
cyclicNameSets = 3 // cyclicNameSets
format context = 0 // format
standAlone context = 1 // stand-alone
wAbbreviated width = 0 // wAbbreviated
wNarrow width = 1 // wNarrow
wWide width = 2 // wWide
leap7 month = 0 // leap7
variant = 1 // variant
cycDayParts cycleType = 0 // cycDayParts
cycDays cycleType = 1 // cycDays
cycMonths cycleType = 2 // cycMonths
cycYears cycleType = 3 // cycYears
cycZodiacs cycleType = 4 // cycZodiacs
era = 0 // era
eraShort = 1 // era-short
eraNarrow = 2 // era-narrow
month = 3 // month
monthShort = 4 // month-short
monthNarrow = 5 // month-narrow
displayName = 0 // displayName
relative = 1 // relative
relativeTime = 2 // relativeTime
before1 relative = 0 // before1
current relative = 1 // current
after1 relative = 2 // after1
future = 0 // future
past = 1 // past
other = 0 // other
one = 1 // one
two = 2 // two
)
var locales = []uint32{ // 754 elements
// Entry 0 - 1F
0x00000000, 0x00000000, 0x0000027a, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 20 - 3F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 40 - 5F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 60 - 7F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 80 - 9F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x0000027a, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000027a, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000027a,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
// Entry A0 - BF
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x000003dd, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000027a, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000027a, 0x0000037f, 0x0000027a, 0x0000037f,
// Entry C0 - DF
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000027a,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
// Entry E0 - FF
0x0000037f, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000027a, 0x0000027a, 0x0000037f, 0x0000037f,
0x0000027a, 0x0000037f, 0x0000037f, 0x0000037f,
0x0000037f, 0x0000037f, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 100 - 11F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 120 - 13F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 140 - 15F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 160 - 17F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 180 - 19F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 1A0 - 1BF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 1C0 - 1DF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 1E0 - 1FF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 200 - 21F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 220 - 23F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 240 - 25F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 260 - 27F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 280 - 29F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 2A0 - 2BF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 2C0 - 2DF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
// Entry 2E0 - 2FF
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000,
} // Size: xxxx bytes
var indices = []uint16{ // 1070 elements
// Entry 0 - 3F
0x0002, 0x0003, 0x0259, 0x000e, 0x0012, 0x0022, 0x00b9, 0x00c1,
0x00fd, 0x010d, 0x0147, 0x0181, 0x01bc, 0x0204, 0x020b, 0x0212,
0x0219, 0x0220, 0x0003, 0x9005, 0x0016, 0x001f, 0x0003, 0x001a,
0x8000, 0x8000, 0x0001, 0x001c, 0x0001, 0x0000, 0x0000, 0x0001,
0x0000, 0x0003, 0x0004, 0x0027, 0x0000, 0x00b6, 0x0050, 0x0002,
0x002a, 0x003d, 0x0003, 0x8002, 0x9001, 0x002e, 0x000d, 0x0000,
0xffff, 0x0102, 0x0111, 0x0120, 0x012f, 0x013e, 0x014d, 0x015c,
0x016b, 0x017a, 0x0189, 0x0198, 0x01a7, 0x0003, 0x9000, 0x0041,
// Entry 40 - 7F
0x9000, 0x000d, 0x0000, 0xffff, 0x01b6, 0x01c6, 0x01d6, 0x01e6,
0x01f6, 0x0206, 0x0216, 0x0226, 0x0236, 0x0246, 0x0257, 0x0268,
0x0005, 0x0056, 0x8003, 0x8003, 0x006b, 0x00b0, 0x0001, 0x0058,
0x0003, 0x005c, 0x8000, 0x8000, 0x000d, 0x0000, 0xffff, 0x0279,
0x0281, 0x0289, 0x0291, 0x0299, 0x02a1, 0x02a9, 0x02b1, 0x02b9,
0x02c1, 0x02ca, 0x02d3, 0x0001, 0x006d, 0x0003, 0x0071, 0x8000,
0x8000, 0x003d, 0x0000, 0xffff, 0x02dc, 0x02e2, 0x02e8, 0x02ee,
0x02f4, 0x02fa, 0x0300, 0x0306, 0x030c, 0x0312, 0x0319, 0x0320,
// Entry 80 - BF
0x0327, 0x032e, 0x0335, 0x033c, 0x0343, 0x034a, 0x0351, 0x0358,
0x035f, 0x0366, 0x036d, 0x0374, 0x037b, 0x0382, 0x0389, 0x0390,
0x0397, 0x039e, 0x03a5, 0x03ac, 0x03b3, 0x03ba, 0x03c1, 0x03c8,
0x03cf, 0x03d6, 0x03dd, 0x03e4, 0x03eb, 0x03f2, 0x03f9, 0x0400,
0x0407, 0x040e, 0x0415, 0x041c, 0x0423, 0x042a, 0x0431, 0x0438,
0x043f, 0x0446, 0x044d, 0x0454, 0x045b, 0x0462, 0x0469, 0x0470,
0x0001, 0x00b2, 0x0003, 0xa000, 0x8000, 0x8000, 0x0001, 0x0000,
0x0477, 0x0004, 0x9001, 0x0000, 0x00be, 0x9001, 0x0001, 0x0000,
// Entry C0 - FF
0x0576, 0x0003, 0x00c5, 0x00f0, 0x00fa, 0x0002, 0x00c8, 0x00dc,
0x0003, 0x8002, 0x9001, 0x00cc, 0x000e, 0x0000, 0xffff, 0x0675,
0x067e, 0x0685, 0x068b, 0x0692, 0x0696, 0x069e, 0x06a6, 0x06ad,
0x06b4, 0x06b9, 0x06bf, 0x06c7, 0x0003, 0x9000, 0x00e0, 0x9000,
0x000e, 0x0000, 0xffff, 0x06cf, 0x06d1, 0x06d3, 0x06d5, 0x06d7,
0x06d9, 0x06db, 0x06dd, 0x06df, 0x06e1, 0x06e4, 0x06e7, 0x06ea,
0x0003, 0x00f4, 0x8000, 0x8000, 0x0001, 0x00f6, 0x0002, 0x0000,
0x06ed, 0x06f2, 0x0001, 0x0000, 0x06f7, 0x0003, 0x9003, 0x0101,
// Entry 100 - 13F
0x010a, 0x0003, 0x0105, 0x8000, 0x8000, 0x0001, 0x0107, 0x0001,
0x0000, 0x06ed, 0x0001, 0x0000, 0x07f6, 0x0003, 0x0111, 0x013a,
0x0144, 0x0002, 0x0114, 0x0127, 0x0003, 0x8002, 0x9001, 0x0118,
0x000d, 0x0000, 0xffff, 0x08f5, 0x0900, 0x090b, 0x0916, 0x0921,
0x092c, 0x0937, 0x0942, 0x094d, 0x0958, 0x0963, 0x096e, 0x0003,
0x9000, 0x012b, 0x9000, 0x000d, 0x0000, 0xffff, 0x0979, 0x0985,
0x0991, 0x099d, 0x09a9, 0x09b5, 0x09c1, 0x09cd, 0x09d9, 0x09e5,
0x09f2, 0x09ff, 0x0003, 0x013e, 0x8000, 0x8000, 0x0001, 0x0140,
// Entry 140 - 17F
0x0002, 0x0000, 0x06ed, 0x06f2, 0x0001, 0x0000, 0x0a0c, 0x0003,
0x014b, 0x0174, 0x017e, 0x0002, 0x014e, 0x0161, 0x0003, 0x8002,
0x9001, 0x0152, 0x000d, 0x0000, 0xffff, 0x0b0b, 0x0b17, 0x0b23,
0x0b2f, 0x0b3b, 0x0b47, 0x0b53, 0x0b5f, 0x0b6b, 0x0b77, 0x0b83,
0x0b8f, 0x0003, 0x9000, 0x0165, 0x9000, 0x000d, 0x0000, 0xffff,
0x0b9b, 0x0ba8, 0x0bb5, 0x0bc2, 0x0bcf, 0x0bdc, 0x0be9, 0x0bf6,
0x0c03, 0x0c10, 0x0c1e, 0x0c2c, 0x0003, 0x0178, 0x8000, 0x8000,
0x0001, 0x017a, 0x0002, 0x0000, 0x0c3a, 0x0c3e, 0x0001, 0x0000,
// Entry 180 - 1BF
0x0c41, 0x0003, 0x0185, 0x01b0, 0x01b9, 0x0002, 0x0188, 0x019c,
0x0003, 0x8002, 0x9001, 0x018c, 0x000e, 0x0000, 0x0d6f, 0x0d40,
0x0d47, 0x0d4f, 0x0d56, 0x0d5c, 0x0d63, 0x0d6a, 0x0d77, 0x0d7d,
0x0d82, 0x0d88, 0x0d8e, 0x0d91, 0x0003, 0x9000, 0x01a0, 0x9000,
0x000e, 0x0000, 0x06db, 0x06cf, 0x06d1, 0x06d3, 0x06d5, 0x06d7,
0x06d9, 0x06db, 0x06dd, 0x06df, 0x06e1, 0x06e4, 0x06e7, 0x06ea,
0x0003, 0x01b4, 0x8000, 0x8000, 0x0001, 0x01b6, 0x0001, 0x0000,
0x0d96, 0x0001, 0x0000, 0x0d99, 0x0003, 0x01c0, 0x01f8, 0x0201,
// Entry 1C0 - 1FF
0x0002, 0x01c3, 0x01e5, 0x0003, 0x01c7, 0x9001, 0x01d6, 0x000d,
0x0000, 0xffff, 0x0e98, 0x0ea1, 0x0eaa, 0x0eb3, 0x0ebc, 0x0ec5,
0x0ece, 0x0ed7, 0x0ee0, 0x0ee9, 0x0ef3, 0x0efd, 0x000d, 0x0000,
0xffff, 0x0f07, 0x0f10, 0x0f19, 0x0f22, 0x0f2b, 0x0f34, 0x0f3d,
0x0f46, 0x0f4f, 0x0f58, 0x0f62, 0x0f6c, 0x0003, 0x9000, 0x01e9,
0x9000, 0x000d, 0x0000, 0xffff, 0x06cf, 0x06d1, 0x06d3, 0x06d5,
0x06d7, 0x06d9, 0x06db, 0x06dd, 0x06df, 0x06e1, 0x06e4, 0x06e7,
0x0003, 0x01fc, 0x8000, 0x8000, 0x0001, 0x01fe, 0x0001, 0x0000,
// Entry 200 - 23F
0x0f76, 0x0001, 0x0000, 0x0f79, 0x0003, 0x9008, 0x9008, 0x0208,
0x0001, 0x0000, 0x1078, 0x0003, 0x9008, 0x9008, 0x020f, 0x0001,
0x0000, 0x1177, 0x0003, 0x9008, 0x0000, 0x0216, 0x0001, 0x0000,
0x1276, 0x0003, 0x9008, 0x0000, 0x021d, 0x0001, 0x0000, 0x1375,
0x0003, 0x0224, 0x024d, 0x0256, 0x0002, 0x0227, 0x023a, 0x0003,
0x8002, 0x9001, 0x022b, 0x000d, 0x0000, 0xffff, 0x1474, 0x147e,
0x148a, 0x1492, 0x1496, 0x149d, 0x14a7, 0x14ac, 0x14b1, 0x14b6,
0x14ba, 0x14c1, 0x0003, 0x9000, 0x023e, 0x9000, 0x000d, 0x0000,
// Entry 240 - 27F
0xffff, 0x06cf, 0x06d1, 0x06d3, 0x06d5, 0x06d7, 0x06d9, 0x06db,
0x06dd, 0x06df, 0x06e1, 0x06e4, 0x06e7, 0x0003, 0x0251, 0x8000,
0x8000, 0x0001, 0x0253, 0x0001, 0x0000, 0x14c8, 0x0001, 0x0000,
0x14cb, 0x0006, 0x0260, 0x8000, 0x8001, 0x0265, 0x8003, 0x8004,
0x0001, 0x0262, 0x0001, 0x0000, 0x15ca, 0x0003, 0x0269, 0x026c,
0x0271, 0x0001, 0x0000, 0x15ce, 0x0003, 0x0000, 0x15d4, 0x15df,
0x15ea, 0x0002, 0x0274, 0x0277, 0x0001, 0x0000, 0x15f5, 0x0001,
0x0000, 0x15fc, 0x0002, 0x0003, 0x00cc, 0x0009, 0x000d, 0x001b,
// Entry 280 - 2BF
0x0000, 0x0000, 0x0000, 0x0060, 0x0067, 0x00b0, 0x00be, 0x0003,
0x0000, 0x0011, 0x0018, 0x0001, 0x0013, 0x0001, 0x0015, 0x0001,
0x0000, 0x0000, 0x0001, 0x0000, 0x1603, 0x0004, 0x0020, 0x0000,
0x005d, 0x0044, 0x0001, 0x0022, 0x0003, 0x0026, 0x0000, 0x0035,
0x000d, 0x0000, 0xffff, 0x1702, 0x1706, 0x170a, 0x170e, 0x1712,
0x1716, 0x171a, 0x171e, 0x1722, 0x1726, 0x172b, 0x1730, 0x000d,
0x0000, 0xffff, 0x1735, 0x1741, 0x174e, 0x175a, 0x1767, 0x1773,
0x177f, 0x178d, 0x179a, 0x17a6, 0x17b2, 0x17c1, 0x0005, 0x0000,
// Entry 2C0 - 2FF
0x0000, 0x0000, 0x0000, 0x004a, 0x0001, 0x004c, 0x0001, 0x004e,
0x000d, 0x0000, 0xffff, 0x17cf, 0x17d3, 0x17d6, 0x17dc, 0x17e3,
0x17ea, 0x17f0, 0x17f6, 0x17fb, 0x1802, 0x180a, 0x180e, 0x0001,
0x0000, 0x1812, 0x0003, 0x0000, 0x0000, 0x0064, 0x0001, 0x0000,
0x1911, 0x0003, 0x006b, 0x0093, 0x00ad, 0x0002, 0x006e, 0x0081,
0x0003, 0x0000, 0x0000, 0x0072, 0x000d, 0x0000, 0xffff, 0x1a10,
0x1a19, 0x1a22, 0x1a2b, 0x1a34, 0x1a3d, 0x1a46, 0x1a4f, 0x1a58,
0x1a61, 0x1a6b, 0x1a75, 0x0002, 0x0000, 0x0084, 0x000d, 0x0000,
// Entry 300 - 33F
0xffff, 0x1a7f, 0x1a8a, 0x1a95, 0x1aa0, 0x1aab, 0x1ab6, 0xffff,
0x1ac1, 0x1acc, 0x1ad7, 0x1ae3, 0x1aef, 0x0003, 0x00a2, 0x0000,
0x0097, 0x0002, 0x009a, 0x009e, 0x0002, 0x0000, 0x1afb, 0x1b1b,
0x0002, 0x0000, 0x1b09, 0x1b27, 0x0002, 0x00a5, 0x00a9, 0x0002,
0x0000, 0x1b32, 0x1b35, 0x0002, 0x0000, 0x0c3a, 0x0c3e, 0x0001,
0x0000, 0x1b38, 0x0003, 0x0000, 0x00b4, 0x00bb, 0x0001, 0x00b6,
0x0001, 0x00b8, 0x0001, 0x0000, 0x0d96, 0x0001, 0x0000, 0x1c37,
0x0003, 0x0000, 0x00c2, 0x00c9, 0x0001, 0x00c4, 0x0001, 0x00c6,
// Entry 340 - 37F
0x0001, 0x0000, 0x0f76, 0x0001, 0x0000, 0x1d36, 0x0005, 0x00d2,
0x0000, 0x0000, 0x00d7, 0x00ee, 0x0001, 0x00d4, 0x0001, 0x0000,
0x1e35, 0x0003, 0x00db, 0x00de, 0x00e3, 0x0001, 0x0000, 0x1e39,
0x0003, 0x0000, 0x15d4, 0x15df, 0x15ea, 0x0002, 0x00e6, 0x00ea,
0x0002, 0x0000, 0x1e49, 0x1e3f, 0x0002, 0x0000, 0x1e60, 0x1e55,
0x0003, 0x00f2, 0x00f5, 0x00fa, 0x0001, 0x0000, 0x1e6d, 0x0003,
0x0000, 0x1e71, 0x1e7a, 0x1e83, 0x0002, 0x00fd, 0x0101, 0x0002,
0x0000, 0x1e9b, 0x1e8c, 0x0002, 0x0000, 0x1ebc, 0x1eac, 0x0002,
// Entry 380 - 3BF
0x0003, 0x0033, 0x0007, 0x0000, 0x000b, 0x0000, 0x0000, 0x0000,
0x0025, 0x002c, 0x0003, 0x000f, 0x0000, 0x0022, 0x0001, 0x0011,
0x0001, 0x0013, 0x000d, 0x0000, 0xffff, 0x1ece, 0x1ed9, 0x1ee4,
0x1eef, 0x1efa, 0x1f05, 0x1f10, 0x1f1b, 0x1f26, 0x1f31, 0x1f3d,
0x1f49, 0x0001, 0x0001, 0x0000, 0x0003, 0x0000, 0x0000, 0x0029,
0x0001, 0x0001, 0x00ff, 0x0003, 0x0000, 0x0000, 0x0030, 0x0001,
0x0001, 0x01fe, 0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x003a,
0x004b, 0x0003, 0x003e, 0x0000, 0x0041, 0x0001, 0x0001, 0x02fd,
// Entry 3C0 - 3FF
0x0002, 0x0044, 0x0048, 0x0002, 0x0001, 0x0310, 0x0300, 0x0001,
0x0001, 0x0322, 0x0003, 0x004f, 0x0000, 0x0052, 0x0001, 0x0001,
0x02fd, 0x0002, 0x0055, 0x005a, 0x0003, 0x0001, 0x0357, 0x0335,
0x0346, 0x0002, 0x0001, 0x037c, 0x036a, 0x0001, 0x0002, 0x0009,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x000c, 0x0000,
0x004a, 0x0003, 0x0010, 0x0000, 0x0047, 0x0002, 0x0013, 0x0035,
0x0003, 0x0017, 0x0000, 0x0026, 0x000d, 0x0001, 0xffff, 0x0390,
0x0399, 0x03a2, 0x03ab, 0x03b4, 0x03bd, 0x03c6, 0x03cf, 0x03d8,
// Entry 400 - 43F
0x03e1, 0x03eb, 0x03f5, 0x000d, 0x0001, 0xffff, 0x03ff, 0x0408,
0x0411, 0x041a, 0x0423, 0x042c, 0x0435, 0x043e, 0x0447, 0x0450,
0x045a, 0x0464, 0x0002, 0x0000, 0x0038, 0x000d, 0x0001, 0xffff,
0x046e, 0x0479, 0x0484, 0xffff, 0x048f, 0x049a, 0xffff, 0x04a5,
0x04b0, 0x04bb, 0x04c7, 0x04d3, 0x0001, 0x0001, 0x04df, 0x0003,
0x0000, 0x0000, 0x004e, 0x0001, 0x0001, 0x05de,
} // Size: xxxx bytes
var buckets = []string{
bucket0,
bucket1,
}
var bucket0 string = "" + // Size: xxxx bytes
"\x02BE\xfe\x01\x94\xfd\xc2\xfa/\xfc\xc0A\xd3\xff\x12\x04[s\xc8nO\xf9_" +
"\xf6b\xa5\xee\xe8*\xbd\xf4J-\x0bu\xfb\x18\x0d\xafH\xa7\x9e\xe0\xb1\x0d9F" +
"Q\x85\x0fԡx\x89.\xe2\x85\xec\xe1Q\x14Ux\x08u\xd6N\xe2\xd3\xd0\xd0\xdek" +
"\xf8\xf9\xb4L\xe8_\xf0DƱ\xf8;\x8e\x88;\xbf\x85z\xab\x99ŲR\xc7B\x9c2" +
"\U000e8bb7\x9e\xf8V\xf6Y\xc1\x8f\x0d\xce\xccw\xc7^z\x81\xbf\xde'_g\xcf" +
"\xe2B\xcf<\xc3T\xf3\xed\xe2־\xccN\xa3\xae^\x88Rj\x9fJW\x8b˞\xf2ԦS\x14v" +
"\x8dm)\x97a\xea\x9eOZ\xa6\xae\xc3\xfcxƪ\xe0\x81\xac\x81 \xc7 \xef\xcdlꄶ" +
"\x92^`{\xe0cqo\x96\xdd\xcd\xd0\x1du\x04\\?\x00\x0f\x8ayk\xcelQ,8\x01\xaa" +
"\xca\xee߭[Pfd\xe8\xc0\xe4\xa7q\xecื\xc1\x96]\x91\x81%\x1b|\x9c\x9c\xa5 Z" +
"\xfc\x16\xa26\xa2\xef\xcd\xd2\xd1-*y\xd0\x0echineseWideM01\x0echineseWid" +
"eM02\x0echineseWideM03\x0echineseWideM04\x0echineseWideM05\x0echineseWid" +
"eM06\x0echineseWideM07\x0echineseWideM08\x0echineseWideM09\x0echineseWid" +
"eM10\x0echineseWideM11\x0echineseWideM12\x0fchineseNarrowM1\x0fchineseNa" +
"rrowM2\x0fchineseNarrowM3\x0fchineseNarrowM4\x0fchineseNarrowM5\x0fchine" +
"seNarrowM6\x0fchineseNarrowM7\x0fchineseNarrowM8\x0fchineseNarrowM9\x10c" +
"hineseNarrowM10\x10chineseNarrowM11\x10chineseNarrowM12\x07dpAbbr1\x07dp" +
"Abbr2\x07dpAbbr3\x07dpAbbr4\x07dpAbbr5\x07dpAbbr6\x07dpAbbr7\x07dpAbbr8" +
"\x07dpAbbr9\x08dpAbbr10\x08dpAbbr11\x08dpAbbr12\x05year1\x05year2\x05yea" +
"r3\x05year4\x05year5\x05year6\x05year7\x05year8\x05year9\x06year10\x06ye" +
"ar11\x06year12\x06year13\x06year14\x06year15\x06year16\x06year17\x06year" +
"18\x06year19\x06year20\x06year21\x06year22\x06year23\x06year24\x06year25" +
"\x06year26\x06year27\x06year28\x06year29\x06year30\x06year31\x06year32" +
"\x06year33\x06year34\x06year35\x06year36\x06year37\x06year38\x06year39" +
"\x06year40\x06year41\x06year42\x06year43\x06year44\x06year45\x06year46" +
"\x06year47\x06year48\x06year49\x06year50\x06year51\x06year52\x06year53" +
"\x06year54\x06year55\x06year56\x06year57\x06year58\x06year59\x06year60" +
"\xfet\xa8(\x0a\xe9C\x9e\xb0֮\xca\x08#\xae\x02\xd6}\x86j\xc2\xc4\xfeJrPS" +
"\xda\x11\x9b\x9dOQQ@\xa2\xd7#\x9c@\xb4ZÕ\x0d\x94\x1f\xc4\xfe\x1c\x0c\xb9" +
"j\xd3\x22\xd6\x22\x82)_\xbf\xe1\x1e&\xa43\x07m\xb5\xc1DL:4\xd3*\\J\x7f" +
"\xfb\xe8с\xf7\xed;\x8c\xfe\x90O\x93\xf8\xf0m)\xbc\xd9\xed\x84{\x18.\x04d" +
"\x10\xf4Kİ\xf3\xf0:\x0d\x06\x82\x0a0\xf2W\xf8\x11A0g\x8a\xc0E\x86\xc1" +
"\xe3\xc94,\x8b\x80U\xc4f؆D\x1d%\x99\x06͉֚K\x96\x8a\xe9\xf0띖\\\xe6\xa4i<N" +
"\xbe\x88\x15\x01\xb7لkf\xeb\x02\xb5~\\\xda{l\xbah\x91\xd6\x16\xbdhl7\xb8" +
"4a:Ⱥ\xa2,\x00\x8f\xfeh\x83RsJ\xe4\xe3\xf1!z\xcd_\x83'\x08\x140\x18g\xb5" +
"\xd0g\x11\xb28\x00\x1cyW\xb2w\x19\xce?1\x88\xdf\xe5}\xee\xbfo\x82YZ\x10" +
"\xf7\xbbV,\xa0M\\='\xfe\x94)X\xc6\xdb2bg\x06I\xf3\xbc\x97٢1g5\xed悥\xdf" +
"\xe6\xf1\xa0\x11\xfbɊ\xd0\xfb\xe7\x90\x00<\x01\xe8\xe9\x96w\x03\xaff^" +
"\x9fr@\x7fK\x03\xd4\xfd\xb4t\xaa\xfe\x8a\x0d>\x05\x15\xddFP\xcfQ\x17+" +
"\x81$\x8b\xcb\x7f\x96\x9e@\x0bl[\x12wh\xb1\xc4\x12\xfa\xe9\x8c\xf5v1\xcf" +
"7\x03;KJ\xba}~\xd3\x19\xba\x14rI\xc9\x08\xacp\xd1\xc4\x06\xda\xde\x0e" +
"\x82\x8e\xb6\xba\x0dʨ\x82\x85T>\x10!<d?\xc8`;X`#fp\xba\xbc\xad\x0b\xd7" +
"\xf4\xc4\x19\x0e26#\xa8h\xd1\xea\xe1v\x9f@\xa2f1C\x1b;\xd5!V\x05\xd2\x08" +
"o\xeaԙ\xacc\xa4e=\x12(=V\x01\x9c7\x95\xa9\x8a\x12m\x09\xcf\xcb\xe3l\xdc" +
"\xc97\x88\xa5@\x9f\x8bnB\xc2݃\xaaFa\x18R\xad\x0bP(w\\w\x16\x90\xb6\x85N" +
"\x05\xb3w$\x1es\xa8\x83\xddw\xaf\xf00,m\xa8f\\B4\x1d\xdaJ\xda\xea\x08Mes" +
"kerem\x06Tekemt\x05Hedar\x06Tahsas\x03Ter\x07Yekatit\x07Megabit\x06Miazi" +
"a\x06Genbot\x04Sene\x05Hamle\x07Nehasse\x07Pagumen\x011\x012\x013\x014" +
"\x015\x016\x017\x018\x019\x0210\x0211\x0212\x0213\x04ERA0\x04ERA1\xfeYZ" +
"\xb1\x89_\x96RH\x9d\xd2δ\x9c$t0<\xbbD¹C\x03\xdbf,\x9cf\xb8x)\x05\x19\x0f" +
"\x1e\x165\xb6>4\x87\x8d?$o\xad\xfc\xe3D\xe7N\xf8\x13\x09\x0f\x800\xbc" +
"\xd5%\xac\x10e?\xf1\x82\xe0\x01 \xf7\xe1\xf7\x96\xfa\x0f\xc1k\xa7\xbb" +
"\x90\xbe*3\xe8|=`\xabb\x84q\xa4 \x83C\x83f\x18\x01\xbb\x0b\xfd\x8el\x14" +
"\x00q\xdb\x1e\xb2\xf7\xa1\x81\x94\xf1\xa0E\xa9L\x07\x885\xc7]\xff/>\x83a" +
"\x80\xba\xad\x9e\x95]\xa8@\xdct\xc4\xdc$\x98\xf8\xc2\x01\xae\xc2T\xa0" +
"\xe3dv\xb2\xee\xb1$\xfdƯ\xc1\xb7\xd8\x09\xc5\xe0\x8b^\x0e\x84Z\xaf\x9bl9" +
"W\xe9Z\xb4\xaa\x8e\x10|ۇ?-\xacR\x7f\x16\xc4լ\x87`v\x8aq^Fi˄\x0c%1\x7f" +
"\x9a6\x87t\xe5\x064\x1a\xfbFP>(\xe9.Q\xbd\x7f}KS\xb9\x02=V\xf9\xb9\xec" +
"\x99\x1a©ټE\xffd\xbb+\xf1M@Q\xa7`K\xfe(\xba\xd4M\x98\xbf\xe3\x0eT\xeb" +
"\xc0\x7f\xa4_b\xaa\xbe9\\\xc9O\xa0\xa0\xf2F\xb5ҋ.?m\xeb)\x90\x18pX\xe4" +
"\xbf\xd2\xd1d\x06S\xfc8\xa3\x0b\x0f\x83#\x1a\x96[A;\x0f&\x92~\x0d\x03." +
"\x83\x0bs+\u07b3\x09L\xb1\xa5\xfam\xec\x9f\x067^\xa2_\xe5|(S\xea\x092" +
"\x0aȀ9v\xeaʠ\x95\xc0/\x86\x9f\xd7\xdc1\x07$u\x94\x0c7Q\xd5b\x83Ğ/\xef" +
"\xd4\x1d\xf6v\xbd\xcbXU\xa0G\x0e\xfd-\xabzr\xcc^_9\xff~\xea\x0fC:\x9f綦u" +
"\xbc*\xc5\x0c\xd2\x18\xc0\x09\xe2\x1f\x91\x0f\x9d\xdb\x09\xa0\xd0Y\xc4" +
"\xcd},\xa6Z#I\xdfz\x86}\xbe݁\xe9ԉ\x16\x19\xc8<B\x89\\\xe1\xb6q\xcbzK\xca" +
"\xed\x910\xab\x1d\xd4\xcc-\x81G\xa1YPV\xb5_\x92\xa3U\xdbvZ܍=\xf8\x8e\xb9" +
"=R\x7f\x7f~\xc8i\xa7W\x03\xba\x86Գa\x10\xe9\xa0DY<\x96h\x15\xd1S\x0agenW" +
"ideM01\x0agenWideM02\x0agenWideM03\x0agenWideM04\x0agenWideM05\x0agenWid" +
"eM06\x0agenWideM07\x0agenWideM08\x0agenWideM09\x0agenWideM10\x0agenWideM" +
"11\x0agenWideM12\x0bgenNarrowM1\x0bgenNarrowM2\x0bgenNarrowM3\x0bgenNarr" +
"owM4\x0bgenNarrowM5\x0bgenNarrowM6\x0bgenNarrowM7\x0bgenNarrowM8\x0bgenN" +
"arrowM9\x0cgenNarrowM10\x0cgenNarrowM11\x0cgenNarrowM12\xfefS\x87\xdc8" +
"\xe5\x07\xe7E\x8d\xf3\xe6\xb0\xf0@5\xef\x94\x19\x88>\x03\xc0\x8e-u;\x08" +
"\xc9\x09\x0a\xab\xf1u\xfd\xb6>\x8c\xf9\xa5\xf0x7\x04\xc7A\xc1\x95\x15v&@" +
"\x1d\x94\x9e\xaam\xbd\x04\u05ed\xe5t\x9e\xabTp\xbf^\x9c\x18\xccyݤ\xe1." +
"\xfeVNˊ@\x19\xe1\xc4\x1f-\x82\x17\xc0ä7\x12\xae\x22o\xcewf1\xae\x19\xb3&" +
"\xa4\x11\xa2\x84t\x1b\xe0\x1f\xb4\xf3\xae\xfc]\uf58e\xb6\xcc\xeb\x86\x04" +
"\x86KK\x9a\xd3sˬ\x10\xea~f[)J\x8ay\x06\x91\xaaRF\xe6\xff\x8fз\xfb\x9b" +
"\x9aj\x95\x8e\xbf(\xec^\x8f\xaacJu*\xc9q\xc0\xbc\x0ccp\x04\xce\xe2b\xce" +
"\xf1.|\xf6\xd9\xcdwrQ=\xbdFav\xa0z\xb7\xc4\xf4e\xfe\x09twy\xc3\x14\x95扶_" +
"U{\x0aJ\xf6SX\x80\xb8%S\xd1&\xffr\x13T)\x05Zdt\x95\x993>\x96U\xb4:\xa3g(" +
"\xbbc\xbd(d'D\x0bgregWideM01\x0bgregWideM02\x0bgregWideM03\x0bgregWideM0" +
"4\x0bgregWideM05\x0bgregWideM06\x0bgregWideM07\x0bgregWideM08\x0bgregWid" +
"eM09\x0bgregWideM10\x0bgregWideM11\x0bgregWideM12\x0cgregNarrowM1\x0cgre" +
"gNarrowM2\x0cgregNarrowM3\x0cgregNarrowM4\x0cgregNarrowM5\x0cgregNarrowM" +
"6\x0cgregNarrowM7\x0cgregNarrowM8\x0cgregNarrowM9\x0dgregNarrowM10\x0dgr" +
"egNarrowM11\x0dgregNarrowM12\x03BCE\x02CE\xfe\x1b\xaa\x9f0]\\%\xe0R)\xbb" +
"3/~\x83u\xb7\xc4^\x1e\xa0F\x1d3<<r_tg\xb4A\xb7\xd0\xf5\xe8\x02B\xb7\xa4" +
"\xa1\x8e\xda\xe8z\xf2b\xa1\x0d3\xfc\x0d}\x9a\x0aF4\xf0{\xea\\Z\x00!/\xbc" +
"Y\x1b\xdd\xfe\xbb\x943OJ-\x92\x86s\xd2b\xad\xab\xaa\x82\x98;\x94\x96_U˒" +
"\x8ch?GB\xc1 \x99\xb72\xbd\x03c\x9c\x19yu-\x83u\x18$;t\xd6s\x01$^\xfeVa" +
"\xea\xa0B\x89\x17\xf5ZX\xcc3\xdb(M\x1f,\xaa\x05\xf1\xfd{f\x02\x98\x0f" +
"\x06\xd1\x07#\x0b\xf3\x10\xb4\x8c\xf6)B\x01}\xd6h\x0e\xb3\xab\x131\x0e" +
"\xca\x15\x81\xaf\xb3Ŷ\x19\xe5\xce\x06\x82\xd0\xdf\xc1\xfa\xde9(\x17\x9a" +
"\x9d\u008c\xd1p\xb5\xb5TN\x7f\x9bc\xb8=\xa3t\xaf\xa2\x8e\x14x\xdc\\)\x97" +
"\xa9\x83G\xec\x1eqQN\xb2h\x22\x16-\xc7Ù/\xd4\x1f\x0b,\xcc&\xe5^{\xd8\xf3" +
"\xfa7!_wKR\x16\xb5\x06Tishri\x07Heshvan\x06Kislev\x05Tevet\x06Shevat\x06" +
"Adar I\x04Adar\x07Adar II\x05Nisan\x04Iyar\x05Sivan\x05Tamuz\x02Av\x04El" +
"ul\x02AM\xfe\xb8r\xb6\xc28\x8d\xd9P\x16\x0e?\xfa;\xf0b<C\x86U\xbb\\\x8cv" +
"\x8a\xb3:\xe2\xee9!\x86t\x00\x86e\xe2\x0a:\xcd\xf8J\xbe\xf3\\\xab\xccH" +
"\x91X\xc0\x85?տ\xa9T\x22a9\xfcD\xc4\xf5\x06nQ\xdbr\xb73\xe9\xff\xb1|\xbf" +
"\x9eeIl\x07\u05c9g7͐x\x1c\xb7re\x02\xc8Ar\xcaYh\xffɽ\xd0H\x0e|\xe6\xe2_}" +
"\x0b\x80\xbe\x87B\x93\x18\xc8P8g\x9b\xa0e\xbc\x9f\xdf\xfa\xe3\xfa\x84" +
"\x86\xfc\xef݂\xce\x09\xaf\x9e\xa5\xa6H\x87\xe0k\xa7g@=\x0bx\x8a\xb0\xae" +
"\x9e#\xc1\xf7\x89\x1f\x8c\x00\x07\x0dN\xf5Ak\xf1\u0558\xac^\xb59\xf1\x13" +
"\x97\xf0g\xeb\xd1\xe4\x91\xd5\xfc\xf6\x1a\xb5\xee*\xb8/\xb7w\xadS\x8c" +
"\xfc\x11|<Pҳ\xf9\x14=Uw\x0c\x85s7\x8f+\xa3C\x84\xcc\x13\xdc\x1c+<\x93" +
"\xa3K\xbbp\xdbh)\xf2ŋ\xed\x1c|\xf8\xf7\xa2\xbaA\x0apЭI\x06\x03U\xb9\xde" +
"\x08islAbbr1\x08islAbbr2\x08islAbbr3\x08islAbbr4\x08islAbbr5\x08islAbbr6" +
"\x08islAbbr7\x08islAbbr8\x08islAbbr9\x09islAbbr10\x09islAbbr11\x09islAbb" +
"r12\x08islWide1\x08islWide2\x08islWide3\x08islWide4\x08islWide5\x08islWi" +
"de6\x08islWide7\x08islWide8\x08islWide9\x09islWide10\x09islWide11\x09isl" +
"Wide12\x02AH\xfe\xb9p\x124V\x03\xd9\xd0\xd1ܰޟ\xcc\xd2 \x13kc\xa31b\x06" +
"\xe6\x889\x80+\xa7\xc3\x0c\xa3\xf8\xddj[\x8fú\x16\x0e\x91\x83\x80W\xa8ZG" +
"\x09S0\xf8\x82\xe6M\xbb\x12\x80\x0cS\xefm\xbe.\x85,\xe6\x0b\xbb\x09\xc4." +
"\\X\xa9\xf6,Y\x04\xd6_\xbc\xb0\xa3X\xd6\xe12\xe7}ٷ\xb9\x89>\x86Nm\xac" +
"\x1a\xac\xb8\x87\xbd\x03\x01裑:\xact%\xd2٦\xf6\xee+T\x93\xac\xb09\xac(E" +
"\xeb\x0e\xfa.\xdd\x0a<\xf9k\xa9z\xd7\x1d\xae\x00U`\xab\xa2\xa2\x00z\x0f" +
"\xa0Hc\xcbiF\x9f\x94\xa3n\x89\x1e9\xad\xcb̛^4\xca(\x13\xd1\xd7CZ\xc8\xfc" +
"\xacv\xa8\x96T<}\xcdn\xd0F\x01\x1f3\x0b\xcc\xe8H\x0d4&\x8eg$\x02q\xe3M" +
"\xd9\x13\xd5\xfd\xe1d\xa1\xe0\x14\xc9\x17ދ\xd4q\xb8\xe7\x0bww\x0b\x05h" +
"\x022k8?n:\x11^\xc9\\\xb3\x01\xc7y2\x1d9\x1a\x140\xdaR\x8d,\xfe\xf0;po" +
"\x9d\x12T\x96\x90\x9b\xa8\xeex\x04\xc1\x98L,C\xb6\x89\xb53\xddƇVZ\xf5i" +
"\xfcg7\x9e\xac\xb2F9\xeczw*\x17N Y\x8fg\xbc\xb5\xebfn\xef\xcd\xe0ʇ'\xad" +
"\xfa\xb2WB\x8a\x8f2\xa8˄l\xff\xe5:-\xe15\xb4\xfe/\x0di^+\xc6\xe7\x07\xc0" +
"\xafi\x17\x88\x10\xcay\xf4.x@!LxF\x06\xab\x9b_!\xf3N\x9d\xae\x83Z?\xa8" +
"\x01\xf0{錒'>\xc6D\x7fW\xe7\x89\x18r_/X\xfd\x9d\x04\x07\x14L\xce*^}kz\xae" +
"\x1b\x9cPg\x89\x0e\x05toS\xf5g\xd4VlA\xdb\xc1:\x092\x88\xf5\xd0\xe6\x00" +
"\x1dp\x90m\x80x\x9ek:\xf6e\xa9\x12\xb8\xfb\xbfx\xf6\x86\x1dm\xb48g\x97#" +
"\xf3\xf1\xc5s\x1e\xfeh\xce\x19Cӽ\x8b\xe3\x08\xac\xd4D0\xf6}\xfbj\xfd\xf5" +
"\x22{\x8f\xf1\x0d\x87\xcf~\xeb\x0e\xbc\x03\x1d\xf9\x1c\xbcE\xad\xc6gz" +
"\x971\x11+j\xe9\x85\xe0\xfe\xc5FУ\x8d\xe1=~p\x9e1(\x89\x89\xc7l\xbd\x90" +
"\xd2h\xb35\xf0\xd2A\xf7o@KT}\xc4^=`\xe4\xa1\\\x00nNK\x86&j`\x95)\x88\xf6" +
"\xb1O\xde\x11\x92\x9e\xe5\x9b S\xcfV\x04\xdf\x09hf4\xf26\xac\x14\x16&d" +
"\x0b\xe0\x9dL\xf9\xa7\xb6\xc90'\x95j\xef\xef[b\x9e̺u\x97\xb2o\xe2\x8e" +
"\xc0\xae\xa3\xf42\xd5&\x02:\xb1b\x89\x00\xd6Y\xe0IE\x16F\xba\xfb\xbcm" +
"\x14s\x84\x91\x08\xf9\xa3\xd4:\x8b\x0f\xb7&_o\x0d\xd4X\x7fX\x90\x1b\xb4" +
"\xa3^<\\\xc8X\x1f\xb8+\x1b\xa1J\xaf\x11\xaaL8C\xb3l\xa9\x13\xa7\xb8h7" +
"\x97\xed\xa5\xb6\x90\x14~o\xe5}o\x8f\x05\xbd%.\xc2\xe1\xcf(\x1dO\x89u" +
"\xdc\xff!\xaf\xe4\x11\x99\x97yj\x88?\xb1\x1eY\xe40\\I8\x22h\xe8\xbda\xe4" +
"\x19\xf2m\x15nޕ\x98>d\xf3y*X&\xa2\xfe:r\x15\x22\xa4\xb16\x0dyw\x09\x98" +
"\x9d,\xfe\x93\x98 {\xb1u\xf0\x1e\x8b\xea2\xa8\xfc\xe3\xc1\xf0b\x9f\xe6" +
"\x08\xf9\xe8\xf1OÒ\x18r\x0cK\xb1\x88\x82\xa4܈\x95\x0b\x99a\x89\xa9&\xfb" +
"\xd6p\x814\xbf\x96\xfe\x0c\xce\x12mhI\x8f\xbf\x9f2B\xaa\x8a1|\xe3\xb4" +
"\xf5\xfdD\x0fl\x10\x8d㕄\xab\xa34Dž\xf8\x8d\x16\xd46\x1f\x04m1߭\xe7MA\x93" +
"\xd1G\xeeǐ\xd2[2$\x09\xcbA\xdb\x0dVd\xc7\x05\xb1W\xf88%)%\xa0#\xaa\xd5" +
"\xe7+:Ly+\x0a\xa7Ytئ\xc4jj\xd1x\x22\xd5\x14\x94\xebYHc\xd6&\xfb.\xfab" +
"\x0e\xa4=\xd14X\x22m\x22.\x22\xb4E\x9f\xef\x7f\xff7\xebP\xb6\xcf\xe4\xa7" +
"{վ\xa6\xfe\xc6\xe5\xf4\x02\x10\xf3\x9dØMI`\xce\xe8*\xd0\x0ac=\xe0um\x13w" +
"\xfd*\xa4\x11\xf7_$\xbfb\xf57>\x91\\J%`\x12\x10\x91\x02}\x06#\xb5\xcb%" +
"\x1d=,\x01\x95\xc0\xb1\x8b*\xdb\x10۸\x17\xc8\xe3\xfeo\xb0\xdeZ\xb1\x8e" +
"\xad\x0e\u0557!s\xb8M`\xa2u\xee>o\\\x0c*d\x81\xe7zf`\xce\xf5\x84\x11\x05" +
"\x1d\xfdů\x89\xc1\xa0\x14k\x05\x9a\x08\x9c\xbe\x0c\xa3\xc3s\x83_h\x85" +
"\xeb\x0a\xf6\u0090\xac\x1e\xf4A\x02\xe2\x8c^\xb0sS\x08\xcf_|\xee۱\xcaji." +
"4ň\xb5\x96w\x91A~\xfc\xe1:$^\x92\xd3p\xbf\xe7_\x0b\xb8]Z\x85\xbbF\x95x" +
"\xbe\x83D\x14\x01R\x18\x15R\xa2\xf0\xb0\x0b\xe3\x9d\xc9J kU\x00\x04\x97R" +
"o\xae\xd4ct\xb7\x8aeX\xe5$\xe8\x10\x0f\x1eTV\xfe\xa9vAU\xedw\x06~`\xd6" +
"\xc2\xefhƹ>\xd1k\x0f9(\x9c6\xa3-<ù\xde\x0dп]\x92-\x02\xd9i\xc7Oܭ\x82\x0c" +
"\x992\x9c6K\xec\xb6kI\xd6\xecZ+j\xff\x92\xd4?pVP\xa9\xe1\x03g\xb4\xb1" +
"\xf6d\x85!XqTu\xd1\xe5w~\xec\x91u\xe1\xcau\x99^!\x12\xf7N\x17\xac\xfa" +
"\xeb\x1e\x09Farvardin\x0bOrdibehesht\x07Khordad\x03Tir\x06Mordad\x09Shah" +
"rivar\x04Mehr\x04Aban\x04Azar\x03Dey\x06Bahman\x06Esfand\x02AP\xfeo4E" +
"\xf1\xca6\xd8\xc0>\xf0x\x90Գ\x09\xfe\xf7\x01\xaf\xd1Y7x\x89\x0e\xe4/\xb9" +
"\x8f{@\xdb@\xa1~\xf4\x83T\xc9D\xb5\xb1;\x1fe\xe2F\x8a|P\xe0\xf2\xb9\xdc." +
"9\xf2\x88\x17\xb5\xf8\xb6(\xb1\xa34\x94\xd6\xcd1\xa9_&\xdbñҎ\x01\xf0\xce" +
"yX\xd5\xffY\xe9*sBR\xb4\xa7\x92uh\xd14gn H\xab\x09\x86*\x11\x91j\xb5\xb1" +
"\x00\x95\x93f?\x17\xdc\x03\x06\xc1\xb1\xe8n\x1d\xf7\xdaw\xdat\xa5%\xaa:b" +
"'\x81\x977B;M=\x1c\xeb\x8a\xfa\xac\xcf\xf5f\x0c;+\x98\xb0ꅴ\xf37L\xa5\x93" +
"(\x08sG\x06\xf8\xbe\x0d\xfd\x1f\x18\x87\x12ݷ\x0d\x05\xe1w\xb3t\xb4e ka" +
"\x8dD\xa4-\xeaP\u05f7\x8d\xcbU2`WV\xf1\xc3G\xfd\x95Y;\x22\x8f\x8a\x0c;" +
"\xcdp֙\xf7.1o\xd2\u0590\xa1\xe7cla\xfcJ\x99\xbd>\xc73]r\x8eCk!\x95Jo\xd5" +
"\xe7W\xd1\xc3\x03Era\x05Month\x0alast month\x0athis month\x0anext month" +
"\x06+{0} m\x06-{0} m\xfeQHs\xc6\xd4tx*\xf5b\xe27\xdaT\xee\x1a\xb1\x84" +
"\x14\xb1\xd2E\x95R=\x9d\x00u\xe5u\x7fT\xd5\x14\xe0\xdf\xd5\x18\xe5q\x8e" +
"\xb4\x15S\x0c\x94\u05ff\xd3.vE\xacn\x99\xb1\xf9(ƃ\xcc\xef\xeej32y\xc0" +
"\xc1\x03X\xf4\x02\xc2\x084\x9b\xa3;\xaf\xb0X1æ\xe68\x8f\xa9E8=U\xefӐB4" +
"\xff\xc4O\xc9R\xab\xafN\x05H\xc9\x1d\xa2\x15U\x80\x9c\xd0\xc8\x1ay\xbb*r" +
"f\x9cW\x16^\xa4\xaf_/\xbc\xf2\xe7\xf68\xcf\xdc\xd8q\xcaRE\x00Yp06\x9a" +
"\xc90\xa3\x08\xce\x19Y\xff\x22H\x83\xbf\x00`\x94\x06r\x85\x965\xc9\x0d^J" +
"{Ks,\xe3o\xed(\x1f$\x10ݱ\x9a\xbf{J^3\xf5_\x9a\x1d\xb6\xd4m\x1a2P\xafR`" +
"\xbeTB+\xb9\x1b<\x08&\xa8\x8a\x18\xf8\x8cy\xc0\xcb\xed\xf1@}\x0b\xbf\xac" +
"H\x048\xf9\x0co\x92\xfa!$\x9b6\xabnY\xc05\x0cݷ\xf3\xa5\x0dE\x97\x03Mo1" +
"\x03Mo2\x03Mo3\x03Mo4\x03Mo5\x03Mo6\x03Mo7\x03Mo8\x03Mo9\x04Mo10\x04Mo11" +
"\x04Mo12\x0bFirst Month\x0cSecond Month\x0bThird Month\x0cFourth Month" +
"\x0bFifth Month\x0bSixth Month\x0dSeventh Month\x0cEighth Month\x0bNinth" +
" Month\x0bTenth Month\x0eEleventh Month\x0dTwelfth Month\x03Rat\x02Ox" +
"\x05Tiger\x06Rabbit\x06Dragon\x05Snake\x05Horse\x04Goat\x06Monkey\x07Roo" +
"ster\x03Dog\x03Pig\xfeѝ\xe0T\xfc\x12\xac\xf3cD\xd0<\xe5Wu\xa5\xc45\x0b" +
"\x9al\x9f?ium\xfc\x96\xb4\xf4\x7f\xfb\xc6\xf1\xff\x9e\x22\xe2\xc9m\x8f" +
"\xd25rg\x87L\x15Y\x10\x80\xd2t\xb5\xe5\x90\x08xH7\xfa\xdb\x02\xf70\x1fИJ" +
"\x88G\x99\xd6\x1a\x83\xb8\xbdz<\xf1\xc9t\U000953c1\xa5N\xa8\x0e\xbe\x05." +
"n\x87R\xf1\xbf\xc8>m%O?@4\xd4\xe8\xf1\x04Y\xb1_\x11\x1b\xb3\x17\xc8R\xed" +
"EHn\xa5\xf7>\xaf9:1?\x9eG\x0cg\xd0M \xbc\xcf+)\x86A\xd2qo\xbd\x18\x12N" +
"\xe4`:\x8fk|?\x8d/\x90\x8c\xe7d\xe4\x08\x9e\x8dO\x15L\x92@\xa5w}F\x7f" +
"\x84r7u\x10\x12/AΞ\xc0\xf9\x89\xb57\x1ct\xbe\x9e&\x9e\xfba\x85;\u05cb" +
"\xc2S\xc0\x97\xe3\x81]\xedg\xf6\xf6t\xd2\xfc\x1ezM\xf0\x08\x87\xeb\x12" +
"\x8f\xffd\x8a>\x09\xa5\xaa\x9ag&?\x0d\xadV\x93x!Xi{\x99\x04\xf4A r\xfeho" +
"\xd1\xffQ\x8f\xd4\xc1\xe1\x83i\x88\x9a\xfe\xfc<\x14\xd3G\x10\x94GA|\x17M" +
"2\x13\x22W@\x07\x8c-F\x81A\xe1\xb4y$S\xf18\x87v)\x07\x9b\x13R\x02\xf7<" +
"\x86\x1eD,3\xf6\xc9̳\xc3\xc3)HYX\xfbmI\x86\x93^\xe5\xa9\xe9\x12!\x82Y" +
"\xcf}a*-y\xf3\x1e6&\x91N\xe2\xec\x14\x95\x16,\x80\x1e=[E\x80\xca\xc9]." +
"\xed\x0fH:X\xd1lN}\x1d\xe0\xf1\xba'\xd6\x04\xf6u\x06\xc2\xdf\xd1g\x032" +
"\xabp55Yu'\xef\x1e>\x7f\x07\x92\xa7\x0eg\x12\xbb\xdaX\xe0p\x9c;\xd82." +
"\xa4\xc9w\xfa!\xfb\x9eD\xdd\xe7\xb7\xe2\xfa\xb9\xd8ٽ\xf4mB\x9a\xa1\xafo" +
"\x83ˣŷ#m<\x86WU\x8e\xea\xa5p:\xd4e_ܜ\xd2\xcf\x1e\u07fb$W\x96i\xa0\xc1" +
"\x00\x15o\xf8\x10\xb6h\xc2ײ:\x80\xfdO\xf5\xed\xf0\xcf4\x8d!L\x03Dc\xf2&" +
"\x8c\xcf\x15\xf6\xe3\xc3L\xbak\x08enWideM1\x08enWideM2\x08enWideM3\x08en" +
"WideM4\x08enWideM5\x08enWideM6\x08enWideM7\x08enWideM8\x08enWideM9\x09en" +
"WideM10\x09enWideM11\x09enWideM12\x0aenNarrowM1\x0aenNarrowM2\x0aenNarro" +
"wM3\x0aenNarrowM4\x0aenNarrowM5\x0aenNarrowM6\x0aenNarrowM8\x0aenNarrowM" +
"9\x0benNarrowM10\x0benNarrowM11\x0benNarrowM12\x0dBefore Christ\x11Befor" +
"e Common Era\x0bAnno Domini\x0aCommon Era\x02BC\x02AD\xfe\xfe\x1f8{\x91g" +
"\xb7\xd7\xcd\xde#Xk\xe6\x85\xd8Ì\x8e\xf7g\xf0\x10\xd02\xbdJN\x8f\xf8\x15" +
"A\xad\xfd\xcae\xac\xb6\xf7\xe1$9\xb9\xa2 \xb5\x8a\xf1f\x1d/N\xd0\xff\xb2" +
"_\xaaC͑Y\x1d\xcd$ua[\xaa\x1e\x01I\xf0\xbc\xb7\x0b\xc426\x15Ș\x19\x88\x94" +
"\x8b\xd5\xf7\xb0\xa4\xbd\\\xdb=\xafZ\x98A\xa9\xbc'\xdc\xec\xa9wCB\xaf" +
"\xe0\xdb\xf3\xb9\x03\xa2\xa0\x1ad\x98ـ-\xb4C\xa45K\xb5\xa6\x15\x87\xa9" +
"\xe9\x94j?\xb1\x9e\x10\xdf\x0dv\x7f\x1ai \x087\xe5\x17\xd2!y\x93M[\xa7ܳ" +
"\xfa\xae1ר\xe5\xfe\xe9y\xb9\xfc\x80F}Zje\xed\xbc\xc8Y.h\xfb\xb5 * S\xba" +
"\xba\xa8\xce\u07be\x03\xa6\x05\xcf\xe7,\x16i\x0ap\xbd\x16\xd6\xda$\xaf}0" +
"\xf1&\x0bCT\x19\x82x\xd5\x0c\xc7\x13\xf8\xa2R&~\x0b\xa5F\x8f\xa6\x8cݺ\\_" +
"\x06\xf8\xfc$\xbc\xda\xc1H\xe2\xf4\x7f\x84}L\x83\xfb{\xfe@\x09\xa8HF\xaf" +
"\xedRx\x9f\xbd\x0c\x0d\x06\xa5b\xebm\x9e#\xebwI\xfeDp}K\xc1\xd7\xe0\x86#" +
"\x1c;\x0f\xed\x0e`\x05\x9b\x86EI5w\xd9\x05\xfe\xb0zx\xc7T0v֚?S\xaf\xb2" +
"\x9b\x1a\x86\x12ꔚg\x14FB\xe8\x8fKvͫ\xfaz\x9c\x82\x87e\x08\x1f\x9c\x97" +
"\xc3\xc2 \x7f\x1a\xd2M#\x1f\xc2B\xcdJ\x05\xf5\x22\x94ʸ\x11\x05\xf9̄PA" +
"\x15\x8f\x0e5\xf3\xa6v\\ll\xd89y\x06\x08\x01!~\x06\xe3\x04_\xa3\x97j\xec" +
"\xeamZ\xb0\x10\x13\xdaW\x18pN\x1a\xab!\xf2k<\xea\xca\xe9%\x19\xf1\xb9" +
"\x0a\x84\xc1\x06\x84\xcb\x08\xe4\xe2\x037\xf2\x92ǭ\xd4\x0c\xf3;4b<\xc5.%" +
"\xc2!\x079\x8b\x9dG\xc9U\x86\xe6\\22\xf6\xee\xb5lʆ%\xbd\x9e\xfeQV\xf3u" +
"\xa7\xd4r \xecV\xc8V\xb1\x96\xb4\x9f2D\x88m\x13\x94\xa6X瘳\xc9\xcc\xe8K[y" +
"\xa4L\x01'IPP\xfe\xaaI+\xef)l\x86lE\xb8\xd4=\x81\x0f\x0b9렭\xf7_H\xaa\xf1" +
"\x0c\x17\xcf6\xa4\x02\xe1T\xf9\x14\xe9\x0e\xd5WmE}\xa5)\xe7s\xfc\x0c16" +
"\xd4U\xaa\x8d\xc9\xe0m\xd6\x0a\x0e\xf5ȷ9\xfen_\x02=U&vcX\x80EY U\x93\x02" +
"9\x02A\x86\xe5HGX\xf4\xed\x9ckFx(\xa2?\xfa7\x17\x8eCce\xb9\x0f5\xac\xbc" +
"\xf4\xa6\xe2C5\xdd\x08{\x1e\xd9c\x96>K\xc3\xf83\xaaܾ%\xf3\x91\x1b\xf8U" +
"\x1f\xfa<\xfd\xefв\x1b̹\x19f\xb2O\x81>f渃@\xf47l\xc9k\x13F\x1a\xa3\x84" +
"\xad\xa0\xda=_z\xf1́\x13l\xf6J\xd0\xdb\xe6\xed\x9d^ݹ\x19\x0fK\xa1H\x0b-" +
"\x7f\xed\xa8\xde&V\xbc\x9ak\xb8\x15\xc2\x12bWU\x08N1#\xe1W9ޗӬ\xacG\x80" +
"\xb2\x83ozH\xcd?\xd0T\x04ϭ\x03\xccfi\x05\xec\x02k\x9ej\x94\xa9S\xf2\xd4" +
"\xf8\x16r\x03era\x05month\x09enFutMOne\x0benFutMOther\x0aenPastMOne\x0ce" +
"nPastMOther\x03mo.\x08last mo.\x08this mo.\x08next mo.\x0eenShortFutMOne" +
"\x10enShortFutMOther\x0fenShortPastMOne\x11enShortPastMOther\x0a001AbbrM" +
"o1\x0a001AbbrMo2\x0a001AbbrMo3\x0a001AbbrMo4\x0a001AbbrMo5\x0a001AbbrMo6" +
"\x0a001AbbrMo7\x0a001AbbrMo8\x0a001AbbrMo9\x0b001AbbrMo10\x0b001AbbrMo11" +
"\x0b001AbbrMo12"
var bucket1 string = "" + // Size: xxxx bytes
"\xfe\x99ҧ\xa2ݭ\x8a\xb6\xc7&\xe6\xbe.\xca:\xec\xeb4\x0f\xd7;\xfc\x09xhhkw" +
"'\x1f\x0fb\xfb8\xe3UU^S%0XxD\x83Zg\xff\xe7\x1ds\x97n\xef\xf95\xd3k\xbf$:" +
"\x99\xbbnU\xba:n\xdeM.\xa4st\xa6E\x0eG\xf5\xf0\xd6.Q-\x1e8\x87\x11X\xf2" +
"\x19\xc1J\xacI57\xdc\x07\xf0\x87\xc1cMc\x9e\xdc\x0a\xb3%\xff\x03\xe2aR" +
"\x06,\xbf!4J\x8b]4ΙWš\x1dY2\x88:\xb9Q\x16\xfc\xb5r\xf7\xc5d^\x97\x08\xce" +
"\x04EG@\u05fa\x88\x885\x08\x8c/\x83r\x92\xb8\x96\xd4\xfa\x8d\x18\x0fF" +
"\xfd\xa2\x01\xfb\xb0\xa0ڐӔ\xca\xcd\xf7@=\xe2\x96\x03\x87\x8aH\xfa\xc3L" +
"\xa2\xe90H\x93\xf6\x80\x8ck\x05)u{d\xa4\x19D\xd4{\xfd\xb8\xc5\xc0)\xea" +
"\x01\x9b\xcb&\x12\x87y\xf6{\xbb\xcdm\x0az/\xcb\xce#\x1c\x86R\xccy\xdbC" +
"\x7f\xa2\x96\x94\xc2\x22O/\xe4t\xfe\xba4 \xc3\xf1Hdy{܃L\x9aG\xa3\xa9\xea" +
"!LmW\x05\x9d$\x01\xe5wp\x8a'<\xc1\xcao\x8d\x1b\x8d\xd8h\xccX\xdc\xe4\xfd" +
"j\xf6\x0b\xa5'\xad\xe2\x1a\x16\x8fD\xde5\x0d\xaeL\xeft\xe1\x1f/\xd8\xec" +
"\xc9\xc0\xc6C#\x18\xfa\x93\x11Wt\x82\xfc\xa7\x1c\x82\x1b\xfd\x95`\xbd" +
"\x9f;[\xb3\x9e'\xe8DmA/^Ŭ]\x15-\xf9ـb\xea\xe9\x1f\xd9̂\x92\xc8\xddL%\xaf" +
"\xd0\xcc\xc7\x02L\xbb:P3\x22\xbfU\x81\U000d06a1\xa2\xf9q\x96\xbc2\x8e" +
"\x8f\xb4\x80\xbe\x06`\x8b\x0b\xaf\xd2\xd2J\xccV>\xc7d\xf5\xfd\x1c?\xbc7⏟" +
"\xb9%\xf0\xc4\xfe\xf3P\xed\x13V<CG\x99\x12\xc2 \x8e1\x0e\xcej\x12}\xe2P" +
"\xe4\x22\xba\xf5\xb0\x98q|A\xc5\xc8\xc2\xc8\x18w\xb7yb;n\x97\\6F\xe8\xd1" +
"1\xe2Eh\x0b\x95\x09v\xc0Ze?y\xeb\xcc\xe2\xa3\xf26ۦ\xec\x02f\x11oto\xe9z" +
"\x89\xfe\x0e\x7fh\xd1\xf3\x02\x86\xde]\x86\x0a\xbeq7R\xb0\xa1\xf8\x9eLj" +
"\x05\xc4\xfd\xa7B\xe4\xbc8\xff\x1ao\xff\xc7r\xb2I\xec\x94a\x84ԯ\xe6\x919" +
"\x8a\xe3\xc5kM\xe1\x09\x02?\x18jtstj\xbe\xe3P}G\xd0e\xc8Ď\x1e\xaa$\x97" +
"\xbce\x18mx6\xaf\xe10vP\xde\xc5#\xb0\xca\xc7N\x94駢\xf0\xc35\xf6\xb6c\x00" +
":\x18\x22\x1dM\xd2\x1a\\\xdb`\xc1v\x18\xfdh\xae\x1d\xc0\x96}{mSXn]\xd29" +
"\xfdϧT\xccu\xd5\xc0\x88JΆ\x9c:\xd3\x7fﺉc\x1a%Œ:\x9cln\xaa\x08\x1e\x85U+e" +
"\x958V `\xc3C\x0d\xd9ُB\xb0ҁt\xa7\x16\x90_\x84\xc1e\xd4m\x17M\x04\xbe*`" +
"\x9dS\x0e\x01M\xa6\xb7va\xa0\xeb\xf9\xb6\xaeP>ܦ\xd7FR\x9b7\xabPu\xaa\xcf" +
"\xfca;k\xb2+\xe0zXKL\xbd\xce\xde.&\xf5ԛ\xbck\x1b\xd4F\x84\xac\x08#\x02mo" +
"\x0f001ShortFutMOne\x11001ShortFutMOther\x12001ShortPastMOther\x10001Nar" +
"rowFutMOne\x10001NarrowFutMTwo\x12001NarrowFutMOther\x11001NarrowPastMOn" +
"e\x13001NarrowPastMOther\x08gbAbbrM1\x08gbAbbrM2\x08gbAbbrM3\x08gbAbbrM4" +
"\x08gbAbbrM5\x08gbAbbrM6\x08gbAbbrM7\x08gbAbbrM8\x08gbAbbrM9\x09gbAbbrM1" +
"0\x09gbAbbrM11\x09gbAbbrM12\x08gbWideM1\x08gbWideM2\x08gbWideM3\x08gbWid" +
"eM4\x08gbWideM5\x08gbWideM6\x08gbWideM7\x08gbWideM8\x08gbWideM9\x09gbWid" +
"eM10\x09gbWideM11\x09gbWideM12\x0agbNarrowM1\x0agbNarrowM2\x0agbNarrowM3" +
"\x0agbNarrowM5\x0agbNarrowM6\x0agbNarrowM8\x0agbNarrowM9\x0bgbNarrowM10" +
"\x0bgbNarrowM11\x0bgbNarrowM12\xfeG*:*\x8e\xf9f̷\xb2p\xaa\xb9\x12{и\xf7c" +
"\u0088\xdb\x0ce\xfd\xd7\xfc_T\x0f\x05\xf9\xf1\xc1(\x80\xa2)H\x09\x02\x15" +
"\xe8Y!\xc2\xc8\xc3뿓d\x03vԧi%\xb5\xc0\x8c\x05m\x87\x0d\x02y\xe9F\xa9\xe1" +
"\xe1!e\xbc\x1a\x8d\xa0\x93q\x8b\x0c߮\xcdF\xd1Kpx\x87/is\xcc\xdd\xe0\xafʍ" +
"~\xfeҜl\xc2B\xc5\x1a\xa4#ث,kF\xe89\xec\xe6~\xaa\x12\xbf\x1a\xf6L\x0a\xba" +
"\xa9\x96n\xf1\x03Ӊ<\xf5\x03\x84dp\x98\xe1d\xf7'\x94\xe6\x97\x1a4/\x05" +
"\x99\x8f.\x7foH@\xe9\x1a\xda6`MQ\xad\x0d\x08\x99؟+\xe53\xbf\x97\x88~\xe6" +
"eh\xb7\xaf\xaf<\xe1|\xb9\x0cF\xe0\xda\xf2\xbd\xff\x19\xaa\x95\x9b\x81" +
"\xc3\x04\xe3\x1f\xd5o]$\xf5\x0f\xbbzU\xf2a\xb0\x92[\xfeX\x03\x1f\xdc\x0c" +
"\xd5I\xc0a_\xbd\xd8\xde\u009a\x1a@t\x1e\x7f\x8f&\x0c\x8d\xfeM\xd7ڟX\x90" +
"\x97\xfe%\xa3'\x88\x81\xb5\x14l\x0bL\xd9>\x8d\x99\xe2=ƭu,\x9aT \x06\xc1y" +
"\\\x01wf\xdcx\xab\xa1\xee\xec\x82\x1e8\xb09$\x88\xfe<\xb5\x13g\x95\x15NS" +
"\x83`vx\xb9\xb7\xd8h\xc7 \x9e\x9fL\x06\x9a\xadtV\xc9\x13\x85\x0d8\xc15R" +
"\xe5\xadEL\xf0\x0f\x8b:\xf6\x90\x16i۰W\x9dv\xee\xb6B\x80`Ωb\xc7w\x11\xa3" +
"N\x17\xee\xb7\xe0\xbf\xd4a\x0a\x8a\x18g\xb82\x8e\xaaVCG\xc3Ip\xc0^6\xa8N" +
"\xf1\xebt\xa6\xa4\x0cO\xd9c\x97\x8f\xfa\x11)\x1bHY\xa2ӄ\x1bLc\xd6\x08" +
"\x06\xbfj`?3s\x89\xb8\x82(\xaf\xef\x84\xdfz\xc3\x12\xf1b\xd4\xf7ir\xe8," +
"\x8apœ\x00F\xa6b+\xfa}\x03\x14..\xcb1l\xac\x93\xee\x19\x12\xaa\xbbo\x95" +
"\xf3?ݔ7\x84\xb2b\x0c4\x81\x17\xf2K@\xde\x18\x99Q\x17n\xe5?\xdao\xc6(\xfc" +
"\x9b\xees\xc6V\x91\x0dْ\x1d\x06g9o"
var enumMap = map[string]uint16{
"": 0,
"calendars": 0,
"fields": 1,
"buddhist": 0,
"chinese": 1,
"dangi": 2,
"ethiopic": 3,
"ethiopic-amete-alem": 4,
"generic": 5,
"gregorian": 6,
"hebrew": 7,
"islamic": 8,
"islamic-civil": 9,
"islamic-rgsa": 10,
"islamic-tbla": 11,
"islamic-umalqura": 12,
"persian": 13,
"months": 0,
"eras": 1,
"filler": 2,
"cyclicNameSets": 3,
"format": 0,
"stand-alone": 1,
"wAbbreviated": 0,
"wNarrow": 1,
"wWide": 2,
"leap7": 0,
"variant": 1,
"cycDayParts": 0,
"cycDays": 1,
"cycMonths": 2,
"cycYears": 3,
"cycZodiacs": 4,
"era": 0,
"era-short": 1,
"era-narrow": 2,
"month": 3,
"month-short": 4,
"month-narrow": 5,
"displayName": 0,
"relative": 1,
"relativeTime": 2,
"before1": 0,
"current": 1,
"after1": 2,
"future": 0,
"past": 1,
"other": 0,
"one": 1,
"two": 2,
}
// Total table size: xxxx bytes (14KiB); checksum: FE165D0A

181
vendor/golang.org/x/text/internal/cldrtree/tree.go generated vendored Normal file
View File

@ -0,0 +1,181 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cldrtree
import (
"golang.org/x/text/internal"
"golang.org/x/text/language"
)
const (
inheritOffsetShift = 12
inheritMask uint16 = 0x8000
inheritValueMask uint16 = 0x0FFF
missingValue uint16 = 0xFFFF
)
// Tree holds a tree of CLDR data.
type Tree struct {
Locales []uint32
Indices []uint16
Buckets []string
}
// Lookup looks up CLDR data for the given path. The lookup adheres to the alias
// and locale inheritance rules as defined in CLDR.
//
// Each subsequent element in path indicates which subtree to select data from.
// The last element of the path must select a leaf node. All other elements
// of the path select a subindex.
func (t *Tree) Lookup(tag int, path ...uint16) string {
return t.lookup(tag, false, path...)
}
// LookupFeature is like Lookup, but will first check whether a value of "other"
// as a fallback before traversing the inheritance chain.
func (t *Tree) LookupFeature(tag int, path ...uint16) string {
return t.lookup(tag, true, path...)
}
func (t *Tree) lookup(tag int, isFeature bool, path ...uint16) string {
origLang := tag
outer:
for {
index := t.Indices[t.Locales[tag]:]
k := uint16(0)
for i := range path {
max := index[k]
if i < len(path)-1 {
// index (non-leaf)
if path[i] >= max {
break
}
k = index[k+1+path[i]]
if k == 0 {
break
}
if v := k &^ inheritMask; k != v {
offset := v >> inheritOffsetShift
value := v & inheritValueMask
path[uint16(i)-offset] = value
tag = origLang
continue outer
}
} else {
// leaf value
offset := missingValue
if path[i] < max {
offset = index[k+2+path[i]]
}
if offset == missingValue {
if !isFeature {
break
}
// "other" feature must exist
offset = index[k+2]
}
data := t.Buckets[index[k+1]]
n := uint16(data[offset])
return data[offset+1 : offset+n+1]
}
}
if tag == 0 {
break
}
tag = int(internal.Parent[tag])
}
return ""
}
func build(b *Builder) (*Tree, error) {
var t Tree
t.Locales = make([]uint32, language.NumCompactTags)
for _, loc := range b.locales {
tag, _ := language.CompactIndex(loc.tag)
t.Locales[tag] = uint32(len(t.Indices))
var x indexBuilder
x.add(loc.root)
t.Indices = append(t.Indices, x.index...)
}
// Set locales for which we don't have data to the parent's data.
for i, v := range t.Locales {
p := uint16(i)
for v == 0 && p != 0 {
p = internal.Parent[p]
v = t.Locales[p]
}
t.Locales[i] = v
}
for _, b := range b.buckets {
t.Buckets = append(t.Buckets, string(b))
}
if b.err != nil {
return nil, b.err
}
return &t, nil
}
type indexBuilder struct {
index []uint16
}
func (b *indexBuilder) add(i *Index) uint16 {
offset := len(b.index)
max := enumIndex(0)
switch {
case len(i.values) > 0:
for _, v := range i.values {
if v.key > max {
max = v.key
}
}
b.index = append(b.index, make([]uint16, max+3)...)
b.index[offset] = uint16(max) + 1
b.index[offset+1] = i.values[0].value.bucket
for i := offset + 2; i < len(b.index); i++ {
b.index[i] = missingValue
}
for _, v := range i.values {
b.index[offset+2+int(v.key)] = v.value.bucketPos
}
return uint16(offset)
case len(i.subIndex) > 0:
for _, s := range i.subIndex {
if s.meta.index > max {
max = s.meta.index
}
}
b.index = append(b.index, make([]uint16, max+2)...)
b.index[offset] = uint16(max) + 1
for _, s := range i.subIndex {
x := b.add(s)
b.index[offset+int(s.meta.index)+1] = x
}
return uint16(offset)
case i.meta.inheritOffset < 0:
v := uint16(-(i.meta.inheritOffset + 1)) << inheritOffsetShift
p := i.meta
for k := i.meta.inheritOffset; k < 0; k++ {
p = p.parent
}
v += uint16(p.typeInfo.enum.lookup(i.meta.inheritIndex))
v |= inheritMask
return v
}
return 0
}

139
vendor/golang.org/x/text/internal/cldrtree/type.go generated vendored Normal file
View File

@ -0,0 +1,139 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cldrtree
import (
"log"
"strconv"
)
// enumIndex is the numerical value of an enum value.
type enumIndex int
// An enum is a collection of enum values.
type enum struct {
name string // the Go type of the enum
rename func(string) string
keyMap map[string]enumIndex
keys []string
}
// lookup returns the index for the enum corresponding to the string. If s
// currently does not exist it will add the entry.
func (e *enum) lookup(s string) enumIndex {
if e.rename != nil {
s = e.rename(s)
}
x, ok := e.keyMap[s]
if !ok {
if e.keyMap == nil {
e.keyMap = map[string]enumIndex{}
}
u, err := strconv.ParseUint(s, 10, 32)
if err == nil {
for len(e.keys) <= int(u) {
x := enumIndex(len(e.keys))
s := strconv.Itoa(int(x))
e.keyMap[s] = x
e.keys = append(e.keys, s)
}
if e.keyMap[s] != enumIndex(u) {
// TODO: handle more gracefully.
log.Fatalf("cldrtree: mix of integer and non-integer for %q %v", s, e.keys)
}
return enumIndex(u)
}
x = enumIndex(len(e.keys))
e.keyMap[s] = x
e.keys = append(e.keys, s)
}
return x
}
// A typeInfo indicates the set of possible enum values and a mapping from
// these values to subtypes.
type typeInfo struct {
enum *enum
entries map[enumIndex]*typeInfo
keyTypeInfo *typeInfo
shareKeys bool
}
func (t *typeInfo) sharedKeys() bool {
return t.shareKeys
}
func (t *typeInfo) lookupSubtype(s string, opts *options) (x enumIndex, sub *typeInfo) {
if t.enum == nil {
if t.enum = opts.sharedEnums; t.enum == nil {
t.enum = &enum{}
}
}
if opts.sharedEnums != nil && t.enum != opts.sharedEnums {
panic("incompatible enums defined")
}
x = t.enum.lookup(s)
if t.entries == nil {
t.entries = map[enumIndex]*typeInfo{}
}
sub, ok := t.entries[x]
if !ok {
sub = opts.sharedType
if sub == nil {
sub = &typeInfo{}
}
t.entries[x] = sub
}
t.shareKeys = opts.sharedType != nil // For analysis purposes.
return x, sub
}
// metaData includes information about subtypes, possibly sharing commonality
// with sibling branches, and information about inheritance, which may differ
// per branch.
type metaData struct {
b *Builder
parent *metaData
index enumIndex // index into the parent's subtype index
key string
elem string // XML element corresponding to this type.
typeInfo *typeInfo
lookup map[enumIndex]*metaData
subs []*metaData
inheritOffset int // always negative when applicable
inheritIndex string // new value for field indicated by inheritOffset
// inheritType *metaData
}
func (m *metaData) sub(key string, opts *options) *metaData {
if m.lookup == nil {
m.lookup = map[enumIndex]*metaData{}
}
enum, info := m.typeInfo.lookupSubtype(key, opts)
sub := m.lookup[enum]
if sub == nil {
sub = &metaData{
b: m.b,
parent: m,
index: enum,
key: key,
typeInfo: info,
}
m.lookup[enum] = sub
m.subs = append(m.subs, sub)
}
return sub
}
func (m *metaData) validate() {
for _, s := range m.subs {
s.validate()
}
}

View File

@ -309,7 +309,7 @@ func (p *Profile) process(s string, toASCII bool) (string, error) {
for ; len(s) > 0 && s[0] == '.'; s = s[1:] {
}
}
// TODO: allow for a quick check the tables data.
// TODO: allow for a quick check of the tables data.
// It seems like we should only create this error on ToASCII, but the
// UTS 46 conformance tests suggests we should always check this.
if err == nil && p.verifyDNSLength && s == "" {
@ -405,6 +405,9 @@ func validateRegistration(p *Profile, s string) (idem string, bidi bool, err err
}
for i := 0; i < len(s); {
v, sz := trie.lookupString(s[i:])
if sz == 0 {
return s, bidi, runeError(utf8.RuneError)
}
bidi = bidi || info(v).isBidi(s[i:])
// Copy bytes not copied so far.
switch p.simplify(info(v).category()) {
@ -446,6 +449,15 @@ func validateAndMap(p *Profile, s string) (vm string, bidi bool, err error) {
var combinedInfoBits info
for i := 0; i < len(s); {
v, sz := trie.lookupString(s[i:])
if sz == 0 {
b = append(b, s[k:i]...)
b = append(b, "\ufffd"...)
k = len(s)
if err == nil {
err = runeError(utf8.RuneError)
}
break
}
combinedInfoBits |= info(v)
bidi = bidi || info(v).isBidi(s[i:])
start := i
@ -584,6 +596,9 @@ func validateFromPunycode(p *Profile, s string) error {
// loop.
for i := 0; i < len(s); {
v, sz := trie.lookupString(s[i:])
if sz == 0 {
return runeError(utf8.RuneError)
}
if c := p.simplify(info(v).category()); c != valid && c != deviation {
return &labelError{s, "V6"}
}

View File

@ -167,6 +167,7 @@ func TestLabelErrors(t *testing.T) {
{resolve, "\u3002b", ".b", ""},
{resolve, "..b", "..b", ""},
{resolve, "b..", "b..", ""},
{resolve, "\xed", "", "P1"},
// Raw punycode
{punyA, "", "", ""},

View File

@ -47,7 +47,7 @@ type Loader interface {
Reader(i int) (io.ReadCloser, error)
}
var fileRe = regexp.MustCompile(".*/(.*)/(.*)\\.xml")
var fileRe = regexp.MustCompile(`.*[/\\](.*)[/\\](.*)\.xml`)
// Decode loads and decodes the files represented by l.
func (d *Decoder) Decode(l Loader) (cldr *CLDR, err error) {

View File

@ -1,14 +0,0 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package norm_test
import (
"testing"
)
func TestPlaceHolder(t *testing.T) {
// Does nothing, just allows the Makefile to be canonical
// while waiting for the package itself to be written.
}