This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
| 2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
| 2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
| 2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
| 2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
| 2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
| 2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
| 2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
| 2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
| 2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
| 2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(1) |
2
|
3
|
4
|
5
|
|
6
|
7
|
8
(4) |
9
(3) |
10
(1) |
11
(2) |
12
(2) |
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
From: Keith M. <kei...@us...> - 2008-01-12 18:27:38
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22879 Modified Files: ChangeLog configure configure.ac Log Message: MinGW-catgets version 1.0 released. Index: configure.ac =================================================================== RCS file: /cvsroot/mingw/catgets/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** configure.ac 8 Jan 2008 19:51:55 -0000 1.5 --- configure.ac 12 Jan 2008 18:27:34 -0000 1.6 *************** *** 16,25 **** # --------------- --------- MINGW_AC_DEFINE_PACKAGE_ID([BASENAME], [catgets]) ! MINGW_AC_DEFINE_PACKAGE_ID([VERSION_MAJOR], [0]) ! MINGW_AC_DEFINE_PACKAGE_ID([VERSION_MINOR], [1]) # # PATCHLEVEL is optional; comment/uncomment and adjust as required. # ! # MINGW_AC_DEFINE_PACKAGE_ID([PATCHLEVEL], [3]) # # DLL_VERSION is required; installed DLLs will be versioned, by --- 16,25 ---- # --------------- --------- MINGW_AC_DEFINE_PACKAGE_ID([BASENAME], [catgets]) ! MINGW_AC_DEFINE_PACKAGE_ID([VERSION_MAJOR], [1]) ! MINGW_AC_DEFINE_PACKAGE_ID([VERSION_MINOR], [0]) # # PATCHLEVEL is optional; comment/uncomment and adjust as required. # ! # MINGW_AC_DEFINE_PACKAGE_ID([PATCHLEVEL], [0]) # # DLL_VERSION is required; installed DLLs will be versioned, by Index: configure =================================================================== RCS file: /cvsroot/mingw/catgets/configure,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** configure 8 Jan 2008 19:51:55 -0000 1.5 --- configure 12 Jan 2008 18:27:34 -0000 1.6 *************** *** 1,5 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.59 for MinGW catgets 0.1. # # Report bugs to <https://sourceforge.net/tracker/?group_id=2435&atid=102435>. --- 1,5 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.59 for MinGW catgets 1.0. # # Report bugs to <https://sourceforge.net/tracker/?group_id=2435&atid=102435>. *************** *** 270,275 **** PACKAGE_NAME='MinGW catgets' PACKAGE_TARNAME='mingw-catgets' ! PACKAGE_VERSION='0.1' ! PACKAGE_STRING='MinGW catgets 0.1' PACKAGE_BUGREPORT='https://sourceforge.net/tracker/?group_id=2435&atid=102435' --- 270,275 ---- PACKAGE_NAME='MinGW catgets' PACKAGE_TARNAME='mingw-catgets' ! PACKAGE_VERSION='1.0' ! PACKAGE_STRING='MinGW catgets 1.0' PACKAGE_BUGREPORT='https://sourceforge.net/tracker/?group_id=2435&atid=102435' *************** *** 780,784 **** # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures MinGW catgets 0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... --- 780,784 ---- # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures MinGW catgets 1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... *************** *** 837,841 **** if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of MinGW catgets 0.1:";; esac cat <<\_ACEOF --- 837,841 ---- if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of MinGW catgets 1.0:";; esac cat <<\_ACEOF *************** *** 959,963 **** if $ac_init_version; then cat <<\_ACEOF ! MinGW catgets configure 0.1 generated by GNU Autoconf 2.59 --- 959,963 ---- if $ac_init_version; then cat <<\_ACEOF ! MinGW catgets configure 1.0 generated by GNU Autoconf 2.59 *************** *** 973,977 **** running configure, to aid debugging if configure makes a mistake. ! It was created by MinGW catgets $as_me 0.1, which was generated by GNU Autoconf 2.59. Invocation command line was --- 973,977 ---- running configure, to aid debugging if configure makes a mistake. ! It was created by MinGW catgets $as_me 1.0, which was generated by GNU Autoconf 2.59. Invocation command line was *************** *** 5578,5582 **** cat >&5 <<_CSEOF ! This file was extended by MinGW catgets $as_me 0.1, which was generated by GNU Autoconf 2.59. Invocation command line was --- 5578,5582 ---- cat >&5 <<_CSEOF ! This file was extended by MinGW catgets $as_me 1.0, which was generated by GNU Autoconf 2.59. Invocation command line was *************** *** 5638,5642 **** cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! MinGW catgets config.status 0.1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" --- 5638,5642 ---- cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! MinGW catgets config.status 1.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ChangeLog 12 Jan 2008 18:01:41 -0000 1.31 --- ChangeLog 12 Jan 2008 18:27:33 -0000 1.32 *************** *** 1,4 **** --- 1,15 ---- 2008-01-12 Keith Marshall <kei...@us...> + 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 <kei...@us...> + * gencat.c: Force an abort, with appropriate diagnostic, on parsing an unrecognised command line option. |
|
From: Keith M. <kei...@us...> - 2008-01-12 18:01:46
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11521 Modified Files: ChangeLog gencat.c Log Message: * gencat.c: Force an abort, with appropriate diagnostic, on parsing an unrecognised command line option. Index: gencat.c =================================================================== RCS file: /cvsroot/mingw/catgets/gencat.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gencat.c 10 Jan 2008 22:47:42 -0000 1.6 --- gencat.c 12 Jan 2008 18:01:42 -0000 1.7 *************** *** 9,13 **** * * Written by Keith Marshall <kei...@us...> ! * Last modification: 09-Jan-2008 * * --- 9,13 ---- * * Written by Keith Marshall <kei...@us...> ! * Last modification: 12-Jan-2008 * * *************** *** 176,179 **** --- 176,187 ---- banner_printf( print_top_banner + print_nl_duplicate, COPYRIGHT_NOTICE ); exit( EXIT_SUCCESS ); + + case '?': + /* + * This means the user specified an unrecognised option... + * continue parsing, to catch other possible errors, but flag it, + * so we can bail out before processing any message catalogue. + */ + gencat_errno = opt; } *************** *** 181,185 **** cat_index.id = tag; ! if( (argc -= optind) > 1 ) { /* Establish the message catalogue name, recognising `/dev/stdout' --- 189,193 ---- cat_index.id = tag; ! if( ((argc -= optind) > 1) && (gencat_errno == 0) ) { /* Establish the message catalogue name, recognising `/dev/stdout' *************** *** 382,389 **** else ! { /* User specified insufficient command line arguments. ! * Diagnose, and bail out. */ - fprintf( errmsg( MSG_MISSING_ARGS ), progname ); fprintf( errmsg( MSG_GENCAT_USAGE ), progname ); return EXIT_FAILURE; --- 390,405 ---- else ! { /* An error was detected, while parsing the command line... ! */ ! if( argc < 2 ) ! /* ! * User specified insufficient command line arguments. ! */ ! fprintf( errmsg( MSG_MISSING_ARGS ), progname ); ! ! /* In any case, (it may have been an unrecognised option, ! * which was previously diagnosed), display the usage summary, ! * and bail out. */ fprintf( errmsg( MSG_GENCAT_USAGE ), progname ); return EXIT_FAILURE; Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ChangeLog 11 Jan 2008 23:38:46 -0000 1.30 --- ChangeLog 12 Jan 2008 18:01:41 -0000 1.31 *************** *** 1,2 **** --- 1,7 ---- + 2008-01-12 Keith Marshall <kei...@us...> + + * gencat.c: Force an abort, with appropriate diagnostic, on parsing an + unrecognised command line option. + 2008-01-11 Keith Marshall <kei...@us...> |
|
From: Keith M. <kei...@us...> - 2008-01-11 23:38:53
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv799 Modified Files: ChangeLog Log Message: Make replacement `getopt' function module more GNU compatible. Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ChangeLog 10 Jan 2008 22:47:42 -0000 1.29 --- ChangeLog 11 Jan 2008 23:38:46 -0000 1.30 *************** *** 1,2 **** --- 1,10 ---- + 2008-01-11 Keith Marshall <kei...@us...> + + 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 <kei...@us...> |
|
From: Keith M. <kei...@us...> - 2008-01-11 23:38:50
|
Update of /cvsroot/mingw/catgets/repl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv799/repl Modified Files: getopt.c Log Message: Make replacement `getopt' function module more GNU compatible. Index: getopt.c =================================================================== RCS file: /cvsroot/mingw/catgets/repl/getopt.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getopt.c 8 Jan 2008 19:51:59 -0000 1.1 --- getopt.c 11 Jan 2008 23:38:46 -0000 1.2 *************** *** 10,14 **** * * Contributed by Keith Marshall <kei...@us...> ! * Last modification: 27-Dec-2007 * * THIS SOFTWARE IS NOT COPYRIGHTED --- 10,14 ---- * * Contributed by Keith Marshall <kei...@us...> ! * Last modification: 11-Jan-2008 * * THIS SOFTWARE IS NOT COPYRIGHTED *************** *** 50,54 **** /* Initialise the public variables. */ ! int optind = 0; /* index for first non-option arg */ int opterr = 1; /* enable built-in error messages */ --- 50,54 ---- /* Initialise the public variables. */ ! int optind = 1; /* index for first non-option arg */ int opterr = 1; /* enable built-in error messages */ *************** *** 307,310 **** --- 307,323 ---- static int optmark = 0; + if( (argind == 0) || (optind == 0) ) + { + /* POSIX wants `optind' to have an initial value of one, but we want + * it to be initialised to zero, when we are called for the first time, + * (as indicated by `argind' having a value of zero). We also want to + * allow the caller to reset the `getopt' parser, causing it to scan + * the arguments again, (or to scan a new set of arguments); this + * may be achieved by the caller resetting `optind' to zero. + */ + optmark = optind = argind = 0; + nextchar = NULL; + } + if( nextchar && *nextchar ) { |
|
From: Keith M. <kei...@us...> - 2008-01-10 22:47:46
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9699 Modified Files: ChangeLog gencat.c Log Message: * 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. Index: gencat.c =================================================================== RCS file: /cvsroot/mingw/catgets/gencat.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gencat.c 9 Jan 2008 22:04:08 -0000 1.5 --- gencat.c 10 Jan 2008 22:47:42 -0000 1.6 *************** *** 259,268 **** } ! /* Write out the standard message catalogue header record, ! * then seek beyond the space required for the index image, ! * to commence writing out the message data. */ ! write( mc, &cat_index, sizeof( MSGCAT ) ); ! offset = lseek( mc, offset, SEEK_CUR ); /* Compute the offset, ON DISK, for the start of the message --- 259,267 ---- } ! /* Seek forward in the temporary output file, ! * to reserve space into which we will later write the message ! * catalogue header record, and the message index. */ ! offset = lseek( mc, sizeof( MSGCAT ) + offset, SEEK_SET ); /* Compute the offset, ON DISK, for the start of the message *************** *** 310,319 **** } ! /* Rewind the catalogue, to the start of the reserved index space... */ ! lseek( mc, sizeof( MSGCAT ), SEEK_SET ); ! /* ! * Locate the start of the in-memory image of the index, once more, ! * and copy it into the generated message catalogue. */ set_index = msg_index - numsets - msgcount; --- 309,324 ---- } ! /* Store the effective data size of the catalogue into the header. */ ! cat_index.mc.extent = offset; ! ! /* Rewind, and write out the message catalogue header record, ! * at the start of the file space reserved previously. ! */ ! lseek( mc, 0L, SEEK_SET ); ! write( mc, &cat_index, sizeof( MSGCAT ) ); ! ! /* Locate the start of the in-memory image of the index, once more, ! * and copy it into the remaining reserved space in the output file. */ set_index = msg_index - numsets - msgcount; Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ChangeLog 9 Jan 2008 22:13:58 -0000 1.28 --- ChangeLog 10 Jan 2008 22:47:42 -0000 1.29 *************** *** 1,2 **** --- 1,9 ---- + 2008-01-10 Keith Marshall <kei...@us...> + + * 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 <kei...@us...> |
|
From: Keith M. <kei...@us...> - 2008-01-09 22:14:02
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26898 Modified Files: ChangeLog README Log Message: * README: Some minor wording improvements. Update copyright notice to include new year. Add additional notes regarding deployment of the pre-compiled development kit. Index: README =================================================================== RCS file: /cvsroot/mingw/catgets/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 1 Jan 2008 18:45:09 -0000 1.1 --- README 9 Jan 2008 22:13:58 -0000 1.2 *************** *** 2,9 **** $Id$ ! Copyright (C) 2007, Keith Marshall Written by Keith Marshall <kei...@us...> ! Last modification: 20-Dec-2007 This package provides a native Win32 implementation of the POSIX National --- 2,9 ---- $Id$ ! Copyright (C) 2007, 2008, Keith Marshall Written by Keith Marshall <kei...@us...> ! Last modification: 09-Jan-2008 This package provides a native Win32 implementation of the POSIX National *************** *** 16,20 **** functions, as required by the POSIX National Language Support API; this is accompanied by a suitable, standards conformant `gencat' utility program, ! which is used to generate the message catalogue files, which are bound to user applications making use of these library functions. --- 16,20 ---- functions, as required by the POSIX National Language Support API; this is accompanied by a suitable, standards conformant `gencat' utility program, ! which is used to generate the message catalogue files for deployment with user applications making use of these library functions. *************** *** 54,57 **** --- 54,70 ---- on the linking command line. + Note that this development kit is specifically intended for native use + on a Win32 platform. To deploy it, you must also have libiconv-2.dll, + installed in a directory named in your $PATH; you may build this from + the mingwPORT, as noted in the following section, `Prerequisites for + Building from Source', or you may download a precompiled version from + the `MSYS Supplementary Tools' collection, on the MinGW download page + on Sourceforge. + + If you wish to develop `catgets' dependent MinGW applications, using + a cross-compiler suite hosted on a non-Win32 platform, then you can + not use this development kit; you should install the requisite tools + as described in the later section, `Building for Cross-Hosted Use'. + 3) mingw-catgets-<version>-src.tar.gz *************** *** 221,226 **** cd cross-build ! make ! make bindist --- 234,238 ---- cd cross-build ! make && make bindist devdist Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ChangeLog 9 Jan 2008 22:04:08 -0000 1.27 --- ChangeLog 9 Jan 2008 22:13:58 -0000 1.28 *************** *** 1,4 **** --- 1,11 ---- 2008-01-09 Keith Marshall <kei...@us...> + * 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 <kei...@us...> + Retain `.exe' file name extension, if present, in program identity banner displayed by `-help' and `-version' options. |
|
From: Keith M. <kei...@us...> - 2008-01-09 22:04:12
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23224 Modified Files: ChangeLog gencat.c Log Message: Retain `.exe' file name extension, if present, in program identity banner displayed by `-help' and `-version' options. Index: gencat.c =================================================================== RCS file: /cvsroot/mingw/catgets/gencat.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gencat.c 9 Jan 2008 21:55:55 -0000 1.4 --- gencat.c 9 Jan 2008 22:04:08 -0000 1.5 *************** *** 9,13 **** * * Written by Keith Marshall <kei...@us...> ! * Last modification: 08-Jan-2008 * * --- 9,13 ---- * * Written by Keith Marshall <kei...@us...> ! * Last modification: 09-Jan-2008 * * *************** *** 150,154 **** if( (ext > 0) && (strcasecmp( *argv + ext, ".exe" ) == 0) ) *(*argv + ext) = '\0'; - progname = *argv; } else --- 150,153 ---- *************** *** 179,182 **** --- 178,182 ---- } + progname = *argv; cat_index.id = tag; Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ChangeLog 9 Jan 2008 21:55:55 -0000 1.26 --- ChangeLog 9 Jan 2008 22:04:08 -0000 1.27 *************** *** 1,4 **** --- 1,12 ---- 2008-01-09 Keith Marshall <kei...@us...> + 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 <kei...@us...> + Support `/dev/stdin' and '/dev/stdout', specified as command line arguments, as case-insensitive aliases for `-', representing the *************** *** 6,12 **** * 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". --- 14,20 ---- * 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". |
|
From: Keith M. <kei...@us...> - 2008-01-09 21:55:59
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19745 Modified Files: ChangeLog gencat.c mcsource.c Log Message: 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. Index: gencat.c =================================================================== RCS file: /cvsroot/mingw/catgets/gencat.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gencat.c 8 Jan 2008 19:51:56 -0000 1.3 --- gencat.c 9 Jan 2008 21:55:55 -0000 1.4 *************** *** 183,190 **** if( (argc -= optind) > 1 ) { /* Initialise the message list, to incorporate any messages which * are already contained within the specified message catalogue. */ ! if( (cat = mc_load( msgcat = *(argv += optind) )) == NULL ) switch( errno ) { --- 183,196 ---- if( (argc -= optind) > 1 ) { + /* Establish the message catalogue name, recognising `/dev/stdout' + * as an alias for `-', representing the standard output stream. + */ + if( strcasecmp( (msgcat = *(argv += optind)), "/dev/stdout" ) == 0 ) + msgcat = "-"; + /* Initialise the message list, to incorporate any messages which * are already contained within the specified message catalogue. */ ! if( (cat = mc_load( msgcat )) == NULL ) switch( errno ) { Index: mcsource.c =================================================================== RCS file: /cvsroot/mingw/catgets/mcsource.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mcsource.c 10 Nov 2007 14:34:45 -0000 1.12 --- mcsource.c 9 Jan 2008 21:55:55 -0000 1.13 *************** *** 4,8 **** * $Id$ * ! * Copyright (C) 2006, 2007, Keith Marshall * * This file implements the message catalogue source code parser, which is --- 4,8 ---- * $Id$ * ! * Copyright (C) 2006, 2007, 2008, Keith Marshall * * This file implements the message catalogue source code parser, which is *************** *** 10,14 **** * * Written by Keith Marshall <kei...@us...> ! * Last modification: 22-Sept-2007 * * --- 10,14 ---- * * Written by Keith Marshall <kei...@us...> ! * Last modification: 08-Jan-2008 * * *************** *** 290,294 **** */ const char *dev_stdin = "/dev/stdin"; ! if( (strcmp( input, "-") == 0) || (strcmp( input, dev_stdin ) == 0) ) { /* ... reading from standard input ... --- 290,294 ---- */ const char *dev_stdin = "/dev/stdin"; ! if( (strcmp( input, "-") == 0) || (strcasecmp( input, dev_stdin ) == 0) ) { /* ... reading from standard input ... Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ChangeLog 8 Jan 2008 19:51:53 -0000 1.25 --- ChangeLog 9 Jan 2008 21:55:55 -0000 1.26 *************** *** 1,2 **** --- 1,14 ---- + 2008-01-09 Keith Marshall <kei...@us...> + + 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 <kei...@us...> |
|
From: Keith M. <kei...@us...> - 2008-01-08 19:52:15
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26202 Modified Files: ChangeLog Makefile.in aclocal.m4 configure configure.ac gencat.c gendefs.awk Log Message: Add `-help' and `-version' options for `gencat'. Index: configure =================================================================== RCS file: /cvsroot/mingw/catgets/configure,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure 31 Dec 2007 17:09:50 -0000 1.4 --- configure 8 Jan 2008 19:51:55 -0000 1.5 *************** *** 311,315 **** #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAKE_TARGETS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S AR ac_ct_AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MAKE_DLL DLLVERSION canonical_prefix HOST_PATH_SEPARATOR REPLACEMENT_HEADERS CPP EGREP LOCAL_HEADERS GENCAT_OBJECTS INCICONV LIBICONV LIBOBJS LTLIBOBJS' ac_subst_files='' --- 311,315 ---- #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAKE_TARGETS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S AR ac_ct_AR AWK_INTERPRETER INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MAKE_DLL DLLVERSION canonical_prefix HOST_PATH_SEPARATOR REPLACEMENT_HEADERS CPP EGREP LOCAL_HEADERS GENCAT_OBJECTS INCICONV LIBICONV LIBOBJS LTLIBOBJS' ac_subst_files='' *************** *** 2399,2402 **** --- 2399,2442 ---- fi + # Extract the first word of "awk", so it can be a program name with args. + set dummy awk; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_path_AWK_INTERPRETER+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $AWK_INTERPRETER in + [\\/]* | ?:[\\/]*) + ac_cv_path_AWK_INTERPRETER="$AWK_INTERPRETER" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_AWK_INTERPRETER="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_path_AWK_INTERPRETER" && ac_cv_path_AWK_INTERPRETER="/bin/awk" + ;; + esac + fi + AWK_INTERPRETER=$ac_cv_path_AWK_INTERPRETER + + if test -n "$AWK_INTERPRETER"; then + echo "$as_me:$LINENO: result: $AWK_INTERPRETER" >&5 + echo "${ECHO_T}$AWK_INTERPRETER" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do *************** *** 4236,4242 **** # Object modules required to build the `gencat' executable. ! # We need `mkstemp', `nl_langinfo' and `basename'; if these are ! # already available in system libraries, just use the provided ! # implementations, otherwise we must supply them. # --- 4276,4282 ---- # Object modules required to build the `gencat' executable. ! # We need `mkstemp', `nl_langinfo', `getopt_long_only' and `basename'; ! # if these are already available in system libraries, just use the ! # provided implementations, otherwise we must supply them. # *************** *** 4449,4452 **** --- 4489,4598 ---- + for ac_func in getopt_long_only + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 + if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ + #define $ac_func innocuous_$ac_func + + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + + #ifdef __STDC__ + # include <limits.h> + #else + # include <assert.h> + #endif + + #undef $ac_func + + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else + char (*f) () = $ac_func; + #endif + #ifdef __cplusplus + } + #endif + + int + main () + { + return f != $ac_func; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + + else + LOCAL_HEADERS="getopt.h ${LOCAL_HEADERS}" + + GENCAT_OBJECTS=${GENCAT_OBJECTS}' getopt.$(OBJEXT)' + fi + done + + for ac_func in basename do *************** *** 5692,5695 **** --- 5838,5842 ---- s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t + s,@AWK_INTERPRETER@,$AWK_INTERPRETER,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ChangeLog 1 Jan 2008 18:45:08 -0000 1.24 --- ChangeLog 8 Jan 2008 19:51:53 -0000 1.25 *************** *** 1,2 **** --- 1,57 ---- + 2008-01-08 Keith Marshall <kei...@us...> + + 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 <kei...@us...> Index: Makefile.in =================================================================== RCS file: /cvsroot/mingw/catgets/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.in 1 Jan 2008 18:45:09 -0000 1.6 --- Makefile.in 8 Jan 2008 19:51:53 -0000 1.7 *************** *** 95,99 **** OTHER_SOURCES = $(DISTDOC_SOURCES) mkinstalldirs install-sh $(MISC_SOURCES) ! MISC_SOURCES = $(CONFIG_HEADERS) $(CONFIG_SOURCES) $(DEV_SCRIPTS) DISTDOC_SOURCES = ChangeLog COPYING FDL README --- 95,99 ---- OTHER_SOURCES = $(DISTDOC_SOURCES) mkinstalldirs install-sh $(MISC_SOURCES) ! MISC_SOURCES = $(CONFIG_HEADERS) $(CONFIG_SOURCES) $(DISTDEV_SCRIPTS) DISTDOC_SOURCES = ChangeLog COPYING FDL README *************** *** 134,138 **** DLLVERSION = @DLLVERSION@ ! DEV_SCRIPTS = gendefs.awk # Generic rule, replacing the built-in default, to create an object file --- 134,144 ---- DLLVERSION = @DLLVERSION@ ! DISTDEV_SCRIPTS = gendefs.awk ! ! # DISTDEV_SCRIPTS may not be directly runnable... ! # EXECDEV_SCRIPTS derives from them, creating variants with appropriate ! # shebang entries, making them directly executable from a command line. ! # ! EXECDEV_SCRIPTS = gendefs # Generic rule, replacing the built-in default, to create an object file *************** *** 159,164 **** $(LN_S) $< $@ all-dll = @MAKE_DLL@ ! all-targets = @MAKE_TARGETS@ all: $(all-targets) --- 165,177 ---- $(LN_S) $< $@ + # Generic rule to make a runnable (shebanged) script, + # from a non-runnable awk program script. + # + %: %.awk + sed '1s,!.*,! @AWK_INTERPRETER@ -f,' $< > $@ + chmod 755 $@ + all-dll = @MAKE_DLL@ ! all-targets = $(EXECDEV_SCRIPTS) @MAKE_TARGETS@ all: $(all-targets) *************** *** 228,232 **** done ! install-scripts: $(DEV_SCRIPTS) $(mkinstalldirs) --require ${prefix} ${scriptdir} for script in $^; do \ --- 241,245 ---- done ! install-scripts: $(EXECDEV_SCRIPTS) $(mkinstalldirs) --require ${prefix} ${scriptdir} for script in $^; do \ Index: configure.ac =================================================================== RCS file: /cvsroot/mingw/catgets/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure.ac 31 Dec 2007 17:09:50 -0000 1.4 --- configure.ac 8 Jan 2008 19:51:55 -0000 1.5 *************** *** 4,8 **** # $Id$ # ! # Copyright (C) 2006, 2007, MinGW Project # Written by Keith Marshall <kei...@us...> # --- 4,8 ---- # $Id$ # ! # Copyright (C) 2006, 2007, 2008, MinGW Project # Written by Keith Marshall <kei...@us...> # *************** *** 63,66 **** --- 63,67 ---- AC_PROG_LN_S AC_CHECK_TOOL([AR], [ar], [ar]) + AC_PATH_PROG([AWK_INTERPRETER], [awk], [/bin/awk]) AC_PROG_INSTALL *************** *** 103,112 **** # Object modules required to build the `gencat' executable. ! # We need `mkstemp', `nl_langinfo' and `basename'; if these are ! # already available in system libraries, just use the provided ! # implementations, otherwise we must supply them. # GENCAT_AC_FUNC_MKSTEMP GENCAT_AC_FUNC_NL_LANGINFO GENCAT_AC_FUNC_BASENAME # --- 104,114 ---- # Object modules required to build the `gencat' executable. ! # We need `mkstemp', `nl_langinfo', `getopt_long_only' and `basename'; ! # if these are already available in system libraries, just use the ! # provided implementations, otherwise we must supply them. # GENCAT_AC_FUNC_MKSTEMP GENCAT_AC_FUNC_NL_LANGINFO + GENCAT_AC_FUNC_GETOPT_LONG_ONLY GENCAT_AC_FUNC_BASENAME # Index: gendefs.awk =================================================================== RCS file: /cvsroot/mingw/catgets/gendefs.awk,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gendefs.awk 6 Apr 2007 22:34:55 -0000 1.1.1.1 --- gendefs.awk 8 Jan 2008 19:51:57 -0000 1.2 *************** *** 30,38 **** # # <message text> is the fallback text defined for the message; it ! # must all on the same line as the `#define' token. # # # Written by Keith Marshall <kei...@us...> ! # Last modification: 05-Mar-2007 # # --- 30,46 ---- # # <message text> is the fallback text defined for the message; it ! # must all appear on the same line as the `#define' ! # token, or that line must terminate with a reverse ! # solidus, so escaping the newline, to indicate that ! # the following line is to be subsumed as a logical ! # continuation of the `#define' line; continuation, ! # in this manner, may be extended over any number ! # of consecutive input lines, by similarly escaping ! # the terminal newline on all but the last physical ! # input line of any such single logical line. # # # Written by Keith Marshall <kei...@us...> ! # Last modification: 02-Jan-2008 # # *************** *** 54,58 **** # Establish the default convention for identifying message definitions. # ! BEGIN { MSGTAG = "MSG_[A-Z_a-z0-9]+" } # # Allow the user to substitute an alternative identification convention, --- 62,88 ---- # Establish the default convention for identifying message definitions. # ! BEGIN { MSGTAG = "MSG_[A-Z_a-z0-9]+"; MULTILINE = 0 } ! # ! # If we enabled MULTILINE mode, on the preceding input line, then we treat ! # the current input line as a logical continuation of the preceding line. ! # We must handle this case *before* any other condition, because such line ! # continuation overrides any other line type identification checks. ! # ! MULTILINE == 1 { ! # ! # If this continuation line is not itself continued, ! # then we turn off MULTILINE, effective from the *next* input line. ! # ! if( $0 !~ /\\$/ ) MULTILINE = 0; ! # ! # We then emit the continuation line, and immediately proceed to ! # the next input line. ! # ! print ! next ! } ! # ! # If we are *not* in MULTILINE mode, then we proceed to the normal input ! # line interpretation strategy... # # Allow the user to substitute an alternative identification convention, *************** *** 78,81 **** --- 108,117 ---- $1$2 == "#define" && match( $3, MSGTAG ) == 1 && RLENGTH == length( $3 ){ # + # Only lines, such as this, which begin with a `#define' token, are permitted + # to initiate MULTILINE continuation mode; when such a line is terminated by + # a reverse solidus escaped newline, then initiate MULTILINE mode. + # + if( $0 ~ /\\$/ ) MULTILINE = 1 + # # Extract the set number from the message definition; # if it differs from that of the set identified by CURSET, *************** *** 107,109 **** } # ! # $RCSfile$Revision: end of file --- 143,145 ---- } # ! # $RCSfile$Revision$: end of file Index: aclocal.m4 =================================================================== RCS file: /cvsroot/mingw/catgets/aclocal.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** aclocal.m4 31 Dec 2007 17:09:50 -0000 1.3 --- aclocal.m4 8 Jan 2008 19:51:54 -0000 1.4 *************** *** 1,4 **** --- 1,15 ---- # aclocal.m4 -*- Autoconf -*- vim: filetype=config # + # $Id$ + # + # Copyright (C) 2006, 2007, 2008, MinGW Project + # Written by Keith Marshall <kei...@us...> + # + # This is aclocal.m4 for the MinGW `catgets' package. + # + # This is free software; it is provided `as is', in the hope that it may + # be useful, but WITHOUT WARRANTY OF ANY KIND, not even an implied warranty + # of MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. + # m4_include([m4/pkgid.m4]) m4_include([m4/iconv.m4]) *************** *** 209,212 **** --- 220,228 ---- ])# CATGETS_AC_CONFIG_TARGET + # GENCAT_AC_OBJECTS_INIT + # ---------------------- + # Initialise the list of object files to be compiled, + # as prerequisites for building the `gencat' executable. + # AC_DEFUN([GENCAT_AC_OBJECTS_INIT], [GENCAT_OBJECTS=${GENCAT_OBJECTS-'gencat.$(OBJEXT)'} *************** *** 214,217 **** --- 230,238 ---- ])# GENCAT_AC_OBJECTS_INIT + # GENCAT_AC_OBJECTS_ADD( OBJECT_FILE_NAME ) + # ----------------------------------------- + # Add OBJECT_FILE_NAME to the list of object files to be compiled, + # as prerequisites for building the `gencat' executable. + # AC_DEFUN([GENCAT_AC_OBJECTS_ADD], [AC_REQUIRE([GENCAT_AC_OBJECTS_INIT])dnl *************** *** 219,222 **** --- 240,250 ---- ])# GENCAT_AC_OBJECTS_ADD + # GENCAT_AC_FUNC_BASENAME + # ----------------------- + # Check if the standard C library provides the `basename' function; + # if not, add `basename.$(OBJEXT)' to the list of prerequisite objects + # to be compiled, to ensure that a replacement is made available from + # package local sources. + # AC_DEFUN([GENCAT_AC_FUNC_BASENAME], [AC_REQUIRE([GENCAT_AC_OBJECTS_INIT])dnl *************** *** 224,227 **** --- 252,262 ---- ])# GENCAT_AC_FUNC_BASENAME + # GENCAT_AC_FUNC_MKSTEMP + # ---------------------- + # Check if the standard C library provides the `mkstemp' function; + # if not, add `mkstemp.$(OBJEXT)' to the list of prerequisite objects + # to be compiled, to ensure that a replacement is made available from + # package local sources. + # AC_DEFUN([GENCAT_AC_FUNC_MKSTEMP], [AC_REQUIRE([GENCAT_AC_OBJECTS_INIT])dnl *************** *** 229,232 **** --- 264,299 ---- ])# GENCAT_AC_FUNC_MKSTEMP + # GENCAT_AC_FUNC_GETOPT_LONG_ONLY + # ------------------------------- + # Check if the standard C library provides the `getopt_long_only' + # function; if not, add `getopt.$(OBJEXT)' to the list of prerequisite + # objects to be compiled, to ensure that a replacement is made available + # from package local sources. + # + AC_DEFUN([GENCAT_AC_FUNC_GETOPT_LONG_ONLY], + [AC_REQUIRE([GENCAT_AC_OBJECTS_INIT])dnl + AC_CHECK_FUNCS([getopt_long_only],[],GENCAT_AC_OBJECTS_ADD_GETOPT)dnl + ])# GENCAT_AC_FUNC_GETOPT_LONG_ONLY + + # GENCAT_AC_OBJECTS_ADD_GETOPT + # ---------------------------- + # Helper macro invoked by GENCAT_AC_FUNC_GETOPT_LONG_ONLY, + # to add `getopt.$(OBJECT)' to the list of prerequisite objects + # to be compiled; it also ensures that a compatible version of + # `getopt.h' is used, by adding a compatible package local + # version to the LOCAL_HEADERS list. + # + AC_DEFUN([GENCAT_AC_OBJECTS_ADD_GETOPT], + [AC_SUBST([LOCAL_HEADERS],["getopt.h ${LOCAL_HEADERS}"]) + GENCAT_AC_OBJECTS_ADD([getopt])dnl + ])# GENCAT_AC_OBJECTS_ADD_GETOPT + + # GENCAT_AC_FUNC_LANGINFO + # ----------------------- + # Check if the standard C library provides the `nl_langinfo' function; + # if not, add `langinfo.$(OBJEXT)' to the list of prerequisite objects + # to be compiled, to ensure that a replacement is made available from + # package local sources. + # AC_DEFUN([GENCAT_AC_FUNC_NL_LANGINFO], [AC_REQUIRE([GENCAT_AC_OBJECTS_INIT])dnl *************** *** 234,237 **** --- 301,309 ---- ])# GENCAT_AC_FUNC_NL_LANGINFO + # CATGETS_AC_CONFIG_VERSION + # ------------------------- + # Propagate the `catgets' version number into object code, + # via manifest definitions in `config.h'. + # AC_DEFUN([CATGETS_AC_CONFIG_VERSION], [CATGETS_AC_CONFIG_VERSION_DEFINE([CATGETS_VERSION_MAJOR],[major],[2])dnl *************** *** 239,242 **** --- 311,320 ---- ])# CATGETS_AC_CONFIG_VERSION + # CATGETS_AC_CONFIG_VERSION_DEFINE + # -------------------------------- + # Helper macro invoked by CATGETS_AC_CONFIG_VERSION, + # to place manifest definitions of the `catgets' major and minor + # version numbers into `config.h'. + # AC_DEFUN([CATGETS_AC_CONFIG_VERSION_DEFINE], [AC_DEFINE_UNQUOTED([$1],[`IFS=.;set x $PACKAGE_VERSION;echo ${$3}`], Index: gencat.c =================================================================== RCS file: /cvsroot/mingw/catgets/gencat.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gencat.c 12 May 2007 16:54:35 -0000 1.2 --- gencat.c 8 Jan 2008 19:51:56 -0000 1.3 *************** *** 4,13 **** * $Id$ * ! * Copyright (C) 2006, 2007, Keith Marshall * * This file implements the `main' function for the `gencat' program. * * Written by Keith Marshall <kei...@us...> ! * Last modification: 12-May-2007 * * --- 4,13 ---- * $Id$ * ! * Copyright (C) 2006, 2007, 2008, Keith Marshall * * This file implements the `main' function for the `gencat' program. * * Written by Keith Marshall <kei...@us...> ! * Last modification: 08-Jan-2008 * * *************** *** 27,30 **** --- 27,38 ---- * */ + #define PROGRAM_IDENTITY progname, PACKAGE_VERSION + + #define AUTHOR_IDENTITY "Keith Marshall" + #define AUTHOR_ATTRIBUTION AUTHOR_IDENTITY" for the MinGW Project" + + #define COPYRIGHT_YEARS "2006, 2007, 2008" + #define COPYRIGHT_HOLDER COPYRIGHT_YEARS, AUTHOR_IDENTITY + #define COPYRIGHT_NOTICE MSG_COPYRIGHT_NOTICE, COPYRIGHT_HOLDER #ifdef HAVE_CONFIG_H *************** *** 35,42 **** --- 43,52 ---- #include <stdio.h> #include <stdlib.h> + #include <stdarg.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> + #include <getopt.h> #include <libgen.h> #include <errno.h> *************** *** 55,64 **** nl_catd gencat_messages; int main( int argc, char **argv ) { char *msgcat; char *outfile = NULL; ! int mc, numsets, setnum, msgcount; off_t offset, msg_index_offset; --- 65,122 ---- nl_catd gencat_messages; + /* Option control flags, for printing of program identification banners, + * as required for `help', `version' and copyright notifications. + */ + #define print_top_banner 0x08 + #define print_nl_duplicate 0x04 + + /* Standard arguments, to include in a program identification banner. + */ + #define top_banner_text PROGRAM_IDENTITY, AUTHOR_ATTRIBUTION + + static + void banner_printf( int opts, int set, int msg, const char *fmt, ... ) + { + /* A helper function, for printing banner notifications. + */ + va_list args; + const char *nl_fmt = catgets( gencat_messages, set, msg, NULL ); + + if( opts & print_top_banner ) + printf( catgets( gencat_messages, MSG_PROGRAM_BANNER ), top_banner_text ); + + va_start( args, fmt ); + if( (nl_fmt == NULL) || ((opts & print_nl_duplicate) != 0) ) + /* + * A national language translation has been provided, but the + * English version must also be displayed, or there is no available + * translation, so we just print the English text anyway. + */ + vprintf( fmt, args ); + + if( nl_fmt != NULL ) + /* + * When we found a national language translation, we print it. + */ + vprintf( nl_fmt, args ); + va_end( args ); + } + int main( int argc, char **argv ) { + struct option options[] = + { + /* The options understood by this version of `gencat'; + * all are long form, to be evaluated by getopt_long_only(). + */ + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'v' }, + { NULL, 0, NULL, 0 } + }; + char *msgcat; char *outfile = NULL; ! int opt, mc, numsets, setnum, msgcount; off_t offset, msg_index_offset; *************** *** 84,95 **** gencat_messages = catopen( "gencat", NL_CAT_LOCALE ); cat_index.id = tag; ! if( --argc > 1 ) { /* Initialise the message list, to incorporate any messages which * are already contained within the specified message catalogue. */ ! if( (cat = mc_load( msgcat = *++argv )) == NULL ) switch( errno ) { --- 142,190 ---- gencat_messages = catopen( "gencat", NL_CAT_LOCALE ); + if( (*argv = strdup( progname )) != NULL ) + { + /* Set up the form of the program name to display in diagnostics; + * exclude the path component, and discard any `.exe' suffix. + */ + int ext = strlen( *argv ) - 4; + if( (ext > 0) && (strcasecmp( *argv + ext, ".exe" ) == 0) ) + *(*argv + ext) = '\0'; + progname = *argv; + } + else + /* Something went wrong... + * retain the basename from the original program path name, + * as the effective program name. + */ + *argv = progname; + + /* Evaluate any options, specified on the command line. + */ + while( (opt = getopt_long_only( argc, argv, "vh", options, NULL )) != -1 ) + switch( opt ) + { + case 'h': + /* + * This is a request to display a help message. + */ + banner_printf( print_top_banner, MSG_GENCAT_SYNOPSIS, *argv ); + exit( EXIT_SUCCESS ); + + case 'v': + /* + * And this is for display of version and copyright info. + */ + banner_printf( print_top_banner + print_nl_duplicate, COPYRIGHT_NOTICE ); + exit( EXIT_SUCCESS ); + } + cat_index.id = tag; ! if( (argc -= optind) > 1 ) { /* Initialise the message list, to incorporate any messages which * are already contained within the specified message catalogue. */ ! if( (cat = mc_load( msgcat = *(argv += optind) )) == NULL ) switch( errno ) { *************** *** 111,120 **** --- 206,222 ---- cat = mc_merge( cat, mc_source( *++argv )); + /* Walk the resultant in-memory linked message list, counting... + */ msgcount = numsets = setnum = 0; for( curr = cat; curr != NULL; curr = curr->link ) { + /* the number of individual messages defined... + */ ++msgcount; if( curr->set > setnum ) { + /* and the number of distinct message sets, + * to which they are allocated. + */ ++numsets; setnum = curr->set; *************** *** 122,131 **** --- 224,242 ---- } dfprintf(( stderr, "%u messages in %u sets\n", msgcount, numsets )); + + /* Compute the required image size for the message catalogue index, + * and allocate memory in which to construct it... + */ offset = ( numsets + msgcount ) * sizeof( struct key ); if( (set_index = mc_malloc( offset )) == NULL ) { + /* bailing out, if insufficient memory. + */ fprintf( errmsg( MSG_OUT_OF_MEMORY ), progname ); return( EXIT_FAILURE ); } + /* Locate the start of the message index entries, + * within the composite set and message index image. + */ msg_index = set_index + numsets; *************** *** 142,174 **** } write( mc, &cat_index, sizeof( MSGCAT ) ); offset = lseek( mc, offset, SEEK_CUR ); ! setnum = 0; msg_index_offset = sizeof( MSGCAT ) + numsets * sizeof( struct key ); for( curr = cat; curr != NULL; curr = curr->link ) { if( curr->set > setnum ) { set_index->setnum = setnum = curr->set; (set_index++)->offset = msg_index_offset; } msg_index_offset += sizeof( struct key ); msg_index->msgnum = curr->msg; (msg_index++)->offset = offset; ! offset += write( mc, curr->base + curr->loc, curr->len ); } ! set_index = msg_index - numsets - msgcount; lseek( mc, sizeof( MSGCAT ), SEEK_SET ); write( mc, set_index, (numsets + msgcount) * sizeof( struct key ) ); if( gencat_errno == 0 ) { if( outfile == NULL ) outfile = msgcat; if( strcmp( outfile, "-" ) == 0 ) { int count; char buf[ BUFSIZ ]; --- 253,339 ---- } + /* Write out the standard message catalogue header record, + * then seek beyond the space required for the index image, + * to commence writing out the message data. + */ write( mc, &cat_index, sizeof( MSGCAT ) ); offset = lseek( mc, offset, SEEK_CUR ); ! ! /* Compute the offset, ON DISK, for the start of the message ! * index, within the composite set and message index image, in ! * terms of its physical byte count from start of file. ! */ msg_index_offset = sizeof( MSGCAT ) + numsets * sizeof( struct key ); + + /* Forcing a set number transition into the first message set... + */ + setnum = 0; + /* + * Walk the in-memory linked message list again... + */ for( curr = cat; curr != NULL; curr = curr->link ) { + /* adding a new set index entry, on each set number transition... + */ if( curr->set > setnum ) { + /* incorporating the applicable set number, + * and the ON-DISK byte offset for the index entry + * associated with its first included message. + */ set_index->setnum = setnum = curr->set; (set_index++)->offset = msg_index_offset; } + /* Adjust the cumulative computed value of the ON-DISK + * message index offset, to account for each message traversed... + */ msg_index_offset += sizeof( struct key ); + /* + * while incorporating the appropriate message number, + * and message data offset, into the in-memory image of + * the message index. + */ msg_index->msgnum = curr->msg; (msg_index++)->offset = offset; ! /* ! * and write out the message data, to the catalogue file, ! * updating `offset' to track where the data for the NEXT message, ! * if any, is to be written. ! */ offset += write( mc, curr->base + curr->loc, curr->len ); } ! /* Rewind the catalogue, to the start of the reserved index space... ! */ lseek( mc, sizeof( MSGCAT ), SEEK_SET ); + /* + * Locate the start of the in-memory image of the index, once more, + * and copy it into the generated message catalogue. + */ + set_index = msg_index - numsets - msgcount; write( mc, set_index, (numsets + msgcount) * sizeof( struct key ) ); + /* Check message catalogue generation status... + */ if( gencat_errno == 0 ) { + /* Completed without error... + */ if( outfile == NULL ) + /* + * Always true, at present... + * (this is here to accommodate a possible future implementation + * of an `--output-file=NAME' option, to facilitate including an + * existing message catalogue into a new, and differently named, + * derivative message catalogue). + */ outfile = msgcat; if( strcmp( outfile, "-" ) == 0 ) { + /* This is emitting the message catalogue content to the standard + * output stream; rewind the temporary catalogue file, read back, + * and then rewrite its content to the stdout stream. + */ int count; char buf[ BUFSIZ ]; *************** *** 176,179 **** --- 341,347 ---- while( (count = read( mc, buf, BUFSIZ )) > 0 ) write( STDOUT_FILENO, buf, count ); + + /* When done, close and delete the temporary file. + */ close( mc ); remove( tmpcat ); *************** *** 181,184 **** --- 349,357 ---- else { + /* This is saving the message catalogue as a permanent disk file, + * overwriting any previously existing version; this is achieved by + * simply renaming the temporary file, and setting its attributes + * appropriately. + */ close( mc ); rename( tmpcat, outfile ); *************** *** 187,199 **** } else ! { close( mc ); remove( tmpcat ); } } else ! { ! /* User specified insufficient command line arguments. * Diagnose, and bail out. */ --- 360,375 ---- } else ! { /* An error occurred... ! * The temporary file is likely to be corrupt, ! * so simply discard it, and report failure. ! */ close( mc ); remove( tmpcat ); + return EXIT_FAILURE; } } else ! { /* User specified insufficient command line arguments. * Diagnose, and bail out. */ *************** *** 202,205 **** --- 378,383 ---- return EXIT_FAILURE; } + /* On successful completion, report it. + */ return EXIT_SUCCESS; } |
|
From: Keith M. <kei...@us...> - 2008-01-08 19:52:05
|
Update of /cvsroot/mingw/catgets/include In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26202/include Modified Files: gcmsgs.h Log Message: Add `-help' and `-version' options for `gencat'. Index: gcmsgs.h =================================================================== RCS file: /cvsroot/mingw/catgets/include/gcmsgs.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gcmsgs.h 18 Jun 2007 22:36:08 -0000 1.4 --- gcmsgs.h 8 Jan 2008 19:51:58 -0000 1.5 *************** *** 8,12 **** * !$ * !$ $Id$ ! * !$ Copyright (C) 2006, 2007, MinGW Project * !$ Written by Keith Marshall <kei...@us...> * !$ --- 8,12 ---- * !$ * !$ $Id$ ! * !$ Copyright (C) 2006, 2007, 2008, MinGW Project * !$ Written by Keith Marshall <kei...@us...> * !$ *************** *** 36,61 **** * !$quote " * ! */ ! #define MSG_MISSING_ARGS 1, 1, "%s: incorrect number of arguments\n" ! #define MSG_GENCAT_USAGE 1, 2, "usage: %s catalogue-name input-file ...\n" ! #define MSG_OUTPUT_NOFILE 1, 3, "%s: %s: cannot create temporary output file\n" ! #define MSG_OUT_OF_MEMORY 1, 4, "%s: out of memory\n" ! #define MSG_INTERNAL_ERROR 1, 5, "%s: internal error: %s\n" ! #define MSG_BAD_CATALOGUE 2, 1, "%s: %s: file is not a valid message catalogue\n" ! #define MSG_UNKNOWN_CODESET 2, 2, "%s: %s: unknown codeset descriptor\n" ! #define MSG_CODESET_CLASH 2, 3, "%s:%u: codeset `%s' conflicts with prior declaration\n" ! #define MSG_HAD_CODESET 2, 4, "%s:%u: codeset `%s' previously declared here\n" ! #define MSG_SETNUM_NOT_INCR 2, 5, "invalid set number: expecting > %d; got %d\n" ! #define MSG_MSGNUM_NOT_INCR 2, 6, "invalid message number: expecting > %d; got %d\n" ! #define MSG_REDEFINED 2, 7, "%s: %s:%u: redefinition of message %u in set %u\n" ! #define MSG_PREVIOUS_HERE 2, 8, "%s: %s:%u: previous definition was here\n" ! #define MSG_EOF_IN_QUOTES 3, 2, "%s:%u: unexpected EOF encountered before closing quote\n" ! #define MSG_TEXT_DISCARDED 3, 3, "%s:%u: incomplete message marked for deletion\n" ! #define MSG_MISSING_NEWLINE 3, 4, "%s:%u: missing newline at end of file\n" ! #define MSG_BAD_INDEX 3, 5, "invalid reference in message index" ! #define MSG_UTF_UNKNOWN 4, 1, "%s:unrecognisable encoding format\n" ! #define MSG_UTF_SIZE_ERROR 4, 2, "%s:invalid byte count per code point; value was %d\n" ! #define MSG_UTF_FRAME_ERROR 4, 3, "%s:%u:UTF-%u%cE input framing error\n" ! #define MSG_UTF_CODESET 4, 4, "%s:input codeset identified as %s; conflicts with ...\n" /* ! * !$ end of file --- 36,145 ---- * !$quote " * ! + * !$ When translating these message definitions, please take care + * !$ to preserve the number and order of `printf' format tags; (i.e. + * !$ tags of the form `%c', where `c' is any alphabetic character). + * !$ Also please note the usage of `\n' to insert a line break into + * !$ any message definition, and the use of a `\` following the + * !$ closing quote, on all but the last line of a multiline message + * !$ definition; there must be no white space between the quote and + * !$ the following `\', nor following the `\' itself. + * ! + * ! + * !$ Message set #1 is reserved for the program banner, which is + * !$ displayed when either the `-help' or the `-version' option is + * !$ invoked; it is discretional whether a translation of this, in + * !$ the national language, is provided. If not, then set #1 may be + * !$ excluded from the message catalogue, or the banner template + * !$ may be left untranslated, in which case the banner will be + * !$ displayed in its original English language form. + * ! */ ! #define MSG_PROGRAM_BANNER 1, 1, \ ! "%s (MinGW catgets SubSystem for MS-Windows), Version %s\n"\ ! "Written by %s\n" ! /* ! * ! ! * !$ Messages in set #2 are reserved for use by the `-version' option, ! * !$ and are displayed *both* in English *and* in the national language. ! * !$ While it is not normally necessary to provide an English language ! * !$ message catalogue, if one is provided, it should *exclude* all of ! * !$ the messages defined in set #2, to avoid displaying identical ! * !$ copies of these messages twice. ! * ! ! */ ! #define MSG_COPYRIGHT_NOTICE 2, 3, "\nCopyright (C) %s, %s.\n"\ ! "This is free software; see the source for copying conditions. There is NO\n"\ ! "WARRANTY OF ANY KIND, not even an IMPLIED WARRANTY OF MERCHANTABILITY, nor\n"\ ! "of FITNESS FOR ANY PARTICULAR PURPOSE.\n" ! /* ! * ! ! * !$ Set #3 is reserved for the synopsis displayed by the `-help' option; ! * !$ in general, a national language version of this should be provided. ! * ! ! */ ! #define MSG_GENCAT_SYNOPSIS 3, 2, \ ! "\nUsage: %s catalogue-name input-file ...\n"\ ! "\nDescription\n"\ ! " Generate, or update, the national language message catalogue specified\n"\ ! " by `catalogue-name', (which is a binary file, in the format required by\n"\ ! " the MinGW implementation of the POSIX `catgets' facility), reading the\n"\ ! " message definitions from each specified `input-file' in turn.\n"\ ! "\nOptions\n"\ ! " In normal use, there are no options. However, for compatibility with\n"\ ! " GNU standard utilities, the following are accepted:--\n\n"\ ! " -help, --help\n"\ ! " Display this program synopsis, and exit.\n\n"\ ! " -version, --version\n"\ ! " Display program identification, and copyright notice,\n"\ ! " then exit.\n\n" ! /* ! * ! ! * !$ Set #4 specifies messages relating to `gencat' program invocation, ! * !$ or to runtime problems; they should always be translated to the ! * !$ applicable national language. ! * ! ! */ ! #define MSG_MISSING_ARGS 4, 1, "%s: incorrect number of arguments\n" ! #define MSG_GENCAT_USAGE 4, 2, "usage: %s catalogue-name input-file ...\n" ! #define MSG_OUTPUT_NOFILE 4, 3, "%s: %s: cannot create temporary output file\n" ! #define MSG_OUT_OF_MEMORY 4, 4, "%s: out of memory\n" ! #define MSG_INTERNAL_ERROR 4, 5, "%s: internal error: %s\n" ! /* ! * ! ! * !$ Set #5 defines messages relating to problems in interpretation of ! * !$ the content, or format, of the input files, or any pre-existing ! * !$ version of the message catalogue which is being updated; national ! * !$ language translations should be provided. ! * ! ! */ ! #define MSG_BAD_CATALOGUE 5, 1, "%s: %s: file is not a valid message catalogue\n" ! #define MSG_UNKNOWN_CODESET 5, 2, "%s: %s: unknown codeset descriptor\n" ! #define MSG_CODESET_CLASH 5, 3, "%s:%u: codeset `%s' conflicts with prior declaration\n" ! #define MSG_HAD_CODESET 5, 4, "%s:%u: codeset `%s' previously declared here\n" ! #define MSG_SETNUM_NOT_INCR 5, 5, "invalid set number: expecting > %d; got %d\n" ! #define MSG_MSGNUM_NOT_INCR 5, 6, "invalid message number: expecting > %d; got %d\n" ! #define MSG_REDEFINED 5, 7, "%s: %s:%u: redefinition of message %u in set %u\n" ! #define MSG_PREVIOUS_HERE 5, 8, "%s: %s:%u: previous definition was here\n" ! /* ! * ! ! * !$ Set #6 defines messages relating to abnormal conditions occuring ! * !$ when the end of an input file is encountered; again, national ! * !$ language translations should be provided. ! * ! ! */ ! #define MSG_EOF_IN_QUOTES 6, 2, "%s:%u: unexpected EOF encountered before closing quote\n" ! #define MSG_TEXT_DISCARDED 6, 3, "%s:%u: incomplete message marked for deletion\n" ! #define MSG_MISSING_NEWLINE 6, 4, "%s:%u: missing newline at end of file\n" ! #define MSG_BAD_INDEX 6, 5, "invalid reference in message index" ! /* ! * ! ! * !$ Set #7 defines messages relating to malformed Unicode input streams; ! * !$ once again, national language translations should be provided. ! * ! ! */ ! #define MSG_UTF_UNKNOWN 7, 1, "%s:unrecognisable encoding format\n" ! #define MSG_UTF_SIZE_ERROR 7, 2, "%s:invalid byte count per code point; value was %d\n" ! #define MSG_UTF_FRAME_ERROR 7, 3, "%s:%u:UTF-%u%cE input framing error\n" ! #define MSG_UTF_CODESET 7, 4, "%s:input codeset identified as %s; conflicts with ...\n" /* ! * !$ end of file |
|
From: Keith M. <kei...@us...> - 2008-01-08 19:52:04
|
Update of /cvsroot/mingw/catgets/repl/include In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26202/repl/include Added Files: getopt.h Log Message: Add `-help' and `-version' options for `gencat'. --- NEW FILE: getopt.h --- #ifndef __GETOPT_H__ /* * getopt.h * * $Id: getopt.h,v 1.1 2008/01/08 19:51:59 keithmarshall Exp $ * * Defines constants and function prototypes required to implement * the `getopt', `getopt_long' and `getopt_long_only' APIs. * * This file is part of the MinGW32 package set. * * Contributed by Keith Marshall <kei...@us...> * Last modification: 04-Jan-2008 * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * $Revision: 1.1 $ * $Author: keithmarshall $ * $Date: 2008/01/08 19:51:59 $ * */ #define __GETOPT_H__ /* All the headers include this file. */ #include <_mingw.h> #ifdef __cplusplus extern "C" { #endif extern int optind; /* index of first non-option in argv */ extern int optopt; /* single option character, as parsed */ extern int opterr; /* flag to enable built-in diagnostics... */ /* (user may set to zero, to suppress) */ extern char *optarg; /* pointer to argument of current option */ extern int getopt( int, char * const [], const char * ); #ifdef __cplusplus } #endif /* * POSIX requires the `getopt' API to be specified in `unistd.h'; * thus, `unistd.h' includes this header. However, we do not want * to expose the `getopt_long' or `getopt_long_only' APIs, when * included in this manner. Thus, close the standard __GETOPT_H__ * declarations block, and open an additional __GETOPT_LONG_H__ * specific block, only when *not* __UNISTD_H_SOURCED__, in which * to declare the extended API. */ #endif /* !defined(__GETOPT_H__) */ #if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) #define __GETOPT_LONG_H__ #ifdef __cplusplus extern "C" { #endif struct option /* specification for a long form option... */ { const char *name; /* option name, without leading hyphens */ int has_arg; /* does it take an argument? */ int *flag; /* where to save its status, or NULL */ int val; /* its associated status value */ }; enum /* permitted values for its `has_arg' field... */ { no_argument = 0, /* option never takes an argument */ required_argument, /* option always requires an argument */ optional_argument /* option may take an argument */ }; extern int getopt_long( int, char * const [], const char *, const struct option *, int * ); extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * ); /* * Previous MinGW implementation had... */ #ifndef HAVE_DECL_GETOPT /* * ...for the long form API only; keep this for compatibility. */ # define HAVE_DECL_GETOPT 1 #endif #ifdef __cplusplus } #endif #endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ /* $RCSfile: getopt.h,v $Revision: 1.1 $: end of file */ |
|
From: Keith M. <kei...@us...> - 2008-01-08 19:52:04
|
Update of /cvsroot/mingw/catgets/repl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26202/repl Added Files: getopt.c Log Message: Add `-help' and `-version' options for `gencat'. --- NEW FILE: getopt.c --- /* * getopt.c * * $Id: getopt.c,v 1.1 2008/01/08 19:51:59 keithmarshall Exp $ * * Implementation of the `getopt', `getopt_long' and `getopt_long_only' * APIs, for inclusion in the MinGW runtime library. * * This file is part of the MinGW32 package set. * * Contributed by Keith Marshall <kei...@us...> * Last modification: 27-Dec-2007 * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * $Revision: 1.1 $ * $Author: keithmarshall $ * $Date: 2008/01/08 19:51:59 $ * */ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <getopt.h> /* Identify how to get the calling program name, for use in messages... */ #ifdef __CYGWIN__ /* * CYGWIN uses this DLL reference... */ # define PROGNAME __progname extern char __declspec(dllimport) *__progname; #else /* * ...while elsewhere, we simply use the first argument passed. */ # define PROGNAME *argv #endif /* Initialise the public variables. */ int optind = 0; /* index for first non-option arg */ int opterr = 1; /* enable built-in error messages */ char *optarg = NULL; /* pointer to current option argument */ #define CHAR char /* argument type selector */ #define getopt_switchar '-' /* option prefix character in argv */ #define getopt_pluschar '+' /* prefix for POSIX mode in optstring */ #define getopt_takes_argument ':' /* marker for optarg in optstring */ #define getopt_arg_assign '=' /* longopt argument field separator */ #define getopt_unknown '?' /* return code for unmatched option */ #define getopt_ordered 1 /* return code for ordered non-option */ #define getopt_all_done -1 /* return code to indicate completion */ enum { /* All `getopt' API functions are implemented via calls to the * common static function `getopt_parse()'; these `mode' selectors * determine the behaviour of `getopt_parse()', to deliver the * appropriate result in each case. */ getopt_mode_standard = 0, /* getopt() */ getopt_mode_long, /* getopt_long() */ getopt_mode_long_only /* getopt_long_only() */ }; enum { /* When attempting to match a command line argument to a long form option, * these indicate the status of the match. */ getopt_no_match = 0, /* no successful match */ getopt_abbreviated_match, /* argument is an abbreviation for an option */ getopt_exact_match /* argument matches the full option name */ }; int optopt = getopt_unknown; /* return value for option being evaluated */ static __inline__ int getopt_missing_arg( const CHAR *optstring ) { /* Helper function to determine the appropriate return value, * for the case where a required option argument is missing. */ if( (*optstring == getopt_pluschar) || (*optstring == getopt_switchar) ) ++optstring; return (*optstring == getopt_takes_argument) ? getopt_takes_argument : getopt_unknown; } /* `complain' macro facilitates the generation of simple built-in * error messages, displayed on various fault conditions, provided * `opterr' is non-zero. */ #define complain( MSG, ARG ) if( opterr ) \ fprintf( stderr, "%s: "MSG"\n", PROGNAME, ARG ) static __inline__ int getopt_argerror( int mode, char *fmt, CHAR *prog, struct option *opt, int retval ) { /* Helper function, to generate more complex built-in error * messages, for invalid arguments to long form options ... */ if( opterr ) { /* ... but, displayed only if `opterr' is non-zero. */ char flag[] = "--"; if( mode != getopt_mode_long ) /* * only display one hyphen, for implicit long form options, * improperly resolved by `getopt_long_only()'. */ flag[1] = 0; /* * always preface the program name ... */ fprintf( stderr, "%s: ", prog ); /* * to the appropriate, option specific message. */ fprintf( stderr, fmt, flag, opt->name ); } /* Whether displaying the message, or not, always set `optopt' * to identify the faulty option ... */ optopt = opt->val; /* * and return the `invalid option' indicator. */ return retval; } /* `getopt_conventions' establish behavioural options, to control * the operation of `getopt_parse()', e.g. to select between POSIX * and GNU style argument parsing behaviour. */ #define getopt_set_conventions 0x1000 #define getopt_posixly_correct 0x0010 static __inline__ int getopt_conventions( int flags ) { static int conventions = 0; if( (conventions == 0) && ((flags & getopt_set_conventions) == 0) ) { /* default conventions have not yet been established; * initialise them now! */ conventions = getopt_set_conventions; if( (flags == getopt_pluschar) || (getenv( "POSIXLY_CORRECT" ) != NULL) ) conventions |= getopt_posixly_correct; } else if( flags & getopt_set_conventions ) /* * default conventions may have already been established, * but this is a specific request to augment them. */ conventions |= flags; /* in any event, return the currently established conventions. */ return conventions; } static __inline__ int is_switchar( CHAR flag ) { /* A simple helper function, used to identify the switch character * introducing an optional command line argument. */ return flag == getopt_switchar; } static __inline__ const CHAR *getopt_match( CHAR lookup, const CHAR *opt_string ) { /* Helper function, used to identify short form options. */ if( (*opt_string == getopt_pluschar) || (*opt_string == getopt_switchar) ) ++opt_string; if( *opt_string == getopt_takes_argument ) ++opt_string; do if( lookup == *opt_string ) return opt_string; while( *++opt_string ); return NULL; } static __inline__ int getopt_match_long( const CHAR *nextchar, const CHAR *optname ) { /* Helper function, used to identify potential matches for * long form options. */ CHAR matchchar; while( (matchchar = *nextchar++) && (matchchar == *optname) ) /* * skip over initial substring which DOES match. */ ++optname; if( matchchar ) { /* did NOT match the entire argument to an initial substring * of a defined option name ... */ if( matchchar != getopt_arg_assign ) /* * ... and didn't stop at an `=' internal field separator, * so this is NOT a possible match. */ return getopt_no_match; /* DID stop at an `=' internal field separator, * so this IS a possible match, and what follows is an * argument to the possibly matched option. */ optarg = (char *)(nextchar); } return *optname /* * if we DIDN'T match the ENTIRE text of the option name, * then it's a possible abbreviated match ... */ ? getopt_abbreviated_match /* * but if we DID match the entire option name, * then it's a DEFINITE EXACT match. */ : getopt_exact_match; } static __inline__ int getopt_resolved( int mode, int argc, CHAR *const *argv, int *argind, struct option *opt, int index, int *retindex, const CHAR *optstring ) { /* Helper function to establish appropriate return conditions, * on resolution of a long form option. */ if( retindex != NULL ) *retindex = index; if( optarg && (opt[index].has_arg == no_argument) ) /* * it is an error for the user to specify an option specific argument * with an option which doesn't expect one! */ return getopt_argerror( mode, "option `%s%s' doesn't accept an argument\n", PROGNAME, opt + index, getopt_unknown ); else if( (optarg == NULL) && (opt[index].has_arg == required_argument) ) { /* similarly, it is an error if no argument is specified * with an option which requires one ... */ if( (*argind + 1) < argc ) /* * ... except that the requirement may be satisfied from * the following comand line argument, if any ... */ optarg = argv[++*argind]; else /* so fail this case, only if no such argument exists! */ return getopt_argerror( mode, "option `%s%s' requires an argument\n", PROGNAME, opt + index, getopt_missing_arg( optstring ) ); } /* when the caller has provided a return buffer ... */ if( retindex != NULL ) { /* ... then we place the proper return value there, * and return a status code of zero ... */ *retindex = opt[index].val; return 0; } /* ... otherwise, the return value becomes the status code. */ return opt[index].val; } static #define getopt_std_args int argc, CHAR *const argv[], const CHAR *optstring int getopt_parse( int mode, getopt_std_args, ... ) { /* Common core implementation for ALL `getopt' functions. */ static int argind = 0; static const CHAR *nextchar = NULL; static int optmark = 0; if( nextchar && *nextchar ) { /* we are parsing a standard, or short format, option argument ... */ const CHAR *optchar; if( (optchar = getopt_match( optopt = *nextchar++, optstring )) != NULL ) { /* we have identified it as valid ... */ if( optchar[1] == getopt_takes_argument ) { /* and determined that it requires an associated argument ... */ if( ! *(optarg = (char *)(nextchar)) ) { /* the argument is NOT attached ... */ if( optchar[2] == getopt_takes_argument ) /* * but this GNU extension marks it as optional, * so we don't provide one on this occasion. */ optarg = NULL; /* otherwise this option takes a mandatory argument, * so, provided there is one available ... */ else if( (argc - argind) > 1 ) /* * we take the following command line argument, * as the appropriate option argument. */ optarg = argv[++argind]; /* but if no further argument is available, * then there is nothing we can do, except for * issuing the requisite diagnostic message. */ else { complain( "option requires an argument -- %c", optopt ); return getopt_missing_arg( optstring ); } } nextchar = NULL; } else optarg = NULL; return optopt; } /* if we didn't find a valid match for the specified option character, * then we fall through to here, so take appropriate diagnostic action. */ if( mode == getopt_mode_long_only ) { complain( "unrecognised option `-%s'", --nextchar ); nextchar = NULL; optopt = 0; } else complain( "invalid option -- %c", optopt ); return getopt_unknown; } if( optmark > optind ) { /* This can happen, in GNU parsing mode ONLY, when we have * skipped over non-option arguments, and found a subsequent * option argument; in this case we permute the arguments. */ int index; /* * `optspan' specifies the number of contiguous arguments * which are spanned by the current option, and so must be * moved together during permutation. */ int optspan = argind - optmark + 1; /* * we use `this_arg' to store these temporarily. */ CHAR *this_arg[optspan]; /* * we cannot manipulate `argv' directly, since the `getopt' * API prototypes it as `read-only'; this cast to `arglist' * allows us to work around that restriction. */ CHAR **arglist = (char **)(argv); /* save temporary copies of the arguments which are associated * with the current option ... */ for( index = 0; index < optspan; ++index ) this_arg[index] = arglist[optmark + index]; /* move all preceding non-option arguments to the right, * overwriting these saved arguments, while making space * to replace them in their permuted location. */ for( --optmark; optmark >= optind; --optmark ) arglist[optmark + optspan] = arglist[optmark]; /* restore the temporarily saved option arguments to * their permuted location. */ for( index = 0; index < optspan; ++index ) arglist[optind + index] = this_arg[index]; /* adjust `optind', to account for the relocated option. */ optind += optspan; } else /* no permutation occurred ... * simply adjust `optind' for all options parsed so far. */ optind = argind + 1; /* enter main parsing loop ... */ while( argc > ++argind ) { /* inspect each argument in turn, identifying possible options ... */ if( is_switchar( *(nextchar = argv[optmark = argind]) ) && *++nextchar ) { /* we've found a candidate option argument ... */ if( is_switchar( *nextchar ) ) { /* it's a double hyphen argument ... */ const CHAR *refchar = nextchar; if( *++refchar ) { /* and it looks like a long format option ... * `getopt_long' mode must be active to accept it as such, * `getopt_long_only' also qualifies, but we must downgrade * it to force explicit handling as a long format option. */ if( mode >= getopt_mode_long ) { nextchar = refchar; mode = getopt_mode_long; } } else { /* this is an explicit `--' end of options marker, so wrap up now! */ if( optmark > optind ) { /* permuting the argument list as necessary ... * (note use of `this_arg' and `arglist', as above). */ CHAR *this_arg = argv[optmark]; CHAR **arglist = (CHAR **)(argv); /* move all preceding non-option arguments to the right ... */ do arglist[optmark] = arglist[optmark - 1]; while( optmark-- > optind ); /* reinstate the `--' marker, in its permuted location. */ arglist[optind] = this_arg; } /* ... before finally bumping `optind' past the `--' marker, * and returning the `all done' completion indicator. */ ++optind; return getopt_all_done; } } else if( mode < getopt_mode_long_only ) { /* it's not an explicit long option, and `getopt_long_only' isn't active, * so we must explicitly try to match it as a short option. */ mode = getopt_mode_standard; } if( mode >= getopt_mode_long ) { /* the current argument is a long form option, (either explicitly, * introduced by a double hyphen, or implicitly because we were called * by `getopt_long_only'); this is where we parse it. */ int lookup; int matched = -1; /* we need to fetch the `extra' function arguments, which are * specified for the `getopt_long' APIs. */ va_list refptr; va_start( refptr, optstring ); struct option *longopts = va_arg( refptr, struct option * ); int *optindex = va_arg( refptr, int * ); va_end( refptr ); /* ensuring that `optarg' does not inherit any junk, from parsing * preceding arguments ... */ optarg = NULL; for( lookup = 0; longopts && longopts[lookup].name; ++lookup ) { /* scan the list of defined long form options ... */ switch( getopt_match_long( nextchar, longopts[lookup].name ) ) { /* looking for possible matches for the current argument. */ case getopt_exact_match: /* * when an exact match is found, * return it immediately, setting `nextchar' to NULL, * to ensure we don't mistakenly try to match any * subsequent characters as short form options. */ nextchar = NULL; return getopt_resolved( mode, argc, argv, &argind, longopts, lookup, optindex, optstring ); case getopt_abbreviated_match: /* * but, for a partial (initial substring) match ... */ if( matched >= 0 ) { /* if this is not the first, then we have an ambiguity ... */ complain( "option `%s' is ambiguous", argv[argind] ); nextchar = NULL; optopt = 0; return getopt_unknown; } /* otherwise just note that we've found a possible match ... */ matched = lookup; } } if( matched >= 0 ) { /* if we get to here, then we found exactly one partial match, * so return it, as for an exact match. */ nextchar = NULL; return getopt_resolved( mode, argc, argv, &argind, longopts, matched, optindex, optstring ); } if( mode < getopt_mode_long_only ) { /* if here, then we had what SHOULD have been a long form option, * but it is unmatched; (perversely, `mode == getopt_mode_long_only' * allows us to still try to match it as a short form option). */ optopt = 0; nextchar = NULL; complain( "unrecognised option `%s'", argv[argind] ); return getopt_unknown; } } /* fall through to handle standard short form options... * when the option argument format is neither explictly identified * as long, nor implicitly matched as such, and the argument isn't * just a bare hyphen, (which isn't an option), then we make one * recursive call to explicitly interpret it as short format. */ if( *nextchar ) return getopt_parse( mode, argc, argv, optstring ); } /* if we get to here, then we've parsed a non-option argument ... * in GNU compatibility mode, we step over it, so we can permute * any subsequent option arguments, but ... */ if( *optstring == getopt_switchar ) { /* if `optstring' begins with a `-' character, this special * GNU specific behaviour requires us to return the non-option * arguments in strict order, as pseudo-arguments to a special * option, with return value defined as `getopt_ordered'. */ nextchar = NULL; optarg = argv[argind]; return getopt_ordered; } if( getopt_conventions( *optstring ) & getopt_posixly_correct ) /* * otherwise ... * for POSIXLY_CORRECT behaviour, or if `optstring' begins with * a `+' character, then we break out of the parsing loop, so that * the scan ends at the current argument, with no permutation. */ break; } /* fall through when all arguments have been evaluated, */ return getopt_all_done; } /* All three public API entry points are trivially defined, * in terms of the internal `getopt_parse' function. */ int getopt( getopt_std_args ) { return getopt_parse( getopt_mode_standard, argc, argv, optstring ); } int getopt_long( getopt_std_args, const struct option *opts, int *index ) { return getopt_parse( getopt_mode_long, argc, argv, optstring, opts, index ); } int getopt_long_only( getopt_std_args, const struct option *opts, int *index ) { return getopt_parse( getopt_mode_long_only, argc, argv, optstring, opts, index ); } #ifdef __weak_alias /* * These Microsnot style uglified aliases are provided for compatibility * with the previous MinGW implementation of the getopt API. */ __weak_alias( getopt, _getopt ) __weak_alias( getopt_long, _getopt_long ) __weak_alias( getopt_long_only, _getopt_long_only ) #endif /* $RCSfile: getopt.c,v $Revision: 1.1 $: end of file */ |
|
From: Keith M. <kei...@us...> - 2008-01-01 18:45:15
|
Update of /cvsroot/mingw/catgets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12508 Modified Files: ChangeLog Makefile.in Added Files: FDL README Log Message: Establish package structure for distribution. Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/catgets/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ChangeLog 31 Dec 2007 17:09:49 -0000 1.23 --- ChangeLog 1 Jan 2008 18:45:08 -0000 1.24 *************** *** 1,2 **** --- 1,26 ---- + 2008-01-01 Keith Marshall <kei...@us...> + + 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 <kei...@us...> Index: Makefile.in =================================================================== RCS file: /cvsroot/mingw/catgets/Makefile.in,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.in 31 Dec 2007 17:09:50 -0000 1.5 --- Makefile.in 1 Jan 2008 18:45:09 -0000 1.6 *************** *** 7,14 **** # $Id$ # ! # Copyright (C) 2006, 2007, Keith Marshall # # Written by Keith Marshall <kei...@us...> ! # Last modification: 13-Nov-2007 # # --- 7,14 ---- # $Id$ # ! # Copyright (C) 2006, 2007, 2008, Keith Marshall # # Written by Keith Marshall <kei...@us...> ! # Last modification: 01-Jan-2008 # # *************** *** 37,41 **** --- 37,43 ---- bindir = @bindir@ libdir = @libdir@ + scriptdir = @datadir@/$(PACKAGE)/scripts includedir = @includedir@ + docdir = @datadir@/doc/$(PACKAGE) mandir = @mandir@ *************** *** 92,98 **** GENCAT_OBJECTS = @GENCAT_OBJECTS@ ! OTHER_SOURCES = COPYING ChangeLog mkinstalldirs install-sh $(MISC_SOURCES) ! MISC_SOURCES = $(CONFIG_HEADERS) $(CONFIG_SOURCES) $(INSTALL_PROGS) MANPAGE_SOURCES = catopen.man catgets.man catclose.man gencat.man --- 94,101 ---- GENCAT_OBJECTS = @GENCAT_OBJECTS@ ! OTHER_SOURCES = $(DISTDOC_SOURCES) mkinstalldirs install-sh $(MISC_SOURCES) ! MISC_SOURCES = $(CONFIG_HEADERS) $(CONFIG_SOURCES) $(DEV_SCRIPTS) + DISTDOC_SOURCES = ChangeLog COPYING FDL README MANPAGE_SOURCES = catopen.man catgets.man catclose.man gencat.man *************** *** 131,135 **** DLLVERSION = @DLLVERSION@ ! INSTALL_PROGS = gendefs.awk # Generic rule, replacing the built-in default, to create an object file --- 134,138 ---- DLLVERSION = @DLLVERSION@ ! DEV_SCRIPTS = gendefs.awk # Generic rule, replacing the built-in default, to create an object file *************** *** 203,206 **** --- 206,210 ---- INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ *************** *** 214,232 **** cd cross-build; $(MAKE) install-headers install-libs ! install-bin install-progs: all ! $(mkinstalldirs) --require ${exec_prefix} ${bindir} ${libdir} ! for prog in $(BUILD_PROGS); do \ ! echo $(INSTALL_PROGRAM) $$prog ${bindir}/$(tool_prefix)$$prog; \ ! $(INSTALL_PROGRAM) $$prog ${bindir}/$(tool_prefix)$$prog; \ done ! for prog in $(INSTALL_PROGS); do \ ! echo $(INSTALL_PROGRAM) ${srcdir}/$$prog ${bindir}/$(tool_prefix)$$prog; \ ! $(INSTALL_PROGRAM) ${srcdir}/$$prog ${bindir}/$(tool_prefix)$$prog; \ done ! install-libs: all-libs $(all-dll) test -z "$(all-dll)" || for dll in $(BUILD_DLLS); do \ echo $(INSTALL_DATA) $$dll ${bindir}; \ $(INSTALL_DATA) $$dll ${bindir}; \ echo $(INSTALL_DATA) $(DLL_IMPORT_LIBNAME) ${libdir}; \ $(INSTALL_DATA) $(DLL_IMPORT_LIBNAME) ${libdir}; \ --- 218,249 ---- cd cross-build; $(MAKE) install-headers install-libs ! install-progs: install-bin-progs install-scripts ! ! install-bin-progs: $(BUILD_PROGS) ! $(mkinstalldirs) --require ${exec_prefix} ${bindir} ! for prog in $^; do \ ! progname=`IFS='\\/'; set x $$prog; eval echo '$$'$$#`; \ ! echo $(INSTALL_PROGRAM) $$prog ${bindir}/$(tool_prefix)$$progname; \ ! $(INSTALL_PROGRAM) $$prog ${bindir}/$(tool_prefix)$$progname; \ done ! ! install-scripts: $(DEV_SCRIPTS) ! $(mkinstalldirs) --require ${prefix} ${scriptdir} ! for script in $^; do \ ! prog=`IFS='\\/'; set x $$script; eval echo '$$'$$#`; \ ! echo $(INSTALL_SCRIPT) $$script ${scriptdir}/$(tool_prefix)$$prog; \ ! $(INSTALL_SCRIPT) $$script ${scriptdir}/$(tool_prefix)$$prog; \ done ! install-dll: $(all-dll) ! $(mkinstalldirs) --require ${exec_prefix} ${bindir} test -z "$(all-dll)" || for dll in $(BUILD_DLLS); do \ echo $(INSTALL_DATA) $$dll ${bindir}; \ $(INSTALL_DATA) $$dll ${bindir}; \ + done + + install-libs: all-libs $(all-dll) + $(mkinstalldirs) --require ${exec_prefix} ${bindir} ${libdir} + test -z "$(all-dll)" || for dll in $(BUILD_DLLS); do \ echo $(INSTALL_DATA) $(DLL_IMPORT_LIBNAME) ${libdir}; \ $(INSTALL_DATA) $(DLL_IMPORT_LIBNAME) ${libdir}; \ *************** *** 269,278 **** ## ============== ## ! dist: srcdist bindist dist_srcdir = @abs_top_srcdir@ DISTDIRS = include m4 repl repl/include man DISTFILES = $(GENCAT_SOURCES) $(CATGETS_SOURCES) $(OTHER_SOURCES) ! DISTNAME = $(PACKAGE)-$(VERSION) ZIP = gzip -c --- 286,298 ---- ## ============== ## ! dist: srcdist bindist devdist dist_srcdir = @abs_top_srcdir@ DISTDIRS = include m4 repl repl/include man DISTFILES = $(GENCAT_SOURCES) $(CATGETS_SOURCES) $(OTHER_SOURCES) ! DISTNAME = $(PACKAGE)-$(VERSION)$(SNAPSHOT) ! ! bindist-tag = bin ! devdist-tag = dev ZIP = gzip -c *************** *** 294,303 **** rm -rf $(DISTNAME) ! bindist: all rm -rf tmp; mkdir tmp ! $(MAKE) prefix=`pwd`/tmp install-progs install-libs install-doc ! cd tmp && tar chf - * | $(ZIP) > ../$(DISTNAME)-bin.$(ZIPTYPE) rm -rf tmp ## ========== ## --- 314,349 ---- rm -rf $(DISTNAME) ! bindist devdist: all rm -rf tmp; mkdir tmp ! $(MAKE) prefix=`pwd`/tmp $@-install ! cd tmp && tar chf - * | $(ZIP) > ../$(DISTNAME)-$($@-tag).$(ZIPTYPE) rm -rf tmp + bindist-install: bindist-docs-install install-dll + devdist-install: devdist-docs-install devdist-headers-install + devdist-install: install-progs install-libs install-doc + + bindist-docs-install: README COPYING + $(mkinstalldirs) ${docdir} + for file in $^; do \ + echo $(INSTALL_DATA) $$file ${docdir}; \ + $(INSTALL_DATA) $$file ${docdir}; \ + done + + devdist-docs-install: bindist-docs-install devdist-extra-docs-install + + devdist-extra-docs-install: FDL + for file in $^; do \ + echo $(INSTALL_DATA) $$file ${docdir}; \ + $(INSTALL_DATA) $$file ${docdir}; \ + done + + devdist-headers-install: nl_types.h langinfo.h + $(mkinstalldirs) ${includedir} + for file in $^; do \ + echo $(INSTALL_DATA) $$file ${includedir}; \ + $(INSTALL_DATA) $$file ${includedir}; \ + done + ## ========== ## --- NEW FILE: FDL --- GNU Free Documentation License Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. --- NEW FILE: README --- MinGW catgets README $Id: README,v 1.1 2008/01/01 18:45:09 keithmarshall Exp $ Copyright (C) 2007, Keith Marshall Written by Keith Marshall <kei...@us...> Last modification: 20-Dec-2007 This package provides a native Win32 implementation of the POSIX National Language Support API, conforming generally to IEEE standard 1003.1-2001, and SUSv3, for adding national language message catalogue support to user applications. It comprises a development library, designated libcatgets.a for static linking, or catgets-<n>.dll with accompanying libcatgets.dll.a import library for dynamic linking, with supporting nl_types.h header file, delivering Win32 implementations of the catopen(), catgets() and catclose() functions, as required by the POSIX National Language Support API; this is accompanied by a suitable, standards conformant `gencat' utility program, which is used to generate the message catalogue files, which are bound to user applications making use of these library functions. The MinGW catgets package is free software It is provided AS IS, in the hope that it may be useful, but WITHOUT WARRANTY OF ANY KIND, not even an IMPLIED WARRANTY of MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. Permission is granted to redistribute this software, either "as is" or in modified form, under the terms of the GNU General Public License, as published by the Free Software Foundation; either version 2, or (at your option) any later version; see the file COPYING, for further details. Packaging Options ----------------- MinGW catgets is available for download in three package formats; (the full text of this README file is included with each):-- 1) mingw-catgets-<version>-bin.tar.gz Provides only the pre-built dynamic link library, for use by client applications which are delivered in binary format. The DLL is placed in the `bin' subdirectory of the directory in which the package is untarred; typically this should be the root of either the MinGW tree, or the MSYS tree. 2) mingw-catgets-<version>-dev.tar.gz Provides the header files and precompiled libraries, which are needed to develop `catgets' client applications, together with the associated `manpage' documentation, and the `gencat' tool which must be used to compile compatible message catalogues. It should be untarred in the root of the MinGW tree, and client applications should be linked with the `-lcatgets' option, specified *after* the dependent object modules, on the linking command line. 3) mingw-catgets-<version>-src.tar.gz Provides the full source code from which the above two packages have been built; it supports building for native deployment, as the above, or for deployment as components of a cross-compiler tool chain. Prerequisites for Building from Source -------------------------------------- To build and install the catgets development libraries and tools, you require a C compiler, and tool chain, such as that provided by MinGW, and a build environment capable of running Bourne shell scripts, and the GNU `make' utility, such as that provided by MSYS. Before attempting to build MinGW catgets from source, you must ensure that a suitable `iconv' implementation is installed. This is not normally the case, with a standard MinGW/MSYS installation, but the requirement may be satisfied by installing GNU libiconv; this *must* be libiconv-1.11 or later, and it *must* incorporate the 2007-04-23 patch, correcting a Win32 specific wchar_t conversion bug; you may ensure that this prerequisite is adequately satisfied, by installing libiconv-1.11 using the mingwPORT script from http://downloads.sourceforge.net/mingw/libiconv-1.11-mingwPORT-20070423-1.tar.bz2 Building from Source, for use "In Place" on Win32 ------------------------------------------------- The build procedure, using MinGW and MSYS, is as follows:-- 1) Choose a suitable directory, where you will build the package; (it must be a directory in which you have write permission). A typical example might be `~/src'; create it if necessary... mkdir -p ~/src cd ~/src 2) Extract the source distribution tarball... tar xzf [[/]path/to/]mingw-catgets-<version>.tar.gz 3) Create a build directory, and make it your working directory... mkdir mingw-catgets-<version>/build cd mingw-catgets-<version>/build 4) Configure the build... ../configure [options ...] For a typical MinGW installation, you will probably want to set, at least, the `--prefix=/mingw' option; if you don't, this setting will default to `--prefix=/usr/local', which is not what you want if you have installed MinGW and MSYS with their standard configurations. To see other available options, try... ../configure --help (You may wish to consider adjusting the `CFLAGS', or the `--mandir' settings). 5) Build the installable components... make 6) Install the basic development library components... make install 7) Install documentation... This step is optional, but recommended; if you have installed, or if you plan to install, the `man' package then... make install-man will allow you to access the manpages for gencat(1), catopen(3), catgets(3) and catclose(3) from any working directory. Building for Cross-Hosted Use ----------------------------- MinGW catgets may be built as a component of a cross-hosted compiler tool chain; this is supported directly by the build system, when a `--target' option differing from `--host' is specified at `configure' time. To build as a cross tool, the cross-compiler suite must already have been installed, and the `--target' option must be specified to match the prefix used to identify, and invoke the cross-compiler itself. For example, this is how I build it, for use with my GNU/Linux hosted i586-mingw32-gcc tool chain, (which is identified by the prefix `i586-mingw32'):-- 1) You may, if you wish, install GNU libiconv. However, your host may already have a suitable iconv implementation, such as that provided by glibc on GNU/Linux systems; if this is the case, it should suffice. 2) Create the working directory to host the source tree, as described in steps (1) and (2) of the standard Win32 "In Place" build procedure. 3) Create a build directory, in which to progress the first stage of the build, and make it your working directory... mkdir mingw-catgets-<version>/build cd mingw-catgets-<version>/build 4) Configure the build... ../configure [options ...] --prefix=<prefix> --target=i586-mingw32 As before, you may wish to review to options listed by... ../configure --help and adjust any you consider to be appropriate; it is important that you specify a <prefix> which matches the installation path of your cross compiler tool chain, and that you set the --target to match the name of your cross tools -- in my case, the cross compiler is i586-mingw32-gcc, and the entire tool chain shares the i586-mingw32 target prefix. 5) Build and install the cross tool components... make make install This results in building of the natively hosted tools, directly within the build directory, together with the subset of the library components which are needed to build these tools, and which are also compiled to native object code. Additionally, in the cross-build subdirectory, the appropriate target specific cross-compiler is invoked, to build the full set of libraries, as they will be required when subsequently deploying the cross-tools to create applications for the target platform. On successful completion of this cross-tools build, the cross-tools and the supporting cross-compiled libraries are installed into the prefix, directory, as specified in the configure command; at installation time, the names of the executable cross-tool programs are qualified by the addition of a program name prefix, to match the specified target. 6) Install documentation... As in the case of the natively built tool chain, step (5) does not install the man pages which accompany the package. These may be separately installed by issuing the command... make install-man In this case, the installed man pages retain the same basic names as used in the natively compiled case. If preferred, the man pages may be installed into an existing MANPATH directory, and distinguished their similarly named native counterparts, by in the first instance configuring with an explicit `--mandir=...' option, and then adding a target specific man page name prefix, such as... make man_prefix=i586-mingw32- install-man 7) Note that step (5) builds only the cross-compiled library components, which are the minimum required to support deployment of the cross-tools into an existing cross-compiler tool chain; in particular, it does not create a tool chain for eventual deployment on the target platform. If this is required, it may be prepared and packaged, without separate configuration, by completing the partial build which has already been initiated in the cross-build subdirectory... cd cross-build make make bindist Linking MinGW Applications to use Message Catalogues ---------------------------------------------------- This package provides POSIX conformant national language support for MinGW applications. Such support is added through calls to the POSIX standard `catopen', `catgets' and `catclose' functions, as described in the accompanying `man' pages. References to these functions are resolved by addition of the `-lcatgets' option to the command line, when linking the application; both static and dynamically linked variants of the associated library are provided. Preparing the Message Catalogues -------------------------------- Message catalogues, for use with the MinGW `catgets' implementation, are compiled using a POSIX conforming `gencat' tool; (when deployed as a component of a cross-hosted tool chain, this tool is named so as to maintain consistency with the cross-compiler naming convention; thus when the cross-compiler is built for, say, an i586-mingw32 target, invoked as i586-mingw32-gcc for example, then gencat would be consistently invoked as i586-mingw32-gencat. The command syntax, and the syntax for its message definition source files, is described in the accompanying `gencat' man page. $RCSfile: README,v $: end of file |