diff options
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Makefile | 73 | ||||
-rw-r--r-- | deps.mk | 205 | ||||
-rw-r--r-- | doc/pds.en.0.adoc | 5 | ||||
-rwxr-xr-x | mkdeps.sh | 32 | ||||
-rw-r--r-- | po/doc/de.po | 22 | ||||
-rw-r--r-- | po/doc/doc.pot | 21 | ||||
-rw-r--r-- | po/doc/eo.po | 22 | ||||
-rw-r--r-- | po/doc/es.po | 22 | ||||
-rw-r--r-- | po/doc/fr.po | 22 | ||||
-rw-r--r-- | po/doc/note.txt | 5 | ||||
-rw-r--r-- | po/doc/po4a.cfg | 5 | ||||
-rw-r--r-- | po/doc/pt.po | 22 | ||||
-rw-r--r-- | po/pds/de.po | 10 | ||||
-rw-r--r-- | po/pds/eo.po | 10 | ||||
-rw-r--r-- | po/pds/es.po | 10 | ||||
-rw-r--r-- | po/pds/fr.po | 10 | ||||
-rw-r--r-- | po/pds/pds.pot | 10 | ||||
-rw-r--r-- | po/pds/po4a.cfg | 3 | ||||
-rw-r--r-- | po/pds/pt.po | 10 | ||||
-rw-r--r-- | src/pds.go | 8 |
21 files changed, 410 insertions, 122 deletions
@@ -1,4 +1,7 @@ -/src/version.go +/doc/* +!/doc/*.en.*.adoc +/po/*/*.mo +/src/meta.go /*.bin /src/*.a /src/*.bin @@ -3,7 +3,6 @@ DATE = 1970-01-01 VERSION = 0.1.0 NAME = pds NAME_UC = $(NAME) -LANGUAGES = en ## Installation prefix. Defaults to "/usr". PREFIX = /usr BINDIR = $(PREFIX)/bin @@ -24,39 +23,51 @@ GOLDFLAGS = -L $(GOLIBDIR) .SUFFIXES: -.SUFFIXES: .go .a .bin .bin-check +.SUFFIXES: .go .a .bin .bin-check .adoc .po .mo .go.a: go tool compile -I $(@D) $(GOCFLAGS) -o $@ -p $(*F) \ `find $< $$(if [ $(*F) != main ]; then \ - echo src/$(NAME).go src/version.go; fi) | uniq` + echo src/$(NAME).go src/meta.go; fi) | uniq` .a.bin: go tool link -L $(@D) $(GOLDFLAGS) -o $@ --extldflags '$(LDLIBS)' $< +.adoc: + asciidoctor -b manpage -o $@ $< + +.po.mo: + msgfmt -cfv -o $@ $< + all: include deps.mk -libs.a = $(libs.go:.go=.a) -mains.a = $(mains.go:.go=.a) -mains.bin = $(mains.go:.go=.bin) -functional-tests/lib.a = $(functional-tests/lib.go:.go=.a) -fuzz-targets/lib.a = $(fuzz-targets/lib.go:.go=.a) -benchmarks/lib.a = $(benchmarks/lib.go:.go=.a) +libs.a = $(libs.go:.go=.a) +mains.a = $(mains.go:.go=.a) +mains.bin = $(mains.go:.go=.bin) +functional/lib.a = $(functional/lib.go:.go=.a) +fuzz/lib.a = $(fuzz/lib.go:.go=.a) +benchmarks/lib.a = $(benchmarks/lib.go:.go=.a) +manpages.N.adoc = $(manpages.en.N.adoc) $(manpages.XX.N.adoc) +manpages.N = $(manpages.N.adoc:.adoc=) +sources.mo = $(sources.po:.po=.mo) sources = \ src/$(NAME).go \ - src/version.go \ + src/meta.go \ derived-assets = \ - src/version.go \ + src/meta.go \ $(libs.a) \ $(mains.a) \ $(mains.bin) \ + $(manpages.XX.N.adoc) \ + $(manpages.N) \ + $(sources.mo) \ side-assets = \ tests/fuzz/corpus/ \ @@ -70,21 +81,27 @@ all: $(derived-assets) $(libs.a): Makefile deps.mk -$(libs.a): src/$(NAME).go src/version.go +$(libs.a): src/$(NAME).go src/meta.go -$(fuzz-targets/lib.a): +$(fuzz/lib.a): go tool compile $(GOCFLAGS) -o $@ -p $(NAME) -d=libfuzzer \ - $*.go src/$(NAME).go src/version.go + $*.go src/$(NAME).go src/meta.go + +src/meta.go: Makefile + echo 'package $(NAME)' > $@ + echo 'const Version = "$(VERSION)"' >> $@ + echo 'const Name = "$(NAME)"' >> $@ + echo 'const LOCALEDIR = "$(LOCALEDIR)"' >> $@ -src/version.go: Makefile - echo 'package $(NAME); const Version = "$(VERSION)"' > $@ +$(manpages.XX.N.adoc): po/doc/po4a.cfg + po4a --no-update --translate-only $@ po/doc/po4a.cfg tests.bin-check = \ tests/main.bin-check \ - $(functional-tests/main.go:.go=.bin-check) \ + $(functional/main.go:.go=.bin-check) \ $(tests.bin-check): $(EXEC)$*.bin @@ -111,12 +128,12 @@ check: check-unit check-integration FUZZSEC=1 -fuzz-targets/main.bin-check = $(fuzz-targets/main.go:.go=.bin-check) -$(fuzz-targets/main.bin-check): +fuzz/main.bin-check = $(fuzz/main.go:.go=.bin-check) +$(fuzz/main.bin-check): $(EXEC)$*.bin --test.fuzztime=$(FUZZSEC)s \ --test.fuzz='.*' --test.fuzzcachedir=tests/fuzz/corpus -fuzz: $(fuzz-targets/main.bin-check) +fuzz: $(fuzz/main.bin-check) @@ -130,6 +147,17 @@ bench: $(benchmarks/main.bin-check) +i18n-doc: + po4a po/doc/po4a.cfg + +i18n-code: + gotext src/$(NAME).go > po/$(NAME)/$(NAME).pot + po4a po/$(NAME)/po4a.cfg + +i18n: i18n-doc i18n-code + + + ## Remove *all* derived artifacts produced during the build. ## A dedicated test asserts that this is always true. clean: @@ -145,6 +173,8 @@ install: all cp src/$(NAME).a '$(DESTDIR)$(GOLIBDIR)' cp $(sources) '$(DESTDIR)$(SRCDIR)' + instool '$(DESTDIR)$(MANDIR)' install man $(manpages.N) + instool '$(DESTDIR)$(LOCALEDIR)' install mo $(sources.mo) ## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror ## of the "install" target, and removes *all* that was installed. @@ -154,6 +184,9 @@ uninstall: '$(DESTDIR)$(GOLIBDIR)'/$(NAME).a \ '$(DESTDIR)$(SRCDIR)' \ + instool '$(DESTDIR)$(MANDIR)' uninstall man $(manpages.N) + instool '$(DESTDIR)$(LOCALEDIR)' uninstall mo $(sources.mo) + ALWAYS: @@ -4,14 +4,6 @@ libs.go = \ tests/benchmarks/builtin-map-set/pds.go \ tests/benchmarks/builtin-slice-append-int/pds.go \ tests/benchmarks/builtin-slice-append-interface/pds.go \ - tests/benchmarks/vector-append/pds.go \ - tests/benchmarks/vector-builder-append/pds.go \ - tests/benchmarks/vector-builder-prepend/pds.go \ - tests/benchmarks/vector-builder-set/pds.go \ - tests/benchmarks/vector-iterator-backward/pds.go \ - tests/benchmarks/vector-iterator-forward/pds.go \ - tests/benchmarks/vector-prepend/pds.go \ - tests/benchmarks/vector-set/pds.go \ tests/benchmarks/map-builder-delete/pds.go \ tests/benchmarks/map-builder-set/pds.go \ tests/benchmarks/map-delete/pds.go \ @@ -23,12 +15,20 @@ libs.go = \ tests/benchmarks/sortedmap-iterator-backward/pds.go \ tests/benchmarks/sortedmap-iterator-forward/pds.go \ tests/benchmarks/sortedmap-set/pds.go \ - tests/functional/vector-api/pds.go \ - tests/functional/vector-builder-api/pds.go \ + tests/benchmarks/vector-append/pds.go \ + tests/benchmarks/vector-builder-append/pds.go \ + tests/benchmarks/vector-builder-prepend/pds.go \ + tests/benchmarks/vector-builder-set/pds.go \ + tests/benchmarks/vector-iterator-backward/pds.go \ + tests/benchmarks/vector-iterator-forward/pds.go \ + tests/benchmarks/vector-prepend/pds.go \ + tests/benchmarks/vector-set/pds.go \ tests/functional/map-api/pds.go \ tests/functional/map-builder-api/pds.go \ tests/functional/sortedmap-api/pds.go \ tests/functional/sortedmap-builder-api/pds.go \ + tests/functional/vector-api/pds.go \ + tests/functional/vector-builder-api/pds.go \ tests/pds.go \ mains.go = \ @@ -36,14 +36,6 @@ mains.go = \ tests/benchmarks/builtin-map-set/main.go \ tests/benchmarks/builtin-slice-append-int/main.go \ tests/benchmarks/builtin-slice-append-interface/main.go \ - tests/benchmarks/vector-append/main.go \ - tests/benchmarks/vector-builder-append/main.go \ - tests/benchmarks/vector-builder-prepend/main.go \ - tests/benchmarks/vector-builder-set/main.go \ - tests/benchmarks/vector-iterator-backward/main.go \ - tests/benchmarks/vector-iterator-forward/main.go \ - tests/benchmarks/vector-prepend/main.go \ - tests/benchmarks/vector-set/main.go \ tests/benchmarks/map-builder-delete/main.go \ tests/benchmarks/map-builder-set/main.go \ tests/benchmarks/map-delete/main.go \ @@ -55,47 +47,64 @@ mains.go = \ tests/benchmarks/sortedmap-iterator-backward/main.go \ tests/benchmarks/sortedmap-iterator-forward/main.go \ tests/benchmarks/sortedmap-set/main.go \ - tests/functional/vector-api/main.go \ - tests/functional/vector-builder-api/main.go \ + tests/benchmarks/vector-append/main.go \ + tests/benchmarks/vector-builder-append/main.go \ + tests/benchmarks/vector-builder-prepend/main.go \ + tests/benchmarks/vector-builder-set/main.go \ + tests/benchmarks/vector-iterator-backward/main.go \ + tests/benchmarks/vector-iterator-forward/main.go \ + tests/benchmarks/vector-prepend/main.go \ + tests/benchmarks/vector-set/main.go \ tests/functional/map-api/main.go \ tests/functional/map-builder-api/main.go \ tests/functional/sortedmap-api/main.go \ tests/functional/sortedmap-builder-api/main.go \ + tests/functional/vector-api/main.go \ + tests/functional/vector-builder-api/main.go \ tests/main.go \ -functional-tests/lib.go = \ - tests/functional/vector-api/pds.go \ - tests/functional/vector-builder-api/pds.go \ +manpages.en.N.adoc = \ + doc/pds.en.0.adoc \ + +manpages.XX.N.adoc = \ + doc/pds.de.0.adoc \ + doc/pds.eo.0.adoc \ + doc/pds.es.0.adoc \ + doc/pds.fr.0.adoc \ + doc/pds.pt.0.adoc \ + +sources.po = \ + po/pds/de.po \ + po/pds/eo.po \ + po/pds/es.po \ + po/pds/fr.po \ + po/pds/pt.po \ + +functional/lib.go = \ tests/functional/map-api/pds.go \ tests/functional/map-builder-api/pds.go \ tests/functional/sortedmap-api/pds.go \ tests/functional/sortedmap-builder-api/pds.go \ + tests/functional/vector-api/pds.go \ + tests/functional/vector-builder-api/pds.go \ -functional-tests/main.go = \ - tests/functional/vector-api/main.go \ - tests/functional/vector-builder-api/main.go \ +functional/main.go = \ tests/functional/map-api/main.go \ tests/functional/map-builder-api/main.go \ tests/functional/sortedmap-api/main.go \ tests/functional/sortedmap-builder-api/main.go \ + tests/functional/vector-api/main.go \ + tests/functional/vector-builder-api/main.go \ -fuzz-targets/lib.go = \ +fuzz/lib.go = \ -fuzz-targets/main.go = \ +fuzz/main.go = \ benchmarks/lib.go = \ tests/benchmarks/builtin-map-delete/pds.go \ tests/benchmarks/builtin-map-set/pds.go \ tests/benchmarks/builtin-slice-append-int/pds.go \ tests/benchmarks/builtin-slice-append-interface/pds.go \ - tests/benchmarks/vector-append/pds.go \ - tests/benchmarks/vector-builder-append/pds.go \ - tests/benchmarks/vector-builder-prepend/pds.go \ - tests/benchmarks/vector-builder-set/pds.go \ - tests/benchmarks/vector-iterator-backward/pds.go \ - tests/benchmarks/vector-iterator-forward/pds.go \ - tests/benchmarks/vector-prepend/pds.go \ - tests/benchmarks/vector-set/pds.go \ tests/benchmarks/map-builder-delete/pds.go \ tests/benchmarks/map-builder-set/pds.go \ tests/benchmarks/map-delete/pds.go \ @@ -107,20 +116,20 @@ benchmarks/lib.go = \ tests/benchmarks/sortedmap-iterator-backward/pds.go \ tests/benchmarks/sortedmap-iterator-forward/pds.go \ tests/benchmarks/sortedmap-set/pds.go \ + tests/benchmarks/vector-append/pds.go \ + tests/benchmarks/vector-builder-append/pds.go \ + tests/benchmarks/vector-builder-prepend/pds.go \ + tests/benchmarks/vector-builder-set/pds.go \ + tests/benchmarks/vector-iterator-backward/pds.go \ + tests/benchmarks/vector-iterator-forward/pds.go \ + tests/benchmarks/vector-prepend/pds.go \ + tests/benchmarks/vector-set/pds.go \ benchmarks/main.go = \ tests/benchmarks/builtin-map-delete/main.go \ tests/benchmarks/builtin-map-set/main.go \ tests/benchmarks/builtin-slice-append-int/main.go \ tests/benchmarks/builtin-slice-append-interface/main.go \ - tests/benchmarks/vector-append/main.go \ - tests/benchmarks/vector-builder-append/main.go \ - tests/benchmarks/vector-builder-prepend/main.go \ - tests/benchmarks/vector-builder-set/main.go \ - tests/benchmarks/vector-iterator-backward/main.go \ - tests/benchmarks/vector-iterator-forward/main.go \ - tests/benchmarks/vector-prepend/main.go \ - tests/benchmarks/vector-set/main.go \ tests/benchmarks/map-builder-delete/main.go \ tests/benchmarks/map-builder-set/main.go \ tests/benchmarks/map-delete/main.go \ @@ -132,6 +141,14 @@ benchmarks/main.go = \ tests/benchmarks/sortedmap-iterator-backward/main.go \ tests/benchmarks/sortedmap-iterator-forward/main.go \ tests/benchmarks/sortedmap-set/main.go \ + tests/benchmarks/vector-append/main.go \ + tests/benchmarks/vector-builder-append/main.go \ + tests/benchmarks/vector-builder-prepend/main.go \ + tests/benchmarks/vector-builder-set/main.go \ + tests/benchmarks/vector-iterator-backward/main.go \ + tests/benchmarks/vector-iterator-forward/main.go \ + tests/benchmarks/vector-prepend/main.go \ + tests/benchmarks/vector-set/main.go \ src/pds.a: src/pds.go tests/benchmarks/builtin-map-delete/main.a: tests/benchmarks/builtin-map-delete/main.go @@ -142,22 +159,6 @@ tests/benchmarks/builtin-slice-append-int/main.a: tests/benchmarks/builtin-slice tests/benchmarks/builtin-slice-append-int/pds.a: tests/benchmarks/builtin-slice-append-int/pds.go tests/benchmarks/builtin-slice-append-interface/main.a: tests/benchmarks/builtin-slice-append-interface/main.go tests/benchmarks/builtin-slice-append-interface/pds.a: tests/benchmarks/builtin-slice-append-interface/pds.go -tests/benchmarks/vector-append/main.a: tests/benchmarks/vector-append/main.go -tests/benchmarks/vector-append/pds.a: tests/benchmarks/vector-append/pds.go -tests/benchmarks/vector-builder-append/main.a: tests/benchmarks/vector-builder-append/main.go -tests/benchmarks/vector-builder-append/pds.a: tests/benchmarks/vector-builder-append/pds.go -tests/benchmarks/vector-builder-prepend/main.a: tests/benchmarks/vector-builder-prepend/main.go -tests/benchmarks/vector-builder-prepend/pds.a: tests/benchmarks/vector-builder-prepend/pds.go -tests/benchmarks/vector-builder-set/main.a: tests/benchmarks/vector-builder-set/main.go -tests/benchmarks/vector-builder-set/pds.a: tests/benchmarks/vector-builder-set/pds.go -tests/benchmarks/vector-iterator-backward/main.a: tests/benchmarks/vector-iterator-backward/main.go -tests/benchmarks/vector-iterator-backward/pds.a: tests/benchmarks/vector-iterator-backward/pds.go -tests/benchmarks/vector-iterator-forward/main.a: tests/benchmarks/vector-iterator-forward/main.go -tests/benchmarks/vector-iterator-forward/pds.a: tests/benchmarks/vector-iterator-forward/pds.go -tests/benchmarks/vector-prepend/main.a: tests/benchmarks/vector-prepend/main.go -tests/benchmarks/vector-prepend/pds.a: tests/benchmarks/vector-prepend/pds.go -tests/benchmarks/vector-set/main.a: tests/benchmarks/vector-set/main.go -tests/benchmarks/vector-set/pds.a: tests/benchmarks/vector-set/pds.go tests/benchmarks/map-builder-delete/main.a: tests/benchmarks/map-builder-delete/main.go tests/benchmarks/map-builder-delete/pds.a: tests/benchmarks/map-builder-delete/pds.go tests/benchmarks/map-builder-set/main.a: tests/benchmarks/map-builder-set/main.go @@ -180,10 +181,22 @@ tests/benchmarks/sortedmap-iterator-forward/main.a: tests/benchmarks/sortedmap-i tests/benchmarks/sortedmap-iterator-forward/pds.a: tests/benchmarks/sortedmap-iterator-forward/pds.go tests/benchmarks/sortedmap-set/main.a: tests/benchmarks/sortedmap-set/main.go tests/benchmarks/sortedmap-set/pds.a: tests/benchmarks/sortedmap-set/pds.go -tests/functional/vector-api/main.a: tests/functional/vector-api/main.go -tests/functional/vector-api/pds.a: tests/functional/vector-api/pds.go -tests/functional/vector-builder-api/main.a: tests/functional/vector-builder-api/main.go -tests/functional/vector-builder-api/pds.a: tests/functional/vector-builder-api/pds.go +tests/benchmarks/vector-append/main.a: tests/benchmarks/vector-append/main.go +tests/benchmarks/vector-append/pds.a: tests/benchmarks/vector-append/pds.go +tests/benchmarks/vector-builder-append/main.a: tests/benchmarks/vector-builder-append/main.go +tests/benchmarks/vector-builder-append/pds.a: tests/benchmarks/vector-builder-append/pds.go +tests/benchmarks/vector-builder-prepend/main.a: tests/benchmarks/vector-builder-prepend/main.go +tests/benchmarks/vector-builder-prepend/pds.a: tests/benchmarks/vector-builder-prepend/pds.go +tests/benchmarks/vector-builder-set/main.a: tests/benchmarks/vector-builder-set/main.go +tests/benchmarks/vector-builder-set/pds.a: tests/benchmarks/vector-builder-set/pds.go +tests/benchmarks/vector-iterator-backward/main.a: tests/benchmarks/vector-iterator-backward/main.go +tests/benchmarks/vector-iterator-backward/pds.a: tests/benchmarks/vector-iterator-backward/pds.go +tests/benchmarks/vector-iterator-forward/main.a: tests/benchmarks/vector-iterator-forward/main.go +tests/benchmarks/vector-iterator-forward/pds.a: tests/benchmarks/vector-iterator-forward/pds.go +tests/benchmarks/vector-prepend/main.a: tests/benchmarks/vector-prepend/main.go +tests/benchmarks/vector-prepend/pds.a: tests/benchmarks/vector-prepend/pds.go +tests/benchmarks/vector-set/main.a: tests/benchmarks/vector-set/main.go +tests/benchmarks/vector-set/pds.a: tests/benchmarks/vector-set/pds.go tests/functional/map-api/main.a: tests/functional/map-api/main.go tests/functional/map-api/pds.a: tests/functional/map-api/pds.go tests/functional/map-builder-api/main.a: tests/functional/map-builder-api/main.go @@ -192,20 +205,16 @@ tests/functional/sortedmap-api/main.a: tests/functional/sortedmap-api/main.go tests/functional/sortedmap-api/pds.a: tests/functional/sortedmap-api/pds.go tests/functional/sortedmap-builder-api/main.a: tests/functional/sortedmap-builder-api/main.go tests/functional/sortedmap-builder-api/pds.a: tests/functional/sortedmap-builder-api/pds.go +tests/functional/vector-api/main.a: tests/functional/vector-api/main.go +tests/functional/vector-api/pds.a: tests/functional/vector-api/pds.go +tests/functional/vector-builder-api/main.a: tests/functional/vector-builder-api/main.go +tests/functional/vector-builder-api/pds.a: tests/functional/vector-builder-api/pds.go tests/main.a: tests/main.go tests/pds.a: tests/pds.go tests/benchmarks/builtin-map-delete/main.bin: tests/benchmarks/builtin-map-delete/main.a tests/benchmarks/builtin-map-set/main.bin: tests/benchmarks/builtin-map-set/main.a tests/benchmarks/builtin-slice-append-int/main.bin: tests/benchmarks/builtin-slice-append-int/main.a tests/benchmarks/builtin-slice-append-interface/main.bin: tests/benchmarks/builtin-slice-append-interface/main.a -tests/benchmarks/vector-append/main.bin: tests/benchmarks/vector-append/main.a -tests/benchmarks/vector-builder-append/main.bin: tests/benchmarks/vector-builder-append/main.a -tests/benchmarks/vector-builder-prepend/main.bin: tests/benchmarks/vector-builder-prepend/main.a -tests/benchmarks/vector-builder-set/main.bin: tests/benchmarks/vector-builder-set/main.a -tests/benchmarks/vector-iterator-backward/main.bin: tests/benchmarks/vector-iterator-backward/main.a -tests/benchmarks/vector-iterator-forward/main.bin: tests/benchmarks/vector-iterator-forward/main.a -tests/benchmarks/vector-prepend/main.bin: tests/benchmarks/vector-prepend/main.a -tests/benchmarks/vector-set/main.bin: tests/benchmarks/vector-set/main.a tests/benchmarks/map-builder-delete/main.bin: tests/benchmarks/map-builder-delete/main.a tests/benchmarks/map-builder-set/main.bin: tests/benchmarks/map-builder-set/main.a tests/benchmarks/map-delete/main.bin: tests/benchmarks/map-delete/main.a @@ -217,25 +226,25 @@ tests/benchmarks/sortedmap-delete/main.bin: tests/benchmarks/sortedmap-delete/ma tests/benchmarks/sortedmap-iterator-backward/main.bin: tests/benchmarks/sortedmap-iterator-backward/main.a tests/benchmarks/sortedmap-iterator-forward/main.bin: tests/benchmarks/sortedmap-iterator-forward/main.a tests/benchmarks/sortedmap-set/main.bin: tests/benchmarks/sortedmap-set/main.a -tests/functional/vector-api/main.bin: tests/functional/vector-api/main.a -tests/functional/vector-builder-api/main.bin: tests/functional/vector-builder-api/main.a +tests/benchmarks/vector-append/main.bin: tests/benchmarks/vector-append/main.a +tests/benchmarks/vector-builder-append/main.bin: tests/benchmarks/vector-builder-append/main.a +tests/benchmarks/vector-builder-prepend/main.bin: tests/benchmarks/vector-builder-prepend/main.a +tests/benchmarks/vector-builder-set/main.bin: tests/benchmarks/vector-builder-set/main.a +tests/benchmarks/vector-iterator-backward/main.bin: tests/benchmarks/vector-iterator-backward/main.a +tests/benchmarks/vector-iterator-forward/main.bin: tests/benchmarks/vector-iterator-forward/main.a +tests/benchmarks/vector-prepend/main.bin: tests/benchmarks/vector-prepend/main.a +tests/benchmarks/vector-set/main.bin: tests/benchmarks/vector-set/main.a tests/functional/map-api/main.bin: tests/functional/map-api/main.a tests/functional/map-builder-api/main.bin: tests/functional/map-builder-api/main.a tests/functional/sortedmap-api/main.bin: tests/functional/sortedmap-api/main.a tests/functional/sortedmap-builder-api/main.bin: tests/functional/sortedmap-builder-api/main.a +tests/functional/vector-api/main.bin: tests/functional/vector-api/main.a +tests/functional/vector-builder-api/main.bin: tests/functional/vector-builder-api/main.a tests/main.bin: tests/main.a tests/benchmarks/builtin-map-delete/main.bin-check: tests/benchmarks/builtin-map-delete/main.bin tests/benchmarks/builtin-map-set/main.bin-check: tests/benchmarks/builtin-map-set/main.bin tests/benchmarks/builtin-slice-append-int/main.bin-check: tests/benchmarks/builtin-slice-append-int/main.bin tests/benchmarks/builtin-slice-append-interface/main.bin-check: tests/benchmarks/builtin-slice-append-interface/main.bin -tests/benchmarks/vector-append/main.bin-check: tests/benchmarks/vector-append/main.bin -tests/benchmarks/vector-builder-append/main.bin-check: tests/benchmarks/vector-builder-append/main.bin -tests/benchmarks/vector-builder-prepend/main.bin-check: tests/benchmarks/vector-builder-prepend/main.bin -tests/benchmarks/vector-builder-set/main.bin-check: tests/benchmarks/vector-builder-set/main.bin -tests/benchmarks/vector-iterator-backward/main.bin-check: tests/benchmarks/vector-iterator-backward/main.bin -tests/benchmarks/vector-iterator-forward/main.bin-check: tests/benchmarks/vector-iterator-forward/main.bin -tests/benchmarks/vector-prepend/main.bin-check: tests/benchmarks/vector-prepend/main.bin -tests/benchmarks/vector-set/main.bin-check: tests/benchmarks/vector-set/main.bin tests/benchmarks/map-builder-delete/main.bin-check: tests/benchmarks/map-builder-delete/main.bin tests/benchmarks/map-builder-set/main.bin-check: tests/benchmarks/map-builder-set/main.bin tests/benchmarks/map-delete/main.bin-check: tests/benchmarks/map-delete/main.bin @@ -247,25 +256,25 @@ tests/benchmarks/sortedmap-delete/main.bin-check: tests/benchmarks/sortedmap-del tests/benchmarks/sortedmap-iterator-backward/main.bin-check: tests/benchmarks/sortedmap-iterator-backward/main.bin tests/benchmarks/sortedmap-iterator-forward/main.bin-check: tests/benchmarks/sortedmap-iterator-forward/main.bin tests/benchmarks/sortedmap-set/main.bin-check: tests/benchmarks/sortedmap-set/main.bin -tests/functional/vector-api/main.bin-check: tests/functional/vector-api/main.bin -tests/functional/vector-builder-api/main.bin-check: tests/functional/vector-builder-api/main.bin +tests/benchmarks/vector-append/main.bin-check: tests/benchmarks/vector-append/main.bin +tests/benchmarks/vector-builder-append/main.bin-check: tests/benchmarks/vector-builder-append/main.bin +tests/benchmarks/vector-builder-prepend/main.bin-check: tests/benchmarks/vector-builder-prepend/main.bin +tests/benchmarks/vector-builder-set/main.bin-check: tests/benchmarks/vector-builder-set/main.bin +tests/benchmarks/vector-iterator-backward/main.bin-check: tests/benchmarks/vector-iterator-backward/main.bin +tests/benchmarks/vector-iterator-forward/main.bin-check: tests/benchmarks/vector-iterator-forward/main.bin +tests/benchmarks/vector-prepend/main.bin-check: tests/benchmarks/vector-prepend/main.bin +tests/benchmarks/vector-set/main.bin-check: tests/benchmarks/vector-set/main.bin tests/functional/map-api/main.bin-check: tests/functional/map-api/main.bin tests/functional/map-builder-api/main.bin-check: tests/functional/map-builder-api/main.bin tests/functional/sortedmap-api/main.bin-check: tests/functional/sortedmap-api/main.bin tests/functional/sortedmap-builder-api/main.bin-check: tests/functional/sortedmap-builder-api/main.bin +tests/functional/vector-api/main.bin-check: tests/functional/vector-api/main.bin +tests/functional/vector-builder-api/main.bin-check: tests/functional/vector-builder-api/main.bin tests/main.bin-check: tests/main.bin tests/benchmarks/builtin-map-delete/main.a: tests/benchmarks/builtin-map-delete/$(NAME).a tests/benchmarks/builtin-map-set/main.a: tests/benchmarks/builtin-map-set/$(NAME).a tests/benchmarks/builtin-slice-append-int/main.a: tests/benchmarks/builtin-slice-append-int/$(NAME).a tests/benchmarks/builtin-slice-append-interface/main.a: tests/benchmarks/builtin-slice-append-interface/$(NAME).a -tests/benchmarks/vector-append/main.a: tests/benchmarks/vector-append/$(NAME).a -tests/benchmarks/vector-builder-append/main.a: tests/benchmarks/vector-builder-append/$(NAME).a -tests/benchmarks/vector-builder-prepend/main.a: tests/benchmarks/vector-builder-prepend/$(NAME).a -tests/benchmarks/vector-builder-set/main.a: tests/benchmarks/vector-builder-set/$(NAME).a -tests/benchmarks/vector-iterator-backward/main.a: tests/benchmarks/vector-iterator-backward/$(NAME).a -tests/benchmarks/vector-iterator-forward/main.a: tests/benchmarks/vector-iterator-forward/$(NAME).a -tests/benchmarks/vector-prepend/main.a: tests/benchmarks/vector-prepend/$(NAME).a -tests/benchmarks/vector-set/main.a: tests/benchmarks/vector-set/$(NAME).a tests/benchmarks/map-builder-delete/main.a: tests/benchmarks/map-builder-delete/$(NAME).a tests/benchmarks/map-builder-set/main.a: tests/benchmarks/map-builder-set/$(NAME).a tests/benchmarks/map-delete/main.a: tests/benchmarks/map-delete/$(NAME).a @@ -277,10 +286,18 @@ tests/benchmarks/sortedmap-delete/main.a: tests/benchmarks/sortedmap-delete/$(NA tests/benchmarks/sortedmap-iterator-backward/main.a: tests/benchmarks/sortedmap-iterator-backward/$(NAME).a tests/benchmarks/sortedmap-iterator-forward/main.a: tests/benchmarks/sortedmap-iterator-forward/$(NAME).a tests/benchmarks/sortedmap-set/main.a: tests/benchmarks/sortedmap-set/$(NAME).a -tests/functional/vector-api/main.a: tests/functional/vector-api/$(NAME).a -tests/functional/vector-builder-api/main.a: tests/functional/vector-builder-api/$(NAME).a +tests/benchmarks/vector-append/main.a: tests/benchmarks/vector-append/$(NAME).a +tests/benchmarks/vector-builder-append/main.a: tests/benchmarks/vector-builder-append/$(NAME).a +tests/benchmarks/vector-builder-prepend/main.a: tests/benchmarks/vector-builder-prepend/$(NAME).a +tests/benchmarks/vector-builder-set/main.a: tests/benchmarks/vector-builder-set/$(NAME).a +tests/benchmarks/vector-iterator-backward/main.a: tests/benchmarks/vector-iterator-backward/$(NAME).a +tests/benchmarks/vector-iterator-forward/main.a: tests/benchmarks/vector-iterator-forward/$(NAME).a +tests/benchmarks/vector-prepend/main.a: tests/benchmarks/vector-prepend/$(NAME).a +tests/benchmarks/vector-set/main.a: tests/benchmarks/vector-set/$(NAME).a tests/functional/map-api/main.a: tests/functional/map-api/$(NAME).a tests/functional/map-builder-api/main.a: tests/functional/map-builder-api/$(NAME).a tests/functional/sortedmap-api/main.a: tests/functional/sortedmap-api/$(NAME).a tests/functional/sortedmap-builder-api/main.a: tests/functional/sortedmap-builder-api/$(NAME).a +tests/functional/vector-api/main.a: tests/functional/vector-api/$(NAME).a +tests/functional/vector-builder-api/main.a: tests/functional/vector-builder-api/$(NAME).a tests/main.a: tests/$(NAME).a diff --git a/doc/pds.en.0.adoc b/doc/pds.en.0.adoc new file mode 100644 index 0000000..785a117 --- /dev/null +++ b/doc/pds.en.0.adoc @@ -0,0 +1,5 @@ += pds(0) + +== NAME + +pds - . @@ -5,21 +5,41 @@ export LANG=POSIX.UTF-8 libs() { - find src tests -name '*.go' | grep -v '/main\.go$' | - grep -v '/version\.go$' + find src tests -name '*.go' | + grep -Ev '/(main|meta)\.go$' | + grep -Ev '/_cgo_(import|gotypes)\.go$' | + grep -Ev '\.cgo1\.go$' } mains() { find src tests -name '*.go' | grep '/main\.go$' } +docs() { + find doc/*.en.*.adoc +} + +xdocs() { + for l in `find po/doc/*.po | xargs -I% basename % .po`; do + docs | sed 's|/\(.*\)\.en\.\(.*\)$|/\1.'"$l"'.\2|' + done +} + +pos() { + find po/ -name '*.po' | grep -Ev '^po/(doc|tests)/' +} + + libs | varlist 'libs.go' mains | varlist 'mains.go' +docs | varlist 'manpages.en.N.adoc' +xdocs | varlist 'manpages.XX.N.adoc' +pos | varlist 'sources.po' -find tests/functional/*/*.go -not -name main.go | varlist 'functional-tests/lib.go' -find tests/functional/*/main.go | varlist 'functional-tests/main.go' -find tests/fuzz/*/*.go -not -name main.go | varlist 'fuzz-targets/lib.go' -find tests/fuzz/*/main.go | varlist 'fuzz-targets/main.go' +find tests/functional/*/*.go -not -name main.go | varlist 'functional/lib.go' +find tests/functional/*/main.go | varlist 'functional/main.go' +find tests/fuzz/*/*.go -not -name main.go | varlist 'fuzz/lib.go' +find tests/fuzz/*/main.go | varlist 'fuzz/main.go' find tests/benchmarks/*/*.go -not -name main.go | varlist 'benchmarks/lib.go' find tests/benchmarks/*/main.go | varlist 'benchmarks/main.go' diff --git a/po/doc/de.po b/po/doc/de.po new file mode 100644 index 0000000..3a73364 --- /dev/null +++ b/po/doc/de.po @@ -0,0 +1,22 @@ +msgid "" +msgstr "" +"Language: de\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: Title = +#: doc/pds.en.0.adoc:1 +#, no-wrap +msgid "pds(0)" +msgstr "" + +#. type: Title == +#: doc/pds.en.0.adoc:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: doc/pds.en.0.adoc:5 +msgid "pds - ." +msgstr "" diff --git a/po/doc/doc.pot b/po/doc/doc.pot new file mode 100644 index 0000000..7285449 --- /dev/null +++ b/po/doc/doc.pot @@ -0,0 +1,21 @@ +msgid "" +msgstr "" +"Language: \n" +"Content-Type: text/plain; charset=UTF-8\n" + +#. type: Title = +#: doc/pds.en.0.adoc:1 +#, no-wrap +msgid "pds(0)" +msgstr "" + +#. type: Title == +#: doc/pds.en.0.adoc:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: doc/pds.en.0.adoc:5 +msgid "pds - ." +msgstr "" diff --git a/po/doc/eo.po b/po/doc/eo.po new file mode 100644 index 0000000..0a34040 --- /dev/null +++ b/po/doc/eo.po @@ -0,0 +1,22 @@ +msgid "" +msgstr "" +"Language: eo\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: Title = +#: doc/pds.en.0.adoc:1 +#, no-wrap +msgid "pds(0)" +msgstr "" + +#. type: Title == +#: doc/pds.en.0.adoc:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: doc/pds.en.0.adoc:5 +msgid "pds - ." +msgstr "" diff --git a/po/doc/es.po b/po/doc/es.po new file mode 100644 index 0000000..756f27f --- /dev/null +++ b/po/doc/es.po @@ -0,0 +1,22 @@ +msgid "" +msgstr "" +"Language: es\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: Title = +#: doc/pds.en.0.adoc:1 +#, no-wrap +msgid "pds(0)" +msgstr "" + +#. type: Title == +#: doc/pds.en.0.adoc:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: doc/pds.en.0.adoc:5 +msgid "pds - ." +msgstr "" diff --git a/po/doc/fr.po b/po/doc/fr.po new file mode 100644 index 0000000..43ebddf --- /dev/null +++ b/po/doc/fr.po @@ -0,0 +1,22 @@ +msgid "" +msgstr "" +"Language: fr\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. type: Title = +#: doc/pds.en.0.adoc:1 +#, no-wrap +msgid "pds(0)" +msgstr "" + +#. type: Title == +#: doc/pds.en.0.adoc:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: doc/pds.en.0.adoc:5 +msgid "pds - ." +msgstr "" diff --git a/po/doc/note.txt b/po/doc/note.txt new file mode 100644 index 0000000..45279a4 --- /dev/null +++ b/po/doc/note.txt @@ -0,0 +1,5 @@ +PO4A-HEADER: mode=eof + + + +// Generated from po4a(1). diff --git a/po/doc/po4a.cfg b/po/doc/po4a.cfg new file mode 100644 index 0000000..4e53161 --- /dev/null +++ b/po/doc/po4a.cfg @@ -0,0 +1,5 @@ +[options] --keep 0 --master-charset UTF-8 --localized-charset UTF-8 --addendum-charset UTF-8 + +[po_directory] po/doc + +[type: asciidoc] doc/pds.en.0.adoc $lang:doc/pds.$lang.0.adoc diff --git a/po/doc/pt.po b/po/doc/pt.po new file mode 100644 index 0000000..44e60c1 --- /dev/null +++ b/po/doc/pt.po @@ -0,0 +1,22 @@ +msgid "" +msgstr "" +"Language: pt\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: Title = +#: doc/pds.en.0.adoc:1 +#, no-wrap +msgid "pds(0)" +msgstr "" + +#. type: Title == +#: doc/pds.en.0.adoc:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: doc/pds.en.0.adoc:5 +msgid "pds - ." +msgstr "" diff --git a/po/pds/de.po b/po/pds/de.po new file mode 100644 index 0000000..f4b542d --- /dev/null +++ b/po/pds/de.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Language: de\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/pds.go:108 +#, c-format +msgid "immutable.Vector.Get: index %d out of bounds" +msgstr "" diff --git a/po/pds/eo.po b/po/pds/eo.po new file mode 100644 index 0000000..198504e --- /dev/null +++ b/po/pds/eo.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Language: eo\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/pds.go:108 +#, c-format +msgid "immutable.Vector.Get: index %d out of bounds" +msgstr "" diff --git a/po/pds/es.po b/po/pds/es.po new file mode 100644 index 0000000..d364269 --- /dev/null +++ b/po/pds/es.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Language: es\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/pds.go:108 +#, c-format +msgid "immutable.Vector.Get: index %d out of bounds" +msgstr "" diff --git a/po/pds/fr.po b/po/pds/fr.po new file mode 100644 index 0000000..d2a8159 --- /dev/null +++ b/po/pds/fr.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Language: fr\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: src/pds.go:108 +#, c-format +msgid "immutable.Vector.Get: index %d out of bounds" +msgstr "" diff --git a/po/pds/pds.pot b/po/pds/pds.pot new file mode 100644 index 0000000..3e0988b --- /dev/null +++ b/po/pds/pds.pot @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Language: \n" +"Content-Type: text/plain; charset=UTF-8\n" + +#: src/pds.go:108 +#, c-format +msgid "immutable.Vector.Get: index %d out of bounds" +msgstr "" + diff --git a/po/pds/po4a.cfg b/po/pds/po4a.cfg new file mode 100644 index 0000000..22937b3 --- /dev/null +++ b/po/pds/po4a.cfg @@ -0,0 +1,3 @@ +[options] --keep 0 --master-charset UTF-8 --localized-charset UTF-8 --addendum-charset UTF-8 + +[po_directory] po/pds diff --git a/po/pds/pt.po b/po/pds/pt.po new file mode 100644 index 0000000..7a90a0c --- /dev/null +++ b/po/pds/pt.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Language: pt\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/pds.go:108 +#, c-format +msgid "immutable.Vector.Get: index %d out of bounds" +msgstr "" @@ -48,8 +48,12 @@ import ( "reflect" "sort" "strings" + + gt "gotext" ) + + // Vector is a dense, ordered, indexed collections. They are analogous to slices // in Go. They can be updated by appending to the end of the vector, prepending // values to the beginning of the vector, or updating existing indexes in the @@ -101,7 +105,9 @@ func (l *Vector[T]) cap() int { func (l *Vector[T]) Get(index int) T { if index < 0 || index >= l.size { panic(fmt.Sprintf( - "immutable.Vector.Get: index %d out of bounds", + gt.Gettext( + "immutable.Vector.Get: index %d out of bounds", + ), index, )) } |