Skip to content

Commit

Permalink
ptexenc: Add help ptekf.1 for ptekf
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@69762 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
t-tk committed Feb 10, 2024
1 parent 99b12a9 commit 509dd8f
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 17 deletions.
4 changes: 0 additions & 4 deletions texk/mendexk/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* COPYRIGHT,
* main.c: 2024.

2024-02-05 Karl Berry <[email protected]>

* main.c:

2023-08-11 TANAKA Takuji <[email protected]>

* tests/mendex.test:
Expand Down
6 changes: 6 additions & 0 deletions texk/ptexenc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2024-02-10 TANAKA Takuji <[email protected]>

* ptekf.1: Add command line manual.
* ptekf.c: Tweak command line help message.
* Makefile.am: Adjust.

2023-02-09 Karl Berry <[email protected]>

* version.ac: remove /dev, for TL24.
Expand Down
1 change: 1 addition & 0 deletions texk/ptexenc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ EXTRA_DIST = COPYRIGHT ChangeLog.jp
## The programs
bin_PROGRAMS = ptekf
ptekf_LDADD = libptexenc.la
man1_MANS = ptekf.1

LDADD = $(KPATHSEA_LIBS)

Expand Down
69 changes: 60 additions & 9 deletions texk/ptexenc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ CONFIG_HEADER = $(top_builddir)/ptexenc/c-auto.h
CONFIG_CLEAN_FILES = ptexenc.pc
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(includedir)"
PROGRAMS = $(bin_PROGRAMS)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
Expand Down Expand Up @@ -207,6 +208,9 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man1_MANS)
DATA = $(pkgconfig_DATA)
HEADERS = $(nobase_include_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
Expand Down Expand Up @@ -609,6 +613,7 @@ EXTRA_DIST = COPYRIGHT ChangeLog.jp $(TESTS) tests/enc-amb0.bib-euc \
tests/enc-utf8b.bib-jis tests/enc-utf8b.bib-sjis \
tests/enc-utf8b.bib-utf8
ptekf_LDADD = libptexenc.la
man1_MANS = ptekf.1
LDADD = $(KPATHSEA_LIBS)

#
Expand Down Expand Up @@ -844,6 +849,47 @@ clean-libtool:

distclean-libtool:
-rm -f libtool config.lt
install-man1: $(man1_MANS)
@$(NORMAL_INSTALL)
@list1='$(man1_MANS)'; \
list2=''; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
done; }

uninstall-man1:
@$(NORMAL_UNINSTALL)
@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
Expand Down Expand Up @@ -1279,11 +1325,11 @@ distcleancheck: distclean
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS)
all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS)
install-binPROGRAMS: install-libLTLIBRARIES

installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
Expand Down Expand Up @@ -1349,7 +1395,8 @@ info: info-am

info-am:

install-data-am: install-nobase_includeHEADERS install-pkgconfigDATA
install-data-am: install-man install-nobase_includeHEADERS \
install-pkgconfigDATA

install-dvi: install-dvi-am

Expand All @@ -1365,7 +1412,7 @@ install-info: install-info-am

install-info-am:

install-man:
install-man: install-man1

install-pdf: install-pdf-am

Expand Down Expand Up @@ -1402,7 +1449,10 @@ ps: ps-am
ps-am:

uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA
uninstall-man uninstall-nobase_includeHEADERS \
uninstall-pkgconfigDATA

uninstall-man: uninstall-man1

.MAKE: check-am install-am install-strip

Expand All @@ -1418,15 +1468,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man \
install-libLTLIBRARIES install-man install-man1 \
install-nobase_includeHEADERS install-pdf install-pdf-am \
install-pkgconfigDATA install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
recheck tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA
uninstall-binPROGRAMS uninstall-libLTLIBRARIES uninstall-man \
uninstall-man1 uninstall-nobase_includeHEADERS \
uninstall-pkgconfigDATA

.PRECIOUS: Makefile

Expand Down
65 changes: 65 additions & 0 deletions texk/ptexenc/ptekf.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.TH PTEKF 1
\"=====================================================================
.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
.if n .ds TX TeX
\"=====================================================================
.SH NAME
ptekf \- p\*(TX-enc Kanji Filter
.SH SYNOPSIS
.HP
\fBptekf\fR [\fIoptions\fR] [\fB\-\-\fR] \fIin_file1\fR [\fIin_file2 ...\fR]
.HP
\fBptekf\fR \-\-help | \-\-version
.SH DESCRIPTION
\fBptekf\fR is a simple character encoding converter for input/output files of p\*(TX-family programs.
This utility can be used to check procedures of character encoding conversion and guessing encoding \
which are impremented in p\*(TX-family i.e. \fB(e)(u)ptex\fR, \fB(u)pbibtex\fR, \fBmendex\fR and so on.
.SH OPTIONS
.PP
.TP
\fB\-j\fR
Specify output encoding ISO-2022-JP.
.TP
\fB\-s\fR
Specify output encoding Shift_JIS.
.TP
\fB\-e\fR
Specify output encoding EUC-JP.
.TP
\fB\-u\fR
Specify output encoding UTF-8.
.TP
\fB\-J\fR
Specify input encoding ISO-2022-JP.
.TP
\fB\-S\fR
Specify input encoding Shift_JIS.
.TP
\fB\-E\fR
Specify input encoding EUC-JP.
.TP
\fB\-U\fR
Specify input encoding UTF-8.
.TP
\fB\-g\fR \fB\-\-guess\fR
Guess the input encoding (no conversion).
.TP
\fB\-G\fR
Guess the input encoding and output to stdout or files.
.TP
\fB\-b\fR \fB\-\-buffer\fR
Output internal buffer without code conversion.
.TP
\fB\-v\fR \fB\-\-version\fR
Print version number.
.TP
\fB\-h\fR \fB\-\-help\fR
Print help message.
.TP
Default input/output encoding depends on kpathsearch parameters \fBPTEX_KANJI_ENC\fR and \fBguess_input_kanji_encoding\fR.
.SH SEE ALSO
eptex(1), euptex(1), pbibtex(1), upbibtex(1), mendex(1)
.SH AUTHOR
This manual page was written by Japanese \*(TX Development Community \
<https://texjp.org>. For more information, see GitHub repository \
<https://github.com/texjporg/tex-jp-build>.
8 changes: 4 additions & 4 deletions texk/ptexenc/ptekf.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ static void show_version(void)

static void show_usage(void)
{
printf("Usage: ptekf -[OPTION] [--] in_file1 [in_file2 ..]\n");
printf(" j/s/e/u Specify output encoding ISO-2022-JP, Shift_JIS, EUC-JP, UTF8\n");
printf(" J/S/E/U Specify input encoding ISO-2022-JP, Shift_JIS, EUC-JP, UTF8\n");
printf("Usage: ptekf -[OPTION] [--] in_file1 [in_file2 ...]\n");
printf(" j/s/e/u Specify output encoding ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8\n");
printf(" J/S/E/U Specify input encoding ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8\n");
printf(" G Guess the input encoding and output to stdout or files\n");
printf(" --guess -g Guess the input encoding (no conversion)\n");
printf(" --buffer -b Output internal buffer without code conversion\n");
printf(" --version -v Print version number\n");
printf(" --help -h Print this help\n");
printf(" --buffer -b Output internal buffer without code conversion\n");
printf("Default input/output encoding depends on kpathsearch parameters PTEX_KANJI_ENC, guess_input_kanji_encoding\n");
printf("\nEmail bug reports to %s.\n", BUG_ADDRESS);
}
Expand Down

0 comments on commit 509dd8f

Please sign in to comment.