POSIX.1 National Language Support API for MinGW
Rev. | e8a4ca7c72694a37645e1013e561569c8dbb322b |
---|---|
大小 | 16,990 字节 |
时间 | 2008-02-16 21:57:19 |
作者 | Keith Marshall |
Log Message | MinGW-catgets version 1.0.1 released.
|
2008-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
MinGW-catgets version 1.0.1 released.
Source update only: correct `make install' defect.
* All files (RELEASE_1_0_1): CVS tag assigned.
* configure.ac (PATCHLEVEL): Reactivate and increment.
* configure: Regenerated.
* Makefile.in (EXECDEV_SCRIPTS): Don't explicitly include...
(all-targets): ...in this, but add to...
(all-scripts): ...this new target, included by...
(all-native): ...this.
(clean): Include EXECDEV_SCRIPTS.
2008-01-12 Keith Marshall <keithmarshall@users.sourceforge.net>
MinGW-catgets version 1.0 released.
* configure.ac (VERSION_MAJOR, VERSION_MINOR): Updated.
(PATCHLEVEL): Reset to zero; commented out.
* configure: Regenerated.
* All files (RELEASE_1_0): CVS tag assigned.
2008-01-12 Keith Marshall <keithmarshall@users.sourceforge.net>
* gencat.c: Force an abort, with appropriate diagnostic, on parsing an
unrecognised command line option.
2008-01-11 Keith Marshall <keithmarshall@users.sourceforge.net>
Make replacement `getopt' function module more GNU compatible.
* repl/getopt.c (optind): Initialise to one; POSIX requires this.
(getopt_parse): Handle changed initial value for `optind'; allow
caller to reset the parser, by setting `optind = 0'.
2008-01-10 Keith Marshall <keithmarshall@users.sourceforge.net>
* gencat.c: Delay writing the catalogue header until *after* the
message data has been fully committed; store the ultimate catalogue
size in the header record, then rewind to write header and index
records sequentially.
2008-01-09 Keith Marshall <keithmarshall@users.sourceforge.net>
* README: Some minor wording improvements.
Update copyright notice to include new year.
Add additional notes regarding deployment of the pre-compiled
development kit.
2008-01-09 Keith Marshall <keithmarshall@users.sourceforge.net>
Retain `.exe' file name extension, if present, in program identity
banner displayed by `-help' and `-version' options.
* gencat.c (progname): Delay reassignment to `*argv', with `.exe'
extension stripped, until after parsing option arguments.
2008-01-09 Keith Marshall <keithmarshall@users.sourceforge.net>
Support `/dev/stdin' and '/dev/stdout', specified as command line
arguments, as case-insensitive aliases for `-', representing the
standard input and standard output streams respectively.
* gencat.c (msgcat): Assign from first non-option command line
argument; replace with "-", if strcasecmp() matches "/dev/stdout".
* mcsource.c (input): Use strcasecmp() instead of strcmp, to check for
match to "/dev/stdin".
2008-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
Add `-help' and `-version' options for `gencat'.
* repl/getopt.c: New file; it provides a replacement for the
`libmingwex.a' implementation of the `getopt' object module, with...
(getopt_long_only): New function; implement it.
* repl/include/getopt.h: New file; it provides a replacement header
for use with the above replacement getopt.c implementation.
* gencat.c: Add more comments; update copyright notice for new year.
(PROGRAM_IDENTITY): New manifest definition.
(AUTHOR_IDENTITY, AUTHOR_ATTRIBUTION): Ditto.
(COPYRIGHT_YEARS, COPYRIGHT_HOLDER, COPYRIGHT_NOTICE): Ditto.
(stdarg.h, getopt.h): Include.
(banner_printf): New static function.
(main): Add `options' defining structure; filter `argv' through it,
using `getopt_long_only' function.
* include/gcmsgs.h: Update copyright notice for new year.
Renumber existing message sets, making initial space to insert...
(MSG_PROGRAM_BANNER): New message definition; allocate exclusively to
message set #1, for display by both `-help' and `-version' options.
(MSG_COPYRIGHT_NOTICE): New message definition; allocate exclusively
to message set #2, for display by `-version' option.
(MSG_GENCAT_SYNOPSIS): New message definition; allocate exclusively to
message set #3, for display by `-help' option.
Add additional comments; document message set allocations.
* gendefs.awk (MULTILINE): New control variable; use it to implement
handling for multiline message definitions.
* Makefile.in (DEV_SCRIPTS): Renamed again, to...
(DISTDEV_SCRIPTS): ...this; it specifies the distributable scripts.
(EXECDEV_SCRIPTS): Define; it specifies executable variants of these.
(all-targets): Include EXECDEV_SCRIPTS, to ensure they are built.
(install-scripts): Ditto, to install them.
(AWK_INTERPRETER): New autoconf substitution; use it to define a
generic pattern rule, for generating EXECDEV_SCRIPTS from awk scripts
specified in DISTDEV_SCRIPTS.
* aclocal.m4: Add copyright notice, and other macro specific comments.
(GENCAT_AC_FUNC_GETOPT_LONG_ONLY): New macro; it checks for presence
of the getopt_long_only() function, in the standard C libraries.
(GENCAT_AC_OBJECTS_ADD_GETOPT): New macro; it is invoked if needed, by
GENCAT_AC_FUNC_GETOPT_LONG_ONLY, to schedule building of a replacement
getopt function module, providing getopt_long_only().
* configure.ac: Update copyright notice, for new year.
(AWK_INTERPRETER): New AC_SUBST variable; defined by AC_PATH_PROG.
(GENCAT_AC_FUNC_GETOPT_LONG_ONLY): Invoke.
* configure: Regenerated.
2008-01-01 Keith Marshall <keithmarshall@users.sourceforge.net>
Establish package structure for distribution.
* README, FDL: New files.
* Makefile.in (scriptdir, docdir): New macros; define them.
(DISTDOC_SOURCES): New macro; define to include ChangeLog, README
and FDL as distributed files.
(OTHER_SOURCES): Include DISTDOC_SOURCES.
(INSTALL_PROGS): Macro renamed to...
(DEV_SCRIPTS): ...this.
(MISC_SOURCES): Update accordingly.
(INSTALL_SCRIPT): New macro; define per autoconf substitution.
(install-bin-progs, install-scripts): New make targets.
(install-progs): Use them.
(DISTNAME): Add SNAPSHOT placeholder macro.
(bindist-tag, devdist-tag): New macros; define them.
(bindist-docs-install): New target.
(devdist-headers-install): New target.
(devdist-docs-install, devdist-extra-docs-install): New targets.
(devdist): New target; use them.
(dist): Build it.
2007-12-31 Keith Marshall <keithmarshall@users.sourceforge.net>
Support direct building as a cross-hosted development kit.
* aclocal.m4 (CATGETS_AC_CONFIG_TARGET): New macro.
* configure.ac: Use it.
* configure: Regenerated.
* Makefile.in (all-targets): New macro; defined by configure...
(MAKE_TARGETS): ...by means of this substitution variable...
(all-native, all-cross-hosted): ...these new macros; define them.
(all): Use it; also require...
(all-cross-hosted-libs): ...this new target, built recursively...
(cross-build): ...via this new target.
(clean, distclean): Clean it...
(distclean-cross-hosted): ...supported by this new target.
(FORCE): New pseudo-target, to FORCE it.
(manpage): Add `man_prefix' placeholder macro.
(install-all-native, install-all-cross-hosted): New targets.
(install): Use them.
(install-bin): New target.
2007-11-11 Keith Marshall <keithmarshall@users.sourceforge.net>
* catgets.c [HAVE_WINDOWS_H]: Include windows.h.
(mc_is_dirsep): New macro...
(mc_nlspath_open): Use it.
[_WIN32] (mc_dirname_strip, mc_dirname_len): New inline functions.
[_WIN32] (mc_mbstowcs, mc_wcstombs): New inline functions; these
abstract the nastiness of the Win32 MultiByteToWideChar API.
[_WIN32] (mc_validate_mapped): New static function; use it as a
wrapper around mc_validate(), to map POSIX style message catalogue
path names into the installation tree of the calling application.
(mc_resolve) [_WIN32]: New inline function...
(mc_resolve) [!_WIN32]: New `do nothing' macro...
(catopen): Use it to clean up temporary resources, allocated for the
Win32 case, where mc_validate() is wrapped by mc_validate_mapped().
(mc_pop_locale): Make it inline.
* nlspath.h.in (mc_MK_NLSPATH): New macro; use it to...
(APP_NLSPATH, SYS_NLSPATH): Construct these new defines, from...
(APP_NLSPATH_PREFERRED, APP_NLSPATH_ALTERNATE): These new defines...
(SYS_NLSPATH_PREFERRED, SYS_NLSPATH_ALTERNATE): and these likewise.
(NLSPATH_DEFAULT): Redefined, based on APP_NLSPATH and SYS_NLSPATH.
* configure.ac (AC_CHECK_HEADERS): Include windows.h.
* configure, config.h.in: Regenerated.
2007-11-10 Keith Marshall <keithmarshall@users.sourceforge.net>
* Makefile.in (install-man): Require pre-existing ${prefix};
when ok, actually invoke command to perform the installation.
(install-progs, install-libs, install-headers): Be verbose;
echo commands as invoked within compound command blocks.
2007-09-22 Charles Wilson <cwilso11@users.sourceforge.net>
Relocate misplaced declaration statements to precede assignments or
function calls, within their containing scopes.
* catopen.c (mc_open): Relocate `retval' declaration, at top level.
(mc_nlspath_open): Relocate `break_code' declaration within enclosing
`if' block.
* mcsource.c (mc_source): Declare `len' before `dfprintf', within
enclosing `if' block.
2007-08-17 Keith Marshall <keithmarshall@users.sourceforge.net>
Avoid a potential segmentation fault.
* mcmerge.c (mc_merge): Don't blindly inspect data fields within
the `curr' message record; `curr' may be NULL, so test it first.
2007-08-17 Keith Marshall <keithmarshall@users.sourceforge.net>
* man/gencat.man (TH): Correct section; s/MAN3EXT/MAN1EXT/
2007-08-16 Keith Marshall <keithmarshall@users.sourceforge.net>
Make `catopen' respect LC_ALL, overriding LC_MESSAGES environment
variable, as required by POSIX, when opening message catalogues in
NL_CAT_LOCALE mode.
* catopen.c (mc_nlspath_open): Use ...
(mc_nl_cat_locale_getenv): this new static function.
(NLS_LOCALE_STRING): Defunct macro; deleted.
2007-07-16 Keith Marshall <keithmarshall@users.sourceforge.net>
Add manpage sources.
* man: New directory, containing...
* man/catopen.man, man/catgets.man, man/catclose.man: New files.
* man/gencat.man: New file.
* Makefile.in (VPATH): Add `man' source directory.
(MANPAGE_SOURCES): Define; it includes all new `*.man' files, as
itemised above, for this update.
(MANSECTS, MAN1EXT, MAN2EXT, MAN3EXT): Define.
(mansect_lookup, mansect_transform, mansect, manpage): New macros;
use them to define a generic rule for generating installable manpages,
from raw manpage source, used by...
(all-man): this new documentation target.
(all-info, all-html-doc, all-pdf, all-ps): New documentation targets;
none invoke any action, at present.
(all-doc): New collective documentation target; it invokes `all-man',
`all-info', `all-htmldoc', `all-pdf' and `all-ps'.
(all): Add `all-doc' as new prerequisite.
(install-man): Add prerequisites and commands for `MANPAGE_SOURCES'.
(DISTDIRS): Add `man'.
(clean): Add `*.n', `*.a' and `*.dll' as generic prototypes for `rm'.
2007-07-16 Keith Marshall <keithmarshall@users.sourceforge.net>
* catclose.c (mc_close): Error out, if descriptor for message
catalogue to be closed lies outside the valid range.
2007-06-18 Keith Marshall <keithmarshall@users.sourceforge.net>
Handle unicode input streams.
* mcutfsig.c, include/mcutfsig.h: New files; they define the
interface and implementation for...
(mc_utf_signature): ...this new function.
* mcsource.c (mc_discard): New static function.
(mc_source): Use it to clean up heap on abnormal termination.
Include `mcutfsig.h'; use `mc_utf_signature' to identify unicode
streams; map codeset using new local variables `input_encoding'
and `input_code_size'; use them with...
(UTF_TYPE): ...this new macro, to parse input accordingly.
* include/gcmsgs.h (MSG_HAD_CODESET): New wording.
(MSG_UTF_CODESET, NMSG_UTF_UNKNOWN): New message definitions.
(MSG_UTF_SIZE_ERROR, MSG_UTF_FRAME_ERROR): Likewise.
* Makefile.in (canonical_prefix): New macro.
(HEADER_TRANSFORM_SCRIPT): Use it.
(GENCAT_HEADERS): Add `mcutfsig.h'.
(GENCAT_SOURCES): Add `mcutfsig.c'.
(target): Macro renamed as...
(tool_prefix): ...this.
(install-progs): Updated to use it.
(clean): Remove all locally generated headers.
* aclocal.m4 (MINGW_AC_HOST_CANONICAL_PREFIX): New macro.
(MSYS_AC_CANONICAL_PATH): New macro; copied from `man' sources.
* configure.ac: Use them.
(GENCAT_AC_OBJECTS_ADD): Add `mcutfsig'.
* configure: Regenerated.
2007-06-01 Keith Marshall <keithmarshall@users.sourceforge.net>
* repl/include/langinfo.h (LC_CTYPE): Include locale.h, to define.
2007-05-20 Keith Marshall <keithmarshall@users.sourceforge.net>
Handle CRLF line endings in source files.
* mcsource.c: Add numerous additional comments.
(mc_source): Add `last_char' local variable; use it to implement
one character look ahead, to suppress emission of extraneous CRs
into the compiled message text, when immediately followed by LF.
(mc_workspace_wanted, mc_update_workspace): Mark as `inline'.
(mc_add_escape): Mark as `inline'.
2007-05-17 Keith Marshall <keithmarshall@users.sourceforge.net>
* mcsource.c (mc_source): Adjust block nesting to correct logic
defect introduced in revision 1.7 (2007-05-14).
[DEBUG]: Tidy up formatting of some ugly debugging messages.
2007-05-14 Keith Marshall <keithmarshall@users.sourceforge.net>
* mcsource.c (mc_source): Close `input_fd' prior to every use
of `return', when returning abnormally.
2007-05-14 Keith Marshall <keithmarshall@users.sourceforge.net>
Support all escape sequences required by POSIX 1003.1.
* mcsource.c (OCTAL_SEQUENCE_DECODE): New manifest constant.
(HEXADECIMAL_SEQUENCE_DECODE): Ditto, but not currently used.
(mc_source): Interpret "\n", "\r", "\b", "\t", "\v" and "\f"
standard escapes, and also "\ddd" generic octal digit sequence
escapes, appearing in message text definitions; "\\" is also
implicitly handled as required.
2007-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
Add support for `delset' directive.
* mcmerge.c (mc_delset): New static function...
(mc_merge): Use it.
* include/gcmsgs.h (MSG_DEL_UNSUPPORTED): Redundant message
definition; deleted.
2007-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
Add support for single message deletion.
* mcsource.c: More comment improvements.
(mc_source): Set `this->base = NULL' on parsing a message number
immediately followed by `newline'; this causes the message to be
removed from the internal catalogue index, when the input record
is merged.
* mcmerge.c (mc_merge): Reorganise logic; add section to remove
entries with `set > 0 && msg > 0 && base == NULL'.
Relocate logic block for processing `delset' requests; still need
an implementation for this.
Add logic block to catch and diagnose invalid index entries.
* include/gcmsgs.h (MSG_CATLOAD_FAILED): Renamed symbolic define...
(MSG_BAD_CATALOGUE): ...to this.
(MSG_INTERNAL_ERROR, MSG_BAD_INDEX): New message defines; used by
`mc_merge', to diagnose invalid index entries.
* include/gencat.h (msgarg): New macro; used by `mc_merge', to
associate `MSG_BAD_INDEX' with `MSG_INTERNAL_ERROR'.
* gencat.c (main): Use `MSG_BAD_CATALOGUE'.
2007-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
* mcsource.c: Miscellaneous comment and layout improvements;
improved formatting of some debugging/tracing messages.
(add_escape): Static function renamed...
(mc_add_escape): ...to this.
(wanted): Static function renamed...
(mc_workspace_wanted): ...to this.
(update_workspace): Static function renamed...
(mc_update_workspace): ...to this.
(errout): Static function renamed...
(mc_errout): ...to this.
* include/debug.h (DCODEFMT): Redundant macro; deleted.
2007-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
Avoid attempt to read input again, after EOF detected; this caused
strange behaviour if processing an interactive input stream.
* mcsource.c (mc_source): New local variable `input_fd'; assign it as
a duplicate of `fd'. Set `fd' to -1, when EOF detected; don't do any
more reads, after `fd' set to this invalid value. Call `close' on
`input_fd', before return.
2007-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
Avoid calling `iconv' with unintialised codeset converter.
* mcsource.c (mc_default_codeset): New static function.
(mc_source): Use it, before each `iconv' call, to initialise the
codeset converters, if `codeset' has not been assigned.
2007-05-09 Keith Marshall <keithmarshall@users.sourceforge.net>
Provide more robust handling of possibly incomplete LC_MESSAGES macro
expansions, when parsing NLSPATH.
* catopen.c (mc_check_break_code): New function.
(mc_nlspath_open): Use it to identify break points, when splitting
LC_MESSAGES string into its component parts.
2007-04-20 Keith Marshall <keithmarshall@users.sourceforge.net>
* catopen.c (mc_open): Catch unopened file; return failed status.
* mcsource.c (mc_source): Kill MSGTEXT state, after NL at EOF.
2007-04-06 Keith Marshall <keithmarshall@users.sourceforge.net>
Initial import of module catgets.
* MinGW: Vendor tag.
* R0: Release tag.