ICU-1220 terse printing with -l. We'll have a --list-converters that
will dump the converters and their alias as if it were a brand new convrtrs.txt X-SVN-Rev: 6739
This commit is contained in:
parent
3029b7cf1f
commit
52affd22d1
@ -24,6 +24,12 @@ include $(srcdir)/resfiles.mk
|
||||
RESDIR=uconvmsg
|
||||
RESFILES=$(RESSRC:%.txt=$(RESDIR)/%.res)
|
||||
|
||||
##
|
||||
|
||||
SECTION = 1
|
||||
|
||||
ALL_MAN_FILES = $(TARGET).$(SECTION)
|
||||
|
||||
## Extra files to remove for 'make clean'
|
||||
CLEANFILES = *~ $(DEPS)
|
||||
|
||||
@ -47,7 +53,7 @@ DEPS = $(OBJECTS:.o=.d)
|
||||
|
||||
## List of phony targets
|
||||
.PHONY : all all-local install install-local clean clean-local \
|
||||
distclean distclean-local dist dist-local check check-local resfiles package-resfiles install-resfiles
|
||||
distclean distclean-local dist dist-local check check-local resfiles package-resfiles install-resfiles install-man
|
||||
|
||||
## Clear suffix list
|
||||
.SUFFIXES :
|
||||
@ -60,9 +66,9 @@ distclean : distclean-local
|
||||
dist: dist-local
|
||||
check: check-local
|
||||
|
||||
all-local: $(TARGET) resfiles
|
||||
all-local: $(TARGET) resfiles $(ALL_MAN_FILES)
|
||||
|
||||
install-local: all-local install-target install-resfiles
|
||||
install-local: all-local install-target install-resfiles install-man
|
||||
|
||||
install-target: all-local
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
||||
@ -107,6 +113,13 @@ $(RESDIR)/%.res: $(srcdir)/%.txt
|
||||
@$(MKINSTALLDIRS) $(RESDIR)
|
||||
$(INVOKE) $(top_builddir)/tools/genrb/genrb -eUTF-8 -d $(RESDIR) $^
|
||||
|
||||
install-man: $(ALL_MAN_FILES)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
$(INSTALL_DATA) $? $(DESTDIR)$(mandir).man$(SECTION)
|
||||
|
||||
%.$(SECTION): $(srcdir)/%.$(SECTION).in
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
# Don't do this. This is a problem when changing platforms.
|
||||
#ifneq ($(MAKECMDGOALS),distclean)
|
||||
|
@ -81,7 +81,9 @@ static void printAllConverters(const char *pname)
|
||||
{
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
int32_t num;
|
||||
#if 0
|
||||
size_t numprint = 0;
|
||||
#endif
|
||||
static const size_t maxline = 70;
|
||||
|
||||
// getAvailable returns a string-table with all available codepages
|
||||
@ -97,12 +99,16 @@ static void printAllConverters(const char *pname)
|
||||
{
|
||||
// ucnv_getAvailableName gets the codepage name at a specific
|
||||
// index
|
||||
#if 0
|
||||
numprint += printf("%-20s", convtable[i]);
|
||||
if (numprint>maxline)
|
||||
{
|
||||
putchar('\n');
|
||||
numprint = 0;
|
||||
}
|
||||
#else
|
||||
printf("%s ", convtable[i]);
|
||||
#endif
|
||||
}
|
||||
puts(convtable[num-1]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user