diff -Nru autogen-5.11.9/agen5/agCgi.c autogen-5.12/agen5/agCgi.c --- autogen-5.11.9/agen5/agCgi.c 2011-01-21 01:24:54.000000000 +0100 +++ autogen-5.12/agen5/agCgi.c 2011-06-03 21:17:53.000000000 +0200 @@ -1,6 +1,6 @@ /** - * \file agCgi.c + * @file agCgi.c * * Time-stamp: "2011-01-20 16:24:54 bkorb" * diff -Nru autogen-5.11.9/agen5/agInit.c autogen-5.12/agen5/agInit.c --- autogen-5.11.9/agen5/agInit.c 2011-04-21 00:20:27.000000000 +0200 +++ autogen-5.12/agen5/agInit.c 2011-06-03 21:17:56.000000000 +0200 @@ -1,14 +1,14 @@ /** - * \file agInit.c + * @file agInit.c * * Do all the initialization stuff. For daemon mode, only * children will return. * - * Time-stamp: "2011-04-20 15:20:27 bkorb" + * Time-stamp: "2011-06-03 12:13:40 bkorb" * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -182,14 +182,14 @@ switch (*popt) { case ' ': case TAB: case '\r': case NL: - while (isspace((int)*(++popt))) ; + while (IS_WHITESPACE_CHAR((int)*(++popt))) ; goto retry; case 'Q': if (pzDepTarget != NULL) dep_usage(dup_targ); - while (isspace((int)*(++popt))) ; + while (IS_WHITESPACE_CHAR((int)*(++popt))) ; pzDepTarget = make_quote_str(popt); break; @@ -197,7 +197,7 @@ if (pzDepTarget != NULL) dep_usage(dup_targ); - while (isspace((int)*(++popt))) ; + while (IS_WHITESPACE_CHAR((int)*(++popt))) ; AGDUPSTR(pzDepTarget, popt, "make target name"); break; @@ -214,7 +214,7 @@ if (pzDepFile != NULL) dep_usage(dup_targ); - while (isspace((int)*(++popt))) ; + while (IS_WHITESPACE_CHAR((int)*(++popt))) ; pzDepFile = aprf("%s-XXXXXX", popt); break; diff -Nru autogen-5.11.9/agen5/agShell.c autogen-5.12/agen5/agShell.c --- autogen-5.11.9/agen5/agShell.c 2011-03-12 23:30:57.000000000 +0100 +++ autogen-5.12/agen5/agShell.c 2011-06-03 21:17:59.000000000 +0200 @@ -1,7 +1,7 @@ /** - * \file agShell + * @file agShell.c * - * Time-stamp: "2011-03-12 14:30:57 bkorb" + * Time-stamp: "2011-05-26 10:57:44 bkorb" * * Manage a server shell process * @@ -22,10 +22,9 @@ * with this program. If not, see . */ #ifndef SHELL_ENABLED - void closeServer(void) { -} +HIDE_FN(void closeServer(void) {;}) - char * runShell(char const* pzCmd) { +HIDE_FN(char * runShell(char const* pzCmd)) { char* pz; AGDUPSTR(pz, pzCmd, "dummy shell command"); return pz; diff -Nru autogen-5.11.9/agen5/agUtils.c autogen-5.12/agen5/agUtils.c --- autogen-5.11.9/agen5/agUtils.c 2011-04-29 19:30:02.000000000 +0200 +++ autogen-5.12/agen5/agUtils.c 2011-06-03 21:18:01.000000000 +0200 @@ -1,12 +1,12 @@ /** - * \file agUtils.c + * @file agUtils.c * * Various utilities for AutoGen. * - * Time-stamp: "2011-04-29 10:30:02 bkorb" + * Time-stamp: "2011-06-03 12:13:25 bkorb" * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -184,7 +184,7 @@ unsigned int ch = (unsigned int)*(pz++); if (ch == NUL) break; - if (! isalnum(ch)) + if (! IS_ALPHANUMERIC_CHAR(ch)) pz[-1] = '_'; } fprintf(pfDepends, "%s_TList =", pz_targ_base); @@ -211,18 +211,16 @@ else if ((fname[0] == '>') && (fname[1] == '>')) { fname += 2; - while (isspace((int)(*fname))) fname++; + while (IS_WHITESPACE_CHAR((int)(*fname))) fname++; pfTrace = fopen(fname, "a"); } else pfTrace = fopen(fname, "w"); - if (pfTrace == NULL) { - fprintf(stderr, "Error %d (%s) opening `%s' for output", - errno, strerror(errno), fname); - exit(EXIT_FAILURE); - } + if (pfTrace == NULL) + AG_ABEND(aprf("Error %d (%s) opening `%s' for output", + errno, strerror(errno), fname)); #ifdef _IONBF setvbuf(pfTrace, NULL, _IONBF, 0); diff -Nru autogen-5.11.9/agen5/autogen.c autogen-5.12/agen5/autogen.c --- autogen-5.11.9/agen5/autogen.c 2011-04-20 23:23:54.000000000 +0200 +++ autogen-5.12/agen5/autogen.c 2011-06-03 21:15:00.000000000 +0200 @@ -1,13 +1,13 @@ /** - * \file autogen.c + * @file autogen.c * - * Time-stamp: "2011-04-20 14:23:54 bkorb" + * Time-stamp: "2011-06-03 12:15:00 bkorb" * * This is the main routine for autogen. * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -47,11 +47,7 @@ /* = = = START-STATIC-FORWARD = = = */ static void -inner_main( -#if GUILE_VERSION >= 108000 - void * closure, -#endif - int argc, char ** argv); +inner_main(void * closure, int argc, char ** argv); static void exit_cleanup(wait_for_pclose_enum_t cl_wait); @@ -78,11 +74,7 @@ * main routine under Guile guidance */ static void -inner_main( -#if GUILE_VERSION >= 108000 - void * closure, -#endif - int argc, char ** argv) +inner_main(void * closure, int argc, char ** argv) { atexit(done_check); initialize(argc, argv); @@ -362,9 +354,9 @@ */ do { #ifndef DEBUG_ENABLED - closeOutput(AG_FALSE); + out_close(AG_FALSE); #else - closeOutput(AG_TRUE); + out_close(AG_TRUE); #endif } while (pCurFp->pPrev != NULL); exit_code = AUTOGEN_EXIT_BAD_TEMPLATE; diff -Nru autogen-5.11.9/agen5/autogen.h autogen-5.12/agen5/autogen.h --- autogen-5.11.9/agen5/autogen.h 2011-04-20 23:25:17.000000000 +0200 +++ autogen-5.12/agen5/autogen.h 2011-06-03 21:20:50.000000000 +0200 @@ -1,8 +1,8 @@ -/* - * \file autogen.h +/** + * @file autogen.h * - * Time-stamp: "2011-04-20 14:25:17 bkorb" + * Time-stamp: "2011-06-03 12:20:50 bkorb" * * Global header file for AutoGen * @@ -30,10 +30,10 @@ #include REGEX_HEADER #include -#if GUILE_VERSION >= 109000 -# include -#else +#if GUILE_VERSION < 107000 # include +#else +# include #endif #include "opts.h" @@ -490,8 +490,6 @@ extern int ag_fmemioctl(FILE * fp, int req, ...); #endif -#include "proto.h" - typedef union { const void* cp; void* p; @@ -521,11 +519,54 @@ # define manageAllocatedData(_ptr) #endif +#if __STDC_VERSION__ < 199901L +# if __GNUC__ >= 2 +# define __func__ __FUNCTION__ +# else +# define __func__ "" +# endif +#endif + /* * Code variations based on the version of Guile: */ #include "guile-iface.h" +#include "proto.h" + +static inline SCM ag_eval(char const * pzStr) +{ + SCM res; + char const * pzSaveScheme = pzLastScheme; /* Watch for nested calls */ + pzLastScheme = pzStr; + + res = ag_scm_c_eval_string_from_file_line( + pzStr, pCurTemplate->pzTplFile, pCurMacro->lineNo); + + pzLastScheme = pzSaveScheme; + return res; +} + +/* + * Extracted from guile-iface stuff. Seems to be stable since for at least + * 1.6.0 through 2.0.0. 1.4.x is thoroughly dead now (May, 2011). + */ +#define AG_SCM_DISPLAY(_s) \ + scm_display(_s, scm_current_output_port()) + +#define AG_SCM_BOOT_GUILE(_ac, _av, _im) \ + scm_boot_guile((_ac), (_av), (_im), NULL) + +#define AG_SCM_APPLY2(_op, _f, _tst) \ + scm_apply(_op, _f, scm_cons(_tst, AG_SCM_LISTOFNULL())) + +#define AG_SCM_CHAR_P(_c) SCM_CHARP(_c) + +/* + * Hide dummy functions from complexity measurement tools + */ +#define HIDE_FN(_t) _t + #endif /* AUTOGEN_BUILD */ /* * Local Variables: diff -Nru autogen-5.11.9/agen5/cgi-fsm.c autogen-5.12/agen5/cgi-fsm.c --- autogen-5.11.9/agen5/cgi-fsm.c 2011-05-06 16:07:08.000000000 +0200 +++ autogen-5.12/agen5/cgi-fsm.c 2011-06-26 16:40:06.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (cgi-fsm.c) * - * It has been AutoGen-ed May 6, 2011 at 07:07:07 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:05 AM by AutoGen 5.11.10pre11 * From the definitions cgi.def * and the template file fsm * * Automated Finite State Machine * - * Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright @@ -31,12 +31,10 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ #define DEFINE_FSM #include "cgi-fsm.h" #include -#include /* * Do not make changes to this file, except between the START/END @@ -215,9 +213,9 @@ return CGI_ST_INVALID; } curCh = *(pzSrc++); - if (isalpha( curCh )) + if (IS_ALPHABETIC_CHAR( curCh )) trans_evt = CGI_EV_ALPHA; - else if (isdigit( curCh )) + else if (IS_DEC_DIGIT_CHAR( curCh )) trans_evt = CGI_EV_NAME_CHAR; else switch (curCh) { case '_': trans_evt = CGI_EV_NAME_CHAR; break; diff -Nru autogen-5.11.9/agen5/cgi-fsm.h autogen-5.12/agen5/cgi-fsm.h --- autogen-5.11.9/agen5/cgi-fsm.h 2011-05-06 16:07:07.000000000 +0200 +++ autogen-5.12/agen5/cgi-fsm.h 2011-06-26 16:40:05.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (cgi-fsm.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:07 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:05 AM by AutoGen 5.11.10pre11 * From the definitions cgi.def * and the template file fsm * * Automated Finite State Machine * - * Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright @@ -31,7 +31,6 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ /* * This file enumerates the states and transition events for a FSM. diff -Nru autogen-5.11.9/agen5/defDirect.c autogen-5.12/agen5/defDirect.c --- autogen-5.11.9/agen5/defDirect.c 2011-04-20 23:19:01.000000000 +0200 +++ autogen-5.12/agen5/defDirect.c 2011-06-03 21:18:04.000000000 +0200 @@ -1,5 +1,5 @@ /** - * \file defDirect.c + * @file defDirect.c * * Time-stamp: "2011-04-20 14:19:01 bkorb" * diff -Nru autogen-5.11.9/agen5/defFind.c autogen-5.12/agen5/defFind.c --- autogen-5.11.9/agen5/defFind.c 2011-01-21 01:23:20.000000000 +0100 +++ autogen-5.12/agen5/defFind.c 2011-06-03 21:18:06.000000000 +0200 @@ -1,5 +1,5 @@ /** - * \file defFind.c + * @file defFind.c * * Time-stamp: "2011-01-20 16:23:20 bkorb" * diff -Nru autogen-5.11.9/agen5/defLex.c autogen-5.12/agen5/defLex.c --- autogen-5.11.9/agen5/defLex.c 2011-04-20 23:26:11.000000000 +0200 +++ autogen-5.12/agen5/defLex.c 2011-06-03 21:20:36.000000000 +0200 @@ -1,7 +1,8 @@ -/* +/** + * @file defLex.c * - * Time-stamp: "2011-04-20 14:26:11 bkorb" + * Time-stamp: "2011-06-03 12:20:36 bkorb" * * This module scans the template variable declarations and passes * tokens back to the parser. diff -Nru autogen-5.11.9/agen5/defLoad.c autogen-5.12/agen5/defLoad.c --- autogen-5.11.9/agen5/defLoad.c 2011-01-21 01:25:52.000000000 +0100 +++ autogen-5.12/agen5/defLoad.c 2011-06-03 21:18:09.000000000 +0200 @@ -1,6 +1,6 @@ /** - * \file defLoad.c + * @file defLoad.c * * Time-stamp: "2011-01-20 16:25:52 bkorb" * diff -Nru autogen-5.11.9/agen5/defParse-fsm.c autogen-5.12/agen5/defParse-fsm.c --- autogen-5.11.9/agen5/defParse-fsm.c 2011-05-06 16:07:08.000000000 +0200 +++ autogen-5.12/agen5/defParse-fsm.c 2011-06-26 16:40:06.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (defParse-fsm.c) * - * It has been AutoGen-ed May 6, 2011 at 07:07:09 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:06 AM by AutoGen 5.11.10pre11 * From the definitions defParse.def * and the template file fsm * * Automated Finite State Machine * - * Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright @@ -31,12 +31,10 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ #define DEFINE_FSM #include "defParse-fsm.h" #include -#include #define FSM_USER_HEADERS #include "defParse.x" diff -Nru autogen-5.11.9/agen5/defParse-fsm.h autogen-5.12/agen5/defParse-fsm.h --- autogen-5.11.9/agen5/defParse-fsm.h 2011-05-06 16:07:08.000000000 +0200 +++ autogen-5.12/agen5/defParse-fsm.h 2011-06-26 16:40:06.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (defParse-fsm.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:08 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:06 AM by AutoGen 5.11.10pre11 * From the definitions defParse.def * and the template file fsm * * Automated Finite State Machine * - * Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright @@ -31,7 +31,6 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ /* * This file enumerates the states and transition events for a FSM. diff -Nru autogen-5.11.9/agen5/defParse.x autogen-5.12/agen5/defParse.x --- autogen-5.11.9/agen5/defParse.x 2011-01-21 01:22:19.000000000 +0100 +++ autogen-5.12/agen5/defParse.x 2011-06-03 21:20:23.000000000 +0200 @@ -1,10 +1,10 @@ /** - * \file defParse.x + * @file defParse.x * * Definition parser functions. * - * Time-stamp: "2011-01-20 16:22:19 bkorb" + * Time-stamp: "2011-06-03 12:20:23 bkorb" * * This file is part of AutoGen. * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved diff -Nru autogen-5.11.9/agen5/directive.h autogen-5.12/agen5/directive.h --- autogen-5.11.9/agen5/directive.h 2011-05-06 16:07:02.000000000 +0200 +++ autogen-5.12/agen5/directive.h 2011-06-26 16:40:01.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (directive.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:02 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:01 AM by AutoGen 5.11.10pre11 * From the definitions directive.def * and the template file directive * * copyright (c) 1992-2011 by Bruce Korb - all rights reserved * - * AutoGen is free software: you can redistribute it and/or modify it +AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -20,7 +20,6 @@ * * You should have received a copy of the GNU General Public License along * with this program. If not, see . - */ #ifndef AUTOGEN_DIRECTIVE_H_GUARD #define AUTOGEN_DIRECTIVE_H_GUARD 1 @@ -113,7 +112,7 @@ */ #define SCHEME_INIT_FILE "directive.h" static const int schemeLine = __LINE__+2; -static char const zSchemeInit[3860] = +static char const zSchemeInit[3858] = "(use-modules (ice-9 common-list))\n\ (define identifier?\n\ (lambda (x) (or (string? x) (symbol? x))))\n\ @@ -169,7 +168,7 @@ (define tmp-dir \"\")\n\ (define header-file \"\")\n\ (define header-guard \"\")\n\ -(define autogen-version \"5.11.9\")\n\ +(define autogen-version \"5.12\")\n\ (define c-file-line-fmt \"#line %2$d \\\"%1$s\\\"\\n\")\n\ (define-macro (defined-as predicate symbol)\n\ `(and (defined? ',symbol) (,predicate ,symbol)))\n\ diff -Nru autogen-5.11.9/agen5/expExtract.c autogen-5.12/agen5/expExtract.c --- autogen-5.11.9/agen5/expExtract.c 2011-01-28 19:22:33.000000000 +0100 +++ autogen-5.12/agen5/expExtract.c 2011-06-03 21:18:11.000000000 +0200 @@ -1,5 +1,5 @@ /** - * \file expExtract.c + * @file expExtract.c * * Time-stamp: "2011-01-28 10:22:33 bkorb" * diff -Nru autogen-5.11.9/agen5/expFormat.c autogen-5.12/agen5/expFormat.c --- autogen-5.11.9/agen5/expFormat.c 2011-04-22 23:32:06.000000000 +0200 +++ autogen-5.12/agen5/expFormat.c 2011-06-13 17:15:05.000000000 +0200 @@ -1,8 +1,8 @@ /** - * \file expFormat.c + * @file expFormat.c * - * Time-stamp: "2011-04-22 14:32:06 bkorb" + * Time-stamp: "2011-06-13 08:15:05 bkorb" * * This module implements formatting expression functions. * @@ -23,6 +23,13 @@ * with this program. If not, see . */ +typedef enum { + LSEG_INFO = 1, + LSEG_DESC = 2, + LSEG_FULL = 3, + LSEG_NAME = 4 +} lic_segment_e_t; + static char const zDne1[] = "%s -*- buffer-read-only: t -*- vi: set ro:\n" "%s\n"; @@ -41,11 +48,9 @@ "%1$sFrom the definitions %4$s\n" "%1$sand the template file %5$s"; -static char const zOwnLen[] = "owner length"; -static char const zPfxLen[] = "prefix length"; -static char const zProgLen[] = "program name length"; -static char const zPfxMsg[] = "%s may not exceed %d chars\n"; -static char const zFmtAlloc[] = "asprintf allocation"; +static char const pfx_txt[] = "\n"; +static int const pfx_len = sizeof(pfx_txt) - 1; +static char const bad_lic[] = "an unknown license"; /*=gfunc dne * @@ -276,8 +281,127 @@ return SCM_UNDEFINED; } +/** + * Assemble the copyright preamble and long license description. + * + * @param txt a pointer to the first of two newlines separating + * copyright information from the description. + */ +static void +assemble_full_desc(char * txt) +{ + /* + * Preserve the first newline. Set the move destination + * out past where we will be inserting the "" marker. + */ + char * md = ++txt + pfx_len; /* move destination */ + char * pd = txt; /* prefix destination */ + + txt += 2; + while (*txt == NL) txt++; + /* + * Maybe there were exactly enough NL characters we don't need to move + */ + if (md != txt) + memmove(md, txt, strlen(txt) + 1); + memmove(pd, pfx_txt, pfx_len); + + /* + * Look for a trailing license name and trim it off. + */ + txt = strstr(md, "\n\n"); + if (txt != NULL) + *txt = NUL; + else { + txt += strlen(txt); + if (txt[-1] == NL) + txt[-1] = NUL; + } +} + +/** + * Trim off the license name. It is the third double-newline stanza + * in the license file. + * + * @param p a pointer to the first of two newlines separating + * copyright information from the description. + * @return pointer to second stanza, sans the license name trailer. + */ +static char * +trim_lic_name(char * p) +{ + char * res; + /* skip the leading white space. It starts with NL. */ + while (IS_WHITESPACE_CHAR(*(++p))) ; + if (strncmp(p, pfx_txt, pfx_len - 1) == 0) { + p += pfx_len - 1; + while (IS_WHITESPACE_CHAR(*p)) p++; + } + + if (*p == NUL) + return p; + + res = p; + + /* + * The last section ends with two consecutive new lines. + * All trailing newlines are trimmed (not all white space). + */ + p = strstr(p, "\n\n"); + if (p != NULL) + *p = NUL; + else { + p = res + strlen(res); + + /* + * We have skipped at least two bytes: the two leading NL chars. + * Therefore, we know that "p[-1]" refers to a valid byte. + */ + if (p[-1] == NL) + *p = NUL; + } + + return res; +} + +/** + * Extract the license name. It is the third double-newline stanza + * in the license file. + * + * @param txt a pointer to the first of two newlines separating + * copyright information from the description. + * @return pointer to the license name trailer. + */ +static char * +get_lic_name(char * p) +{ + while (*(++p) == NL) ; /* skip the leading NL's. It starts with NL. */ + + /* + * Find the third stanza. If there. If not, we supply some static + * text: "an unknown license" + */ + p = strstr(p, "\n\n"); + if (p == NULL) { + strcpy(p, bad_lic); + return p; + } + while (*p == NL) p++; + return p; +} + +/** + * Find the kind of text being requested. It may be "full" (the first + * two stanzas), "info" (the first -- copyright info + license name), + * "description" (the second -- a one paragraph description), or + * "name" -- the third stanza. + * + * @param txt a pointer to the first of two newlines separating + * copyright information from the description. + * @return pointer to the requested text. + */ static char * -find_lic_text(int segment, SCM lic, size_t * txt_len) +find_lic_text(lic_segment_e_t segment, SCM lic, size_t * txt_len) { static char const * const lic_sfx[] = { "lic", NULL }; @@ -306,7 +430,7 @@ flen = stbf.st_size; } - ftext = ag_scribble(flen + 1); + ftext = ag_scribble(flen + sizeof(bad_lic)); *txt_len = flen; { @@ -329,21 +453,40 @@ AG_ABEND(aprf("invalid license file: %s", fname)); switch (segment) { - case 0: p[1] = NUL; break; - case 1: p += 2; while (*p == NL) p++; ftext = p; break; + case LSEG_INFO: p[1] = NUL; break; + case LSEG_DESC: ftext = trim_lic_name(p); break; + case LSEG_NAME: ftext = get_lic_name(p); break; + case LSEG_FULL: assemble_full_desc(p); break; } } return ftext; } +/** + * Construct an SCM for the kind of text being requested. + * + * It may be "full" (the first two stanzas), "info" (the first -- copyright + * info + license name), "description" (the second -- a one paragraph + * description), or "name" -- the third stanza. + * + * @param seg which segment of license is desired + * @param lic The name of the license + * @param prog the name of the program + * @param pfx a per-line prefix + * @param owner who owns the copyright + * @param years the copyright years + * + * @return the SCM-ized string + */ static SCM -construct_license(int seg, SCM lic, SCM prog, SCM pfx, SCM owner, SCM years) +construct_license( + lic_segment_e_t seg, SCM lic, SCM prog, SCM pfx, SCM owner, SCM years) { static SCM subs = SCM_UNDEFINED; static SCM empty = SCM_UNDEFINED; - SCM vals = SCM_UNDEFINED; + SCM vals = SCM_UNDEFINED; char * lic_text; size_t text_len; @@ -392,10 +535,24 @@ * and @pxref{SCM license-description, @code{license-description}}), * with all the same substitutions. * - * All of these depend upon the existence of a license file named - * after the @code{license} argument with a @code{.lic} suffix. - * That file should contain two blocks of text separated by two or more - * newline characters. + * All of these depend upon the existence of a license file named after the + * @code{license} argument with a @code{.lic} suffix. That file should + * contain three blocks of text, each separated by two or more newline + * characters. + * + * The first section describes copyright attribution and the name of the usage + * licence. For GNU software, this should be the text that is to be displayed + * with the program version. Four text markers can be replaced: , + * , and . + * + * The second section is a short description of the terms of the license. + * This is typically the kind of text that gets displayed in the header of + * source files. The third section is strictly the name of the license + * without any substitution markers. Only the , and + * markers are substituted. + * + * The third section is strictly the name of the license. + * No marker substitutions are performed. * * @example * Copyright (C) , all rights reserved. @@ -403,17 +560,18 @@ * modification and redistribution under the terms * of the GNU General Public License, version 3 or later * - * + * * is free software: you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software ... - * @end example * + * the GNU General Public License, version 3 or later + * @end example =*/ SCM ag_scm_license_full(SCM lic, SCM prog, SCM pfx, SCM owner, SCM years) { - return construct_license(3, lic, prog, pfx, owner, years); + return construct_license(LSEG_FULL, lic, prog, pfx, owner, years); } /*=gfunc license_description @@ -437,7 +595,7 @@ SCM ag_scm_license_description(SCM lic, SCM prog, SCM pfx, SCM owner) { - return construct_license(1, lic, prog, pfx, owner, SCM_UNDEFINED); + return construct_license(LSEG_DESC, lic, prog, pfx, owner, SCM_UNDEFINED); } /*=gfunc license_info @@ -464,7 +622,30 @@ SCM ag_scm_license_info(SCM lic, SCM prog, SCM pfx, SCM owner, SCM years) { - return construct_license(0, lic, prog, pfx, owner, years); + return construct_license(LSEG_INFO, lic, prog, pfx, owner, years); +} + +/*=gfunc license_name + * + * what: Emit the name of the license + * general_use: + * + * exparg: license, name of license type + * + * doc: + * + * Emit a string that contains the full name of the license. +=*/ +SCM +ag_scm_license_name(SCM lic) +{ + size_t text_len; + char * txt = find_lic_text(LSEG_NAME, lic, &text_len); + char * e = txt + strlen(txt); + while (IS_WHITESPACE_CHAR(e[-1]) && (e > txt)) e--; + *e = NUL; + lic = AG_SCM_STR02SCM(txt); + return lic; } /*=gfunc gpl @@ -640,14 +821,21 @@ * Make sure they are reasonably sized (less than * SCRIBBLE_SIZE). Copy them to the scratch buffer. */ - if (AG_SCM_STRLEN(prog_name) >= SCRIBBLE_SIZE) - AG_ABEND(aprf(zPfxMsg, zProgLen, SCRIBBLE_SIZE)); + { + static char const zPfxMsg[] = "%s may not exceed %d chars\n"; + static char const zProgLen[] = "program name length"; + static char const zOwnLen[] = "owner length"; + static char const zPfxLen[] = "prefix length"; - if (AG_SCM_STRLEN(prefix) >= SCRIBBLE_SIZE) - AG_ABEND(aprf(zPfxMsg, zPfxLen, SCRIBBLE_SIZE)); + if (AG_SCM_STRLEN(prog_name) >= SCRIBBLE_SIZE) + AG_ABEND(aprf(zPfxMsg, zProgLen, SCRIBBLE_SIZE)); - if (AG_SCM_STRLEN(owner) >= SCRIBBLE_SIZE) - AG_ABEND(aprf(zPfxMsg, zOwnLen, SCRIBBLE_SIZE)); + if (AG_SCM_STRLEN(prefix) >= SCRIBBLE_SIZE) + AG_ABEND(aprf(zPfxMsg, zPfxLen, SCRIBBLE_SIZE)); + + if (AG_SCM_STRLEN(owner) >= SCRIBBLE_SIZE) + AG_ABEND(aprf(zPfxMsg, zOwnLen, SCRIBBLE_SIZE)); + } /* * Reformat the string with the given arguments diff -Nru autogen-5.11.9/agen5/expGperf.c autogen-5.12/agen5/expGperf.c --- autogen-5.11.9/agen5/expGperf.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/agen5/expGperf.c 2011-06-03 21:20:16.000000000 +0200 @@ -1,13 +1,14 @@ -/* +/** + * @file expGperf.c * - * Time-stamp: "2010-12-06 13:18:05 bkorb" + * Time-stamp: "2011-06-03 12:20:16 bkorb" * * Create a perfect hash function program and use it to compute * index values for a list of provided names. It also documents how * to incorporate that hashing function into a generated C program. * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -24,14 +25,12 @@ */ #ifndef SHELL_ENABLED -SCM -ag_scm_make_gperf(SCM name, SCM hlist) +HIDE_FN(SCM ag_scm_make_gperf(SCM name, SCM hlist)) { return SCM_UNDEFINED; } -SCM -ag_scm_gperf(SCM name, SCM str) +HIDE_FN(SCM ag_scm_gperf(SCM name, SCM str)) { return SCM_UNDEFINED; } diff -Nru autogen-5.11.9/agen5/expGuile.c autogen-5.12/agen5/expGuile.c --- autogen-5.11.9/agen5/expGuile.c 2011-02-25 20:37:54.000000000 +0100 +++ autogen-5.12/agen5/expGuile.c 2011-06-03 21:18:16.000000000 +0200 @@ -1,14 +1,14 @@ /** - * \file expGuile.c + * @file expGuile.c * - * Time-stamp: "2011-02-25 11:37:54 bkorb" + * Time-stamp: "2011-06-03 12:13:11 bkorb" * * This module implements the expression functions that should * be part of Guile. * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -63,15 +63,9 @@ } { -#if GUILE_VERSION < 107000 - scm_t_port * pt = SCM_PTAB_ENTRY(port); - pt->line_number = line - 1; - pt->file_name = file; -#else - SCM ln = scm_from_int(line); + SCM ln = AG_SCM_INT2SCM(line); scm_set_port_filename_x(port, file); scm_set_port_line_x(port, ln); -#endif } } @@ -277,12 +271,12 @@ pz = (char*)(void*)AG_SCM_CHARS(str); while (--len >= 0) { char ch = *pz; - if (! isalnum(ch)) { + if (! IS_ALPHANUMERIC_CHAR(ch)) { - if (isspace(ch)) + if (IS_WHITESPACE_CHAR(ch)) ; - else if (isprint(ch)) + else if (IS_GRAPHIC_CHAR(ch)) *pz = '_'; else @@ -317,7 +311,7 @@ pz = (char*)(void*)AG_SCM_CHARS(str); while (--len >= 0) { char ch = *pz; - if (islower(ch)) + if (IS_LOWER_CASE_CHAR(ch)) *pz = toupper(ch); pz++; } @@ -374,15 +368,15 @@ while (--len >= 0) { char ch = *pz; - if (! isalnum(ch)) { + if (! IS_ALPHANUMERIC_CHAR(ch)) { word_start = AG_TRUE; } else if (word_start) { word_start = AG_FALSE; - if (islower(ch)) + if (IS_LOWER_CASE_CHAR(ch)) *pz = toupper(ch); - } else if (isupper(ch)) + } else if (IS_UPPER_CASE_CHAR(ch)) *pz = tolower(ch); pz++; @@ -438,7 +432,7 @@ pz = (char*)(void*)AG_SCM_CHARS(str); while (--len >= 0) { char ch = *pz; - if (isupper(ch)) + if (IS_UPPER_CASE_CHAR(ch)) *pz = tolower(ch); pz++; } @@ -498,19 +492,19 @@ while (--len >= 0) { unsigned int ch = *(pzs++); - if (islower(ch)) { + if (IS_LOWER_CASE_CHAR(ch)) { if (! cap_done) { ch = toupper(ch); cap_done = AG_TRUE; } - } else if (isupper(ch)) { + } else if (IS_UPPER_CASE_CHAR(ch)) { if (cap_done) ch = tolower(ch); else cap_done = AG_TRUE; - } else if (isdigit(ch)) { + } else if (IS_DEC_DIGIT_CHAR(ch)) { cap_done = AG_FALSE; } else { diff -Nru autogen-5.11.9/agen5/expMake.c autogen-5.12/agen5/expMake.c --- autogen-5.11.9/agen5/expMake.c 2011-04-20 23:26:01.000000000 +0200 +++ autogen-5.12/agen5/expMake.c 2011-06-03 21:19:50.000000000 +0200 @@ -1,8 +1,8 @@ -/* - * expMake.c +/** + * @file expMake.c * - * Time-stamp: "2011-04-20 14:26:01 bkorb" + * Time-stamp: "2011-06-03 12:19:50 bkorb" * * This module implements Makefile construction functions. * @@ -106,10 +106,10 @@ * skip all blank lines and other initial white space * in the source string. */ - if (! isspace(*pzText)) + if (! IS_WHITESPACE_CHAR(*pzText)) tabch = TAB; else { - while (isspace(*++pzText)) ; + while (IS_WHITESPACE_CHAR(*++pzText)) ; tabch = (pzText[-1] == TAB) ? NUL : TAB; } @@ -149,7 +149,7 @@ /* * Backup past trailing white space (other than newline). */ - while (isspace(pzOut[ -1 ]) && (pzOut[ -1 ] != NL)) + while (IS_WHITESPACE_CHAR(pzOut[ -1 ]) && (pzOut[ -1 ] != NL)) pzOut--; /* @@ -158,7 +158,7 @@ */ { char* pz = pzScn; - while (isspace(*pz)) { + while (IS_WHITESPACE_CHAR(*pz)) { if (*(pz++) == NL) pzScn = pz; } diff -Nru autogen-5.11.9/agen5/expOutput.c autogen-5.12/agen5/expOutput.c --- autogen-5.11.9/agen5/expOutput.c 2011-05-05 20:01:03.000000000 +0200 +++ autogen-5.12/agen5/expOutput.c 2011-06-03 21:18:19.000000000 +0200 @@ -1,8 +1,8 @@ /** - * \file expOutput.c + * @file expOutput.c * - * Time-stamp: "2011-05-05 11:01:03 bkorb" + * Time-stamp: "2011-06-03 11:46:31 bkorb" * * This module implements the output file manipulation function * @@ -197,7 +197,7 @@ make_writable(pz); if (OPT_VALUE_TRACE > TRACE_DEBUG_MESSAGE) - fprintf(pfTrace, "open_output_file '%s' mode %s\n", fname, mode); + fprintf(pfTrace, "%s '%s' mode %s\n", __func__, fname, mode); /* * Avoid printing temporary file names in the dependency file @@ -258,7 +258,8 @@ pz[ sz ] = NUL; if (OPT_VALUE_TRACE > TRACE_DEBUG_MESSAGE) - fprintf(pfTrace, "renaming %s to %s\n", pCurFp->pzOutName, pz); + fprintf(pfTrace, "%s %s to %s\n", __func__, + pCurFp->pzOutName, pz); rename(pCurFp->pzOutName, pz); /* @@ -313,10 +314,10 @@ } if (OPT_VALUE_TRACE >= TRACE_EXPRESSIONS) - fprintf(pfTrace, "out-pop%s\n", (res == SCM_UNDEFINED) ? "" : " #t"); + fprintf(pfTrace, "%s%s\n", __func__, (res == SCM_UNDEFINED) ? "" : " #t"); outputDepth--; - closeOutput(AG_FALSE); + out_close(AG_FALSE); return res; } @@ -391,7 +392,7 @@ pSuspended[ suspendCt-1 ].pzSuspendName = AG_SCM_TO_NEWSTR(susp_nm); pSuspended[ suspendCt-1 ].pOutDesc = pCurFp; if (OPT_VALUE_TRACE >= TRACE_EXPRESSIONS) - fprintf(pfTrace, "suspended output to '%s'\n", + fprintf(pfTrace, "%s '%s'\n", __func__, pSuspended[ suspendCt-1 ].pzSuspendName); pCurFp = pCurFp->pPrev; @@ -425,7 +426,7 @@ pSuspended[ ix ] = pSuspended[ suspendCt ]; ++outputDepth; if (OPT_VALUE_TRACE >= TRACE_EXPRESSIONS) - fprintf(pfTrace, "resuming output to '%s'\n", pzName); + fprintf(pfTrace, "%s '%s'\n", __func__, pzName); return SCM_UNDEFINED; } } @@ -643,7 +644,7 @@ pCurFp = p; if (OPT_VALUE_TRACE > TRACE_DEBUG_MESSAGE) - fprintf(pfTrace, "out-push-new on temp file\n"); + fprintf(pfTrace, "%s -- temp file %s\n", __func__, pzNewFile); return SCM_UNDEFINED; } #endif @@ -728,8 +729,8 @@ tbuf.modtime = outTime; utime(pCurFp->pzOutName, &tbuf); if (OPT_VALUE_TRACE > TRACE_DEBUG_MESSAGE) - fprintf(pfTrace, "switching output from %s to '%s'\n", - pCurFp->pzOutName, pzNewFile); + fprintf(pfTrace, "%s from %s to '%s'\n", + __func__, pCurFp->pzOutName, pzNewFile); pCurFp->pzOutName = pzNewFile; /* memory leak */ return SCM_UNDEFINED; diff -Nru autogen-5.11.9/agen5/expPrint.c autogen-5.12/agen5/expPrint.c --- autogen-5.11.9/agen5/expPrint.c 2011-01-21 01:21:45.000000000 +0100 +++ autogen-5.12/agen5/expPrint.c 2011-06-03 21:18:22.000000000 +0200 @@ -1,6 +1,6 @@ /** - * \file expPrint.c + * @file expPrint.c * * Time-stamp: "2011-01-20 16:21:45 bkorb" * diff -Nru autogen-5.11.9/agen5/expr.h autogen-5.12/agen5/expr.h --- autogen-5.11.9/agen5/expr.h 2011-05-06 16:07:05.000000000 +0200 +++ autogen-5.12/agen5/expr.h 2011-06-26 16:40:03.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (expr.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:05 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:03 AM by AutoGen 5.11.10pre11 * From the definitions expr.def * and the template file snarf * * copyright (c) 1992-2011 Bruce Korb - all rights reserved * - * AutoGen is free software: you can redistribute it and/or modify it +AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -20,7 +20,6 @@ * * You should have received a copy of the GNU General Public License along * with this program. If not, see . - * * Guile Implementation Routines - for the ag group */ @@ -90,6 +89,7 @@ extern SCM ag_scm_license_description(SCM, SCM, SCM, SCM); extern SCM ag_scm_license_full(SCM, SCM, SCM, SCM, SCM); extern SCM ag_scm_license_info(SCM, SCM, SCM, SCM, SCM); +extern SCM ag_scm_license_name(SCM); extern SCM ag_scm_low_lim(SCM); extern SCM ag_scm_make_gperf(SCM, SCM); extern SCM ag_scm_make_header_guard(SCM); diff -Nru autogen-5.11.9/agen5/expr.ini autogen-5.12/agen5/expr.ini --- autogen-5.11.9/agen5/expr.ini 2011-05-06 16:07:05.000000000 +0200 +++ autogen-5.12/agen5/expr.ini 2011-06-26 16:40:03.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (expr.ini) * - * It has been AutoGen-ed May 6, 2011 at 07:07:05 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:03 AM by AutoGen 5.11.10pre11 * From the definitions expr.def * and the template file snarf * * copyright (c) 1992-2011 Bruce Korb - all rights reserved * - * AutoGen is free software: you can redistribute it and/or modify it +AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -20,7 +20,6 @@ * * You should have received a copy of the GNU General Public License along * with this program. If not, see . - * * Guile Initializations - Ag Global Variables */ @@ -44,7 +43,7 @@ void ag_init(void) { -static char const g_nm[1049] = +static char const g_nm[1062] = "ag-fprintf\0" "ag-function?\0" "agpl\0" "base-name\0" "bsd\0" "c-string\0" @@ -66,40 +65,40 @@ "last-for?\0" "len\0" "lgpl\0" "license\0" "license-description\0" "license-full\0" - "license-info\0" "low-lim\0" - "make-gperf\0" "make-header-guard\0" - "make-tmp-dir\0" "makefile-script\0" - "match-value?\0" "max\0" - "min\0" "out-delete\0" - "out-depth\0" "out-emit-suspended\0" - "out-line\0" "out-move\0" - "out-name\0" "out-pop\0" - "out-push-add\0" "out-push-new\0" - "out-resume\0" "out-suspend\0" - "out-switch\0" "output-file-next-line\0" - "prefix\0" "printf\0" - "raw-shell-str\0" "set-option\0" - "set-writable\0" "shell\0" - "shell-str\0" "shellf\0" - "sprintf\0" "stack\0" - "string-capitalize\0" "string-capitalize!\0" - "*=*\0" "*==*\0" - "string-downcase\0" "string-downcase!\0" - "*~\0" "*~~\0" - "*=\0" "*==\0" - "==\0" "~\0" - "=\0" "*~*\0" - "*~~*\0" "~~\0" - "~*\0" "~~*\0" - "=*\0" "==*\0" - "string-substitute\0" "string->c-name!\0" - "string->camelcase\0" "string-tr\0" - "string-tr!\0" "string-upcase\0" - "string-upcase!\0" "sub-shell-str\0" - "suffix\0" "sum\0" - "time-string->number\0" "tpl-file\0" - "tpl-file-line\0" "tpl-file-next-line\0" - "version-compare\0"; + "license-info\0" "license-name\0" + "low-lim\0" "make-gperf\0" + "make-header-guard\0" "make-tmp-dir\0" + "makefile-script\0" "match-value?\0" + "max\0" "min\0" + "out-delete\0" "out-depth\0" + "out-emit-suspended\0" "out-line\0" + "out-move\0" "out-name\0" + "out-pop\0" "out-push-add\0" + "out-push-new\0" "out-resume\0" + "out-suspend\0" "out-switch\0" + "output-file-next-line\0" "prefix\0" + "printf\0" "raw-shell-str\0" + "set-option\0" "set-writable\0" + "shell\0" "shell-str\0" + "shellf\0" "sprintf\0" + "stack\0" "string-capitalize\0" + "string-capitalize!\0" "*=*\0" + "*==*\0" "string-downcase\0" + "string-downcase!\0" "*~\0" + "*~~\0" "*=\0" + "*==\0" "==\0" + "~\0" "=\0" + "*~*\0" "*~~*\0" + "~~\0" "~*\0" + "~~*\0" "=*\0" + "==*\0" "string-substitute\0" + "string->c-name!\0" "string->camelcase\0" + "string-tr\0" "string-tr!\0" + "string-upcase\0" "string-upcase!\0" + "sub-shell-str\0" "suffix\0" + "sum\0" "time-string->number\0" + "tpl-file\0" "tpl-file-line\0" + "tpl-file-next-line\0" "version-compare\0"; NEW_PROC(g_nm + 0, 2, 0, 1, ag_fprintf); NEW_PROC(g_nm + 11, 1, 0, 0, ag_function_p); @@ -144,72 +143,73 @@ NEW_PROC(g_nm + 339, 3, 1, 0, license_description); NEW_PROC(g_nm + 359, 3, 2, 0, license_full); NEW_PROC(g_nm + 372, 3, 2, 0, license_info); - NEW_PROC(g_nm + 385, 1, 0, 0, low_lim); - NEW_PROC(g_nm + 393, 1, 0, 1, make_gperf); - NEW_PROC(g_nm + 404, 1, 0, 0, make_header_guard); - NEW_PROC(g_nm + 422, 0, 0, 0, make_tmp_dir); - NEW_PROC(g_nm + 435, 1, 0, 0, makefile_script); - NEW_PROC(g_nm + 451, 3, 0, 0, match_value_p); - NEW_PROC(g_nm + 464, 0, 0, 1, max); - NEW_PROC(g_nm + 468, 0, 0, 1, min); - NEW_PROC(g_nm + 472, 0, 0, 0, out_delete); - NEW_PROC(g_nm + 483, 0, 0, 0, out_depth); - NEW_PROC(g_nm + 493, 1, 0, 0, out_emit_suspended); - NEW_PROC(g_nm + 512, 0, 0, 0, out_line); - NEW_PROC(g_nm + 521, 1, 0, 0, out_move); - NEW_PROC(g_nm + 530, 0, 0, 0, out_name); - NEW_PROC(g_nm + 539, 0, 1, 0, out_pop); - NEW_PROC(g_nm + 547, 1, 0, 0, out_push_add); - NEW_PROC(g_nm + 560, 0, 1, 0, out_push_new); - NEW_PROC(g_nm + 573, 1, 0, 0, out_resume); - NEW_PROC(g_nm + 584, 1, 0, 0, out_suspend); - NEW_PROC(g_nm + 596, 1, 0, 0, out_switch); - NEW_PROC(g_nm + 607, 0, 2, 0, output_file_next_line); - NEW_PROC(g_nm + 629, 2, 0, 0, prefix); - NEW_PROC(g_nm + 636, 1, 0, 1, printf); - NEW_PROC(g_nm + 643, 1, 0, 0, raw_shell_str); - NEW_PROC(g_nm + 657, 1, 0, 0, set_option); - NEW_PROC(g_nm + 668, 0, 1, 0, set_writable); - NEW_PROC(g_nm + 681, 1, 0, 0, shell); - NEW_PROC(g_nm + 687, 1, 0, 0, shell_str); - NEW_PROC(g_nm + 697, 1, 0, 1, shellf); - NEW_PROC(g_nm + 704, 1, 0, 1, sprintf); - NEW_PROC(g_nm + 712, 1, 0, 0, stack); - NEW_PROC(g_nm + 718, 1, 0, 0, string_capitalize); - NEW_PROC(g_nm + 736, 1, 0, 0, string_capitalize_x); - NEW_PROC(g_nm + 755, 2, 0, 0, string_contains_eqv_p); - NEW_PROC(g_nm + 759, 2, 0, 0, string_contains_p); - NEW_PROC(g_nm + 764, 1, 0, 0, string_downcase); - NEW_PROC(g_nm + 780, 1, 0, 0, string_downcase_x); - NEW_PROC(g_nm + 797, 2, 0, 0, string_end_eqv_match_p); - NEW_PROC(g_nm + 800, 2, 0, 0, string_end_match_p); - NEW_PROC(g_nm + 804, 2, 0, 0, string_ends_eqv_p); - NEW_PROC(g_nm + 807, 2, 0, 0, string_ends_with_p); - NEW_PROC(g_nm + 811, 2, 0, 0, string_equals_p); - NEW_PROC(g_nm + 814, 2, 0, 0, string_eqv_match_p); - NEW_PROC(g_nm + 816, 2, 0, 0, string_eqv_p); - NEW_PROC(g_nm + 818, 2, 0, 0, string_has_eqv_match_p); - NEW_PROC(g_nm + 822, 2, 0, 0, string_has_match_p); - NEW_PROC(g_nm + 827, 2, 0, 0, string_match_p); - NEW_PROC(g_nm + 830, 2, 0, 0, string_start_eqv_match_p); - NEW_PROC(g_nm + 833, 2, 0, 0, string_start_match_p); - NEW_PROC(g_nm + 837, 2, 0, 0, string_starts_eqv_p); - NEW_PROC(g_nm + 840, 2, 0, 0, string_starts_with_p); - NEW_PROC(g_nm + 844, 3, 0, 0, string_substitute); - NEW_PROC(g_nm + 862, 1, 0, 0, string_to_c_name_x); - NEW_PROC(g_nm + 878, 1, 0, 0, string_to_camelcase); - NEW_PROC(g_nm + 896, 3, 0, 0, string_tr); - NEW_PROC(g_nm + 906, 3, 0, 0, string_tr_x); - NEW_PROC(g_nm + 917, 1, 0, 0, string_upcase); - NEW_PROC(g_nm + 931, 1, 0, 0, string_upcase_x); - NEW_PROC(g_nm + 946, 1, 0, 0, sub_shell_str); - NEW_PROC(g_nm + 960, 0, 0, 0, suffix); - NEW_PROC(g_nm + 967, 0, 0, 1, sum); - NEW_PROC(g_nm + 971, 1, 0, 0, time_string_to_number); - NEW_PROC(g_nm + 991, 0, 1, 0, tpl_file); - NEW_PROC(g_nm +1000, 0, 1, 0, tpl_file_line); - NEW_PROC(g_nm +1014, 0, 1, 0, tpl_file_next_line); - NEW_PROC(g_nm +1033, 3, 0, 0, version_compare); + NEW_PROC(g_nm + 385, 1, 0, 0, license_name); + NEW_PROC(g_nm + 398, 1, 0, 0, low_lim); + NEW_PROC(g_nm + 406, 1, 0, 1, make_gperf); + NEW_PROC(g_nm + 417, 1, 0, 0, make_header_guard); + NEW_PROC(g_nm + 435, 0, 0, 0, make_tmp_dir); + NEW_PROC(g_nm + 448, 1, 0, 0, makefile_script); + NEW_PROC(g_nm + 464, 3, 0, 0, match_value_p); + NEW_PROC(g_nm + 477, 0, 0, 1, max); + NEW_PROC(g_nm + 481, 0, 0, 1, min); + NEW_PROC(g_nm + 485, 0, 0, 0, out_delete); + NEW_PROC(g_nm + 496, 0, 0, 0, out_depth); + NEW_PROC(g_nm + 506, 1, 0, 0, out_emit_suspended); + NEW_PROC(g_nm + 525, 0, 0, 0, out_line); + NEW_PROC(g_nm + 534, 1, 0, 0, out_move); + NEW_PROC(g_nm + 543, 0, 0, 0, out_name); + NEW_PROC(g_nm + 552, 0, 1, 0, out_pop); + NEW_PROC(g_nm + 560, 1, 0, 0, out_push_add); + NEW_PROC(g_nm + 573, 0, 1, 0, out_push_new); + NEW_PROC(g_nm + 586, 1, 0, 0, out_resume); + NEW_PROC(g_nm + 597, 1, 0, 0, out_suspend); + NEW_PROC(g_nm + 609, 1, 0, 0, out_switch); + NEW_PROC(g_nm + 620, 0, 2, 0, output_file_next_line); + NEW_PROC(g_nm + 642, 2, 0, 0, prefix); + NEW_PROC(g_nm + 649, 1, 0, 1, printf); + NEW_PROC(g_nm + 656, 1, 0, 0, raw_shell_str); + NEW_PROC(g_nm + 670, 1, 0, 0, set_option); + NEW_PROC(g_nm + 681, 0, 1, 0, set_writable); + NEW_PROC(g_nm + 694, 1, 0, 0, shell); + NEW_PROC(g_nm + 700, 1, 0, 0, shell_str); + NEW_PROC(g_nm + 710, 1, 0, 1, shellf); + NEW_PROC(g_nm + 717, 1, 0, 1, sprintf); + NEW_PROC(g_nm + 725, 1, 0, 0, stack); + NEW_PROC(g_nm + 731, 1, 0, 0, string_capitalize); + NEW_PROC(g_nm + 749, 1, 0, 0, string_capitalize_x); + NEW_PROC(g_nm + 768, 2, 0, 0, string_contains_eqv_p); + NEW_PROC(g_nm + 772, 2, 0, 0, string_contains_p); + NEW_PROC(g_nm + 777, 1, 0, 0, string_downcase); + NEW_PROC(g_nm + 793, 1, 0, 0, string_downcase_x); + NEW_PROC(g_nm + 810, 2, 0, 0, string_end_eqv_match_p); + NEW_PROC(g_nm + 813, 2, 0, 0, string_end_match_p); + NEW_PROC(g_nm + 817, 2, 0, 0, string_ends_eqv_p); + NEW_PROC(g_nm + 820, 2, 0, 0, string_ends_with_p); + NEW_PROC(g_nm + 824, 2, 0, 0, string_equals_p); + NEW_PROC(g_nm + 827, 2, 0, 0, string_eqv_match_p); + NEW_PROC(g_nm + 829, 2, 0, 0, string_eqv_p); + NEW_PROC(g_nm + 831, 2, 0, 0, string_has_eqv_match_p); + NEW_PROC(g_nm + 835, 2, 0, 0, string_has_match_p); + NEW_PROC(g_nm + 840, 2, 0, 0, string_match_p); + NEW_PROC(g_nm + 843, 2, 0, 0, string_start_eqv_match_p); + NEW_PROC(g_nm + 846, 2, 0, 0, string_start_match_p); + NEW_PROC(g_nm + 850, 2, 0, 0, string_starts_eqv_p); + NEW_PROC(g_nm + 853, 2, 0, 0, string_starts_with_p); + NEW_PROC(g_nm + 857, 3, 0, 0, string_substitute); + NEW_PROC(g_nm + 875, 1, 0, 0, string_to_c_name_x); + NEW_PROC(g_nm + 891, 1, 0, 0, string_to_camelcase); + NEW_PROC(g_nm + 909, 3, 0, 0, string_tr); + NEW_PROC(g_nm + 919, 3, 0, 0, string_tr_x); + NEW_PROC(g_nm + 930, 1, 0, 0, string_upcase); + NEW_PROC(g_nm + 944, 1, 0, 0, string_upcase_x); + NEW_PROC(g_nm + 959, 1, 0, 0, sub_shell_str); + NEW_PROC(g_nm + 973, 0, 0, 0, suffix); + NEW_PROC(g_nm + 980, 0, 0, 1, sum); + NEW_PROC(g_nm + 984, 1, 0, 0, time_string_to_number); + NEW_PROC(g_nm +1004, 0, 1, 0, tpl_file); + NEW_PROC(g_nm +1013, 0, 1, 0, tpl_file_line); + NEW_PROC(g_nm +1027, 0, 1, 0, tpl_file_next_line); + NEW_PROC(g_nm +1046, 3, 0, 0, version_compare); } #undef NEW_PROC /* end of expr.ini */ diff -Nru autogen-5.11.9/agen5/expState.c autogen-5.12/agen5/expState.c --- autogen-5.11.9/agen5/expState.c 2011-03-04 18:29:20.000000000 +0100 +++ autogen-5.12/agen5/expState.c 2011-06-03 21:18:25.000000000 +0200 @@ -1,6 +1,6 @@ /** - * \file expState.c + * @file expState.c * * This module implements expression functions that * query and get state information from AutoGen data. diff -Nru autogen-5.11.9/agen5/expString.c autogen-5.12/agen5/expString.c --- autogen-5.11.9/agen5/expString.c 2011-04-20 23:25:50.000000000 +0200 +++ autogen-5.12/agen5/expString.c 2011-06-03 21:18:28.000000000 +0200 @@ -1,8 +1,8 @@ /** - * \file expString.c + * @file expString.c * - * Time-stamp: "2011-04-20 14:25:50 bkorb" + * Time-stamp: "2011-05-31 16:34:42 bkorb" * * This module implements expression functions that * manipulate string values. @@ -43,11 +43,11 @@ static void do_substitution( char const * pzStr, - scm_sizet strLen, + size_t strLen, SCM match, SCM repl, char ** ppzRes, - scm_sizet * pResLen ); + size_t * pResLen); /* = = = END-STATIC-FORWARD = = = */ static size_t @@ -338,11 +338,11 @@ static void do_substitution( char const * pzStr, - scm_sizet strLen, + size_t strLen, SCM match, SCM repl, char ** ppzRes, - scm_sizet * pResLen ) + size_t * pResLen) { char* pzMatch = ag_scm2zchars(match, "match text"); char* pzRepl = ag_scm2zchars(repl, "repl text"); @@ -391,7 +391,7 @@ * The "match" and "repl" trees *must* be identical in structure. */ LOCAL void -do_multi_subs(char ** ppzStr, scm_sizet * pStrLen, SCM match, SCM repl) +do_multi_subs(char ** ppzStr, size_t * pStrLen, SCM match, SCM repl) { char* pzStr = *ppzStr; char* pzNxt = pzStr; @@ -516,14 +516,14 @@ SCM ag_scm_join(SCM sep, SCM list) { - int l_len, sv_l_len; - SCM car; - SCM alist = list; - size_t sep_len; - scm_sizet str_len; - char* pzRes; + int l_len, sv_l_len; + SCM car; + SCM alist = list; + size_t sep_len; + size_t str_len; + char * pzRes; char const * pzSep; - char* pzScan; + char * pzScan; if (! AG_SCM_STRING_P(sep)) return SCM_UNDEFINED; @@ -1117,8 +1117,8 @@ SCM ag_scm_string_tr(SCM Str, SCM From, SCM To) { - scm_sizet lenz = AG_SCM_STRLEN(Str); - SCM res = AG_SCM_STR2SCM(AG_SCM_CHARS(Str), lenz); + size_t lenz = AG_SCM_STRLEN(Str); + SCM res = AG_SCM_STR2SCM(AG_SCM_CHARS(Str), lenz); return ag_scm_string_tr_x(res, From, To); } @@ -1146,9 +1146,9 @@ SCM ag_scm_string_substitute(SCM Str, SCM Match, SCM Repl) { - char const * pzStr; - scm_sizet len; - SCM res; + char const * pzStr; + size_t len; + SCM res; if (! AG_SCM_STRING_P(Str)) return SCM_UNDEFINED; diff -Nru autogen-5.11.9/agen5/fmemopen.c autogen-5.12/agen5/fmemopen.c --- autogen-5.11.9/agen5/fmemopen.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/agen5/fmemopen.c 2011-06-26 16:39:38.000000000 +0200 @@ -1,11 +1,32 @@ +#if defined(ENABLE_FMEMOPEN) +#include + +typedef enum { + FMEMC_INVALID = 0, + FMEMC_GET_BUF_ADDR +} fmemctl_t; + +typedef struct { + enum { FMEMC_GBUF_LEAVE_OWNERSHIP, + FMEMC_GBUF_TAKE_OWNERSHIP + } own; + char * buffer; + size_t buf_size; + size_t eof; +} fmemc_get_buf_addr_t; + +#ifdef HURD +#define _IOT__IOTBASE_fmemc_get_buf_addr_t sizeof(fmemc_get_buf_addr_t) +#endif + +#define IOCTL_FMEMC_GET_BUF_ADDR \ + _IOWR('m', FMEMC_GET_BUF_ADDR, fmemc_get_buf_addr_t) /** - * \file fmemopen.c + * @file /old-home/bkorb/tools/mine/lib/fmemopen/fmemopen.c * * Copyright (c) 2004-2011 by Bruce Korb. All rights reserved. * - * Time-stamp: "2010-09-07 17:49:08 bkorb" - * * This code was inspired from software written by * Hanno Mueller, kontakt@hanno.de * and completely rewritten by Bruce Korb, bkorb@gnu.org @@ -31,54 +52,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#if defined(ENABLE_FMEMOPEN) - -/*=--subblock=arg=arg_type,arg_name,arg_desc =*/ -/*=* - * library: fmem - * header: libfmem.h - * - * lib_description: - * - * This library only functions in the presence of GNU or BSD's libc. - * It is distributed under the Berkeley Software Distribution License. - * This library can only function if there is a libc-supplied mechanism - * for fread/fwrite/fseek/fclose to call into this code. GNU uses - * fopencookie and BSD supplies funopen. -=*/ -/* - * ag_fmemopen() - "my" version of a string stream - * inspired by the glibc version, but completely rewritten and - * extended by Bruce Korb - bkorb@gnu.org - * - * - See the man page. - */ - -#if defined(__linux) -# if ! defined(_GNU_SOURCE) -# define _GNU_SOURCE -# endif - -# define HAVE_FOPENCOOKIE 1 -# undef HAVE_FUNOPEN -#endif - -#ifdef _NETBSD_SOURCE -# undef HAVE_FOPENCOOKIE -# define HAVE_FUNOPEN 1 -#endif - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - #if defined(HAVE_FOPENCOOKIE) # if defined(HAVE_LIBIO_H) # include @@ -86,14 +59,10 @@ typedef off64_t * seek_off_t; typedef int seek_ret_t; -# define FOPENCOOKIE_INTERFACE 1 -# undef FUNOPEN_INTERFACE #elif defined(HAVE_FUNOPEN) typedef fpos_t seek_off_t; typedef fpos_t seek_ret_t; -# undef FOPENCOOKIE_INTERFACE -# define FUNOPEN_INTERFACE 1 # ifdef NEED_COOKIE_FUNCTION_TYPEDEFS typedef int (cookie_read_function_t )(void *, char *, int); @@ -101,35 +70,8 @@ typedef fpos_t (cookie_seek_function_t )(void *, fpos_t, int); typedef int (cookie_close_function_t)(void *); # endif /* NEED_COOKIE_FUNCTION_TYPEDEFS */ - -#else -# error OOPS - Choke Me. #endif -#ifndef NUL -# define NUL '\0' -#endif - -typedef enum { - FMEMC_INVALID = 0, - FMEMC_GET_BUF_ADDR -} fmemctl_t; - -#define FMEMC_IOCTL_BASE 'm' - -typedef struct { - enum { FMEMC_GBUF_LEAVE_OWNERSHIP, - FMEMC_GBUF_TAKE_OWNERSHIP - } own; - char * buffer; - size_t buf_size; - size_t eof; -} fmemc_get_buf_addr_t; - -#define IOCTL_FMEMC_GET_BUF_ADDR \ - _IOWR(FMEMC_IOCTL_BASE, FMEMC_GET_BUF_ADDR, fmemc_get_buf_addr_t) - #define PROP_TABLE \ _Prop_( read, "Read from buffer" ) \ _Prop_( write, "Write to buffer" ) \ @@ -166,6 +108,14 @@ fmem_cookie_t * cookie; } cookie_fp_map_t; +#ifndef AUTOGEN_BUILD +/** + * invent our own boolean rather than try to work around all the ways + * different systems spell it. + */ +typedef enum { AG_FALSE = 0, AG_TRUE = 1 } ag_bool; +#endif + static cookie_fp_map_t const * map = NULL; static unsigned int map_ct = 0; static unsigned int map_alloc_ct = 0; @@ -385,7 +335,7 @@ size_t new_pos; fmem_cookie_t *pFMC = cookie; -#ifdef FOPENCOOKIE_INTERFACE +#ifdef HAVE_FOPENCOOKIE /* * GNU interface: offset passed and returned by address. */ @@ -421,7 +371,7 @@ pFMC->next_ix = new_pos; -#ifdef FOPENCOOKIE_INTERFACE +#ifdef HAVE_FOPENCOOKIE *offset = (off64_t)new_pos; return 0; #else @@ -687,7 +637,7 @@ cookie_write_function_t* pWr = (pFMC->mode & FLAG_BIT(write)) ? (cookie_write_function_t*)fmem_write : NULL; -#ifdef FOPENCOOKIE_INTERFACE +#ifdef HAVE_FOPENCOOKIE cookie_io_functions_t iof; iof.read = pRd; iof.write = pWr; @@ -748,11 +698,7 @@ fmem_cookie_t * cookie; fmemc_get_buf_addr_t * gba; - switch (req) { - case IOCTL_FMEMC_GET_BUF_ADDR: - break; - - default: + if (req != IOCTL_FMEMC_GET_BUF_ADDR) { /* * It is not any of the IOCTL commands we know about. */ @@ -795,11 +741,11 @@ return 0; } -#endif /* ENABLE_FMEMOPEN */ /* * Local Variables: * mode: C * c-file-style: "stroustrup" * indent-tabs-mode: nil * End: - * end of agen5/fmemopen.c */ + * end of fmemopen.c */ +#endif /* ENABLE_FMEMOPEN */ diff -Nru autogen-5.11.9/agen5/fsm.tpl autogen-5.12/agen5/fsm.tpl --- autogen-5.11.9/agen5/fsm.tpl 2011-04-21 02:32:26.000000000 +0200 +++ autogen-5.12/agen5/fsm.tpl 2011-06-03 21:10:58.000000000 +0200 @@ -4,10 +4,10 @@ c=%s-fsm.c -# Time-stamp: "2011-04-20 17:32:26 bkorb" +# Time-stamp: "2011-06-03 12:10:58 bkorb" ## This file is part of AutoGen. -## AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved +## Copyright (c) 1992-2011 Bruce Korb - all rights reserved ## ## AutoGen is free software: you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the @@ -149,7 +149,6 @@ #define DEFINE_FSM #include "[=(. header-file)=]" #include -#include [=IF (exist? "handler-file")=] #define FSM_USER_HEADERS #include "[= handler-file =]" diff -Nru autogen-5.11.9/agen5/funcCase.c autogen-5.12/agen5/funcCase.c --- autogen-5.11.9/agen5/funcCase.c 2011-01-31 21:18:34.000000000 +0100 +++ autogen-5.12/agen5/funcCase.c 2011-06-03 21:18:33.000000000 +0200 @@ -1,10 +1,10 @@ /** - * \file funcCase.c + * @file funcCase.c * * This module implements the CASE text function. * - * Time-stamp: "2011-01-31 12:18:34 bkorb" + * Time-stamp: "2011-06-03 11:54:20 bkorb" */ /* * This file is part of AutoGen. @@ -1190,7 +1190,7 @@ */ if (*pzSrc == '*') { pzSrc++; - if (isspace(*pzSrc) || (*pzSrc == NUL)) { + if (IS_WHITESPACE_CHAR(*pzSrc) || (*pzSrc == NUL)) { typ = (int)FTYP_SELECT_MATCH_ANYTHING; srcLen = 0; pMac->ozText = 0; @@ -1235,7 +1235,7 @@ default: goto bad_sel; } - if ((pzSrc[1] != NUL) && (! isspace(pzSrc[1]))) + if ((pzSrc[1] != NUL) && (! IS_WHITESPACE_CHAR(pzSrc[1]))) goto bad_sel; typ = (int)((pzSrc[-1] == '!') @@ -1259,10 +1259,10 @@ typ |= (int)FTYP_SELECT_COMPARE_SKP_END; } - if (! isspace(*pzSrc)) + if (! IS_WHITESPACE_CHAR(*pzSrc)) AG_ABEND_IN(pT, pMac, zInvSel); - while (isspace(*pzSrc)) pzSrc++; + while (IS_WHITESPACE_CHAR(*pzSrc)) pzSrc++; srcLen -= pzSrc - (char const *)pMac->ozText; if (srcLen <= 0) AG_ABEND_IN(pT, pMac, zInvSel); diff -Nru autogen-5.11.9/agen5/funcDef.c autogen-5.12/agen5/funcDef.c --- autogen-5.11.9/agen5/funcDef.c 2011-04-22 01:51:41.000000000 +0200 +++ autogen-5.12/agen5/funcDef.c 2011-06-06 00:31:33.000000000 +0200 @@ -1,10 +1,10 @@ /** - * \file funcDef.c + * @file funcDef.c * * This module implements the DEFINE text function. * - * Time-stamp: "2011-04-21 16:51:41 bkorb" + * Time-stamp: "2011-06-05 15:31:33 bkorb" * * This file is part of AutoGen. * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved @@ -51,7 +51,7 @@ fill_in_values(tDefList * pDL, char * pzScan, tTemplate* pT, tMacro* pMac); static void -prep_invoke_args(tMacro* pMac); +prep_invoke_args(tMacro * pMac); static void build_defs(int defCt, tDefList* pList); @@ -338,10 +338,10 @@ } static void -prep_invoke_args(tMacro* pMac) +prep_invoke_args(tMacro * pMac) { - char* pzText; - tTemplate* pT = pCurTemplate; + char * pzText; + tTemplate * pT = pCurTemplate; if (pMac->ozText == 0) AG_ABEND_IN(pT, pMac, "The INVOKE macro requires a name"); @@ -682,8 +682,8 @@ * the first time the macro is processed and evaluated again every * time the macro is evaluated. =*/ -tMacro* -mFunc_Invoke(tTemplate* pT, tMacro* pMac) +tMacro * +mFunc_Invoke(tTemplate * pT, tMacro * pMac) { char* pzText; SCM macName; @@ -735,14 +735,13 @@ return mFunc_Define(pT, pMac); } - /* Load Debug * * what: Loads the debug function so you can set breakpoints * at load time, too :-) */ -tMacro* -mLoad_Debug(tTemplate* pT, tMacro* pMac, char const ** ppzScan) +tMacro * +mLoad_Debug(tTemplate * pT, tMacro * pMac, char const ** ppzScan) { if (OPT_VALUE_TRACE >= TRACE_DEBUG_MESSAGE) return mLoad_Unknown(pT, pMac, ppzScan); @@ -750,13 +749,13 @@ } -tMacro* -mLoad_Define(tTemplate* pT, tMacro* pMac, char const ** ppzScan) +tMacro * +mLoad_Define(tTemplate * pT, tMacro * pMac, char const ** ppzScan) { static char const zNameNeeded[] = "DEFINE requires a name"; - char* pzCopy; /* next text dest */ - tTemplate* pNewT; + char * pzCopy; /* next text dest */ + tTemplate * pNewT; /* * Save the global macro loading mode diff -Nru autogen-5.11.9/agen5/funcEval.c autogen-5.12/agen5/funcEval.c --- autogen-5.11.9/agen5/funcEval.c 2011-05-05 20:02:50.000000000 +0200 +++ autogen-5.12/agen5/funcEval.c 2011-06-03 21:18:39.000000000 +0200 @@ -1,6 +1,6 @@ /** - * \file funcEval.c + * @file funcEval.c * * This module evaluates macro expressions. * diff -Nru autogen-5.11.9/agen5/funcFor.c autogen-5.12/agen5/funcFor.c --- autogen-5.11.9/agen5/funcFor.c 2011-04-20 23:25:32.000000000 +0200 +++ autogen-5.12/agen5/funcFor.c 2011-06-03 21:19:38.000000000 +0200 @@ -1,7 +1,8 @@ -/* +/** + * @file funcFor.c * - * Time-stamp: "2011-04-20 14:25:32 bkorb" + * Time-stamp: "2011-06-03 12:19:38 bkorb" * * This module implements the FOR text macro. * diff -Nru autogen-5.11.9/agen5/funcIf.c autogen-5.12/agen5/funcIf.c --- autogen-5.11.9/agen5/funcIf.c 2011-01-27 21:39:51.000000000 +0100 +++ autogen-5.12/agen5/funcIf.c 2011-06-03 21:18:42.000000000 +0200 @@ -1,6 +1,6 @@ /** - * \file funcIf.c + * @file funcIf.c * * Time-stamp: "2011-01-27 12:39:51 bkorb" * diff -Nru autogen-5.11.9/agen5/functions.c autogen-5.12/agen5/functions.c --- autogen-5.11.9/agen5/functions.c 2011-04-20 23:22:51.000000000 +0200 +++ autogen-5.12/agen5/functions.c 2011-06-03 21:18:45.000000000 +0200 @@ -1,8 +1,8 @@ /** - * \file functions.c + * @file functions.c * - * Time-stamp: "2011-04-20 14:22:51 bkorb" + * Time-stamp: "2011-06-03 11:54:40 bkorb" * * This module implements text functions. * @@ -61,7 +61,7 @@ if (pM->funcCode == FTYP_TEXT) { char* pz = pNewTpl->pzTemplText + pM->ozText; char* pzE = pz + strlen(pz); - while ((pzE > pz) && isspace(pzE[-1])) --pzE; + while ((pzE > pz) && IS_WHITESPACE_CHAR(pzE[-1])) --pzE; /* * IF there is no text left, remove the macro entirely @@ -233,8 +233,8 @@ * [+ # say what you want, but no '+' before any ']' chars +] * @end example =*/ -tMacro* -mLoad_Comment(tTemplate* pT, tMacro* pMac, char const ** ppzScan) +tMacro * +mLoad_Comment(tTemplate * pT, tMacro * pMac, char const ** ppzScan) { memset((void*)pMac, 0, sizeof(*pMac)); return pMac; @@ -247,8 +247,8 @@ * Move any text into the text offset field. * This is used as the default load mechanism. */ -tMacro* -mLoad_Unknown(tTemplate* pT, tMacro* pMac, char const ** ppzScan) +tMacro * +mLoad_Unknown(tTemplate * pT, tMacro * pMac, char const ** ppzScan) { char * pzCopy = pT->pNext; char const * pzSrc; @@ -270,7 +270,7 @@ goto return_emtpy_expression; } - while (--srcLen, isspace(*++pzSrc)) { + while (--srcLen, IS_WHITESPACE_CHAR(*++pzSrc)) { if (srcLen <= 0) goto return_emtpy_expression; } @@ -293,7 +293,7 @@ * Move back the source pointer. We may have skipped blanks, * so skip over however many first, then back up over the name. */ - while (isspace(pzSrc[-1])) pzSrc--, srcLen++; + while (IS_WHITESPACE_CHAR(pzSrc[-1])) pzSrc--, srcLen++; remLen = strlen(pzCopy); pzSrc -= remLen; srcLen += remLen; diff -Nru autogen-5.11.9/agen5/functions.h autogen-5.12/agen5/functions.h --- autogen-5.11.9/agen5/functions.h 2011-05-06 16:07:14.000000000 +0200 +++ autogen-5.12/agen5/functions.h 2011-06-26 16:40:11.000000000 +0200 @@ -10,7 +10,7 @@ * * copyright (c) 1992-2011 by Bruce Korb - all rights reserved * - * AutoGen is free software: you can redistribute it and/or modify it +AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -22,7 +22,6 @@ * * You should have received a copy of the GNU General Public License along * with this program. If not, see . - * * The 21 AutoGen functions are tagged with special attributes: * @@ -305,7 +304,7 @@ NULL }; -#define FUNCTION_CKSUM ((unsigned short)0xAB4A) +#define FUNCTION_CKSUM ((unsigned short)0xDC25) #endif /* AUTOGEN_FUNCTIONS_H_GUARD */ /* functions.h ends here */ diff -Nru autogen-5.11.9/agen5/guile-iface.def autogen-5.12/agen5/guile-iface.def --- autogen-5.11.9/agen5/guile-iface.def 2011-04-30 01:23:21.000000000 +0200 +++ autogen-5.12/agen5/guile-iface.def 2011-06-01 02:15:44.000000000 +0200 @@ -10,32 +10,16 @@ #endif iface = { - i-name = apply2; - i-args = '_op, _f, _tst'; - i-impl = { i-end = '108'; i-code = 'gh_call2(_op, _f, _tst)'; }; - i-impl = { i-end = '201'; - i-code = 'scm_apply(_op, _f, scm_cons(_tst, AG_SCM_LISTOFNULL()))'; }; -}; - -iface = { i-name = bool_p; i-args = '_b'; - i-impl = { i-end = '108'; i-code = 'SCM_BOOLP(_b)'; }; + i-impl = { i-end = '107'; i-code = 'SCM_BOOLP(_b)'; }; i-impl = { i-end = '201'; i-code = 'scm_is_bool(_b)'; }; }; iface = { - i-name = boot_guile; - i-args = '_ac, _av, _im'; - i-impl = { i-end = '108'; i-code = 'gh_enter((_ac), (_av), (_im))'; }; - i-impl = { i-end = '201'; - i-code = 'scm_boot_guile((_ac), (_av), (_im), NULL)'; }; -}; - -iface = { i-name = char; i-args = '_c'; - i-impl = { i-end = '108'; i-code = 'gh_scm2char(_c)'; }; + i-impl = { i-end = '107'; i-code = 'gh_scm2char(_c)'; }; i-impl = { i-end = '201'; i-code = 'SCM_CHAR(_c)'; }; }; @@ -43,25 +27,10 @@ i-name = chars; i-args = '_s'; i-impl = { i-end = '107'; i-code = 'SCM_CHARS(_s)'; }; - i-impl = { i-end = '108'; i-code = 'SCM_STRING_CHARS(_s)'; }; i-impl = { i-end = '201'; i-code = 'scm_i_string_chars(_s)'; }; }; iface = { - i-name = char_p; - i-args = '_c'; - i-impl = { i-end = '201'; i-code = 'SCM_CHARP(_c)'; }; -}; - -iface = { - i-name = display; - i-args = '_s'; - i-impl = { i-end = '108'; i-code = 'gh_display(_s)'; }; - i-impl = { i-end = '201'; - i-code = 'scm_display(_s, scm_current_output_port())'; }; -}; - -iface = { i-name = falsep; i-args = '_r'; i-impl = { i-end = '107'; i-code = 'SCM_FALSEP(_r)'; }; @@ -71,14 +40,14 @@ iface = { i-name = from_long; i-args = '_l'; - i-impl = { i-end = '108'; i-code = 'gh_long2scm(_l)'; }; + i-impl = { i-end = '107'; i-code = 'gh_long2scm(_l)'; }; i-impl = { i-end = '201'; i-code = 'scm_from_long(_l)'; }; }; iface = { i-name = int2scm; i-args = '_i'; - i-impl = { i-end = '108'; i-code = 'gh_int2scm(_i)'; }; + i-impl = { i-end = '107'; i-code = 'gh_int2scm(_i)'; }; i-impl = { i-end = '201'; i-code = 'scm_from_int(_i)'; }; }; @@ -98,14 +67,14 @@ iface = { i-name = listofnull; - i-impl = { i-end = '109'; i-code = 'scm_listofnull'; }; + i-impl = { i-end = '107'; i-code = 'scm_listofnull'; }; i-impl = { i-end = '201'; i-code = 'scm_list_1(SCM_EOL)'; }; }; iface = { i-name = long2scm; i-args = '_i'; - i-impl = { i-end = '108'; i-code = 'gh_long2scm(_i)'; }; + i-impl = { i-end = '107'; i-code = 'gh_long2scm(_i)'; }; i-impl = { i-end = '201'; i-code = 'scm_from_long(_i)'; }; }; @@ -161,28 +130,28 @@ iface = { i-name = strlen; i-args = '_s'; - i-impl = { i-end = '108'; i-code = 'SCM_STRING_LENGTH(_s)'; }; + i-impl = { i-end = '107'; i-code = 'SCM_STRING_LENGTH(_s)'; }; i-impl = { i-end = '201'; i-code = 'scm_c_string_length(_s)'; }; }; iface = { i-name = sym_p; i-args = '_s'; - i-impl = { i-end = '108'; i-code = 'SCM_SYMBOLP(_s)'; }; + i-impl = { i-end = '107'; i-code = 'SCM_SYMBOLP(_s)'; }; i-impl = { i-end = '201'; i-code = 'scm_is_symbol(_s)'; }; }; iface = { i-name = to_int; i-args = '_i'; - i-impl = { i-end = '108'; i-code = 'gh_scm2int(_i)'; }; + i-impl = { i-end = '107'; i-code = 'gh_scm2int(_i)'; }; i-impl = { i-end = '201'; i-code = 'scm_to_int(_i)'; }; }; iface = { i-name = to_long; i-args = '_v'; - i-impl = { i-end = '108'; i-code = 'gh_scm2long(_v)'; }; + i-impl = { i-end = '107'; i-code = 'gh_scm2long(_v)'; }; i-impl = { i-end = '201'; i-code = 'scm_to_long(_v)'; }; }; @@ -196,13 +165,13 @@ iface = { i-name = to_ulong; i-args = '_v'; - i-impl = { i-end = '108'; i-code = 'gh_scm2ulong(_v)'; }; + i-impl = { i-end = '107'; i-code = 'gh_scm2ulong(_v)'; }; i-impl = { i-end = '201'; i-code = 'scm_to_ulong(_v)'; }; }; iface = { i-name = vec_p; i-args = '_v'; - i-impl = { i-end = '108'; i-code = 'SCM_VECTORP(_v)'; }; + i-impl = { i-end = '107'; i-code = 'SCM_VECTORP(_v)'; }; i-impl = { i-end = '201'; i-code = 'scm_is_vector(_v)'; }; }; diff -Nru autogen-5.11.9/agen5/guile-iface.h autogen-5.12/agen5/guile-iface.h --- autogen-5.11.9/agen5/guile-iface.h 2011-05-06 16:07:15.000000000 +0200 +++ autogen-5.12/agen5/guile-iface.h 2011-06-26 16:40:12.000000000 +0200 @@ -1,12 +1,7 @@ #if GUILE_VERSION < 107000 -# define AG_SCM_APPLY2(_op, _f, _tst) gh_call2(_op, _f, _tst) # define AG_SCM_BOOL_P(_b) SCM_BOOLP(_b) -# define AG_SCM_BOOT_GUILE(_ac, _av, _im) \ - gh_enter((_ac), (_av), (_im)) # define AG_SCM_CHAR(_c) gh_scm2char(_c) # define AG_SCM_CHARS(_s) SCM_CHARS(_s) -# define AG_SCM_CHAR_P(_c) SCM_CHARP(_c) -# define AG_SCM_DISPLAY(_s) gh_display(_s) # define AG_SCM_FALSEP(_r) SCM_FALSEP(_r) # define AG_SCM_FROM_LONG(_l) gh_long2scm(_l) # define AG_SCM_INT2SCM(_i) gh_int2scm(_i) @@ -29,81 +24,10 @@ # define AG_SCM_TO_ULONG(_v) gh_scm2ulong(_v) # define AG_SCM_VEC_P(_v) SCM_VECTORP(_v) -#elif GUILE_VERSION < 108000 -# define AG_SCM_APPLY2(_op, _f, _tst) gh_call2(_op, _f, _tst) -# define AG_SCM_BOOL_P(_b) SCM_BOOLP(_b) -# define AG_SCM_BOOT_GUILE(_ac, _av, _im) \ - gh_enter((_ac), (_av), (_im)) -# define AG_SCM_CHAR(_c) gh_scm2char(_c) -# define AG_SCM_CHARS(_s) SCM_STRING_CHARS(_s) -# define AG_SCM_CHAR_P(_c) SCM_CHARP(_c) -# define AG_SCM_DISPLAY(_s) gh_display(_s) -# define AG_SCM_FALSEP(_r) scm_is_false(_r) -# define AG_SCM_FROM_LONG(_l) gh_long2scm(_l) -# define AG_SCM_INT2SCM(_i) gh_int2scm(_i) -# define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p)) -# define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l)) -# define AG_SCM_LISTOFNULL() scm_listofnull -# define AG_SCM_LONG2SCM(_i) gh_long2scm(_i) -# define AG_SCM_NFALSEP(_r) scm_is_true(_r) -# define AG_SCM_NULLP(_m) scm_is_null(_m) -# define AG_SCM_NUM_P(_n) scm_is_number(_n) -# define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p)) -# define AG_SCM_STR02SCM(_s) scm_from_locale_string(_s) -# define AG_SCM_STR2SCM(_st,_sz) scm_from_locale_stringn(_st,_sz) -# define AG_SCM_STRING_P(_s) scm_is_string(_s) -# define AG_SCM_STRLEN(_s) SCM_STRING_LENGTH(_s) -# define AG_SCM_SYM_P(_s) SCM_SYMBOLP(_s) -# define AG_SCM_TO_INT(_i) gh_scm2int(_i) -# define AG_SCM_TO_LONG(_v) gh_scm2long(_v) -# define AG_SCM_TO_NEWSTR(_s) scm_to_locale_string(_s) -# define AG_SCM_TO_ULONG(_v) gh_scm2ulong(_v) -# define AG_SCM_VEC_P(_v) SCM_VECTORP(_v) - -#elif GUILE_VERSION < 109000 -# define AG_SCM_APPLY2(_op, _f, _tst) \ - scm_apply(_op, _f, scm_cons(_tst, AG_SCM_LISTOFNULL())) -# define AG_SCM_BOOL_P(_b) scm_is_bool(_b) -# define AG_SCM_BOOT_GUILE(_ac, _av, _im) \ - scm_boot_guile((_ac), (_av), (_im), NULL) -# define AG_SCM_CHAR(_c) SCM_CHAR(_c) -# define AG_SCM_CHARS(_s) scm_i_string_chars(_s) -# define AG_SCM_CHAR_P(_c) SCM_CHARP(_c) -# define AG_SCM_DISPLAY(_s) \ - scm_display(_s, scm_current_output_port()) -# define AG_SCM_FALSEP(_r) scm_is_false(_r) -# define AG_SCM_FROM_LONG(_l) scm_from_long(_l) -# define AG_SCM_INT2SCM(_i) scm_from_int(_i) -# define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p)) -# define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l)) -# define AG_SCM_LISTOFNULL() scm_listofnull -# define AG_SCM_LONG2SCM(_i) scm_from_long(_i) -# define AG_SCM_NFALSEP(_r) scm_is_true(_r) -# define AG_SCM_NULLP(_m) scm_is_null(_m) -# define AG_SCM_NUM_P(_n) scm_is_number(_n) -# define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p)) -# define AG_SCM_STR02SCM(_s) scm_from_locale_string(_s) -# define AG_SCM_STR2SCM(_st,_sz) scm_from_locale_stringn(_st,_sz) -# define AG_SCM_STRING_P(_s) scm_is_string(_s) -# define AG_SCM_STRLEN(_s) scm_c_string_length(_s) -# define AG_SCM_SYM_P(_s) scm_is_symbol(_s) -# define AG_SCM_TO_INT(_i) scm_to_int(_i) -# define AG_SCM_TO_LONG(_v) scm_to_long(_v) -# define AG_SCM_TO_NEWSTR(_s) scm_to_locale_string(_s) -# define AG_SCM_TO_ULONG(_v) scm_to_ulong(_v) -# define AG_SCM_VEC_P(_v) scm_is_vector(_v) - #elif GUILE_VERSION < 201000 -# define AG_SCM_APPLY2(_op, _f, _tst) \ - scm_apply(_op, _f, scm_cons(_tst, AG_SCM_LISTOFNULL())) # define AG_SCM_BOOL_P(_b) scm_is_bool(_b) -# define AG_SCM_BOOT_GUILE(_ac, _av, _im) \ - scm_boot_guile((_ac), (_av), (_im), NULL) # define AG_SCM_CHAR(_c) SCM_CHAR(_c) # define AG_SCM_CHARS(_s) scm_i_string_chars(_s) -# define AG_SCM_CHAR_P(_c) SCM_CHARP(_c) -# define AG_SCM_DISPLAY(_s) \ - scm_display(_s, scm_current_output_port()) # define AG_SCM_FALSEP(_r) scm_is_false(_r) # define AG_SCM_FROM_LONG(_l) scm_from_long(_l) # define AG_SCM_INT2SCM(_i) scm_from_int(_i) @@ -125,40 +49,6 @@ # define AG_SCM_TO_NEWSTR(_s) scm_to_locale_string(_s) # define AG_SCM_TO_ULONG(_v) scm_to_ulong(_v) # define AG_SCM_VEC_P(_v) scm_is_vector(_v) - -# define scm_sizet size_t - #else #error unknown GUILE_VERSION #endif - -#if GUILE_VERSION < 107000 /* pre-Guile 1.7.x */ - - static inline char * ag_scm2zchars(SCM s, char const * type) - { - if (! AG_SCM_STRING_P(s)) - AG_ABEND(aprf(zNotStr, type)); - - if (SCM_SUBSTRP(s)) - s = scm_makfromstr(SCM_CHARS(s), SCM_LENGTH(s), 0); - return SCM_CHARS(s); - } - -#else /* Guile 1.7 and following */ - - extern char * ag_scm2zchars(SCM s, char const * type); - -#endif - -static inline SCM ag_eval(char const * pzStr) -{ - SCM res; - char const * pzSaveScheme = pzLastScheme; /* Watch for nested calls */ - pzLastScheme = pzStr; - - res = ag_scm_c_eval_string_from_file_line( - pzStr, pCurTemplate->pzTplFile, pCurMacro->lineNo); - - pzLastScheme = pzSaveScheme; - return res; -} diff -Nru autogen-5.11.9/agen5/guile-iface.tpl autogen-5.12/agen5/guile-iface.tpl --- autogen-5.11.9/agen5/guile-iface.tpl 2011-02-23 20:36:04.000000000 +0100 +++ autogen-5.12/agen5/guile-iface.tpl 2011-05-31 20:47:04.000000000 +0200 @@ -23,6 +23,22 @@ done } +emit_iface_macro() { + NM=$(echo $i | tr a-z- A-Z_) + eval NM=\"$NM\(\${${i}_args}\)\" + if test ${#code} -lt 40 -a ${#NM} -lt 22 + then + printf '# define AG_SCM_%-21s %s\n' "${NM}" "${code}" + else + printf '# define AG_SCM_%-21s \\\n %s\n' "${NM}" "${code}" + fi +} + +emit_iface_type() { + local nm=ag_scm_$(echo $i | tr A-Z- a-z_) + printf '# define %-28s %s\n' $nm "$code" +} + prt_tbl() { if='#if ' for v in $v_list @@ -32,15 +48,12 @@ for i in $i_list do - NM=$(echo $i | tr a-z- A-Z_) - eval NM=\"$NM\(\${${i}_args}\)\" + eval type=\"\${${i}_type}\" eval code=\"\${${i}_vals[$v]}\" - if test ${#code} -lt 40 -a ${#NM} -lt 22 - then - printf '# define AG_SCM_%-21s %s\n' "${NM}" "${code}" - else - printf '# define AG_SCM_%-21s \\\n %s\n' "${NM}" "${code}" - fi + case "$type" in + ( macro | '' ) emit_iface_macro ;; + ( typedef ) emit_iface_type ;; + esac done echo @@ -54,7 +67,9 @@ (shell (string-append "val='" (get "i-impl[].i-code") "'\n" (get "i-name") "_args='" (get "i-args") "'\n" - "name=" (get "i-name") + "name=" (get "i-name") "\n" + (get "i-name") "_type=" (get "i-type" "macro") + )) =][= FOR i-impl =][= @@ -72,40 +87,6 @@ `prt_tbl` =] - -# define scm_sizet size_t - #else #error unknown GUILE_VERSION #endif - -#if GUILE_VERSION < 107000 /* pre-Guile 1.7.x */ - - static inline char * ag_scm2zchars(SCM s, char const * type) - { - if (! AG_SCM_STRING_P(s)) - AG_ABEND(aprf(zNotStr, type)); - - if (SCM_SUBSTRP(s)) - s = scm_makfromstr(SCM_CHARS(s), SCM_LENGTH(s), 0); - return SCM_CHARS(s); - } - -#else /* Guile 1.7 and following */ - - extern char * ag_scm2zchars(SCM s, char const * type); - -#endif - -static inline SCM ag_eval(char const * pzStr) -{ - SCM res; - char const * pzSaveScheme = pzLastScheme; /* Watch for nested calls */ - pzLastScheme = pzStr; - - res = ag_scm_c_eval_string_from_file_line( - pzStr, pCurTemplate->pzTplFile, pCurMacro->lineNo); - - pzLastScheme = pzSaveScheme; - return res; -} diff -Nru autogen-5.11.9/agen5/loadPseudo.c autogen-5.12/agen5/loadPseudo.c --- autogen-5.11.9/agen5/loadPseudo.c 2011-04-20 23:20:23.000000000 +0200 +++ autogen-5.12/agen5/loadPseudo.c 2011-06-25 18:11:38.000000000 +0200 @@ -1,11 +1,11 @@ /** - * \file loadPseudo.c + * @file loadPseudo.c * * Find the start and end macro markers. In btween we must find the * "autogen" and "template" keywords, followed by any suffix specs. * - * Time-stamp: "2011-04-20 14:20:23 bkorb" + * Time-stamp: "2011-06-25 09:11:38 bkorb" * * This module processes the "pseudo" macro * @@ -81,12 +81,12 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * skipSuffixSpec + * do_suffix * * Process a suffix specification */ LOCAL char const * -doSuffixSpec(char const * const pzData, char const * pzFileName, int lineNo) +do_suffix(char const * const pzData, char const * pzFileName, int lineNo) { /* * The following is the complete list of POSIX required-to-be-legal @@ -467,7 +467,7 @@ break; case PM_TR_TEMPL_SUFFIX: - pzData = doSuffixSpec(pzData, pzFileName, templLineNo); + pzData = do_suffix(pzData, pzFileName, templLineNo); break; case PM_TR_TEMPL_SCHEME: diff -Nru autogen-5.11.9/agen5/opts.c autogen-5.12/agen5/opts.c --- autogen-5.11.9/agen5/opts.c 2011-05-06 16:07:01.000000000 +0200 +++ autogen-5.12/agen5/opts.c 2011-06-26 16:40:00.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (opts.c) * - * It has been AutoGen-ed May 6, 2011 at 07:07:01 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:00 AM by AutoGen 5.11.10pre11 * From the definitions opts.def * and the template file options * @@ -18,21 +18,24 @@ * * This source file is copyrighted and licensed under the following terms: * - * autogen copyright (c) 1992-2011 Bruce Korb - all rights reserved - * - * autogen is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * autogen is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - + * Copyright (C) 1992-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU General Public License, version 3 or later + * + * +PFX>autogen is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * autogen is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ #include @@ -51,8 +54,8 @@ /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -static char const zCopyright[275] = -"autogen (GNU AutoGen) 5.11.9\n\ +static char const zCopyright[273] = +"autogen (GNU AutoGen) 5.12\n\ Copyright (C) 1992-2011 Bruce Korb, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the\n\ @@ -192,12 +195,16 @@ #endif /* HAVE_DLOPEN */ /* - * Skip_Suffix option description: + * Skip_Suffix option description with + * "Must also have options" and "Incompatible options": */ static char const zSkip_SuffixText[] = "Omit the file with this suffix"; static char const zSkip_Suffix_NAME[] = "SKIP_SUFFIX"; static char const zSkip_Suffix_Name[] = "skip-suffix"; +static const int + aSkip_SuffixCantList[] = { + INDEX_OPT_SELECT_SUFFIX, NO_EQUIVALENT }; #define SKIP_SUFFIX_FLAGS (OPTST_DISABLED | OPTST_STACKED | OPTST_NO_INIT \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -573,7 +580,7 @@ /* opt state flags */ SKIP_SUFFIX_FLAGS, 0, /* last opt argumnt */ { NULL }, /* arg list/cookie */ NULL, - /* must/cannot opts */ NULL, NULL, + /* must/cannot opts */ NULL, aSkip_SuffixCantList, /* option proc */ optionStackArg, /* desc, NAME, name */ zSkip_SuffixText, zSkip_Suffix_NAME, zSkip_Suffix_Name, /* disablement strs */ NULL, NULL }, @@ -888,8 +895,8 @@ * Define the Autogen Option Environment */ static char const zPROGNAME[8] = "AUTOGEN"; -static char const zUsageTitle[143] = -"autogen (GNU AutoGen) - The Automated Program Generator - Ver. 5.11.9\n\ +static char const zUsageTitle[141] = +"autogen (GNU AutoGen) - The Automated Program Generator - Ver. 5.12\n\ USAGE: %s [ - [] | --[{=| }] ]... [ ]\n"; static char const zRcName[11] = ".autogenrc"; static char const * const apzHomeList[3] = { @@ -1073,10 +1080,10 @@ static void doOptSelect_Suffix(tOptions* pOptions, tOptDesc* pOptDesc) { - /* extracted from opts.def, line 354 */ - if ( (pOptDesc->optArg.argString != NULL) - && (*(pOptDesc->optArg.argString) != NUL)) - (void)doSuffixSpec(pOptDesc->optArg.argString, NULL, -1); + /* extracted from opts.def, line 357 */ + char const * arg = pOptDesc->optArg.argString; + if ((arg != NULL) && (*arg != NUL)) + (void)do_suffix(arg, NULL, -1); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1120,7 +1127,7 @@ static void doOptShell(tOptions* pOptions, tOptDesc* pOptDesc) { - /* extracted from opts.def, line 486 */ + /* extracted from opts.def, line 489 */ pzShellProgram = pOptDesc->optArg.argString; } #endif /* defined SHELL_ENABLED */ diff -Nru autogen-5.11.9/agen5/opts.def autogen-5.12/agen5/opts.def --- autogen-5.11.9/agen5/opts.def 2011-05-06 16:06:37.000000000 +0200 +++ autogen-5.12/agen5/opts.def 2011-06-26 16:39:36.000000000 +0200 @@ -3,10 +3,10 @@ autogen definitions options; /* - * Time-stamp: "2011-04-20 15:19:19 bkorb" + * Time-stamp: "2011-06-25 09:11:49 bkorb" * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -321,7 +321,9 @@ arg-name = suffix; descrip = "Omit the file with this suffix"; max = NOLIMIT; + flags-cant = select-suffix; stack-arg; + #ifndef XML2AG no-preset; doc = <<- _EOF_ @@ -343,6 +345,7 @@ arg-optional; descrip = "specify this output suffix"; max = NOLIMIT; + #ifndef XML2AG no-preset; doc = <<- _EOF_ @@ -351,13 +354,13 @@ specification in the @ref{pseudo macro} section of the info doc. _EOF_; flag-code = <<- _EOF_ - if ( (pOptDesc->optArg.argString != NULL) - && (*(pOptDesc->optArg.argString) != NUL)) - (void)doSuffixSpec(pOptDesc->optArg.argString, NULL, -1); + char const * arg = pOptDesc->optArg.argString; + if ((arg != NULL) && (*arg != NUL)) + (void)do_suffix(arg, NULL, -1); _EOF_; #else - stack-arg; doc = "Pass-through AutoGen argument"; + stack-arg; #endif }; diff -Nru autogen-5.11.9/agen5/opts.h autogen-5.12/agen5/opts.h --- autogen-5.11.9/agen5/opts.h 2011-05-06 16:07:01.000000000 +0200 +++ autogen-5.12/agen5/opts.h 2011-06-26 16:40:00.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (opts.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:01 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:00 AM by AutoGen 5.11.10pre11 * From the definitions opts.def * and the template file options * @@ -18,21 +18,24 @@ * * This source file is copyrighted and licensed under the following terms: * - * autogen copyright (c) 1992-2011 Bruce Korb - all rights reserved - * - * autogen is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * autogen is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - + * Copyright (C) 1992-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU General Public License, version 3 or later + * + * +PFX>autogen is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * autogen is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ /* * This file contains the programmatic interface to the Automated @@ -96,8 +99,8 @@ } teOptIndex; #define OPTION_CT 33 -#define AUTOGEN_VERSION "5.11.9" -#define AUTOGEN_FULL_VERSION "autogen (GNU AutoGen) 5.11.9" +#define AUTOGEN_VERSION "5.12" +#define AUTOGEN_FULL_VERSION "autogen (GNU AutoGen) 5.12" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -276,10 +279,10 @@ #if defined(ENABLE_NLS) # ifndef _ # include - static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); - } +static inline char* aoGetsText(char const* pz) { + if (pz == NULL) return NULL; + return (char*)gettext(pz); +} # define _(s) aoGetsText(s) # endif /* _() */ diff -Nru autogen-5.11.9/agen5/proto.h autogen-5.12/agen5/proto.h --- autogen-5.11.9/agen5/proto.h 2011-05-06 16:07:10.000000000 +0200 +++ autogen-5.12/agen5/proto.h 2011-06-26 16:40:07.000000000 +0200 @@ -1,7 +1,7 @@ /* -*- buffer-read-only: t -*- vi: set ro: * * Prototypes for agen5 - * Generated Fri May 6 07:07:10 PDT 2011 + * Generated Sun Jun 26 07:40:07 PDT 2011 */ #ifndef AGEN5_PROTO_H_GUARD #define AGEN5_PROTO_H_GUARD 1 @@ -159,7 +159,7 @@ * Extracted from expString.c */ LOCAL void -do_multi_subs(char ** ppzStr, scm_sizet * pStrLen, SCM match, SCM repl); +do_multi_subs(char ** ppzStr, size_t * pStrLen, SCM match, SCM repl); /* * Extracted from funcDef.c @@ -183,7 +183,7 @@ * Extracted from loadPseudo.c */ LOCAL char const * -doSuffixSpec(char const * const pzData, char const * pzFileName, int lineNo); +do_suffix(char const * const pzData, char const * pzFileName, int lineNo); LOCAL char const * loadPseudoMacro(char const * pzData, char const * pzFileName); @@ -200,9 +200,12 @@ LOCAL void ag_scribble_free(void); -LOCAL char* +LOCAL char * ag_scribble(ssize_t size); +LOCAL char * +ag_scm2zchars(SCM s, const char * type); + /* * Extracted from tpLoad.c */ @@ -246,7 +249,7 @@ processTemplate(tTemplate* pTF); LOCAL void -closeOutput(ag_bool purge); +out_close(ag_bool purge); #ifdef REDEF_LOCAL # undef LOCAL diff -Nru autogen-5.11.9/agen5/pseudo-fsm.h autogen-5.12/agen5/pseudo-fsm.h --- autogen-5.11.9/agen5/pseudo-fsm.h 2011-05-06 16:07:07.000000000 +0200 +++ autogen-5.12/agen5/pseudo-fsm.h 2011-06-26 16:40:05.000000000 +0200 @@ -2,13 +2,13 @@ * * DO NOT EDIT THIS FILE (pseudo-fsm.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:06 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:04 AM by AutoGen 5.11.10pre11 * From the definitions pseudo.def * and the template file fsm * * Automated Finite State Machine * - * Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright @@ -31,7 +31,6 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ /* * This file enumerates the states and transition events for a FSM. diff -Nru autogen-5.11.9/agen5/scmStrings.c autogen-5.12/agen5/scmStrings.c --- autogen-5.11.9/agen5/scmStrings.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/agen5/scmStrings.c 2011-06-03 21:18:52.000000000 +0200 @@ -1,10 +1,10 @@ /** - * \file scmStrings.c + * @file scmStrings.c * * Temporary SCM strings. * - * Time-stamp: "2010-12-09 15:01:34 bkorb" + * Time-stamp: "2011-05-26 11:24:05 bkorb" * * This file is part of AutoGen. * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved @@ -96,7 +96,7 @@ /* * Allocate and link into list. Advance pointer to next entry. */ - *next_strbuf = res = AGALOC(min_size, "SCM String Buffer"); + *next_strbuf = res = AGALOC(min_size, "scribble buf"); next_strbuf = &(res->next_p); res->next_p = NULL; res->sb_off = 0; @@ -117,8 +117,11 @@ * the space to still be usable at the end of the block macro. * These allocations are intended for temporary space needs that cannot * be kept on the stack. Expression processing. + * + * @param size the number of bytes needed + * @return the memory as a pointer to character */ -LOCAL char* +LOCAL char * ag_scribble(ssize_t size) { string_buf_t* sb = ag_strbufs; @@ -144,20 +147,28 @@ return buf; } - -#if GUILE_VERSION >= 107000 /** * As of Guile 1.7.x, access to the NUL terminated string referenced by * an SCM is no longer guaranteed. Therefore, we must extract the string * into one of our "scribble" buffers. * - * @param s the string to convert - * @param type a string describing the string - * @returns a NUL terminated string, or it aborts. + * @param s the string to convert + * @param type a string describing the string + * @return a NUL terminated string, or it aborts. */ -char * +LOCAL char * ag_scm2zchars(SCM s, const char * type) { +#if GUILE_VERSION < 107000 /* pre-Guile 1.7.x */ + + if (! AG_SCM_STRING_P(s)) + AG_ABEND(aprf(zNotStr, type)); + + if (SCM_SUBSTRP(s)) + s = scm_makfromstr(SCM_CHARS(s), SCM_LENGTH(s), 0); + return SCM_CHARS(s); + +#else static char const bad_val[] = "scm_string_length returned wrong value: %d != %d\n"; size_t len; @@ -182,8 +193,8 @@ buf[len] = NUL; return buf; -} #endif +} /* * Local Variables: diff -Nru autogen-5.11.9/agen5/test/debug.test autogen-5.12/agen5/test/debug.test --- autogen-5.11.9/agen5/test/debug.test 2011-04-29 21:05:14.000000000 +0200 +++ autogen-5.12/agen5/test/debug.test 2011-06-03 20:29:45.000000000 +0200 @@ -2,7 +2,7 @@ # -*- Mode: Shell-script -*- # debug.test --- definition reference testing # -# Time-stamp: "2011-04-29 12:05:14 bkorb" +# Time-stamp: "2011-06-03 11:29:45 bkorb" # Author: Bruce Korb # ## This file is part of AutoGen. @@ -136,7 +136,7 @@ from debug.tpl line 3 Text (12) in debug.tpl at line 9 -closeOutput 'debug.test' +out_close 'debug.test' _EOF_ traceout=${testname}-aglog-x1-$$.log diff -Nru autogen-5.11.9/agen5/test/error.test autogen-5.12/agen5/test/error.test --- autogen-5.11.9/agen5/test/error.test 2011-01-25 00:02:12.000000000 +0100 +++ autogen-5.12/agen5/test/error.test 2011-06-26 16:08:21.000000000 +0200 @@ -22,7 +22,6 @@ ## You should have received a copy of the GNU General Public License along ## with this program. If not, see . -kill_delay=30 . ./defs verb_ok=true diff -Nru autogen-5.11.9/agen5/test/Makefile.am autogen-5.12/agen5/test/Makefile.am --- autogen-5.11.9/agen5/test/Makefile.am 2011-04-20 23:56:07.000000000 +0200 +++ autogen-5.12/agen5/test/Makefile.am 2011-05-28 18:37:20.000000000 +0200 @@ -41,7 +41,7 @@ TESTS_ENVIRONMENT = TERM='' \ COMPILE='$(COMPILE)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \ - EXPRLIST="$(EXPRLIST)" SHELL="$(SHELL)" srcdir="$(srcdir)" + EXPRLIST="$(EXPRLIST)" SHELL="$(POSIX_SHELL)" srcdir="$(srcdir)" distclean-local: -rm -rf testdir FAILURES diff -Nru autogen-5.11.9/agen5/test/Makefile.in autogen-5.12/agen5/test/Makefile.in --- autogen-5.11.9/agen5/test/Makefile.in 2011-05-06 16:06:56.000000000 +0200 +++ autogen-5.12/agen5/test/Makefile.in 2011-06-26 16:39:56.000000000 +0200 @@ -234,7 +234,7 @@ TESTS_ENVIRONMENT = TERM='' \ COMPILE='$(COMPILE)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \ - EXPRLIST="$(EXPRLIST)" SHELL="$(SHELL)" srcdir="$(srcdir)" + EXPRLIST="$(EXPRLIST)" SHELL="$(POSIX_SHELL)" srcdir="$(srcdir)" all: all-am diff -Nru autogen-5.11.9/agen5/test/opts.test autogen-5.12/agen5/test/opts.test --- autogen-5.11.9/agen5/test/opts.test 2011-04-22 17:12:30.000000000 +0200 +++ autogen-5.12/agen5/test/opts.test 2011-05-28 18:56:13.000000000 +0200 @@ -3,7 +3,7 @@ # ---------------------------------------------------------------------- # opts.test --- Verify the handling of options # -# Time-stamp: "2011-04-22 08:12:30 bkorb" +# Time-stamp: "2011-05-28 09:56:13 bkorb" # Author: Bruce Korb ## ## This file is part of AutoGen. @@ -34,7 +34,8 @@ ${SED} -e "${sed_omit_license}" \ -e '/ extracted from.* line [1-9]/d' \ -e '/static char const zDetail/,/";$/d' \ - -e '/static char const zCopyrightNotice/,/";$/d' \ + -e '/static char const zCopyright/,/";$/d' \ + -e '/static char const zLicenseDescrip/,/";$/d' \ $1 > $2 || failure Cannot remove stamps from $1 } diff -Nru autogen-5.11.9/agen5/tpLoad.c autogen-5.12/agen5/tpLoad.c --- autogen-5.11.9/agen5/tpLoad.c 2011-04-20 02:26:12.000000000 +0200 +++ autogen-5.12/agen5/tpLoad.c 2011-06-03 21:14:53.000000000 +0200 @@ -1,13 +1,13 @@ /** - * \file tpLoad.c + * @file tpLoad.c * - * Time-stamp: "2011-04-19 17:26:12 bkorb" + * Time-stamp: "2011-06-03 12:14:53 bkorb" * * This module will load a template and return a template structure. * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff -Nru autogen-5.11.9/agen5/tpParse.c autogen-5.12/agen5/tpParse.c --- autogen-5.11.9/agen5/tpParse.c 2011-04-20 23:20:36.000000000 +0200 +++ autogen-5.12/agen5/tpParse.c 2011-06-03 21:14:32.000000000 +0200 @@ -1,14 +1,13 @@ -/* - * tpParse.c +/** + * @file tpParse.c * - * - * Time-stamp: "2011-04-20 14:20:36 bkorb" + * Time-stamp: "2011-06-03 12:14:32 bkorb" * * This module will load a template and return a template structure. * * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * * AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff -Nru autogen-5.11.9/agen5/tpProcess.c autogen-5.12/agen5/tpProcess.c --- autogen-5.11.9/agen5/tpProcess.c 2011-04-20 23:22:43.000000000 +0200 +++ autogen-5.12/agen5/tpProcess.c 2011-06-03 21:18:55.000000000 +0200 @@ -1,10 +1,10 @@ /** - * \file tpProcess.c + * @file tpProcess.c * * Parse and process the template data descriptions * - * Time-stamp: "2011-04-20 14:22:43 bkorb" + * Time-stamp: "2011-06-03 11:25:10 bkorb" * * This file is part of AutoGen. * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved @@ -236,7 +236,7 @@ generateBlock(pTF, pTF->aMacros, pTF->aMacros + pTF->macroCt); do { - closeOutput(AG_FALSE); /* keep output */ + out_close(AG_FALSE); /* keep output */ } while (pCurFp->pPrev != NULL); break; @@ -245,7 +245,7 @@ * We got here by a long jump. Close/purge the open files. */ do { - closeOutput(AG_TRUE); /* discard output */ + out_close(AG_TRUE); /* discard output */ } while (pCurFp->pPrev != NULL); pzLastScheme = NULL; /* "problem" means "drop current output". */ break; @@ -260,7 +260,7 @@ * We got here by a long jump. Close/purge the open files. */ do { - closeOutput(AG_TRUE); /* discard output */ + out_close(AG_TRUE); /* discard output */ } while (pCurFp->pPrev != NULL); /* @@ -278,13 +278,13 @@ LOCAL void -closeOutput(ag_bool purge) +out_close(ag_bool purge) { if ((pCurFp->flags & FPF_NOCHMOD) == 0) make_readonly(fileno(pCurFp->pFile)); if (OPT_VALUE_TRACE > TRACE_DEBUG_MESSAGE) - fprintf(pfTrace, "closeOutput '%s'\n", pCurFp->pzOutName); + fprintf(pfTrace, "%s '%s'\n", __func__, pCurFp->pzOutName); fclose(pCurFp->pFile); diff -Nru autogen-5.11.9/autoopts/ag-char-map.h autogen-5.12/autoopts/ag-char-map.h --- autogen-5.11.9/autoopts/ag-char-map.h 2011-05-06 16:06:40.000000000 +0200 +++ autogen-5.12/autoopts/ag-char-map.h 2011-06-26 16:39:38.000000000 +0200 @@ -1,10 +1,10 @@ /* - * Character mapping generated 05/06/11 07:06:40 + * Character mapping generated 06/26/11 07:39:38 * * This file contains the character classifications * used by AutoGen and AutoOpts for identifying tokens. * This file is part of AutoGen. - * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * Copyright (c) 1992-2011 Bruce Korb - all rights reserved * AutoGen is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -77,7 +77,7 @@ // used by AutoGen and AutoOpts for identifying tokens. // // This file is part of AutoGen. -// AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved +// Copyright (c) 1992-2011 Bruce Korb - all rights reserved // // AutoGen is free software: you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the Free Software diff -Nru autogen-5.11.9/autoopts/ao_string_tokenize.3 autogen-5.12/autoopts/ao_string_tokenize.3 --- autogen-5.11.9/autoopts/ao_string_tokenize.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/ao_string_tokenize.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH ao_string_tokenize 3 2011-05-06 "" "Programmer's Manual" +.TH ao_string_tokenize 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (ao_string_tokenize.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:41 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/autogen.map autogen-5.12/autoopts/autogen.map --- autogen-5.11.9/autoopts/autogen.map 2011-03-25 23:53:38.000000000 +0100 +++ autogen-5.12/autoopts/autogen.map 2011-06-03 21:11:08.000000000 +0200 @@ -8,7 +8,7 @@ used by AutoGen and AutoOpts for identifying tokens. This file is part of AutoGen. - AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + Copyright (c) 1992-2011 Bruce Korb - all rights reserved AutoGen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff -Nru autogen-5.11.9/autoopts/autoopts/options.h autogen-5.12/autoopts/autoopts/options.h --- autogen-5.11.9/autoopts/autoopts/options.h 2011-05-06 16:06:43.000000000 +0200 +++ autogen-5.12/autoopts/autoopts/options.h 2011-06-26 16:39:41.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (options.h) * - * It has been AutoGen-ed May 6, 2011 at 07:06:43 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:39:41 AM by AutoGen 5.11.10pre11 * From the definitions funcs.def * and the template file options_h * @@ -11,7 +11,7 @@ * * Automated Options Copyright (C) 1992-2011 by Bruce Korb * - * AutoOpts is free software: you can redistribute it and/or modify it +AutoOpts is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -23,7 +23,6 @@ * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; - */ #ifndef AUTOOPTS_OPTIONS_H_GUARD #define AUTOOPTS_OPTIONS_H_GUARD 1 @@ -483,7 +482,9 @@ #define strequate option_strequate #define strtransform option_strtransform -/* +/** + * Everything needed to be known about an mmap-ed file. + * * This is an output only structure used by text_mmap and text_munmap. * Clients must not alter the contents and must provide it to both * the text_mmap and text_munmap procedures. BE ADVISED: if you are @@ -493,15 +494,14 @@ * is not zero, then there *may* not be a terminating NUL. */ typedef struct { - void* txt_data; /* text file data */ - size_t txt_size; /* actual file size */ - size_t txt_full_size; /* mmaped mem size */ - int txt_fd; /* file descriptor */ - int txt_zero_fd; /* fd for /dev/zero */ - int txt_errno; /* warning code */ - int txt_prot; /* "prot" flags */ - int txt_flags; /* mapping type */ - int txt_alloc; /* if we malloced memory */ + void * txt_data; /*@< text file data */ + size_t txt_size; /*@< actual file size */ + size_t txt_full_size; /*@< mmaped mem size */ + int txt_fd; /*@< file descriptor */ + int txt_zero_fd; /*@< fd for /dev/zero */ + int txt_errno; /*@< warning code */ + int txt_prot; /*@< "prot" flags */ + int txt_flags; /*@< mapping type */ } tmap_info_t; #define TEXT_MMAP_FAILED_ADDR(a) ((void*)(a) == (void*)MAP_FAILED) @@ -737,7 +737,7 @@ extern void optionOnlyUsage(tOptions*, int); -/* From: autoopts.c line 1065 +/* From: autoopts.c line 611 * * optionProcess - this is the main option processing routine * diff -Nru autogen-5.11.9/autoopts/autoopts/usage-txt.h autogen-5.12/autoopts/autoopts/usage-txt.h --- autogen-5.11.9/autoopts/autoopts/usage-txt.h 2011-05-06 16:06:42.000000000 +0200 +++ autogen-5.12/autoopts/autoopts/usage-txt.h 2011-06-26 16:39:39.000000000 +0200 @@ -2,18 +2,24 @@ * * DO NOT EDIT THIS FILE (usage-txt.h) * - * It has been AutoGen-ed May 6, 2011 at 07:06:42 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:39:39 AM by AutoGen 5.11.10pre11 * From the definitions usage-txt.def * and the template file usage-txt.tpl * * This file handles all the bookkeeping required for tracking all the little - * tiny strings used by the AutoOpts library. There are 142 + * tiny strings used by the AutoOpts library. There are 144 * of them. This is not versioned because it is entirely internal to the * library and accessed by client code only in a very well-controlled way: * they may substitute translated strings using a procedure that steps through * all the string pointers. * - * AutoOpts is free software: you can redistribute it and/or modify it + * Copyright (C) 1992-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU Lesser General Public License, version 3 or later + * + * +PFX>AutoOpts is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -25,7 +31,6 @@ * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; - */ #ifndef AUTOOPTS_USAGE_TXT_H_GUARD #define AUTOOPTS_USAGE_TXT_H_GUARD 1 @@ -45,7 +50,7 @@ char* utpz_GnuTimeArg; char* utpz_GnuNumArg; char* utpz_GnuStrArg; - cch_t* apz_str[ 135 ]; + cch_t* apz_str[ 137 ]; } usage_text_t; /* @@ -71,135 +76,137 @@ #define zAll (option_usage_text.apz_str[ 10]) #define zAlt (option_usage_text.apz_str[ 11]) #define zAmbigKey (option_usage_text.apz_str[ 12]) -#define zAmbigOptStr (option_usage_text.apz_str[ 13]) -#define zArgsMust (option_usage_text.apz_str[ 14]) -#define zAtMost (option_usage_text.apz_str[ 15]) -#define zAuto (option_usage_text.apz_str[ 16]) -#define zBadPipe (option_usage_text.apz_str[ 17]) -#define zBadVerArg (option_usage_text.apz_str[ 18]) -#define zCantFmt (option_usage_text.apz_str[ 19]) -#define zCantSave (option_usage_text.apz_str[ 20]) -#define zCfgAO_Flags (option_usage_text.apz_str[ 21]) -#define zCfgProg (option_usage_text.apz_str[ 22]) -#define zDefaultOpt (option_usage_text.apz_str[ 23]) -#define zDis (option_usage_text.apz_str[ 24]) -#define zDisabledErr (option_usage_text.apz_str[ 25]) -#define zDisabledOpt (option_usage_text.apz_str[ 26]) -#define zDisabledWhy (option_usage_text.apz_str[ 27]) -#define zEnab (option_usage_text.apz_str[ 28]) -#define zEquiv (option_usage_text.apz_str[ 29]) -#define zErrOnly (option_usage_text.apz_str[ 30]) -#define zExamineFmt (option_usage_text.apz_str[ 31]) -#define zFiveSpaces (option_usage_text.apz_str[ 32]) -#define zFlagOkay (option_usage_text.apz_str[ 33]) -#define zFmtFmt (option_usage_text.apz_str[ 34]) -#define zForkFail (option_usage_text.apz_str[ 35]) -#define zFreopenFail (option_usage_text.apz_str[ 36]) -#define zFSErrOptLoad (option_usage_text.apz_str[ 37]) -#define zFSErrReadFile (option_usage_text.apz_str[ 38]) -#define zFSOptError (option_usage_text.apz_str[ 39]) -#define zFSOptErrMayExist (option_usage_text.apz_str[ 40]) -#define zFSOptErrMustExist (option_usage_text.apz_str[ 41]) -#define zFSOptErrNoExist (option_usage_text.apz_str[ 42]) -#define zFSOptErrOpen (option_usage_text.apz_str[ 43]) -#define zFSOptErrFopen (option_usage_text.apz_str[ 44]) -#define zFileCannotExist (option_usage_text.apz_str[ 45]) -#define zFileMustExist (option_usage_text.apz_str[ 46]) -#define zGenshell (option_usage_text.apz_str[ 47]) +#define zAmbigList (option_usage_text.apz_str[ 13]) +#define zAmbigOptStr (option_usage_text.apz_str[ 14]) +#define zAmbiguous (option_usage_text.apz_str[ 15]) +#define zArgsMust (option_usage_text.apz_str[ 16]) +#define zAtMost (option_usage_text.apz_str[ 17]) +#define zAuto (option_usage_text.apz_str[ 18]) +#define zBadPipe (option_usage_text.apz_str[ 19]) +#define zBadVerArg (option_usage_text.apz_str[ 20]) +#define zCantFmt (option_usage_text.apz_str[ 21]) +#define zCantSave (option_usage_text.apz_str[ 22]) +#define zCfgAO_Flags (option_usage_text.apz_str[ 23]) +#define zCfgProg (option_usage_text.apz_str[ 24]) +#define zDefaultOpt (option_usage_text.apz_str[ 25]) +#define zDis (option_usage_text.apz_str[ 26]) +#define zDisabledErr (option_usage_text.apz_str[ 27]) +#define zDisabledOpt (option_usage_text.apz_str[ 28]) +#define zDisabledWhy (option_usage_text.apz_str[ 29]) +#define zEnab (option_usage_text.apz_str[ 30]) +#define zEquiv (option_usage_text.apz_str[ 31]) +#define zErrOnly (option_usage_text.apz_str[ 32]) +#define zExamineFmt (option_usage_text.apz_str[ 33]) +#define zFiveSpaces (option_usage_text.apz_str[ 34]) +#define zFlagOkay (option_usage_text.apz_str[ 35]) +#define zFmtFmt (option_usage_text.apz_str[ 36]) +#define zForkFail (option_usage_text.apz_str[ 37]) +#define zFreopenFail (option_usage_text.apz_str[ 38]) +#define zFSErrOptLoad (option_usage_text.apz_str[ 39]) +#define zFSErrReadFile (option_usage_text.apz_str[ 40]) +#define zFSOptError (option_usage_text.apz_str[ 41]) +#define zFSOptErrMayExist (option_usage_text.apz_str[ 42]) +#define zFSOptErrMustExist (option_usage_text.apz_str[ 43]) +#define zFSOptErrNoExist (option_usage_text.apz_str[ 44]) +#define zFSOptErrOpen (option_usage_text.apz_str[ 45]) +#define zFSOptErrFopen (option_usage_text.apz_str[ 46]) +#define zFileCannotExist (option_usage_text.apz_str[ 47]) +#define zFileMustExist (option_usage_text.apz_str[ 48]) +#define zGenshell (option_usage_text.apz_str[ 49]) #define zGnuBoolArg (option_usage_text.utpz_GnuBoolArg) -#define zGnuBreak (option_usage_text.apz_str[ 48]) +#define zGnuBreak (option_usage_text.apz_str[ 50]) #define zGnuKeyArg (option_usage_text.utpz_GnuKeyArg) #define zGnuFileArg (option_usage_text.utpz_GnuFileArg) #define zGnuKeyLArg (option_usage_text.utpz_GnuKeyLArg) #define zGnuTimeArg (option_usage_text.utpz_GnuTimeArg) -#define zGnuNestArg (option_usage_text.apz_str[ 49]) +#define zGnuNestArg (option_usage_text.apz_str[ 51]) #define zGnuNumArg (option_usage_text.utpz_GnuNumArg) -#define zGnuOptArg (option_usage_text.apz_str[ 50]) -#define zGnuOptFmt (option_usage_text.apz_str[ 51]) +#define zGnuOptArg (option_usage_text.apz_str[ 52]) +#define zGnuOptFmt (option_usage_text.apz_str[ 53]) #define zGnuStrArg (option_usage_text.utpz_GnuStrArg) -#define zIllOptChr (option_usage_text.apz_str[ 52]) -#define zIllOptStr (option_usage_text.apz_str[ 53]) -#define zIllegal (option_usage_text.apz_str[ 54]) -#define zIntRange (option_usage_text.apz_str[ 55]) -#define zInvalOptDesc (option_usage_text.apz_str[ 56]) -#define zLowerBits (option_usage_text.apz_str[ 57]) -#define zMembers (option_usage_text.apz_str[ 58]) -#define zMisArg (option_usage_text.apz_str[ 59]) -#define zMultiEquiv (option_usage_text.apz_str[ 60]) -#define zMust (option_usage_text.apz_str[ 61]) -#define zNeedOne (option_usage_text.apz_str[ 62]) -#define zNoArg (option_usage_text.apz_str[ 63]) -#define zNoArgv (option_usage_text.apz_str[ 64]) -#define zNoArgs (option_usage_text.apz_str[ 65]) -#define zNoCreat (option_usage_text.apz_str[ 66]) -#define zNoFlags (option_usage_text.apz_str[ 67]) -#define zNoKey (option_usage_text.apz_str[ 68]) -#define zNoLim (option_usage_text.apz_str[ 69]) -#define zNoPreset (option_usage_text.apz_str[ 70]) -#define zNoResetArg (option_usage_text.apz_str[ 71]) -#define zNoRq_NoShrtTtl (option_usage_text.apz_str[ 72]) -#define zNoRq_ShrtTtl (option_usage_text.apz_str[ 73]) -#define zNoStat (option_usage_text.apz_str[ 74]) -#define zNoState (option_usage_text.apz_str[ 75]) -#define zNone (option_usage_text.apz_str[ 76]) -#define zNotDef (option_usage_text.apz_str[ 77]) -#define zNotCmdOpt (option_usage_text.apz_str[ 78]) -#define zNotEnough (option_usage_text.apz_str[ 79]) -#define zNotFile (option_usage_text.apz_str[ 80]) -#define zNotNumber (option_usage_text.apz_str[ 81]) -#define zNotDate (option_usage_text.apz_str[ 82]) -#define zNotDuration (option_usage_text.apz_str[ 83]) -#define zNrmOptFmt (option_usage_text.apz_str[ 84]) -#define zNumberOpt (option_usage_text.apz_str[ 85]) -#define zOneSpace (option_usage_text.apz_str[ 86]) -#define zOnlyOne (option_usage_text.apz_str[ 87]) -#define zOptsOnly (option_usage_text.apz_str[ 88]) -#define zOutputFail (option_usage_text.apz_str[ 89]) -#define zPathFmt (option_usage_text.apz_str[ 90]) -#define zPlsSendBugs (option_usage_text.apz_str[ 91]) -#define zPreset (option_usage_text.apz_str[ 92]) -#define zPresetFile (option_usage_text.apz_str[ 93]) -#define zPresetIntro (option_usage_text.apz_str[ 94]) -#define zProhib (option_usage_text.apz_str[ 95]) -#define zReorder (option_usage_text.apz_str[ 96]) -#define zRange (option_usage_text.apz_str[ 97]) -#define zRangeAbove (option_usage_text.apz_str[ 98]) -#define zRangeLie (option_usage_text.apz_str[ 99]) -#define zRangeOnly (option_usage_text.apz_str[100]) -#define zRangeOr (option_usage_text.apz_str[101]) -#define zRangeErr (option_usage_text.apz_str[102]) -#define zRangeExact (option_usage_text.apz_str[103]) -#define zRangeScaled (option_usage_text.apz_str[104]) -#define zRangeUpto (option_usage_text.apz_str[105]) -#define zResetNotConfig (option_usage_text.apz_str[106]) -#define zReqFmt (option_usage_text.apz_str[107]) -#define zReqOptFmt (option_usage_text.apz_str[108]) -#define zReqThese (option_usage_text.apz_str[109]) -#define zReq_NoShrtTtl (option_usage_text.apz_str[110]) -#define zReq_ShrtTtl (option_usage_text.apz_str[111]) -#define zSepChars (option_usage_text.apz_str[112]) -#define zSetMemberSettings (option_usage_text.apz_str[113]) -#define zShrtGnuOptFmt (option_usage_text.apz_str[114]) -#define zSixSpaces (option_usage_text.apz_str[115]) -#define zStdBoolArg (option_usage_text.apz_str[116]) -#define zStdBreak (option_usage_text.apz_str[117]) -#define zStdFileArg (option_usage_text.apz_str[118]) -#define zStdKeyArg (option_usage_text.apz_str[119]) -#define zStdKeyLArg (option_usage_text.apz_str[120]) -#define zStdTimeArg (option_usage_text.apz_str[121]) -#define zStdNestArg (option_usage_text.apz_str[122]) -#define zStdNoArg (option_usage_text.apz_str[123]) -#define zStdNumArg (option_usage_text.apz_str[124]) -#define zStdOptArg (option_usage_text.apz_str[125]) -#define zStdReqArg (option_usage_text.apz_str[126]) -#define zStdStrArg (option_usage_text.apz_str[127]) -#define zTabHyp (option_usage_text.apz_str[128]) -#define zTabHypAnd (option_usage_text.apz_str[129]) -#define zTabout (option_usage_text.apz_str[130]) -#define zThreeSpaces (option_usage_text.apz_str[131]) -#define zTwoSpaces (option_usage_text.apz_str[132]) -#define zUpTo (option_usage_text.apz_str[133]) -#define zValidKeys (option_usage_text.apz_str[134]) +#define zIllOptChr (option_usage_text.apz_str[ 54]) +#define zIllOptStr (option_usage_text.apz_str[ 55]) +#define zIllegal (option_usage_text.apz_str[ 56]) +#define zIntRange (option_usage_text.apz_str[ 57]) +#define zInvalOptDesc (option_usage_text.apz_str[ 58]) +#define zLowerBits (option_usage_text.apz_str[ 59]) +#define zMembers (option_usage_text.apz_str[ 60]) +#define zMisArg (option_usage_text.apz_str[ 61]) +#define zMultiEquiv (option_usage_text.apz_str[ 62]) +#define zMust (option_usage_text.apz_str[ 63]) +#define zNeedOne (option_usage_text.apz_str[ 64]) +#define zNoArg (option_usage_text.apz_str[ 65]) +#define zNoArgv (option_usage_text.apz_str[ 66]) +#define zNoArgs (option_usage_text.apz_str[ 67]) +#define zNoCreat (option_usage_text.apz_str[ 68]) +#define zNoFlags (option_usage_text.apz_str[ 69]) +#define zNoKey (option_usage_text.apz_str[ 70]) +#define zNoLim (option_usage_text.apz_str[ 71]) +#define zNoPreset (option_usage_text.apz_str[ 72]) +#define zNoResetArg (option_usage_text.apz_str[ 73]) +#define zNoRq_NoShrtTtl (option_usage_text.apz_str[ 74]) +#define zNoRq_ShrtTtl (option_usage_text.apz_str[ 75]) +#define zNoStat (option_usage_text.apz_str[ 76]) +#define zNoState (option_usage_text.apz_str[ 77]) +#define zNone (option_usage_text.apz_str[ 78]) +#define zNotDef (option_usage_text.apz_str[ 79]) +#define zNotCmdOpt (option_usage_text.apz_str[ 80]) +#define zNotEnough (option_usage_text.apz_str[ 81]) +#define zNotFile (option_usage_text.apz_str[ 82]) +#define zNotNumber (option_usage_text.apz_str[ 83]) +#define zNotDate (option_usage_text.apz_str[ 84]) +#define zNotDuration (option_usage_text.apz_str[ 85]) +#define zNrmOptFmt (option_usage_text.apz_str[ 86]) +#define zNumberOpt (option_usage_text.apz_str[ 87]) +#define zOneSpace (option_usage_text.apz_str[ 88]) +#define zOnlyOne (option_usage_text.apz_str[ 89]) +#define zOptsOnly (option_usage_text.apz_str[ 90]) +#define zOutputFail (option_usage_text.apz_str[ 91]) +#define zPathFmt (option_usage_text.apz_str[ 92]) +#define zPlsSendBugs (option_usage_text.apz_str[ 93]) +#define zPreset (option_usage_text.apz_str[ 94]) +#define zPresetFile (option_usage_text.apz_str[ 95]) +#define zPresetIntro (option_usage_text.apz_str[ 96]) +#define zProhib (option_usage_text.apz_str[ 97]) +#define zReorder (option_usage_text.apz_str[ 98]) +#define zRange (option_usage_text.apz_str[ 99]) +#define zRangeAbove (option_usage_text.apz_str[100]) +#define zRangeLie (option_usage_text.apz_str[101]) +#define zRangeOnly (option_usage_text.apz_str[102]) +#define zRangeOr (option_usage_text.apz_str[103]) +#define zRangeErr (option_usage_text.apz_str[104]) +#define zRangeExact (option_usage_text.apz_str[105]) +#define zRangeScaled (option_usage_text.apz_str[106]) +#define zRangeUpto (option_usage_text.apz_str[107]) +#define zResetNotConfig (option_usage_text.apz_str[108]) +#define zReqFmt (option_usage_text.apz_str[109]) +#define zReqOptFmt (option_usage_text.apz_str[110]) +#define zReqThese (option_usage_text.apz_str[111]) +#define zReq_NoShrtTtl (option_usage_text.apz_str[112]) +#define zReq_ShrtTtl (option_usage_text.apz_str[113]) +#define zSepChars (option_usage_text.apz_str[114]) +#define zSetMemberSettings (option_usage_text.apz_str[115]) +#define zShrtGnuOptFmt (option_usage_text.apz_str[116]) +#define zSixSpaces (option_usage_text.apz_str[117]) +#define zStdBoolArg (option_usage_text.apz_str[118]) +#define zStdBreak (option_usage_text.apz_str[119]) +#define zStdFileArg (option_usage_text.apz_str[120]) +#define zStdKeyArg (option_usage_text.apz_str[121]) +#define zStdKeyLArg (option_usage_text.apz_str[122]) +#define zStdTimeArg (option_usage_text.apz_str[123]) +#define zStdNestArg (option_usage_text.apz_str[124]) +#define zStdNoArg (option_usage_text.apz_str[125]) +#define zStdNumArg (option_usage_text.apz_str[126]) +#define zStdOptArg (option_usage_text.apz_str[127]) +#define zStdReqArg (option_usage_text.apz_str[128]) +#define zStdStrArg (option_usage_text.apz_str[129]) +#define zTabHyp (option_usage_text.apz_str[130]) +#define zTabHypAnd (option_usage_text.apz_str[131]) +#define zTabout (option_usage_text.apz_str[132]) +#define zThreeSpaces (option_usage_text.apz_str[133]) +#define zTwoSpaces (option_usage_text.apz_str[134]) +#define zUpTo (option_usage_text.apz_str[135]) +#define zValidKeys (option_usage_text.apz_str[136]) /* * First, set up the strings. Some of these are writable. These are all in @@ -214,7 +221,7 @@ static char eng_zGnuTimeArg[] = "=Tim"; static char eng_zGnuNumArg[] = "=num"; static char eng_zGnuStrArg[] = "=str"; -static char const usage_txt[4435] = +static char const usage_txt[4499] = "malloc of %d bytes failed\n\0" "AutoOpts function called without option descriptor\n\0" "\tThis exceeds the compiled library version: \0" @@ -230,7 +237,9 @@ "all\0" "\t\t\t\t- an alternate for %s\n\0" "%s error: the keyword `%s' is ambiguous for %s\n\0" - "%s: ambiguous option -- %s\n\0" + " The following options match:\n\0" + "%s: ambiguous option name: %s (matches %d options)\n\0" + " %s%s\n\0" "%s: Command line arguments required\n\0" "%d %s%s options allowed\n\0" "version and help options:\0" @@ -376,44 +385,45 @@ * Aren't you glad you don't maintain this by hand? */ usage_text_t option_usage_text = { - 142, + 144, eng_zGnuBoolArg, eng_zGnuKeyArg, eng_zGnuFileArg, eng_zGnuKeyLArg, eng_zGnuTimeArg, eng_zGnuNumArg, eng_zGnuStrArg, { usage_txt + 0, usage_txt + 27, usage_txt + 79, usage_txt + 125, usage_txt + 224, usage_txt + 260, usage_txt + 310, usage_txt + 343, usage_txt + 434, usage_txt + 493, usage_txt + 543, usage_txt + 547, - usage_txt + 574, usage_txt + 623, usage_txt + 651, usage_txt + 688, - usage_txt + 713, usage_txt + 739, usage_txt + 779, usage_txt + 916, - usage_txt + 964, usage_txt +1018, usage_txt +1031, usage_txt +1039, - usage_txt +1081, usage_txt +1105, usage_txt +1145, usage_txt +1160, - usage_txt +1190, usage_txt +1216, usage_txt +1229, usage_txt +1243, - usage_txt +1290, usage_txt +1296, usage_txt +1399, usage_txt +1411, - usage_txt +1462, usage_txt +1491, usage_txt +1542, usage_txt +1576, - usage_txt +1617, usage_txt +1640, usage_txt +1666, usage_txt +1697, - usage_txt +1711, usage_txt +1726, usage_txt +1757, usage_txt +1784, - usage_txt +1890, usage_txt +1896, usage_txt +1902, usage_txt +1909, - usage_txt +1920, usage_txt +1946, usage_txt +1972, usage_txt +1980, - usage_txt +2016, usage_txt +2067, usage_txt +2123, usage_txt +2157, - usage_txt +2195, usage_txt +2260, usage_txt +2303, usage_txt +2338, - usage_txt +2379, usage_txt +2420, usage_txt +2460, usage_txt +2487, - usage_txt +2554, usage_txt +2602, usage_txt +2635, usage_txt +2660, - usage_txt +2708, usage_txt +2743, usage_txt +2781, usage_txt +2808, - usage_txt +2857, usage_txt +2862, usage_txt +2880, usage_txt +2915, - usage_txt +2959, usage_txt +3013, usage_txt +3059, usage_txt +3108, - usage_txt +3161, usage_txt +3169, usage_txt +3217, usage_txt +3219, - usage_txt +3244, usage_txt +3278, usage_txt +3307, usage_txt +3326, - usage_txt +3360, usage_txt +3396, usage_txt +3434, usage_txt +3490, - usage_txt +3516, usage_txt +3582, usage_txt +3595, usage_txt +3626, - usage_txt +3663, usage_txt +3691, usage_txt +3697, usage_txt +3749, - usage_txt +3763, usage_txt +3809, usage_txt +3837, usage_txt +3882, - usage_txt +3924, usage_txt +3938, usage_txt +3963, usage_txt +4003, - usage_txt +4046, usage_txt +4050, usage_txt +4269, usage_txt +4272, - usage_txt +4279, usage_txt +4283, usage_txt +4291, usage_txt +4295, - usage_txt +4299, usage_txt +4303, usage_txt +4307, usage_txt +4311, - usage_txt +4315, usage_txt +4319, usage_txt +4323, usage_txt +4327, - usage_txt +4331, usage_txt +4338, usage_txt +4350, usage_txt +4358, - usage_txt +4362, usage_txt +4365, usage_txt +4398 + usage_txt + 574, usage_txt + 623, usage_txt + 655, usage_txt + 707, + usage_txt + 715, usage_txt + 752, usage_txt + 777, usage_txt + 803, + usage_txt + 843, usage_txt + 980, usage_txt +1028, usage_txt +1082, + usage_txt +1095, usage_txt +1103, usage_txt +1145, usage_txt +1169, + usage_txt +1209, usage_txt +1224, usage_txt +1254, usage_txt +1280, + usage_txt +1293, usage_txt +1307, usage_txt +1354, usage_txt +1360, + usage_txt +1463, usage_txt +1475, usage_txt +1526, usage_txt +1555, + usage_txt +1606, usage_txt +1640, usage_txt +1681, usage_txt +1704, + usage_txt +1730, usage_txt +1761, usage_txt +1775, usage_txt +1790, + usage_txt +1821, usage_txt +1848, usage_txt +1954, usage_txt +1960, + usage_txt +1966, usage_txt +1973, usage_txt +1984, usage_txt +2010, + usage_txt +2036, usage_txt +2044, usage_txt +2080, usage_txt +2131, + usage_txt +2187, usage_txt +2221, usage_txt +2259, usage_txt +2324, + usage_txt +2367, usage_txt +2402, usage_txt +2443, usage_txt +2484, + usage_txt +2524, usage_txt +2551, usage_txt +2618, usage_txt +2666, + usage_txt +2699, usage_txt +2724, usage_txt +2772, usage_txt +2807, + usage_txt +2845, usage_txt +2872, usage_txt +2921, usage_txt +2926, + usage_txt +2944, usage_txt +2979, usage_txt +3023, usage_txt +3077, + usage_txt +3123, usage_txt +3172, usage_txt +3225, usage_txt +3233, + usage_txt +3281, usage_txt +3283, usage_txt +3308, usage_txt +3342, + usage_txt +3371, usage_txt +3390, usage_txt +3424, usage_txt +3460, + usage_txt +3498, usage_txt +3554, usage_txt +3580, usage_txt +3646, + usage_txt +3659, usage_txt +3690, usage_txt +3727, usage_txt +3755, + usage_txt +3761, usage_txt +3813, usage_txt +3827, usage_txt +3873, + usage_txt +3901, usage_txt +3946, usage_txt +3988, usage_txt +4002, + usage_txt +4027, usage_txt +4067, usage_txt +4110, usage_txt +4114, + usage_txt +4333, usage_txt +4336, usage_txt +4343, usage_txt +4347, + usage_txt +4355, usage_txt +4359, usage_txt +4363, usage_txt +4367, + usage_txt +4371, usage_txt +4375, usage_txt +4379, usage_txt +4383, + usage_txt +4387, usage_txt +4391, usage_txt +4395, usage_txt +4402, + usage_txt +4414, usage_txt +4422, usage_txt +4426, usage_txt +4429, + usage_txt +4462 } }; diff -Nru autogen-5.11.9/autoopts/autoopts.c autogen-5.12/autoopts/autoopts.c --- autogen-5.11.9/autoopts/autoopts.c 2011-03-26 01:55:07.000000000 +0100 +++ autogen-5.12/autoopts/autoopts.c 2011-05-25 02:53:41.000000000 +0200 @@ -2,7 +2,7 @@ /** * \file autoopts.c * - * Time-stamp: "2011-03-25 17:55:07 bkorb" + * Time-stamp: "2011-05-24 17:53:41 bkorb" * * This file contains all of the routines that must be linked into * an executable to use the generated option processing. The optional @@ -47,9 +47,6 @@ /* = = = START-STATIC-FORWARD = = = */ static tSuccess -findOptDesc(tOptions* pOpts, tOptState* pOptState); - -static tSuccess next_opt_arg_must(tOptions* pOpts, tOptState* pOptState); static tSuccess @@ -59,13 +56,10 @@ next_opt_arg_none(tOptions* pOpts, tOptState* pOptState); static tSuccess -nextOption(tOptions* pOpts, tOptState* pOptState); +next_opt(tOptions* pOpts, tOptState* pOptState); static tSuccess doPresets(tOptions* pOpts); - -static int -checkConsistency(tOptions* pOpts); /* = = = END-STATIC-FORWARD = = = */ LOCAL void * @@ -248,334 +242,6 @@ return SUCCESS; } - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * HUNT FOR OPTIONS IN THE ARGUMENT LIST - * - * The next four procedures are "private" to nextOption(). - * nextOption() uses findOptDesc() to find the next descriptor and it, in - * turn, uses longOptionFind() and shortOptionFind() to actually do the hunt. - * - * longOptionFind - * - * Find the long option descriptor for the current option - */ -LOCAL tSuccess -longOptionFind(tOptions* pOpts, char* pzOptName, tOptState* pOptState) -{ - ag_bool disable = AG_FALSE; - char* pzEq = strchr(pzOptName, '='); - tOptDesc* pOD = pOpts->pOptDesc; - int idx = 0; - int idxLim = pOpts->optCt; - int matchCt = 0; - int matchIdx = 0; - int nameLen; - char opt_name_buf[128]; - - /* - * IF the value is attached to the name, - * copy it off so we can NUL terminate. - */ - if (pzEq != NULL) { - nameLen = (int)(pzEq - pzOptName); - if (nameLen >= sizeof(opt_name_buf)) - return FAILURE; - memcpy(opt_name_buf, pzOptName, nameLen); - opt_name_buf[nameLen] = NUL; - pzOptName = opt_name_buf; - pzEq++; - - } else nameLen = strlen(pzOptName); - - do { - /* - * If option disabled or a doc option, skip to next - */ - if (pOD->pz_Name == NULL) - continue; - - if ( SKIP_OPT(pOD) - && (pOD->fOptState != (OPTST_OMITTED | OPTST_NO_INIT))) - continue; - - if (strneqvcmp(pzOptName, pOD->pz_Name, nameLen) == 0) { - /* - * IF we have a complete match - * THEN it takes priority over any already located partial - */ - if (pOD->pz_Name[ nameLen ] == NUL) { - matchCt = 1; - matchIdx = idx; - break; - } - } - - /* - * IF there is a disable name - * *AND* no argument value has been supplied - * (disabled options may have no argument) - * *AND* the option name matches the disable name - * THEN ... - */ - else if ( (pOD->pz_DisableName != NULL) - && (strneqvcmp(pzOptName, pOD->pz_DisableName, nameLen) == 0) - ) { - disable = AG_TRUE; - - /* - * IF we have a complete match - * THEN it takes priority over any already located partial - */ - if (pOD->pz_DisableName[ nameLen ] == NUL) { - matchCt = 1; - matchIdx = idx; - break; - } - } - - else - continue; - - /* - * We found a partial match, either regular or disabling. - * Remember the index for later. - */ - matchIdx = idx; - - if (++matchCt > 1) - break; - - } while (pOD++, (++idx < idxLim)); - - /* - * Make sure we either found an exact match or found only one partial - */ - if (matchCt == 1) { - pOD = pOpts->pOptDesc + matchIdx; - - if (SKIP_OPT(pOD)) { - fprintf(stderr, zDisabledErr, pOpts->pzProgName, pOD->pz_Name); - if (pOD->pzText != NULL) - fprintf(stderr, " -- %s", pOD->pzText); - fputc('\n', stderr); - (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); - /* NOTREACHED */ - } - - /* - * IF we found a disablement name, - * THEN set the bit in the callers' flag word - */ - if (disable) - pOptState->flags |= OPTST_DISABLED; - - pOptState->pOD = pOD; - pOptState->pzOptArg = pzEq; - pOptState->optType = TOPT_LONG; - return SUCCESS; - } - - /* - * IF there is no equal sign - * *AND* we are using named arguments - * *AND* there is a default named option, - * THEN return that option. - */ - if ( (pzEq == NULL) - && NAMED_OPTS(pOpts) - && (pOpts->specOptIdx.default_opt != NO_EQUIVALENT)) { - pOptState->pOD = pOpts->pOptDesc + pOpts->specOptIdx.default_opt; - - pOptState->pzOptArg = pzOptName; - pOptState->optType = TOPT_DEFAULT; - return SUCCESS; - } - - /* - * IF we are to stop on errors (the default, actually) - * THEN call the usage procedure. - */ - if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) { - fprintf(stderr, (matchCt == 0) ? zIllOptStr : zAmbigOptStr, - pOpts->pzProgPath, pzOptName); - (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); - } - - return FAILURE; -} - - -/* - * shortOptionFind - * - * Find the short option descriptor for the current option - */ -LOCAL tSuccess -shortOptionFind(tOptions* pOpts, uint_t optValue, tOptState* pOptState) -{ - tOptDesc* pRes = pOpts->pOptDesc; - int ct = pOpts->optCt; - - /* - * Search the option list - */ - do { - if (optValue != pRes->optValue) - continue; - - if (SKIP_OPT(pRes)) { - if ( (pRes->fOptState == (OPTST_OMITTED | OPTST_NO_INIT)) - && (pRes->pz_Name != NULL)) { - fprintf(stderr, zDisabledErr, pOpts->pzProgPath, pRes->pz_Name); - if (pRes->pzText != NULL) - fprintf(stderr, " -- %s", pRes->pzText); - fputc('\n', stderr); - (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); - /* NOTREACHED */ - } - goto short_opt_error; - } - - pOptState->pOD = pRes; - pOptState->optType = TOPT_SHORT; - return SUCCESS; - - } while (pRes++, --ct > 0); - - /* - * IF the character value is a digit - * AND there is a special number option ("-n") - * THEN the result is the "option" itself and the - * option is the specially marked "number" option. - */ - if ( IS_DEC_DIGIT_CHAR(optValue) - && (pOpts->specOptIdx.number_option != NO_EQUIVALENT) ) { - pOptState->pOD = \ - pRes = pOpts->pOptDesc + pOpts->specOptIdx.number_option; - (pOpts->pzCurOpt)--; - pOptState->optType = TOPT_SHORT; - return SUCCESS; - } - -short_opt_error: - - /* - * IF we are to stop on errors (the default, actually) - * THEN call the usage procedure. - */ - if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) { - fprintf(stderr, zIllOptChr, pOpts->pzProgPath, optValue); - (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); - } - - return FAILURE; -} - - -/* - * findOptDesc - * - * Find the option descriptor for the current option - */ -static tSuccess -findOptDesc(tOptions* pOpts, tOptState* pOptState) -{ - /* - * IF we are continuing a short option list (e.g. -xyz...) - * THEN continue a single flag option. - * OTHERWISE see if there is room to advance and then do so. - */ - if ((pOpts->pzCurOpt != NULL) && (*pOpts->pzCurOpt != NUL)) - return shortOptionFind(pOpts, (tAoUC)*(pOpts->pzCurOpt), pOptState); - - if (pOpts->curOptIdx >= pOpts->origArgCt) - return PROBLEM; /* NORMAL COMPLETION */ - - pOpts->pzCurOpt = pOpts->origArgVect[ pOpts->curOptIdx ]; - - /* - * IF all arguments must be named options, ... - */ - if (NAMED_OPTS(pOpts)) { - char * pz = pOpts->pzCurOpt; - int def; - tSuccess res; - tAoUS * def_opt; - - pOpts->curOptIdx++; - - if (*pz != '-') - return longOptionFind(pOpts, pz, pOptState); - - /* - * The name is prefixed with one or more hyphens. Strip them off - * and disable the "default_opt" setting. Use heavy recasting to - * strip off the "const" quality of the "default_opt" field. - */ - while (*(++pz) == '-') ; - def_opt = (void *)&(pOpts->specOptIdx.default_opt); - def = *def_opt; - *def_opt = NO_EQUIVALENT; - res = longOptionFind(pOpts, pz, pOptState); - *def_opt = def; - return res; - } - - /* - * Note the kind of flag/option marker - */ - if (*((pOpts->pzCurOpt)++) != '-') - return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */ - - /* - * Special hack for a hyphen by itself - */ - if (*(pOpts->pzCurOpt) == NUL) - return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */ - - /* - * The current argument is to be processed as an option argument - */ - pOpts->curOptIdx++; - - /* - * We have an option marker. - * Test the next character for long option indication - */ - if (pOpts->pzCurOpt[0] == '-') { - if (*++(pOpts->pzCurOpt) == NUL) - /* - * NORMAL COMPLETION - NOT this arg, but rest are operands - */ - return PROBLEM; - - /* - * We do not allow the hyphen to be used as a flag value. - * Therefore, if long options are not to be accepted, we punt. - */ - if ((pOpts->fOptSet & OPTPROC_LONGOPT) == 0) { - fprintf(stderr, zIllOptStr, pOpts->pzProgPath, - zIllegal, pOpts->pzCurOpt-2); - return FAILURE; - } - - return longOptionFind(pOpts, pOpts->pzCurOpt, pOptState); - } - - /* - * If short options are not allowed, then do long - * option processing. Otherwise the character must be a - * short (i.e. single character) option. - */ - if ((pOpts->fOptSet & OPTPROC_SHORTOPT) != 0) - return shortOptionFind(pOpts, (tAoUC)*(pOpts->pzCurOpt), pOptState); - - return longOptionFind(pOpts, pOpts->pzCurOpt, pOptState); -} - - static tSuccess next_opt_arg_must(tOptions* pOpts, tOptState* pOptState) { @@ -723,20 +389,17 @@ return SUCCESS; } -/* - * nextOption - * +/** * Find the option descriptor and option argument (if any) for the * next command line argument. DO NOT modify the descriptor. Put * all the state in the state argument so that the option can be skipped * without consequence (side effect). */ static tSuccess -nextOption(tOptions* pOpts, tOptState* pOptState) +next_opt(tOptions* pOpts, tOptState* pOptState) { { - tSuccess res; - res = findOptDesc(pOpts, pOptState); + tSuccess res = find_opt(pOpts, pOptState); if (! SUCCESSFUL(res)) return res; } @@ -812,7 +475,7 @@ for (;;) { tOptState optState = OPTSTATE_INITIALIZER(PRESET); - switch (nextOption(pOpts, &optState)) { + switch (next_opt(pOpts, &optState)) { case FAILURE: goto failed_option; case PROBLEM: return SUCCESS; /* no more args */ case SUCCESS: break; @@ -846,7 +509,7 @@ for (;;) { tOptState optState = OPTSTATE_INITIALIZER(DEFINED); - switch (nextOption(pOpts, &optState)) { + switch (next_opt(pOpts, &optState)) { case FAILURE: goto failed_option; case PROBLEM: return SUCCESS; /* no more args */ case SUCCESS: break; @@ -927,123 +590,6 @@ return SUCCESS; } - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * VERIFY OPTION CONSISTENCY - * - * Make sure that the argument list passes our consistency tests. - */ -static int -checkConsistency(tOptions* pOpts) -{ - int errCt = 0; - tOptDesc* pOD = pOpts->pOptDesc; - int oCt = pOpts->presetOptCt; - - /* - * FOR each of "oCt" options, ... - */ - for (;;) { - const int* pMust = pOD->pOptMust; - const int* pCant = pOD->pOptCant; - - /* - * IF the current option was provided on the command line - * THEN ensure that any "MUST" requirements are not - * "DEFAULT" (unspecified) *AND* ensure that any - * "CANT" options have not been SET or DEFINED. - */ - if (SELECTED_OPT(pOD)) { - if (pMust != NULL) for (;;) { - tOptDesc* p = pOpts->pOptDesc + *(pMust++); - if (UNUSED_OPT(p)) { - const tOptDesc* pN = pOpts->pOptDesc + pMust[-1]; - errCt++; - fprintf(stderr, zReqFmt, pOD->pz_Name, pN->pz_Name); - } - - if (*pMust == NO_EQUIVALENT) - break; - } - - if (pCant != NULL) for (;;) { - tOptDesc* p = pOpts->pOptDesc + *(pCant++); - if (SELECTED_OPT(p)) { - const tOptDesc* pN = pOpts->pOptDesc + pCant[-1]; - errCt++; - fprintf(stderr, zCantFmt, pOD->pz_Name, pN->pz_Name); - } - - if (*pCant == NO_EQUIVALENT) - break; - } - } - - /* - * IF this option is not equivalenced to another, - * OR it is equivalenced to itself (is the equiv. root) - * THEN we need to make sure it occurs often enough. - */ - if ( (pOD->optEquivIndex == NO_EQUIVALENT) - || (pOD->optEquivIndex == pOD->optIndex) ) do { - /* - * IF the occurrence counts have been satisfied, - * THEN there is no problem. - */ - if (pOD->optOccCt >= pOD->optMinCt) - break; - - /* - * IF MUST_SET means SET and PRESET are okay, - * so min occurrence count doesn't count - */ - if ( (pOD->fOptState & OPTST_MUST_SET) - && (pOD->fOptState & (OPTST_PRESET | OPTST_SET)) ) - break; - - errCt++; - if (pOD->optMinCt > 1) - fprintf(stderr, zNotEnough, pOD->pz_Name, pOD->optMinCt); - else fprintf(stderr, zNeedOne, pOD->pz_Name); - } while (0); - - if (--oCt <= 0) - break; - pOD++; - } - - /* - * IF we are stopping on errors, check to see if any remaining - * arguments are required to be there or prohibited from being there. - */ - if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) { - - /* - * Check for prohibition - */ - if ((pOpts->fOptSet & OPTPROC_NO_ARGS) != 0) { - if (pOpts->origArgCt > pOpts->curOptIdx) { - fprintf(stderr, zNoArgs, pOpts->pzProgName); - ++errCt; - } - } - - /* - * ELSE not prohibited, check for being required - */ - else if ((pOpts->fOptSet & OPTPROC_ARGS_REQ) != 0) { - if (pOpts->origArgCt <= pOpts->curOptIdx) { - fprintf(stderr, zArgsMust, pOpts->pzProgName); - ++errCt; - } - } - } - - return errCt; -} - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * THESE ROUTINES ARE CALLABLE FROM THE GENERATED OPTION PROCESSING CODE @@ -1171,7 +717,7 @@ * THEN look for too few occurrences of required options */ if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) { - if (checkConsistency(pOpts) != 0) + if (! is_consistent(pOpts)) (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); } diff -Nru autogen-5.11.9/autoopts/autoopts-config.1 autogen-5.12/autoopts/autoopts-config.1 --- autogen-5.11.9/autoopts/autoopts-config.1 2011-05-06 16:06:48.000000000 +0200 +++ autogen-5.12/autoopts/autoopts-config.1 2011-06-26 16:39:46.000000000 +0200 @@ -2,11 +2,11 @@ \" \" DO NOT EDIT THIS FILE (autoopts-config.1) \" -\" It has been AutoGen-ed May 6, 2011 at 07:06:48 AM by AutoGen 5.11.9 +\" It has been AutoGen-ed June 26, 2011 at 07:39:46 AM by AutoGen 5.11.10pre11 \" From the definitions aoconf.def \" and the template file aoconf.tpl \" -.TH autoopts-config 1 2011-05-06 "" "Programmer's Manual" +.TH autoopts-config 1 2011-06-26 "" "Programmer's Manual" .SH NAME autoopts-config \- script to get information about installed version of autoopts diff -Nru autogen-5.11.9/autoopts/autoopts-config.in autogen-5.12/autoopts/autoopts-config.in --- autogen-5.11.9/autoopts/autoopts-config.in 2011-05-06 16:06:48.000000000 +0200 +++ autogen-5.12/autoopts/autoopts-config.in 2011-06-26 16:39:46.000000000 +0200 @@ -2,11 +2,11 @@ ## --------------------------------------------------------------------- ## autoopts-config.in -- Describe AutoOpts configuration ## -## Autoopts Copyright (c) 1992-20112011 by Bruce Korb +## Autoopts Copyright (c) 1992-2011 by Bruce Korb ## ## DO NOT EDIT THIS FILE (autoopts-config.in) ## -## It has been AutoGen-ed May 6, 2011 at 07:06:48 AM by AutoGen 5.11.9 +## It has been AutoGen-ed June 26, 2011 at 07:39:46 AM by AutoGen 5.11.10pre11 ## From the definitions aoconf.def ## and the template file aoconf.tpl ## @@ -29,10 +29,18 @@ libsrc="${pkgdatadir}/libopts-${dotver}.tar.gz" static_libs="${libdir}/libopts.a" cflags="-I${includedir}" -test -n "${ldopts}" && { - ldflags="${ldopts}${libdir} ${ldflags}" - libs=${ldflags} -} +case "${libdir}" in +/lib | /lib64 | /usr/lib | /usr/lib64 ) + ldopts='' + ldflags=-lopts + ;; + +* ) + test -n "${ldopts}" && \ + ldflags="${ldopts}${libdir} ${ldflags}" + ;; +esac +libs=${ldflags} test "${includedir}" = "/usr/include" && cflags="" optlist="\ autogen bindir cflags datadir datarootdir dotver diff -Nru autogen-5.11.9/autoopts/bootstrap.dir autogen-5.12/autoopts/bootstrap.dir --- autogen-5.11.9/autoopts/bootstrap.dir 2011-05-04 02:31:36.000000000 +0200 +++ autogen-5.12/autoopts/bootstrap.dir 2011-06-06 17:50:27.000000000 +0200 @@ -1,5 +1,5 @@ #! /bin/echo This_file_must_be_sourced,_not_executed -# Time-stamp: "2011-05-03 17:31:36 bkorb" +# Time-stamp: "2011-06-06 08:50:27 bkorb" # ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. @@ -21,20 +21,6 @@ ## 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 ## 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd -test "X${mainpid}" = X && { - \cd ${top_srcdir-..} - top_srcdir=`pwd` - . config/bootstrap.shlib - cd autoopts - free_trap=true -} || { - free_trap=false -} - -export AGexe=${AGexe-autogen}\ -L${top_srcdir}/autoopts/tpl -noag=`${AGexe} -v > /dev/null 2>&1 && echo false || echo true` -nl=$'\n' - burn_aover() { agvars=$(egrep '^A[GO]_' ../VERSION) eval "${agvars}" @@ -68,10 +54,22 @@ local tmpl=$( ndst="" - pdta="autoopts.m4${nl}" - edta="${pdta}bootstrap.dir${nl}autoopts-config.in${nl}autogen.map${nl}" + sfil='' + + for f in man mdoc texi + do + for g in man mdoc texi + do + sfil=${sfil}tpl/${f}2${g}${nl} + test -f tpl/${f}2${g}.sh || \ + ndst=${ndst}tpl/${f}2${g}${nl} + done + done + + pdta="autoopts.m4${nl}tpl/usage.tlib${nl}" + edta="bootstrap.dir${nl}autoopts-config.in${nl}autogen.map${nl}" edta="${edta}mk-tpl-config.sh${nl}mk-autoopts-pc.in${nl}" - edta="${edta}install-options-h${nl}po${nl}" + edta="${edta}install-options-h${nl}po${nl}tpl/usage-txt.tpl${nl}" for f in tpl/*.* do @@ -82,19 +80,17 @@ edta=${edta}${f}${nl} # distributed file ;; - ( *tpl-config.tlib ) : ;; - - ( tpl/usage* ) - edta=${edta}${f}${nl} ;; # distribute only file + ( *tpl-config.tlib | *tpl/usage* ) : ;; ( *.tlib | *.tpl | *.def | *.lic ) pdta=${pdta}${f}${nl} ;; # installed & distributed file esac done - echo "local edta='${edta%${nl}}'" echo "local ndst='${ndst%${nl}}'" echo "local pdta='${pdta%${nl}}'" + echo "local edta='${edta%${nl}}'" + echo "local sfil='${sfil%${nl}}'" ) eval "$tmpl" @@ -107,11 +103,14 @@ )"$'\\\n\\\nnodist_pkgdata_DATA = \$(libsrc) \\\\\\\n'"$( echo "${ndst}" | sort -u | columns -I4 --spread=1 --line=' \\\' - )"$'\\\n\\\npkgdata_DATA = \\\\\\\n'"$( + )"$'\\\n\\\npkgdata_DATA = \\\\\\\n'"$( echo "${pdta}" | sort -u | columns -I4 --spread=1 --line=' \\\' - )"$'\\\n\\\nEXTRA_DATA = \$(pkgdata_DATA) \\\\\\\n'"$( + )"$'\\\n\\\nEXTRA_DATA = \$(pkgdata_DATA) \\\\\\\n'"$( echo "${edta}" | sort -u | columns -I4 --spread=1 --line=' \\\' + + )"$'\\\n\\\nGENSCRIPTS = \$(srcdir)/funcs.def \\\\\\\n'"$( + echo "${sfil}" | columns -I4 --spread=1 --line=' \\\' )" rm -f *.3 @@ -176,6 +175,20 @@ ${AGexe} aoconf.def || die "FAILED: ${AGexe} aoconf.def" } +test "X${mainpid}" = X && { + \cd ${top_srcdir-..} + top_srcdir=`pwd` + . config/bootstrap.shlib + cd autoopts + free_trap=true +} || { + free_trap=false +} + +export AGexe=${AGexe-autogen}\ -L${top_srcdir}/autoopts/tpl +noag=`${AGexe} -v > /dev/null 2>&1 && echo false || echo true` +nl=$'\n' + case "$1" in *genshell.c ) if ${noag} diff -Nru autogen-5.11.9/autoopts/check.c autogen-5.12/autoopts/check.c --- autogen-5.11.9/autoopts/check.c 1970-01-01 01:00:00.000000000 +0100 +++ autogen-5.12/autoopts/check.c 2011-05-25 02:50:10.000000000 +0200 @@ -0,0 +1,164 @@ +/** + * @file check.c + * + * @brief consistency checks. + * + * Time-stamp: "2011-05-24 17:50:10 bkorb" + * + * This file contains the routines that deal with processing quoted strings + * into an internal format. + * + * This file is part of AutoOpts, a companion to AutoGen. + * AutoOpts is free software. + * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * + * AutoOpts is available under any one of two licenses. The license + * in use must be one of these two and the choice is under the control + * of the user of the license. + * + * The GNU Lesser General Public License, version 3 or later + * See the files "COPYING.lgplv3" and "COPYING.gplv3" + * + * The Modified Berkeley Software Distribution License + * See the file "COPYING.mbsd" + * + * These files have the following md5sums: + * + * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3 + * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 + * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd + */ + +/** + * Check for conflicts based on "must" and "cannot" attributes. + */ +static ag_bool +has_conflict(tOptions * pOpts, tOptDesc * pOD) +{ + if (pOD->pOptMust != NULL) { + int const * pMust = pOD->pOptMust; + + while (*pMust != NO_EQUIVALENT) { + tOptDesc * p = pOpts->pOptDesc + *(pMust++); + if (UNUSED_OPT(p)) { + const tOptDesc * pN = pOpts->pOptDesc + pMust[-1]; + fprintf(stderr, zReqFmt, pOD->pz_Name, pN->pz_Name); + return AG_TRUE; + } + } + } + + if (pOD->pOptCant != NULL) { + int const * pCant = pOD->pOptCant; + + while (*pCant != NO_EQUIVALENT) { + tOptDesc * p = pOpts->pOptDesc + *(pCant++); + if (SELECTED_OPT(p)) { + const tOptDesc* pN = pOpts->pOptDesc + pCant[-1]; + fprintf(stderr, zCantFmt, pOD->pz_Name, pN->pz_Name); + return AG_TRUE; + } + } + } + + return AG_FALSE; +} + +/** + * Check that the option occurs often enough. Too often is already checked. + */ +static ag_bool +occurs_enough(tOptions * pOpts, tOptDesc * pOD) +{ + /* + * IF the occurrence counts have been satisfied, + * THEN there is no problem. + */ + if (pOD->optOccCt >= pOD->optMinCt) + return AG_TRUE; + + /* + * IF MUST_SET means SET and PRESET are okay, + * so min occurrence count doesn't count + */ + if ( (pOD->fOptState & OPTST_MUST_SET) + && (pOD->fOptState & (OPTST_PRESET | OPTST_SET)) ) + return AG_TRUE; + + if (pOD->optMinCt > 1) + fprintf(stderr, zNotEnough, pOD->pz_Name, pOD->optMinCt); + else fprintf(stderr, zNeedOne, pOD->pz_Name); + return AG_FALSE; +} + +/** + * Verify option consistency. + * + * Make sure that the argument list passes our consistency tests. + */ +LOCAL ag_bool +is_consistent(tOptions * pOpts) +{ + tOptDesc * pOD = pOpts->pOptDesc; + int oCt = pOpts->presetOptCt; + + /* + * FOR each of "oCt" options, ... + */ + for (;;) { + /* + * IF the current option was provided on the command line + * THEN ensure that any "MUST" requirements are not + * "DEFAULT" (unspecified) *AND* ensure that any + * "CANT" options have not been SET or DEFINED. + */ + if (SELECTED_OPT(pOD)) { + if (has_conflict(pOpts, pOD)) + return AG_FALSE; + } + + /* + * IF this option is not equivalenced to another, + * OR it is equivalenced to itself (is the equiv. root) + * THEN we need to make sure it occurs often enough. + */ + if ( (pOD->optEquivIndex == NO_EQUIVALENT) + || (pOD->optEquivIndex == pOD->optIndex) ) + + if (! occurs_enough(pOpts, pOD)) + return AG_FALSE; + + if (--oCt <= 0) + break; + pOD++; + } + + /* + * IF we are stopping on errors, check to see if any remaining + * arguments are required to be there or prohibited from being there. + */ + if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) { + + /* + * Check for prohibition + */ + if ((pOpts->fOptSet & OPTPROC_NO_ARGS) != 0) { + if (pOpts->origArgCt > pOpts->curOptIdx) { + fprintf(stderr, zNoArgs, pOpts->pzProgName); + return AG_FALSE; + } + } + + /* + * ELSE not prohibited, check for being required + */ + else if ((pOpts->fOptSet & OPTPROC_ARGS_REQ) != 0) { + if (pOpts->origArgCt <= pOpts->curOptIdx) { + fprintf(stderr, zArgsMust, pOpts->pzProgName); + return AG_FALSE; + } + } + } + + return AG_TRUE; +} diff -Nru autogen-5.11.9/autoopts/configFileLoad.3 autogen-5.12/autoopts/configFileLoad.3 --- autogen-5.11.9/autoopts/configFileLoad.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/configFileLoad.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH configFileLoad 3 2011-05-06 "" "Programmer's Manual" +.TH configFileLoad 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (configFileLoad.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:41 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/enum.c autogen-5.12/autoopts/enum.c --- autogen-5.11.9/autoopts/enum.c 1970-01-01 01:00:00.000000000 +0100 +++ autogen-5.12/autoopts/enum.c 2011-04-06 19:48:22.000000000 +0200 @@ -0,0 +1,522 @@ + +/** + * \file enumeration.c + * + * Time-stamp: "2011-04-06 10:48:22 bkorb" + * + * Automated Options Paged Usage module. + * + * This routine will run run-on options through a pager so the + * user may examine, print or edit them at their leisure. + * + * This file is part of AutoOpts, a companion to AutoGen. + * AutoOpts is free software. + * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * + * AutoOpts is available under any one of two licenses. The license + * in use must be one of these two and the choice is under the control + * of the user of the license. + * + * The GNU Lesser General Public License, version 3 or later + * See the files "COPYING.lgplv3" and "COPYING.gplv3" + * + * The Modified Berkeley Software Distribution License + * See the file "COPYING.mbsd" + * + * These files have the following md5sums: + * + * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3 + * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 + * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd + */ + +static char const * pz_enum_err_fmt; + +/* = = = START-STATIC-FORWARD = = = */ +static void +enum_err(tOptions * pOpts, tOptDesc * pOD, + char const * const * paz_names, int name_ct); + +static uintptr_t +find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD, + char const * const * paz_names, unsigned int name_ct); + +static void +set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, + unsigned int name_ct); + +static void +set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, + unsigned int name_ct); + +static void +set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, + unsigned int name_ct); +/* = = = END-STATIC-FORWARD = = = */ + +static void +enum_err(tOptions * pOpts, tOptDesc * pOD, + char const * const * paz_names, int name_ct) +{ + size_t max_len = 0; + size_t ttl_len = 0; + int ct_down = name_ct; + int hidden = 0; + + /* + * A real "pOpts" pointer means someone messed up. Give a real error. + */ + if (pOpts > OPTPROC_EMIT_LIMIT) + fprintf(option_usage_fp, pz_enum_err_fmt, pOpts->pzProgName, + pOD->optArg.argString, pOD->pz_Name); + + fprintf(option_usage_fp, zValidKeys, pOD->pz_Name); + + /* + * If the first name starts with this funny character, then we have + * a first value with an unspellable name. You cannot specify it. + * So, we don't list it either. + */ + if (**paz_names == 0x7F) { + paz_names++; + hidden = 1; + ct_down = --name_ct; + } + + /* + * Figure out the maximum length of any name, plus the total length + * of all the names. + */ + { + char const * const * paz = paz_names; + + do { + size_t len = strlen(*(paz++)) + 1; + if (len > max_len) + max_len = len; + ttl_len += len; + } while (--ct_down > 0); + + ct_down = name_ct; + } + + /* + * IF any one entry is about 1/2 line or longer, print one per line + */ + if (max_len > 35) { + do { + fprintf(option_usage_fp, " %s\n", *(paz_names++)); + } while (--ct_down > 0); + } + + /* + * ELSE IF they all fit on one line, then do so. + */ + else if (ttl_len < 76) { + fputc(' ', option_usage_fp); + do { + fputc(' ', option_usage_fp); + fputs(*(paz_names++), option_usage_fp); + } while (--ct_down > 0); + fputc('\n', option_usage_fp); + } + + /* + * Otherwise, columnize the output + */ + else { + int ent_no = 0; + char zFmt[16]; /* format for all-but-last entries on a line */ + + sprintf(zFmt, "%%-%ds", (int)max_len); + max_len = 78 / max_len; /* max_len is now max entries on a line */ + fputs(" ", option_usage_fp); + + /* + * Loop through all but the last entry + */ + ct_down = name_ct; + while (--ct_down > 0) { + if (++ent_no == max_len) { + /* + * Last entry on a line. Start next line, too. + */ + fprintf(option_usage_fp, "%s\n ", *(paz_names++)); + ent_no = 0; + } + + else + fprintf(option_usage_fp, zFmt, *(paz_names++) ); + } + fprintf(option_usage_fp, "%s\n", *paz_names); + } + + if (pOpts > OPTPROC_EMIT_LIMIT) { + fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); + + (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE); + /* NOTREACHED */ + } + + if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP) { + fprintf(option_usage_fp, zLowerBits, name_ct); + fputs(zSetMemberSettings, option_usage_fp); + } else { + fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); + } +} + + +static uintptr_t +find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD, + char const * const * paz_names, unsigned int name_ct) +{ + /* + * Return the matching index as a pointer sized integer. + * The result gets stashed in a char* pointer. + */ + uintptr_t res = name_ct; + size_t len = strlen((char*)pzName); + uintptr_t idx; + + if (IS_DEC_DIGIT_CHAR(*pzName)) { + char * pz = (char *)(void *)pzName; + unsigned long val = strtoul(pz, &pz, 0); + if ((*pz == NUL) && (val < name_ct)) + return (uintptr_t)val; + enum_err(pOpts, pOD, paz_names, (int)name_ct); + return name_ct; + } + + /* + * Look for an exact match, but remember any partial matches. + * Multiple partial matches means we have an ambiguous match. + */ + for (idx = 0; idx < name_ct; idx++) { + if (strncmp((char*)paz_names[idx], (char*)pzName, len) == 0) { + if (paz_names[idx][len] == NUL) + return idx; /* full match */ + + res = (res != name_ct) ? ~0 : idx; /* save partial match */ + } + } + + if (res < name_ct) + return res; /* partial match */ + + pz_enum_err_fmt = (res == name_ct) ? zNoKey : zAmbigKey; + option_usage_fp = stderr; + enum_err(pOpts, pOD, paz_names, (int)name_ct); + return name_ct; +} + + +/*=export_func optionKeywordName + * what: Convert between enumeration values and strings + * private: + * + * arg: tOptDesc*, pOD, enumeration option description + * arg: unsigned int, enum_val, the enumeration value to map + * + * ret_type: char const * + * ret_desc: the enumeration name from const memory + * + * doc: This converts an enumeration value into the matching string. +=*/ +char const * +optionKeywordName(tOptDesc * pOD, unsigned int enum_val) +{ + tOptDesc od; + + od.optArg.argEnum = enum_val; + (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, &od ); + return od.optArg.argString; +} + + +/*=export_func optionEnumerationVal + * what: Convert from a string to an enumeration value + * private: + * + * arg: tOptions*, pOpts, the program options descriptor + * arg: tOptDesc*, pOD, enumeration option description + * arg: char const * const *, paz_names, list of enumeration names + * arg: unsigned int, name_ct, number of names in list + * + * ret_type: uintptr_t + * ret_desc: the enumeration value + * + * doc: This converts the optArg.argString string from the option description + * into the index corresponding to an entry in the name list. + * This will match the generated enumeration value. + * Full matches are always accepted. Partial matches are accepted + * if there is only one partial match. +=*/ +uintptr_t +optionEnumerationVal(tOptions * pOpts, tOptDesc * pOD, + char const * const * paz_names, unsigned int name_ct) +{ + uintptr_t res = 0UL; + + /* + * IF the program option descriptor pointer is invalid, + * then it is some sort of special request. + */ + switch ((uintptr_t)pOpts) { + case (uintptr_t)OPTPROC_EMIT_USAGE: + /* + * print the list of enumeration names. + */ + enum_err(pOpts, pOD, paz_names, (int)name_ct); + break; + + case (uintptr_t)OPTPROC_EMIT_SHELL: + { + unsigned int ix = pOD->optArg.argEnum; + /* + * print the name string. + */ + if (ix >= name_ct) + printf("INVALID-%d", ix); + else + fputs(paz_names[ ix ], stdout); + + break; + } + + case (uintptr_t)OPTPROC_RETURN_VALNAME: + { + tSCC zInval[] = "*INVALID*"; + unsigned int ix = pOD->optArg.argEnum; + /* + * Replace the enumeration value with the name string. + */ + if (ix >= name_ct) + return (uintptr_t)zInval; + + pOD->optArg.argString = paz_names[ix]; + break; + } + + default: + res = find_name(pOD->optArg.argString, pOpts, pOD, paz_names, name_ct); + + if (pOD->fOptState & OPTST_ALLOC_ARG) { + AGFREE(pOD->optArg.argString); + pOD->fOptState &= ~OPTST_ALLOC_ARG; + pOD->optArg.argString = NULL; + } + } + + return res; +} + +static void +set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, + unsigned int name_ct) +{ + /* + * print the list of enumeration names. + */ + enum_err(OPTPROC_EMIT_USAGE, pOD, paz_names, (int)name_ct ); +} + +static void +set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, + unsigned int name_ct) +{ + /* + * print the name string. + */ + int ix = 0; + uintptr_t bits = (uintptr_t)pOD->optCookie; + size_t len = 0; + + bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1; + + while (bits != 0) { + if (bits & 1) { + if (len++ > 0) fputs(" | ", stdout); + fputs(paz_names[ix], stdout); + } + if (++ix >= name_ct) break; + bits >>= 1; + } +} + +static void +set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, + unsigned int name_ct) +{ + static char const none[] = "none"; + static char const plus[3] = " + "; + + char * pz; + uintptr_t bits = (uintptr_t)pOD->optCookie; + int ix = 0; + size_t len = sizeof(none); + + bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1; + + /* + * Replace the enumeration value with the name string. + * First, determine the needed length, then allocate and fill in. + */ + while (bits != 0) { + if (bits & 1) + len += strlen(paz_names[ix]) + sizeof(plus); + if (++ix >= name_ct) break; + bits >>= 1; + } + + pOD->optArg.argString = pz = AGALOC(len, "enum name"); + + /* + * Start by clearing all the bits. We want to turn off any defaults + * because we will be restoring to current state, not adding to + * the default set of bits. + */ + memcpy(pz, none, sizeof(none)-1); + pz += sizeof(none)-1; + bits = (uintptr_t)pOD->optCookie; + bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1; + ix = 0; + + while (bits != 0) { + if (bits & 1) { + size_t nln = strlen(paz_names[ix]); + memcpy(pz, plus, sizeof(plus)); + memcpy(pz+sizeof(plus), paz_names[ix], nln); + pz += strlen(paz_names[ix]) + 3; + } + if (++ix >= name_ct) break; + bits >>= 1; + } + *pz = NUL; +} + +/*=export_func optionSetMembers + * what: Convert between bit flag values and strings + * private: + * + * arg: tOptions*, pOpts, the program options descriptor + * arg: tOptDesc*, pOD, enumeration option description + * arg: char const * const *, + * paz_names, list of enumeration names + * arg: unsigned int, name_ct, number of names in list + * + * doc: This converts the optArg.argString string from the option description + * into the index corresponding to an entry in the name list. + * This will match the generated enumeration value. + * Full matches are always accepted. Partial matches are accepted + * if there is only one partial match. +=*/ +void +optionSetMembers(tOptions * pOpts, tOptDesc * pOD, + char const* const * paz_names, unsigned int name_ct) +{ + /* + * IF the program option descriptor pointer is invalid, + * then it is some sort of special request. + */ + switch ((uintptr_t)pOpts) { + case (uintptr_t)OPTPROC_EMIT_USAGE: + set_memb_usage(pOpts, pOD, paz_names, name_ct); + return; + + case (uintptr_t)OPTPROC_EMIT_SHELL: + set_memb_shell(pOpts, pOD, paz_names, name_ct); + return; + + case (uintptr_t)OPTPROC_RETURN_VALNAME: + set_memb_names(pOpts, pOD, paz_names, name_ct); + return; + + default: + break; + } + + if ((pOD->fOptState & OPTST_RESET) != 0) + return; + + { + char const* pzArg = pOD->optArg.argString; + uintptr_t res; + if ((pzArg == NULL) || (*pzArg == NUL)) { + pOD->optCookie = (void*)0; + return; + } + + res = (uintptr_t)pOD->optCookie; + for (;;) { + tSCC zSpn[] = " ,|+\t\r\f\n"; + int iv, len; + + pzArg += strspn(pzArg, zSpn); + iv = (*pzArg == '!'); + if (iv) + pzArg += strspn(pzArg+1, zSpn) + 1; + + len = strcspn(pzArg, zSpn); + if (len == 0) + break; + + if ((len == 3) && (strncmp(pzArg, zAll, 3) == 0)) { + if (iv) + res = 0; + else res = ~0UL; + } + else if ((len == 4) && (strncmp(pzArg, zNone, 4) == 0)) { + if (! iv) + res = 0; + } + else do { + char* pz; + uintptr_t bit = strtoul(pzArg, &pz, 0); + + if (pz != pzArg + len) { + char z[ AO_NAME_SIZE ]; + char const* p; + int shift_ct; + + if (*pz != NUL) { + if (len >= AO_NAME_LIMIT) + break; + memcpy(z, pzArg, (size_t)len); + z[len] = NUL; + p = z; + } else { + p = pzArg; + } + + shift_ct = find_name(p, pOpts, pOD, paz_names, name_ct); + if (shift_ct >= name_ct) { + pOD->optCookie = (void*)0; + return; + } + bit = 1UL << shift_ct; + } + if (iv) + res &= ~bit; + else res |= bit; + } while (0); + + if (pzArg[len] == NUL) + break; + pzArg += len + 1; + } + if (name_ct < (8 * sizeof(uintptr_t))) { + res &= (1UL << name_ct) - 1UL; + } + + pOD->optCookie = (void*)res; + } +} + +/* + * Local Variables: + * mode: C + * c-file-style: "stroustrup" + * indent-tabs-mode: nil + * End: + * end of autoopts/enumeration.c */ diff -Nru autogen-5.11.9/autoopts/enumeration.c autogen-5.12/autoopts/enumeration.c --- autogen-5.11.9/autoopts/enumeration.c 2011-04-06 19:48:22.000000000 +0200 +++ autogen-5.12/autoopts/enumeration.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,522 +0,0 @@ - -/** - * \file enumeration.c - * - * Time-stamp: "2011-04-06 10:48:22 bkorb" - * - * Automated Options Paged Usage module. - * - * This routine will run run-on options through a pager so the - * user may examine, print or edit them at their leisure. - * - * This file is part of AutoOpts, a companion to AutoGen. - * AutoOpts is free software. - * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved - * - * AutoOpts is available under any one of two licenses. The license - * in use must be one of these two and the choice is under the control - * of the user of the license. - * - * The GNU Lesser General Public License, version 3 or later - * See the files "COPYING.lgplv3" and "COPYING.gplv3" - * - * The Modified Berkeley Software Distribution License - * See the file "COPYING.mbsd" - * - * These files have the following md5sums: - * - * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3 - * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 - * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd - */ - -static char const * pz_enum_err_fmt; - -/* = = = START-STATIC-FORWARD = = = */ -static void -enum_err(tOptions * pOpts, tOptDesc * pOD, - char const * const * paz_names, int name_ct); - -static uintptr_t -find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD, - char const * const * paz_names, unsigned int name_ct); - -static void -set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, - unsigned int name_ct); - -static void -set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, - unsigned int name_ct); - -static void -set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, - unsigned int name_ct); -/* = = = END-STATIC-FORWARD = = = */ - -static void -enum_err(tOptions * pOpts, tOptDesc * pOD, - char const * const * paz_names, int name_ct) -{ - size_t max_len = 0; - size_t ttl_len = 0; - int ct_down = name_ct; - int hidden = 0; - - /* - * A real "pOpts" pointer means someone messed up. Give a real error. - */ - if (pOpts > OPTPROC_EMIT_LIMIT) - fprintf(option_usage_fp, pz_enum_err_fmt, pOpts->pzProgName, - pOD->optArg.argString, pOD->pz_Name); - - fprintf(option_usage_fp, zValidKeys, pOD->pz_Name); - - /* - * If the first name starts with this funny character, then we have - * a first value with an unspellable name. You cannot specify it. - * So, we don't list it either. - */ - if (**paz_names == 0x7F) { - paz_names++; - hidden = 1; - ct_down = --name_ct; - } - - /* - * Figure out the maximum length of any name, plus the total length - * of all the names. - */ - { - char const * const * paz = paz_names; - - do { - size_t len = strlen(*(paz++)) + 1; - if (len > max_len) - max_len = len; - ttl_len += len; - } while (--ct_down > 0); - - ct_down = name_ct; - } - - /* - * IF any one entry is about 1/2 line or longer, print one per line - */ - if (max_len > 35) { - do { - fprintf(option_usage_fp, " %s\n", *(paz_names++)); - } while (--ct_down > 0); - } - - /* - * ELSE IF they all fit on one line, then do so. - */ - else if (ttl_len < 76) { - fputc(' ', option_usage_fp); - do { - fputc(' ', option_usage_fp); - fputs(*(paz_names++), option_usage_fp); - } while (--ct_down > 0); - fputc('\n', option_usage_fp); - } - - /* - * Otherwise, columnize the output - */ - else { - int ent_no = 0; - char zFmt[16]; /* format for all-but-last entries on a line */ - - sprintf(zFmt, "%%-%ds", (int)max_len); - max_len = 78 / max_len; /* max_len is now max entries on a line */ - fputs(" ", option_usage_fp); - - /* - * Loop through all but the last entry - */ - ct_down = name_ct; - while (--ct_down > 0) { - if (++ent_no == max_len) { - /* - * Last entry on a line. Start next line, too. - */ - fprintf(option_usage_fp, "%s\n ", *(paz_names++)); - ent_no = 0; - } - - else - fprintf(option_usage_fp, zFmt, *(paz_names++) ); - } - fprintf(option_usage_fp, "%s\n", *paz_names); - } - - if (pOpts > OPTPROC_EMIT_LIMIT) { - fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); - - (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE); - /* NOTREACHED */ - } - - if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP) { - fprintf(option_usage_fp, zLowerBits, name_ct); - fputs(zSetMemberSettings, option_usage_fp); - } else { - fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); - } -} - - -static uintptr_t -find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD, - char const * const * paz_names, unsigned int name_ct) -{ - /* - * Return the matching index as a pointer sized integer. - * The result gets stashed in a char* pointer. - */ - uintptr_t res = name_ct; - size_t len = strlen((char*)pzName); - uintptr_t idx; - - if (IS_DEC_DIGIT_CHAR(*pzName)) { - char * pz = (char *)(void *)pzName; - unsigned long val = strtoul(pz, &pz, 0); - if ((*pz == NUL) && (val < name_ct)) - return (uintptr_t)val; - enum_err(pOpts, pOD, paz_names, (int)name_ct); - return name_ct; - } - - /* - * Look for an exact match, but remember any partial matches. - * Multiple partial matches means we have an ambiguous match. - */ - for (idx = 0; idx < name_ct; idx++) { - if (strncmp((char*)paz_names[idx], (char*)pzName, len) == 0) { - if (paz_names[idx][len] == NUL) - return idx; /* full match */ - - res = (res != name_ct) ? ~0 : idx; /* save partial match */ - } - } - - if (res < name_ct) - return res; /* partial match */ - - pz_enum_err_fmt = (res == name_ct) ? zNoKey : zAmbigKey; - option_usage_fp = stderr; - enum_err(pOpts, pOD, paz_names, (int)name_ct); - return name_ct; -} - - -/*=export_func optionKeywordName - * what: Convert between enumeration values and strings - * private: - * - * arg: tOptDesc*, pOD, enumeration option description - * arg: unsigned int, enum_val, the enumeration value to map - * - * ret_type: char const * - * ret_desc: the enumeration name from const memory - * - * doc: This converts an enumeration value into the matching string. -=*/ -char const * -optionKeywordName(tOptDesc * pOD, unsigned int enum_val) -{ - tOptDesc od; - - od.optArg.argEnum = enum_val; - (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, &od ); - return od.optArg.argString; -} - - -/*=export_func optionEnumerationVal - * what: Convert from a string to an enumeration value - * private: - * - * arg: tOptions*, pOpts, the program options descriptor - * arg: tOptDesc*, pOD, enumeration option description - * arg: char const * const *, paz_names, list of enumeration names - * arg: unsigned int, name_ct, number of names in list - * - * ret_type: uintptr_t - * ret_desc: the enumeration value - * - * doc: This converts the optArg.argString string from the option description - * into the index corresponding to an entry in the name list. - * This will match the generated enumeration value. - * Full matches are always accepted. Partial matches are accepted - * if there is only one partial match. -=*/ -uintptr_t -optionEnumerationVal(tOptions * pOpts, tOptDesc * pOD, - char const * const * paz_names, unsigned int name_ct) -{ - uintptr_t res = 0UL; - - /* - * IF the program option descriptor pointer is invalid, - * then it is some sort of special request. - */ - switch ((uintptr_t)pOpts) { - case (uintptr_t)OPTPROC_EMIT_USAGE: - /* - * print the list of enumeration names. - */ - enum_err(pOpts, pOD, paz_names, (int)name_ct); - break; - - case (uintptr_t)OPTPROC_EMIT_SHELL: - { - unsigned int ix = pOD->optArg.argEnum; - /* - * print the name string. - */ - if (ix >= name_ct) - printf("INVALID-%d", ix); - else - fputs(paz_names[ ix ], stdout); - - break; - } - - case (uintptr_t)OPTPROC_RETURN_VALNAME: - { - tSCC zInval[] = "*INVALID*"; - unsigned int ix = pOD->optArg.argEnum; - /* - * Replace the enumeration value with the name string. - */ - if (ix >= name_ct) - return (uintptr_t)zInval; - - pOD->optArg.argString = paz_names[ix]; - break; - } - - default: - res = find_name(pOD->optArg.argString, pOpts, pOD, paz_names, name_ct); - - if (pOD->fOptState & OPTST_ALLOC_ARG) { - AGFREE(pOD->optArg.argString); - pOD->fOptState &= ~OPTST_ALLOC_ARG; - pOD->optArg.argString = NULL; - } - } - - return res; -} - -static void -set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, - unsigned int name_ct) -{ - /* - * print the list of enumeration names. - */ - enum_err(OPTPROC_EMIT_USAGE, pOD, paz_names, (int)name_ct ); -} - -static void -set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, - unsigned int name_ct) -{ - /* - * print the name string. - */ - int ix = 0; - uintptr_t bits = (uintptr_t)pOD->optCookie; - size_t len = 0; - - bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1; - - while (bits != 0) { - if (bits & 1) { - if (len++ > 0) fputs(" | ", stdout); - fputs(paz_names[ix], stdout); - } - if (++ix >= name_ct) break; - bits >>= 1; - } -} - -static void -set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names, - unsigned int name_ct) -{ - static char const none[] = "none"; - static char const plus[3] = " + "; - - char * pz; - uintptr_t bits = (uintptr_t)pOD->optCookie; - int ix = 0; - size_t len = sizeof(none); - - bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1; - - /* - * Replace the enumeration value with the name string. - * First, determine the needed length, then allocate and fill in. - */ - while (bits != 0) { - if (bits & 1) - len += strlen(paz_names[ix]) + sizeof(plus); - if (++ix >= name_ct) break; - bits >>= 1; - } - - pOD->optArg.argString = pz = AGALOC(len, "enum name"); - - /* - * Start by clearing all the bits. We want to turn off any defaults - * because we will be restoring to current state, not adding to - * the default set of bits. - */ - memcpy(pz, none, sizeof(none)-1); - pz += sizeof(none)-1; - bits = (uintptr_t)pOD->optCookie; - bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1; - ix = 0; - - while (bits != 0) { - if (bits & 1) { - size_t nln = strlen(paz_names[ix]); - memcpy(pz, plus, sizeof(plus)); - memcpy(pz+sizeof(plus), paz_names[ix], nln); - pz += strlen(paz_names[ix]) + 3; - } - if (++ix >= name_ct) break; - bits >>= 1; - } - *pz = NUL; -} - -/*=export_func optionSetMembers - * what: Convert between bit flag values and strings - * private: - * - * arg: tOptions*, pOpts, the program options descriptor - * arg: tOptDesc*, pOD, enumeration option description - * arg: char const * const *, - * paz_names, list of enumeration names - * arg: unsigned int, name_ct, number of names in list - * - * doc: This converts the optArg.argString string from the option description - * into the index corresponding to an entry in the name list. - * This will match the generated enumeration value. - * Full matches are always accepted. Partial matches are accepted - * if there is only one partial match. -=*/ -void -optionSetMembers(tOptions * pOpts, tOptDesc * pOD, - char const* const * paz_names, unsigned int name_ct) -{ - /* - * IF the program option descriptor pointer is invalid, - * then it is some sort of special request. - */ - switch ((uintptr_t)pOpts) { - case (uintptr_t)OPTPROC_EMIT_USAGE: - set_memb_usage(pOpts, pOD, paz_names, name_ct); - return; - - case (uintptr_t)OPTPROC_EMIT_SHELL: - set_memb_shell(pOpts, pOD, paz_names, name_ct); - return; - - case (uintptr_t)OPTPROC_RETURN_VALNAME: - set_memb_names(pOpts, pOD, paz_names, name_ct); - return; - - default: - break; - } - - if ((pOD->fOptState & OPTST_RESET) != 0) - return; - - { - char const* pzArg = pOD->optArg.argString; - uintptr_t res; - if ((pzArg == NULL) || (*pzArg == NUL)) { - pOD->optCookie = (void*)0; - return; - } - - res = (uintptr_t)pOD->optCookie; - for (;;) { - tSCC zSpn[] = " ,|+\t\r\f\n"; - int iv, len; - - pzArg += strspn(pzArg, zSpn); - iv = (*pzArg == '!'); - if (iv) - pzArg += strspn(pzArg+1, zSpn) + 1; - - len = strcspn(pzArg, zSpn); - if (len == 0) - break; - - if ((len == 3) && (strncmp(pzArg, zAll, 3) == 0)) { - if (iv) - res = 0; - else res = ~0UL; - } - else if ((len == 4) && (strncmp(pzArg, zNone, 4) == 0)) { - if (! iv) - res = 0; - } - else do { - char* pz; - uintptr_t bit = strtoul(pzArg, &pz, 0); - - if (pz != pzArg + len) { - char z[ AO_NAME_SIZE ]; - char const* p; - int shift_ct; - - if (*pz != NUL) { - if (len >= AO_NAME_LIMIT) - break; - memcpy(z, pzArg, (size_t)len); - z[len] = NUL; - p = z; - } else { - p = pzArg; - } - - shift_ct = find_name(p, pOpts, pOD, paz_names, name_ct); - if (shift_ct >= name_ct) { - pOD->optCookie = (void*)0; - return; - } - bit = 1UL << shift_ct; - } - if (iv) - res &= ~bit; - else res |= bit; - } while (0); - - if (pzArg[len] == NUL) - break; - pzArg += len + 1; - } - if (name_ct < (8 * sizeof(uintptr_t))) { - res &= (1UL << name_ct) - 1UL; - } - - pOD->optCookie = (void*)res; - } -} - -/* - * Local Variables: - * mode: C - * c-file-style: "stroustrup" - * indent-tabs-mode: nil - * End: - * end of autoopts/enumeration.c */ diff -Nru autogen-5.11.9/autoopts/env.c autogen-5.12/autoopts/env.c --- autogen-5.11.9/autoopts/env.c 1970-01-01 01:00:00.000000000 +0100 +++ autogen-5.12/autoopts/env.c 2011-04-06 18:35:55.000000000 +0200 @@ -0,0 +1,259 @@ + +/** + * \file environment.c + * + * Time-stamp: "2011-04-06 09:35:55 bkorb" + * + * This file contains all of the routines that must be linked into + * an executable to use the generated option processing. The optional + * routines are in separately compiled modules so that they will not + * necessarily be linked in. + * + * This file is part of AutoOpts, a companion to AutoGen. + * AutoOpts is free software. + * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * + * AutoOpts is available under any one of two licenses. The license + * in use must be one of these two and the choice is under the control + * of the user of the license. + * + * The GNU Lesser General Public License, version 3 or later + * See the files "COPYING.lgplv3" and "COPYING.gplv3" + * + * The Modified Berkeley Software Distribution License + * See the file "COPYING.mbsd" + * + * These files have the following md5sums: + * + * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3 + * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 + * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd + */ + +/* = = = START-STATIC-FORWARD = = = */ +static void +do_env_opt(tOptState * os, char * env_name, + tOptions* pOpts, teEnvPresetType type); +/* = = = END-STATIC-FORWARD = = = */ + +/* + * doPrognameEnv - check for preset values from the ${PROGNAME} + * environment variable. This is accomplished by parsing the text into + * tokens, temporarily replacing the arg vector and calling + * doImmediateOpts and/or doRegularOpts. + */ +LOCAL void +doPrognameEnv(tOptions* pOpts, teEnvPresetType type) +{ + char const* pczOptStr = getenv(pOpts->pzPROGNAME); + token_list_t* pTL; + int sv_argc; + tAoUI sv_flag; + char** sv_argv; + + /* + * No such beast? Then bail now. + */ + if (pczOptStr == NULL) + return; + + /* + * Tokenize the string. If there's nothing of interest, we'll bail + * here immediately. + */ + pTL = ao_string_tokenize(pczOptStr); + if (pTL == NULL) + return; + + /* + * Substitute our $PROGNAME argument list for the real one + */ + sv_argc = pOpts->origArgCt; + sv_argv = pOpts->origArgVect; + sv_flag = pOpts->fOptSet; + + /* + * We add a bogus pointer to the start of the list. The program name + * has already been pulled from "argv", so it won't get dereferenced. + * The option scanning code will skip the "program name" at the start + * of this list of tokens, so we accommodate this way .... + */ + pOpts->origArgVect = (char**)(pTL->tkn_list - 1); + pOpts->origArgCt = pTL->tkn_ct + 1; + pOpts->fOptSet &= ~OPTPROC_ERRSTOP; + + pOpts->curOptIdx = 1; + pOpts->pzCurOpt = NULL; + + switch (type) { + case ENV_IMM: + (void)doImmediateOpts(pOpts); + break; + + case ENV_ALL: + (void)doImmediateOpts(pOpts); + pOpts->curOptIdx = 1; + pOpts->pzCurOpt = NULL; + /* FALLTHROUGH */ + + case ENV_NON_IMM: + (void)doRegularOpts(pOpts); + } + + /* + * Free up the temporary arg vector and restore the original program args. + */ + free(pTL); + pOpts->origArgVect = sv_argv; + pOpts->origArgCt = sv_argc; + pOpts->fOptSet = sv_flag; +} + +static void +do_env_opt(tOptState * os, char * env_name, + tOptions* pOpts, teEnvPresetType type) +{ + os->pzOptArg = getenv(env_name); + if (os->pzOptArg == NULL) + return; + + os->flags = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState; + os->optType = TOPT_UNDEFINED; + + if ( (os->pOD->pz_DisablePfx != NULL) + && (streqvcmp(os->pzOptArg, os->pOD->pz_DisablePfx) == 0)) { + os->flags |= OPTST_DISABLED; + os->pzOptArg = NULL; + } + + switch (type) { + case ENV_IMM: + /* + * Process only immediate actions + */ + if (DO_IMMEDIATELY(os->flags)) + break; + return; + + case ENV_NON_IMM: + /* + * Process only NON immediate actions + */ + if (DO_NORMALLY(os->flags) || DO_SECOND_TIME(os->flags)) + break; + return; + + default: /* process everything */ + break; + } + + /* + * Make sure the option value string is persistent and consistent. + * + * The interpretation of the option value depends + * on the type of value argument the option takes + */ + if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) { + /* + * Ignore any value. + */ + os->pzOptArg = NULL; + + } else if (os->pzOptArg[0] == NUL) { + /* + * If the argument is the empty string and the argument is + * optional, then treat it as if the option was not specified. + */ + if ((os->pOD->fOptState & OPTST_ARG_OPTIONAL) == 0) + return; + os->pzOptArg = NULL; + + } else { + AGDUPSTR(os->pzOptArg, os->pzOptArg, "option argument"); + os->flags |= OPTST_ALLOC_ARG; + } + + handle_opt(pOpts, os); +} + +/* + * doEnvPresets - check for preset values from the envrionment + * This routine should process in all, immediate or normal modes.... + */ +LOCAL void +doEnvPresets(tOptions* pOpts, teEnvPresetType type) +{ + int ct; + tOptState st; + char* pzFlagName; + size_t spaceLeft; + char zEnvName[ AO_NAME_SIZE ]; + + /* + * Finally, see if we are to look at the environment + * variables for initial values. + */ + if ((pOpts->fOptSet & OPTPROC_ENVIRON) == 0) + return; + + doPrognameEnv(pOpts, type); + + ct = pOpts->presetOptCt; + st.pOD = pOpts->pOptDesc; + + pzFlagName = zEnvName + + snprintf(zEnvName, sizeof(zEnvName), "%s_", pOpts->pzPROGNAME); + spaceLeft = AO_NAME_SIZE - (pzFlagName - zEnvName) - 1; + + for (;ct-- > 0; st.pOD++) { + size_t nln; + + /* + * If presetting is disallowed, then skip this entry + */ + if ( ((st.pOD->fOptState & OPTST_NO_INIT) != 0) + || (st.pOD->optEquivIndex != NO_EQUIVALENT) ) + continue; + + /* + * IF there is no such environment variable, + * THEN skip this entry, too. + */ + nln = strlen(st.pOD->pz_NAME) + 1; + if (nln <= spaceLeft) { + /* + * Set up the option state + */ + memcpy(pzFlagName, st.pOD->pz_NAME, nln); + do_env_opt(&st, zEnvName, pOpts, type); + } + } + + /* + * Special handling for ${PROGNAME_LOAD_OPTS} + */ + if ( (pOpts->specOptIdx.save_opts != NO_EQUIVALENT) + && (pOpts->specOptIdx.save_opts != 0)) { + size_t nln; + st.pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts + 1; + + if (st.pOD->pz_NAME == NULL) + return; + + nln = strlen(st.pOD->pz_NAME) + 1; + + if (nln > spaceLeft) + return; + + memcpy(pzFlagName, st.pOD->pz_NAME, nln); + do_env_opt(&st, zEnvName, pOpts, type); + } +} + +/* + * Local Variables: + * mode: C + * c-file-style: "stroustrup" + * indent-tabs-mode: nil + * End: + * end of autoopts/environment.c */ diff -Nru autogen-5.11.9/autoopts/environment.c autogen-5.12/autoopts/environment.c --- autogen-5.11.9/autoopts/environment.c 2011-04-06 18:35:55.000000000 +0200 +++ autogen-5.12/autoopts/environment.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,259 +0,0 @@ - -/** - * \file environment.c - * - * Time-stamp: "2011-04-06 09:35:55 bkorb" - * - * This file contains all of the routines that must be linked into - * an executable to use the generated option processing. The optional - * routines are in separately compiled modules so that they will not - * necessarily be linked in. - * - * This file is part of AutoOpts, a companion to AutoGen. - * AutoOpts is free software. - * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved - * - * AutoOpts is available under any one of two licenses. The license - * in use must be one of these two and the choice is under the control - * of the user of the license. - * - * The GNU Lesser General Public License, version 3 or later - * See the files "COPYING.lgplv3" and "COPYING.gplv3" - * - * The Modified Berkeley Software Distribution License - * See the file "COPYING.mbsd" - * - * These files have the following md5sums: - * - * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3 - * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 - * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd - */ - -/* = = = START-STATIC-FORWARD = = = */ -static void -do_env_opt(tOptState * os, char * env_name, - tOptions* pOpts, teEnvPresetType type); -/* = = = END-STATIC-FORWARD = = = */ - -/* - * doPrognameEnv - check for preset values from the ${PROGNAME} - * environment variable. This is accomplished by parsing the text into - * tokens, temporarily replacing the arg vector and calling - * doImmediateOpts and/or doRegularOpts. - */ -LOCAL void -doPrognameEnv(tOptions* pOpts, teEnvPresetType type) -{ - char const* pczOptStr = getenv(pOpts->pzPROGNAME); - token_list_t* pTL; - int sv_argc; - tAoUI sv_flag; - char** sv_argv; - - /* - * No such beast? Then bail now. - */ - if (pczOptStr == NULL) - return; - - /* - * Tokenize the string. If there's nothing of interest, we'll bail - * here immediately. - */ - pTL = ao_string_tokenize(pczOptStr); - if (pTL == NULL) - return; - - /* - * Substitute our $PROGNAME argument list for the real one - */ - sv_argc = pOpts->origArgCt; - sv_argv = pOpts->origArgVect; - sv_flag = pOpts->fOptSet; - - /* - * We add a bogus pointer to the start of the list. The program name - * has already been pulled from "argv", so it won't get dereferenced. - * The option scanning code will skip the "program name" at the start - * of this list of tokens, so we accommodate this way .... - */ - pOpts->origArgVect = (char**)(pTL->tkn_list - 1); - pOpts->origArgCt = pTL->tkn_ct + 1; - pOpts->fOptSet &= ~OPTPROC_ERRSTOP; - - pOpts->curOptIdx = 1; - pOpts->pzCurOpt = NULL; - - switch (type) { - case ENV_IMM: - (void)doImmediateOpts(pOpts); - break; - - case ENV_ALL: - (void)doImmediateOpts(pOpts); - pOpts->curOptIdx = 1; - pOpts->pzCurOpt = NULL; - /* FALLTHROUGH */ - - case ENV_NON_IMM: - (void)doRegularOpts(pOpts); - } - - /* - * Free up the temporary arg vector and restore the original program args. - */ - free(pTL); - pOpts->origArgVect = sv_argv; - pOpts->origArgCt = sv_argc; - pOpts->fOptSet = sv_flag; -} - -static void -do_env_opt(tOptState * os, char * env_name, - tOptions* pOpts, teEnvPresetType type) -{ - os->pzOptArg = getenv(env_name); - if (os->pzOptArg == NULL) - return; - - os->flags = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState; - os->optType = TOPT_UNDEFINED; - - if ( (os->pOD->pz_DisablePfx != NULL) - && (streqvcmp(os->pzOptArg, os->pOD->pz_DisablePfx) == 0)) { - os->flags |= OPTST_DISABLED; - os->pzOptArg = NULL; - } - - switch (type) { - case ENV_IMM: - /* - * Process only immediate actions - */ - if (DO_IMMEDIATELY(os->flags)) - break; - return; - - case ENV_NON_IMM: - /* - * Process only NON immediate actions - */ - if (DO_NORMALLY(os->flags) || DO_SECOND_TIME(os->flags)) - break; - return; - - default: /* process everything */ - break; - } - - /* - * Make sure the option value string is persistent and consistent. - * - * The interpretation of the option value depends - * on the type of value argument the option takes - */ - if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) { - /* - * Ignore any value. - */ - os->pzOptArg = NULL; - - } else if (os->pzOptArg[0] == NUL) { - /* - * If the argument is the empty string and the argument is - * optional, then treat it as if the option was not specified. - */ - if ((os->pOD->fOptState & OPTST_ARG_OPTIONAL) == 0) - return; - os->pzOptArg = NULL; - - } else { - AGDUPSTR(os->pzOptArg, os->pzOptArg, "option argument"); - os->flags |= OPTST_ALLOC_ARG; - } - - handle_opt(pOpts, os); -} - -/* - * doEnvPresets - check for preset values from the envrionment - * This routine should process in all, immediate or normal modes.... - */ -LOCAL void -doEnvPresets(tOptions* pOpts, teEnvPresetType type) -{ - int ct; - tOptState st; - char* pzFlagName; - size_t spaceLeft; - char zEnvName[ AO_NAME_SIZE ]; - - /* - * Finally, see if we are to look at the environment - * variables for initial values. - */ - if ((pOpts->fOptSet & OPTPROC_ENVIRON) == 0) - return; - - doPrognameEnv(pOpts, type); - - ct = pOpts->presetOptCt; - st.pOD = pOpts->pOptDesc; - - pzFlagName = zEnvName - + snprintf(zEnvName, sizeof(zEnvName), "%s_", pOpts->pzPROGNAME); - spaceLeft = AO_NAME_SIZE - (pzFlagName - zEnvName) - 1; - - for (;ct-- > 0; st.pOD++) { - size_t nln; - - /* - * If presetting is disallowed, then skip this entry - */ - if ( ((st.pOD->fOptState & OPTST_NO_INIT) != 0) - || (st.pOD->optEquivIndex != NO_EQUIVALENT) ) - continue; - - /* - * IF there is no such environment variable, - * THEN skip this entry, too. - */ - nln = strlen(st.pOD->pz_NAME) + 1; - if (nln <= spaceLeft) { - /* - * Set up the option state - */ - memcpy(pzFlagName, st.pOD->pz_NAME, nln); - do_env_opt(&st, zEnvName, pOpts, type); - } - } - - /* - * Special handling for ${PROGNAME_LOAD_OPTS} - */ - if ( (pOpts->specOptIdx.save_opts != NO_EQUIVALENT) - && (pOpts->specOptIdx.save_opts != 0)) { - size_t nln; - st.pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts + 1; - - if (st.pOD->pz_NAME == NULL) - return; - - nln = strlen(st.pOD->pz_NAME) + 1; - - if (nln > spaceLeft) - return; - - memcpy(pzFlagName, st.pOD->pz_NAME, nln); - do_env_opt(&st, zEnvName, pOpts, type); - } -} - -/* - * Local Variables: - * mode: C - * c-file-style: "stroustrup" - * indent-tabs-mode: nil - * End: - * end of autoopts/environment.c */ diff -Nru autogen-5.11.9/autoopts/find.c autogen-5.12/autoopts/find.c --- autogen-5.11.9/autoopts/find.c 1970-01-01 01:00:00.000000000 +0100 +++ autogen-5.12/autoopts/find.c 2011-05-27 01:30:30.000000000 +0200 @@ -0,0 +1,472 @@ +/** + * @file check.c + * + * @brief Hunt for options in the option descriptor list + * + * Time-stamp: "2011-05-26 16:30:30 bkorb" + * + * This file contains the routines that deal with processing quoted strings + * into an internal format. + * + * This file is part of AutoOpts, a companion to AutoGen. + * AutoOpts is free software. + * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved + * + * AutoOpts is available under any one of two licenses. The license + * in use must be one of these two and the choice is under the control + * of the user of the license. + * + * The GNU Lesser General Public License, version 3 or later + * See the files "COPYING.lgplv3" and "COPYING.gplv3" + * + * The Modified Berkeley Software Distribution License + * See the file "COPYING.mbsd" + * + * These files have the following md5sums: + * + * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3 + * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 + * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd + */ + +/** + * find the name and name length we are looking for + */ +static int +parse_opt(char ** nm_pp, char ** arg_pp, char * buf, size_t bufsz) +{ + int res = 0; + char * p = *nm_pp; + *arg_pp = NULL; + + for (;;) { + switch (*(p++)) { + case NUL: return res; + + case '=': + if (res >= bufsz) + return -1; + + memcpy(buf, *nm_pp, res); + + buf[res] = NUL; + *nm_pp = buf; + *arg_pp = p; + return res; + + default: + res++; + } + } +} + +/** + * print out the options that match the given name. + * + * @param pOpts option data + * @param opt_name name of option to look for + */ +static void +opt_ambiguities(tOptions * opts, char * name, int nm_len) +{ + char const * const hyph = + NAMED_OPTS(opts) ? "" : "--"; + + tOptDesc * pOD = opts->pOptDesc; + int idx = 0; + + fputs(zAmbigList, stderr); + do { + if (strneqvcmp(name, pOD->pz_Name, nm_len) == 0) + fprintf(stderr, zAmbiguous, hyph, pOD->pz_Name); + + else if ( (pOD->pz_DisableName != NULL) + && (strneqvcmp(name, pOD->pz_DisableName, nm_len) == 0) + ) + fprintf(stderr, zAmbiguous, hyph, pOD->pz_DisableName); + } while (pOD++, (++idx < opts->optCt)); +} + +/** + * Determine the number of options that match the name + * + * @param pOpts option data + * @param opt_name name of option to look for + * @param nm_len length of provided name + * @param index pointer to int for option index + * @param disable pointer to bool to mark disabled option + * @return count of options that match + */ +static int +opt_match_ct(tOptions * opts, char * name, int nm_len, + int * ixp, ag_bool * disable) +{ + int matchCt = 0; + int idx = 0; + int idxLim = opts->optCt; + tOptDesc * pOD = opts->pOptDesc; + + do { + /* + * If option disabled or a doc option, skip to next + */ + if (pOD->pz_Name == NULL) + continue; + + if ( SKIP_OPT(pOD) + && (pOD->fOptState != (OPTST_OMITTED | OPTST_NO_INIT))) + continue; + + if (strneqvcmp(name, pOD->pz_Name, nm_len) == 0) { + /* + * IF we have a complete match + * THEN it takes priority over any already located partial + */ + if (pOD->pz_Name[ nm_len ] == NUL) { + *ixp = idx; + return 1; + } + } + + /* + * IF there is a disable name + * *AND* the option name matches the disable name + * THEN ... + */ + else if ( (pOD->pz_DisableName != NULL) + && (strneqvcmp(name, pOD->pz_DisableName, nm_len) == 0) + ) { + *disable = AG_TRUE; + + /* + * IF we have a complete match + * THEN it takes priority over any already located partial + */ + if (pOD->pz_DisableName[ nm_len ] == NUL) { + *ixp = idx; + return 1; + } + } + + else + continue; /* does not match any option */ + + /* + * We found a full or partial match, either regular or disabling. + * Remember the index for later. + */ + *ixp = idx; + ++matchCt; + + } while (pOD++, (++idx < idxLim)); + + return matchCt; +} + +/** + * Set the option to the indicated option number. + * + * @param opts option data + * @param arg option argument (if glued to name) + * @param idx option index + * @param disable mark disabled option + * @param st state about current option + */ +static tSuccess +opt_set(tOptions * opts, char * arg, int idx, ag_bool disable, tOptState * st) +{ + tOptDesc * pOD = opts->pOptDesc + idx; + + if (SKIP_OPT(pOD)) { + if ((opts->fOptSet & OPTPROC_ERRSTOP) == 0) + return FAILURE; + + fprintf(stderr, zDisabledErr, opts->pzProgName, pOD->pz_Name); + if (pOD->pzText != NULL) + fprintf(stderr, " -- %s", pOD->pzText); + fputc('\n', stderr); + (*opts->pUsageProc)(opts, EXIT_FAILURE); + /* NOTREACHED */ + _exit(EXIT_FAILURE); /* to be certain */ + } + + /* + * IF we found a disablement name, + * THEN set the bit in the callers' flag word + */ + if (disable) + st->flags |= OPTST_DISABLED; + + st->pOD = pOD; + st->pzOptArg = arg; + st->optType = TOPT_LONG; + + return SUCCESS; +} + +/** + * An option was not found. Check for default option and set it + * if there is one. Otherwise, handle the error. + * + * @param opts option data + * @param name name of option to look for + * @param arg option argument + * @param st state about current option + * + * @return success status + */ +static tSuccess +opt_unknown(tOptions * opts, char * name, char * arg, tOptState * st) +{ + /* + * IF there is no equal sign + * *AND* we are using named arguments + * *AND* there is a default named option, + * THEN return that option. + */ + if ( (arg == NULL) + && NAMED_OPTS(opts) + && (opts->specOptIdx.default_opt != NO_EQUIVALENT)) { + + st->pOD = opts->pOptDesc + opts->specOptIdx.default_opt; + st->pzOptArg = name; + st->optType = TOPT_DEFAULT; + return SUCCESS; + } + + if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) { + fprintf(stderr, zIllOptStr, opts->pzProgPath, name); + (*opts->pUsageProc)(opts, EXIT_FAILURE); + /* NOTREACHED */ + _exit(EXIT_FAILURE); /* to be certain */ + } + + return FAILURE; +} + +/** + * Several options match the provided name. + * + * @param opts option data + * @param name name of option to look for + * @param match_ct number of matching options + * + * @return success status (always FAILURE, if it returns) + */ +static tSuccess +opt_ambiguous(tOptions * opts, char * name, int match_ct) +{ + if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) { + fprintf(stderr, zAmbigOptStr, opts->pzProgPath, name, match_ct); + if (match_ct <= 4) + opt_ambiguities(opts, name, strlen(name)); + (*opts->pUsageProc)(opts, EXIT_FAILURE); + /* NOTREACHED */ + _exit(EXIT_FAILURE); /* to be certain */ + } + return FAILURE; +} + +/** + * Find the option descriptor by full name. + * + * @param pOpts option data + * @param opt_name name of option to look for + * @param pOptState state about current option + * + * @return success status + */ +LOCAL tSuccess +opt_find_long(tOptions * pOpts, char * opt_name, tOptState * pOptState) +{ + char name_buf[128]; + char * opt_arg; + int nm_len = + parse_opt(&opt_name, &opt_arg, name_buf, sizeof(name_buf)); + + int matchIdx = 0; + ag_bool disable = AG_FALSE; + int match_ct = + opt_match_ct(pOpts, opt_name, nm_len, &matchIdx, &disable); + + /* + * See if we found one match, no matches or multiple matches. + */ + switch (match_ct) { + case 1: return opt_set(pOpts, opt_arg, matchIdx, disable, pOptState); + case 0: return opt_unknown(pOpts, opt_name, opt_arg, pOptState); + default: return opt_ambiguous(pOpts, opt_name, match_ct); + } +} + + +/** + * Find the short option descriptor for the current option + * + * @param pOpts option data + * @param optValue option flag character + * @param pOptState state about current option + */ +LOCAL tSuccess +opt_find_short(tOptions* pOpts, uint_t optValue, tOptState* pOptState) +{ + tOptDesc* pRes = pOpts->pOptDesc; + int ct = pOpts->optCt; + + /* + * Search the option list + */ + do { + if (optValue != pRes->optValue) + continue; + + if (SKIP_OPT(pRes)) { + if ( (pRes->fOptState == (OPTST_OMITTED | OPTST_NO_INIT)) + && (pRes->pz_Name != NULL)) { + fprintf(stderr, zDisabledErr, pOpts->pzProgPath, pRes->pz_Name); + if (pRes->pzText != NULL) + fprintf(stderr, " -- %s", pRes->pzText); + fputc('\n', stderr); + (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); + /* NOTREACHED */ + _exit(EXIT_FAILURE); /* to be certain */ + } + goto short_opt_error; + } + + pOptState->pOD = pRes; + pOptState->optType = TOPT_SHORT; + return SUCCESS; + + } while (pRes++, --ct > 0); + + /* + * IF the character value is a digit + * AND there is a special number option ("-n") + * THEN the result is the "option" itself and the + * option is the specially marked "number" option. + */ + if ( IS_DEC_DIGIT_CHAR(optValue) + && (pOpts->specOptIdx.number_option != NO_EQUIVALENT) ) { + pOptState->pOD = \ + pRes = pOpts->pOptDesc + pOpts->specOptIdx.number_option; + (pOpts->pzCurOpt)--; + pOptState->optType = TOPT_SHORT; + return SUCCESS; + } + +short_opt_error: + + /* + * IF we are to stop on errors (the default, actually) + * THEN call the usage procedure. + */ + if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) { + fprintf(stderr, zIllOptChr, pOpts->pzProgPath, optValue); + (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE); + /* NOTREACHED */ + _exit(EXIT_FAILURE); /* to be certain */ + } + + return FAILURE; +} + + +/** + * Find the option descriptor for the current option + */ +LOCAL tSuccess +find_opt(tOptions* pOpts, tOptState* pOptState) +{ + /* + * IF we are continuing a short option list (e.g. -xyz...) + * THEN continue a single flag option. + * OTHERWISE see if there is room to advance and then do so. + */ + if ((pOpts->pzCurOpt != NULL) && (*pOpts->pzCurOpt != NUL)) + return opt_find_short(pOpts, (tAoUC)*(pOpts->pzCurOpt), pOptState); + + if (pOpts->curOptIdx >= pOpts->origArgCt) + return PROBLEM; /* NORMAL COMPLETION */ + + pOpts->pzCurOpt = pOpts->origArgVect[ pOpts->curOptIdx ]; + + /* + * IF all arguments must be named options, ... + */ + if (NAMED_OPTS(pOpts)) { + char * pz = pOpts->pzCurOpt; + int def; + tSuccess res; + tAoUS * def_opt; + + pOpts->curOptIdx++; + + if (*pz != '-') + return opt_find_long(pOpts, pz, pOptState); + + /* + * The name is prefixed with one or more hyphens. Strip them off + * and disable the "default_opt" setting. Use heavy recasting to + * strip off the "const" quality of the "default_opt" field. + */ + while (*(++pz) == '-') ; + def_opt = (void *)&(pOpts->specOptIdx.default_opt); + def = *def_opt; + *def_opt = NO_EQUIVALENT; + res = opt_find_long(pOpts, pz, pOptState); + *def_opt = def; + return res; + } + + /* + * Note the kind of flag/option marker + */ + if (*((pOpts->pzCurOpt)++) != '-') + return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */ + + /* + * Special hack for a hyphen by itself + */ + if (*(pOpts->pzCurOpt) == NUL) + return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */ + + /* + * The current argument is to be processed as an option argument + */ + pOpts->curOptIdx++; + + /* + * We have an option marker. + * Test the next character for long option indication + */ + if (pOpts->pzCurOpt[0] == '-') { + if (*++(pOpts->pzCurOpt) == NUL) + /* + * NORMAL COMPLETION - NOT this arg, but rest are operands + */ + return PROBLEM; + + /* + * We do not allow the hyphen to be used as a flag value. + * Therefore, if long options are not to be accepted, we punt. + */ + if ((pOpts->fOptSet & OPTPROC_LONGOPT) == 0) { + fprintf(stderr, zIllOptStr, pOpts->pzProgPath, + zIllegal, pOpts->pzCurOpt-2); + return FAILURE; + } + + return opt_find_long(pOpts, pOpts->pzCurOpt, pOptState); + } + + /* + * If short options are not allowed, then do long + * option processing. Otherwise the character must be a + * short (i.e. single character) option. + */ + if ((pOpts->fOptSet & OPTPROC_SHORTOPT) != 0) + return opt_find_short(pOpts, (tAoUC)*(pOpts->pzCurOpt), pOptState); + + return opt_find_long(pOpts, pOpts->pzCurOpt, pOptState); +} diff -Nru autogen-5.11.9/autoopts/funcs.def autogen-5.12/autoopts/funcs.def --- autogen-5.11.9/autoopts/funcs.def 2011-05-06 16:06:43.000000000 +0200 +++ autogen-5.12/autoopts/funcs.def 2011-06-26 16:39:41.000000000 +0200 @@ -9,9 +9,11 @@ * boolean.c * configfile.c * cook.c - * enumeration.c - * environment.c + * check.c + * enum.c + * env.c * file.c + * find.c * genshell.c * load.c * makeshell.c @@ -36,7 +38,7 @@ /* GLOBALDEFS */ -#line 1052 "autoopts.c" +#line 598 "autoopts.c" library = 'opts'; header = 'your-opts.h'; lib_description = @@ -270,7 +272,7 @@ }; -#line 237 "enumeration.c" +#line 237 "enum.c" export_func = { name = 'optionEnumerationVal'; what = 'Convert from a string to an enumeration value'; @@ -302,7 +304,7 @@ This will match the generated enumeration value. Full matches are always accepted. Partial matches are accepted if there is only one partial match.'; - srcfile = 'enumeration.c'; + srcfile = 'enum.c'; linenum = '237'; }; @@ -519,7 +521,7 @@ }; -#line 214 "enumeration.c" +#line 214 "enum.c" export_func = { name = 'optionKeywordName'; what = 'Convert between enumeration values and strings'; @@ -537,7 +539,7 @@ ret_type = 'char const *'; ret_desc = 'the enumeration name from const memory'; doc = 'This converts an enumeration value into the matching string.'; - srcfile = 'enumeration.c'; + srcfile = 'enum.c'; linenum = '214'; }; @@ -834,7 +836,7 @@ }; -#line 1065 "autoopts.c" +#line 611 "autoopts.c" export_func = { name = 'optionProcess'; what = 'this is the main option processing routine'; @@ -876,7 +878,7 @@ were generated with the "allow-errors" attribute, or if the ERRSKIP_OPTERR or ERRSTOP_OPTERR macros were invoked.'; srcfile = 'autoopts.c'; - linenum = '1065'; + linenum = '611'; }; @@ -1004,7 +1006,7 @@ }; -#line 398 "enumeration.c" +#line 398 "enum.c" export_func = { name = 'optionSetMembers'; what = 'Convert between bit flag values and strings'; @@ -1034,7 +1036,7 @@ This will match the generated enumeration value. Full matches are always accepted. Partial matches are accepted if there is only one partial match.'; - srcfile = 'enumeration.c'; + srcfile = 'enum.c'; linenum = '398'; }; @@ -1455,7 +1457,7 @@ }; -#line 46 "text_mmap.c" +#line 240 "text_mmap.c" export_func = { name = 'text_mmap'; private; @@ -1486,20 +1488,20 @@ 'This routine will mmap a file into memory ensuring that there is at least one @file{NUL} character following the file data. It will return the address where the file contents have been mapped into memory. If there is a -problem, then it will return @code{MAP_FAILED} and set @file{errno} +problem, then it will return @code{MAP_FAILED} and set @code{errno} appropriately. -The named file does not exist, @code{stat(2)} will set @file{errno} as it -will. If the file is not a regular file, @file{errno} will be +The named file does not exist, @code{stat(2)} will set @code{errno} as it +will. If the file is not a regular file, @code{errno} will be @code{EINVAL}. At that point, @code{open(2)} is attempted with the access bits set appropriately for the requested @code{mmap(2)} protections and flag -bits. On failure, @file{errno} will be set according to the documentation -for @code{open(2)}. If @code{mmap(2)} fails, @file{errno} will be set as +bits. On failure, @code{errno} will be set according to the documentation +for @code{open(2)}. If @code{mmap(2)} fails, @code{errno} will be set as that routine sets it. If @code{text_mmap} works to this point, a valid address will be returned, but there may still be ``issues\'\'. If the file size is not an even multiple of the system page size, then -@code{text_map} will return at this point and @file{errno} will be zero. +@code{text_map} will return at this point and @code{errno} will be zero. Otherwise, an anonymous map is attempted. If not available, then an attempt is made to @code{mmap(2)} @file{/dev/zero}. If any of these fail, the address of the file\'s data is returned, bug @code{no} @file{NUL} characters @@ -1518,11 +1520,11 @@ << use the data >> text_munmap(&mi);'; srcfile = 'text_mmap.c'; - linenum = '46'; + linenum = '240'; }; -#line 293 "text_mmap.c" +#line 313 "text_mmap.c" export_func = { name = 'text_munmap'; private; @@ -1533,14 +1535,14 @@ arg_desc = 'info about the mapping'; }; ret-type = 'int'; - ret-desc = '-1 or 0. @file{errno} will have the error code.'; + ret-desc = '-1 or 0. @code{errno} will have the error code.'; doc = 'This routine will unmap the data mapped in with @code{text_mmap} and close the associated file descriptors opened by that function.'; see = 'munmap(2), close(2)'; err = 'Any error code issued by munmap(2) or close(2) is possible.'; srcfile = 'text_mmap.c'; - linenum = '293'; + linenum = '313'; }; vers-curr = "143360"; vers-min = "102400"; diff -Nru autogen-5.11.9/autoopts/genshell.c autogen-5.12/autoopts/genshell.c --- autogen-5.11.9/autoopts/genshell.c 2011-05-06 16:06:42.000000000 +0200 +++ autogen-5.12/autoopts/genshell.c 2011-06-26 16:39:39.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (genshell.c) * - * It has been AutoGen-ed May 6, 2011 at 07:06:41 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:39:38 AM by AutoGen 5.11.10pre11 * From the definitions genshell.def * and the template file options * @@ -18,21 +18,24 @@ * * This source file is copyrighted and licensed under the following terms: * - * genshellopt copyright (c) 1999-2011 Bruce Korb - all rights reserved - * - * genshellopt is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * genshellopt is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - + * Copyright (C) 1999-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU General Public License, version 3 or later + * + * +PFX>genshellopt is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * genshellopt is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ #include diff -Nru autogen-5.11.9/autoopts/genshell.h autogen-5.12/autoopts/genshell.h --- autogen-5.11.9/autoopts/genshell.h 2011-05-06 16:06:42.000000000 +0200 +++ autogen-5.12/autoopts/genshell.h 2011-06-26 16:39:39.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (genshell.h) * - * It has been AutoGen-ed May 6, 2011 at 07:06:41 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:39:38 AM by AutoGen 5.11.10pre11 * From the definitions genshell.def * and the template file options * @@ -18,21 +18,24 @@ * * This source file is copyrighted and licensed under the following terms: * - * genshellopt copyright (c) 1999-2011 Bruce Korb - all rights reserved - * - * genshellopt is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * genshellopt is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - + * Copyright (C) 1999-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU General Public License, version 3 or later + * + * +PFX>genshellopt is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * genshellopt is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ /* * This file contains the programmatic interface to the Automated @@ -136,10 +139,10 @@ #if defined(ENABLE_NLS) # ifndef _ # include - static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); - } +static inline char* aoGetsText(char const* pz) { + if (pz == NULL) return NULL; + return (char*)gettext(pz); +} # define _(s) aoGetsText(s) # endif /* _() */ diff -Nru autogen-5.11.9/autoopts/load.c autogen-5.12/autoopts/load.c --- autogen-5.11.9/autoopts/load.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/autoopts/load.c 2011-05-25 03:05:28.000000000 +0200 @@ -1,7 +1,7 @@ /** * \file load.c - * Time-stamp: "2010-12-18 11:46:07 bkorb" + * Time-stamp: "2011-05-24 18:05:28 bkorb" * * This file contains the routines that deal with processing text strings * for options, either from a NUL-terminated string passed in or from an @@ -372,7 +372,7 @@ { char* pzArg = assembleArgValue(pzLine, load_mode); - if (! SUCCESSFUL(longOptionFind(pOpts, pzLine, pOS))) + if (! SUCCESSFUL(opt_find_long(pOpts, pzLine, pOS))) return; if (pOS->flags & OPTST_NO_INIT) return; diff -Nru autogen-5.11.9/autoopts/Makefile.am autogen-5.12/autoopts/Makefile.am --- autogen-5.11.9/autoopts/Makefile.am 2011-05-06 16:06:48.000000000 +0200 +++ autogen-5.12/autoopts/Makefile.am 2011-06-26 16:39:46.000000000 +0200 @@ -2,7 +2,7 @@ ## --------------------------------------------------------------------- ## autoopts/Makefile.am ## -## Time-stamp: "2011-03-06 15:11:39 bkorb" +## Time-stamp: "2011-06-06 08:50:00 bkorb" ## Author: Bruce Korb ## ## This file is part of AutoOpts, a companion to AutoGen. @@ -25,18 +25,18 @@ ## 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 ## 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd -SUBDIRS = @OPTS_TESTDIR@ -INCLUDES = @INCLIST@ -libsrc = libopts-@AO_CURRENT@.@AO_REVISION@.@AO_AGE@.tar.gz -LIBOPTS_VER = @AO_CURRENT@:@AO_REVISION@:@AO_AGE@ +SUBDIRS = @OPTS_TESTDIR@ +INCLUDES = @INCLIST@ +libsrc = libopts-@AO_CURRENT@.@AO_REVISION@.@AO_AGE@.tar.gz +LIBOPTS_VER = @AO_CURRENT@:@AO_REVISION@:@AO_AGE@ if NEED_PATHFIND -PATHFIND_MAN= pathfind.3 +PATHFIND_MAN = pathfind.3 else -PATHFIND_MAN= +PATHFIND_MAN = endif -GENMAN = $(PATHFIND_MAN) \ +GENMAN = $(PATHFIND_MAN) \ ao_string_tokenize.3 configFileLoad.3 optionFileLoad.3 \ optionFindNextValue.3 optionFindValue.3 optionFree.3 \ optionGetValue.3 optionLoadLine.3 optionNextValue.3 \ @@ -46,10 +46,12 @@ streqvmap.3 strneqvcmp.3 strtransform.3 nodist_pkgdata_DATA = $(libsrc) \ - tpl/man2mdoc tpl/mdoc2man tpl/mdoc2texi \ - tpl/texi2man tpl/texi2mdoc tpl/tpl-config.tlib + tpl/man2man tpl/man2mdoc tpl/man2texi \ + tpl/mdoc2man tpl/mdoc2mdoc tpl/mdoc2texi \ + tpl/texi2man tpl/texi2mdoc tpl/texi2texi \ + tpl/tpl-config.tlib -pkgdata_DATA = \ +pkgdata_DATA = \ autoopts.m4 tpl/aginfo.tpl tpl/aginfo3.tpl \ tpl/agman-cmd.tpl tpl/agman.tlib tpl/agman1.tpl \ tpl/agman3.tpl tpl/agmdoc-cmd.tpl tpl/agpl.lic \ @@ -57,41 +59,44 @@ tpl/getopt.tpl tpl/gpl.lic tpl/gplv2.lic \ tpl/lgpl.lic tpl/mbsd.lic tpl/optcode.tlib \ tpl/opthead.tlib tpl/options.tpl tpl/optlib.tlib \ - tpl/optmain.tlib tpl/rc-sample.tpl tpl/stdoptions.def - -EXTRA_DATA = $(pkgdata_DATA) \ - autogen.map autoopts-config.in autoopts.m4 \ - bootstrap.dir install-options-h mk-autoopts-pc.in \ - mk-tpl-config.sh po tpl/man2mdoc.pl \ - tpl/mdoc2man.sh tpl/mdoc2texi.pl tpl/texi2man.sh \ - tpl/texi2mdoc.sh tpl/tpl-config-tlib.in tpl/usage-txt.tpl \ + tpl/optmain.tlib tpl/rc-sample.tpl tpl/stdoptions.def \ tpl/usage.tlib -MAN_STAMP = man3-stamp -GENTEXI = libopts.texi libopts.menu -TEXI_STAMP = texi-stamp +EXTRA_DATA = $(pkgdata_DATA) \ + autogen.map autoopts-config.in bootstrap.dir \ + install-options-h mk-autoopts-pc.in mk-tpl-config.sh \ + po tpl/man2mdoc.pl tpl/mdoc2man.sh \ + tpl/mdoc2texi.pl tpl/texi2man.sh tpl/texi2mdoc.sh \ + tpl/tpl-config-tlib.in tpl/usage-txt.tpl + +GENSCRIPTS = $(srcdir)/funcs.def \ + tpl/man2man tpl/man2mdoc tpl/man2texi tpl/mdoc2man tpl/mdoc2mdoc \ + tpl/mdoc2texi tpl/texi2man tpl/texi2mdoc tpl/texi2texi + +MAN_STAMP = man3-stamp +GENTEXI = libopts.texi libopts.menu +TEXI_STAMP = texi-stamp -GENHDRS = autoopts/options.h autoopts/usage-txt.h genshell.h \ +GENHDRS = autoopts/options.h autoopts/usage-txt.h genshell.h \ xat-attribute.h value-type.h ag-char-map.h -HDRS = $(GENHDRS) autoopts.h proto.h parse-duration.h project.h -GEN_SRC = value-type.c xat-attribute.c +HDRS = $(GENHDRS) autoopts.h proto.h parse-duration.h project.h +GEN_SRC = value-type.c xat-attribute.c ## The primary source (autoopts.c) must be listed first and on a separate ## line. 'sed' does some magic here to get the list of source files for the ## documentation. Files without documentation are on the CSRC = line. ## -CSRC = parse-duration.c $(GEN_SRC) \ +CSRC = parse-duration.c $(GEN_SRC) \ autoopts.c \ - boolean.c configfile.c cook.c enumeration.c environment.c \ - file.c genshell.c load.c makeshell.c nested.c numeric.c \ - pgusage.c putshell.c reset.c restore.c save.c sort.c \ - stack.c streqvcmp.c text_mmap.c tokenize.c time.c usage.c \ - version.c - -SRC = $(HDRS) $(CSRC) $(GENSRC) -STAMP_FILES = $(MAN_STAMP) $(TEXI_STAMP) -DEF_FILES = genshell.def $(srcdir)/funcs.def -pkgconfigdir=$(libdir)/pkgconfig + boolean.c configfile.c cook.c check.c enum.c env.c \ + file.c find.c genshell.c load.c makeshell.c nested.c \ + numeric.c pgusage.c putshell.c reset.c restore.c save.c \ + sort.c stack.c streqvcmp.c text_mmap.c tokenize.c time.c \ + usage.c version.c + +SRC = $(HDRS) $(CSRC) $(GENSRC) +DEF_FILES = genshell.def $(srcdir)/funcs.def +pkgconfigdir =$(libdir)/pkgconfig ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## @@ -100,8 +105,8 @@ ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # CLEANFILES = tmp-* libopts.c -DISTCLEANFILES = $(GENMAN) $(GENTEXI) $(STAMP_FILES) -MAINTAINERCLEANFILES = $(GENHDRS) $(GENSRC) $(srcdir)/funcs.def +DISTCLEANFILES = $(GENMAN) $(GENTEXI) *-stamp +MAINTAINERCLEANFILES = $(GENHDRS) $(GENSRC) $(GENSCRIPTS) m4datadir = $(datadir)/aclocal nodist_libopts_la_SOURCES = libopts.c @@ -126,8 +131,8 @@ nobase_include_HEADERS = $(INST_HDRS) bin_SCRIPTS = $(INST_SH) -BOOTENV = top_srcdir="$(top_srcdir)" top_builddir="$(top_builddir)" \ - srcdir="$(srcdir)" builddir="$(builddir)" \ +BOOTENV = top_srcdir="$(top_srcdir)" srcdir="$(srcdir)" \ + top_builddir="$(top_builddir)" builddir="$(builddir)" \ AGexe="$(AGexe)" GDexe="$(GDexe)" CLexe="$(CLexe)" \ POSIX_SHELL="$(POSIX_SHELL)" @@ -137,45 +142,51 @@ ## ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -libopts.c : $(HDRS) $(CSRC) $(top_builddir)/config.h $(srcdir)/mk-tpl-config.sh +libopts.c : tpl-config-stamp +$(GENSCRIPTS) : tpl-config-stamp + +tpl-config-stamp: $(HDRS) $(CSRC) \ + $(top_builddir)/config.h $(srcdir)/mk-tpl-config.sh + @touch tmp-$@ $(BOOTENV) \ - $(SHELL) $(srcdir)/mk-tpl-config.sh $@ $(HDRS) $(CSRC) + $(POSIX_SHELL) $(srcdir)/mk-tpl-config.sh $@ $(HDRS) $(CSRC) + @mv tmp-$@ $@ -makeshell.lo : genshell.c -genshell.c : $(srcdir)/genshell.def - @$(BOOTENV) \ - $(SHELL) $(srcdir)/bootstrap.dir $@ +makeshell.lo : genshell.c +genshell.c : $(srcdir)/genshell.def + $(BOOTENV) \ + $(POSIX_SHELL) $(srcdir)/bootstrap.dir $@ -strcspn.lo : $(top_srcdir)/compat/strcspn.c +strcspn.lo : $(top_srcdir)/compat/strcspn.c $(LTCOMPILE) -o $@ -c $(top_srcdir)/compat/strcspn.c install-data-local : install-man3 -$(GENMAN) : $(MAN_STAMP) -$(MAN_STAMP) : $(srcdir)/funcs.def - @if test -x ../agen5/autogen ; then \ - touch tmp-$@ ; \ - opts='-L$(srcdir)/tpl -L$(builddir)/tpl -Tagman3.tpl' ; \ - echo ! $(AGexe) $${opts} $(srcdir)/funcs.def ; \ - $(AGexe) $${opts} $(srcdir)/funcs.def ; \ - mv -f tmp-$@ $@ ; else true ; fi +$(GENMAN) : $(MAN_STAMP) +$(MAN_STAMP) : $(srcdir)/funcs.def + @test -x ../agen5/autogen || exit 0 ; \ + touch tmp-$@ ; \ + opts='-L$(srcdir)/tpl -L$(builddir)/tpl -Tagman3.tpl' ; \ + echo ! $(AGexe) $${opts} $(srcdir)/funcs.def ; \ + $(AGexe) $${opts} $(srcdir)/funcs.def ; \ + mv -f tmp-$@ $@ -$(GENTEXI) : $(TEXI_STAMP) -$(TEXI_STAMP) : ../agen5/autogen $(srcdir)/funcs.def +$(GENTEXI) : $(TEXI_STAMP) +$(TEXI_STAMP) : ../agen5/autogen $(srcdir)/funcs.def @touch tmp-$@ ; \ opts='-L$(srcdir)/tpl -L$(builddir)/tpl -Taginfo3.tpl' ; \ cmd="$(AGexe) $${opts} -DLEVEL=subsection -blibopts" ; \ cmd="$${cmd} -L$(srcdir) $(srcdir)/funcs.def" ; \ echo ! $$cmd ; $$cmd ; mv -f tmp-$@ $@ -libsrc : $(libsrc) -$(libsrc) : +libsrc : $(libsrc) +$(libsrc) : @$(BOOTENV) \ AO_AGE=@AO_AGE@ AO_CURRENT=@AO_CURRENT@ AO_REVISION=@AO_REVISION@ \ - $(SHELL) $(top_srcdir)/pkg/libopts/mklibsrc.sh + $(POSIX_SHELL) $(top_srcdir)/pkg/libopts/mklibsrc.sh pkgconfig/autoopts.pc : mk-autoopts-pc - $(SHELL) mk-autoopts-pc $@ + $(POSIX_SHELL) mk-autoopts-pc $@ install-data-hook: @DESTdestdir='$(DESTDIR)$(includedir)/autoopts' \ @@ -184,7 +195,7 @@ LIBOPTS_VER='$(LIBOPTS_VER)' \ POSIX_SHELL='$(POSIX_SHELL)' \ bindir='$(bindir)' \ - $(SHELL) $(srcdir)/install-options-h + $(POSIX_SHELL) $(srcdir)/install-options-h .NOTPARALLEL: diff -Nru autogen-5.11.9/autoopts/Makefile.in autogen-5.12/autoopts/Makefile.in --- autogen-5.11.9/autoopts/Makefile.in 2011-05-06 16:06:56.000000000 +0200 +++ autogen-5.12/autoopts/Makefile.in 2011-06-26 16:39:56.000000000 +0200 @@ -332,8 +332,10 @@ streqvmap.3 strneqvcmp.3 strtransform.3 nodist_pkgdata_DATA = $(libsrc) \ - tpl/man2mdoc tpl/mdoc2man tpl/mdoc2texi \ - tpl/texi2man tpl/texi2mdoc tpl/tpl-config.tlib + tpl/man2man tpl/man2mdoc tpl/man2texi \ + tpl/mdoc2man tpl/mdoc2mdoc tpl/mdoc2texi \ + tpl/texi2man tpl/texi2mdoc tpl/texi2texi \ + tpl/tpl-config.tlib pkgdata_DATA = \ autoopts.m4 tpl/aginfo.tpl tpl/aginfo3.tpl \ @@ -343,15 +345,19 @@ tpl/getopt.tpl tpl/gpl.lic tpl/gplv2.lic \ tpl/lgpl.lic tpl/mbsd.lic tpl/optcode.tlib \ tpl/opthead.tlib tpl/options.tpl tpl/optlib.tlib \ - tpl/optmain.tlib tpl/rc-sample.tpl tpl/stdoptions.def + tpl/optmain.tlib tpl/rc-sample.tpl tpl/stdoptions.def \ + tpl/usage.tlib EXTRA_DATA = $(pkgdata_DATA) \ - autogen.map autoopts-config.in autoopts.m4 \ - bootstrap.dir install-options-h mk-autoopts-pc.in \ - mk-tpl-config.sh po tpl/man2mdoc.pl \ - tpl/mdoc2man.sh tpl/mdoc2texi.pl tpl/texi2man.sh \ - tpl/texi2mdoc.sh tpl/tpl-config-tlib.in tpl/usage-txt.tpl \ - tpl/usage.tlib + autogen.map autoopts-config.in bootstrap.dir \ + install-options-h mk-autoopts-pc.in mk-tpl-config.sh \ + po tpl/man2mdoc.pl tpl/mdoc2man.sh \ + tpl/mdoc2texi.pl tpl/texi2man.sh tpl/texi2mdoc.sh \ + tpl/tpl-config-tlib.in tpl/usage-txt.tpl + +GENSCRIPTS = $(srcdir)/funcs.def \ + tpl/man2man tpl/man2mdoc tpl/man2texi tpl/mdoc2man tpl/mdoc2mdoc \ + tpl/mdoc2texi tpl/texi2man tpl/texi2mdoc tpl/texi2texi MAN_STAMP = man3-stamp GENTEXI = libopts.texi libopts.menu @@ -363,19 +369,18 @@ GEN_SRC = value-type.c xat-attribute.c CSRC = parse-duration.c $(GEN_SRC) \ autoopts.c \ - boolean.c configfile.c cook.c enumeration.c environment.c \ - file.c genshell.c load.c makeshell.c nested.c numeric.c \ - pgusage.c putshell.c reset.c restore.c save.c sort.c \ - stack.c streqvcmp.c text_mmap.c tokenize.c time.c usage.c \ - version.c + boolean.c configfile.c cook.c check.c enum.c env.c \ + file.c find.c genshell.c load.c makeshell.c nested.c \ + numeric.c pgusage.c putshell.c reset.c restore.c save.c \ + sort.c stack.c streqvcmp.c text_mmap.c tokenize.c time.c \ + usage.c version.c SRC = $(HDRS) $(CSRC) $(GENSRC) -STAMP_FILES = $(MAN_STAMP) $(TEXI_STAMP) DEF_FILES = genshell.def $(srcdir)/funcs.def pkgconfigdir = $(libdir)/pkgconfig CLEANFILES = tmp-* libopts.c -DISTCLEANFILES = $(GENMAN) $(GENTEXI) $(STAMP_FILES) -MAINTAINERCLEANFILES = $(GENHDRS) $(GENSRC) $(srcdir)/funcs.def +DISTCLEANFILES = $(GENMAN) $(GENTEXI) *-stamp +MAINTAINERCLEANFILES = $(GENHDRS) $(GENSRC) $(GENSCRIPTS) m4datadir = $(datadir)/aclocal nodist_libopts_la_SOURCES = libopts.c libopts_la_SOURCES = $(HDRS) @@ -395,8 +400,8 @@ lib_LTLIBRARIES = $(INST_LIBS) nobase_include_HEADERS = $(INST_HDRS) bin_SCRIPTS = $(INST_SH) -BOOTENV = top_srcdir="$(top_srcdir)" top_builddir="$(top_builddir)" \ - srcdir="$(srcdir)" builddir="$(builddir)" \ +BOOTENV = top_srcdir="$(top_srcdir)" srcdir="$(srcdir)" \ + top_builddir="$(top_builddir)" builddir="$(builddir)" \ AGexe="$(AGexe)" GDexe="$(GDexe)" CLexe="$(CLexe)" \ POSIX_SHELL="$(POSIX_SHELL)" @@ -1079,45 +1084,51 @@ uninstall-pkgdataDATA -libopts.c : $(HDRS) $(CSRC) $(top_builddir)/config.h $(srcdir)/mk-tpl-config.sh +libopts.c : tpl-config-stamp +$(GENSCRIPTS) : tpl-config-stamp + +tpl-config-stamp: $(HDRS) $(CSRC) \ + $(top_builddir)/config.h $(srcdir)/mk-tpl-config.sh + @touch tmp-$@ $(BOOTENV) \ - $(SHELL) $(srcdir)/mk-tpl-config.sh $@ $(HDRS) $(CSRC) + $(POSIX_SHELL) $(srcdir)/mk-tpl-config.sh $@ $(HDRS) $(CSRC) + @mv tmp-$@ $@ -makeshell.lo : genshell.c -genshell.c : $(srcdir)/genshell.def - @$(BOOTENV) \ - $(SHELL) $(srcdir)/bootstrap.dir $@ +makeshell.lo : genshell.c +genshell.c : $(srcdir)/genshell.def + $(BOOTENV) \ + $(POSIX_SHELL) $(srcdir)/bootstrap.dir $@ -strcspn.lo : $(top_srcdir)/compat/strcspn.c +strcspn.lo : $(top_srcdir)/compat/strcspn.c $(LTCOMPILE) -o $@ -c $(top_srcdir)/compat/strcspn.c install-data-local : install-man3 -$(GENMAN) : $(MAN_STAMP) -$(MAN_STAMP) : $(srcdir)/funcs.def - @if test -x ../agen5/autogen ; then \ - touch tmp-$@ ; \ - opts='-L$(srcdir)/tpl -L$(builddir)/tpl -Tagman3.tpl' ; \ - echo ! $(AGexe) $${opts} $(srcdir)/funcs.def ; \ - $(AGexe) $${opts} $(srcdir)/funcs.def ; \ - mv -f tmp-$@ $@ ; else true ; fi +$(GENMAN) : $(MAN_STAMP) +$(MAN_STAMP) : $(srcdir)/funcs.def + @test -x ../agen5/autogen || exit 0 ; \ + touch tmp-$@ ; \ + opts='-L$(srcdir)/tpl -L$(builddir)/tpl -Tagman3.tpl' ; \ + echo ! $(AGexe) $${opts} $(srcdir)/funcs.def ; \ + $(AGexe) $${opts} $(srcdir)/funcs.def ; \ + mv -f tmp-$@ $@ -$(GENTEXI) : $(TEXI_STAMP) -$(TEXI_STAMP) : ../agen5/autogen $(srcdir)/funcs.def +$(GENTEXI) : $(TEXI_STAMP) +$(TEXI_STAMP) : ../agen5/autogen $(srcdir)/funcs.def @touch tmp-$@ ; \ opts='-L$(srcdir)/tpl -L$(builddir)/tpl -Taginfo3.tpl' ; \ cmd="$(AGexe) $${opts} -DLEVEL=subsection -blibopts" ; \ cmd="$${cmd} -L$(srcdir) $(srcdir)/funcs.def" ; \ echo ! $$cmd ; $$cmd ; mv -f tmp-$@ $@ -libsrc : $(libsrc) -$(libsrc) : +libsrc : $(libsrc) +$(libsrc) : @$(BOOTENV) \ AO_AGE=@AO_AGE@ AO_CURRENT=@AO_CURRENT@ AO_REVISION=@AO_REVISION@ \ - $(SHELL) $(top_srcdir)/pkg/libopts/mklibsrc.sh + $(POSIX_SHELL) $(top_srcdir)/pkg/libopts/mklibsrc.sh pkgconfig/autoopts.pc : mk-autoopts-pc - $(SHELL) mk-autoopts-pc $@ + $(POSIX_SHELL) mk-autoopts-pc $@ install-data-hook: @DESTdestdir='$(DESTDIR)$(includedir)/autoopts' \ @@ -1126,7 +1137,7 @@ LIBOPTS_VER='$(LIBOPTS_VER)' \ POSIX_SHELL='$(POSIX_SHELL)' \ bindir='$(bindir)' \ - $(SHELL) $(srcdir)/install-options-h + $(POSIX_SHELL) $(srcdir)/install-options-h .NOTPARALLEL: diff -Nru autogen-5.11.9/autoopts/mk-autoopts-pc.in autogen-5.12/autoopts/mk-autoopts-pc.in --- autogen-5.11.9/autoopts/mk-autoopts-pc.in 2011-05-06 16:06:48.000000000 +0200 +++ autogen-5.12/autoopts/mk-autoopts-pc.in 2011-06-26 16:39:46.000000000 +0200 @@ -2,11 +2,11 @@ ## --------------------------------------------------------------------- ## mk-autoopts-pc.in -- Describe AutoOpts configuration ## -## Autoopts Copyright (c) 1992-20112011 by Bruce Korb +## Autoopts Copyright (c) 1992-2011 by Bruce Korb ## ## DO NOT EDIT THIS FILE (mk-autoopts-pc.in) ## -## It has been AutoGen-ed May 6, 2011 at 07:06:48 AM by AutoGen 5.11.9 +## It has been AutoGen-ed June 26, 2011 at 07:39:46 AM by AutoGen 5.11.10pre11 ## From the definitions aoconf.def ## and the template file aoconf.tpl ## @@ -29,10 +29,18 @@ libsrc="${pkgdatadir}/libopts-${dotver}.tar.gz" static_libs="${libdir}/libopts.a" cflags="-I${includedir}" -test -n "${ldopts}" && { - ldflags="${ldopts}${libdir} ${ldflags}" - libs=${ldflags} -} +case "${libdir}" in +/lib | /lib64 | /usr/lib | /usr/lib64 ) + ldopts='' + ldflags=-lopts + ;; + +* ) + test -n "${ldopts}" && \ + ldflags="${ldopts}${libdir} ${ldflags}" + ;; +esac +libs=${ldflags} test "${includedir}" = "/usr/include" && cflags="" PS4='>mk-aopc> ' dirname=`dirname ${1}` diff -Nru autogen-5.11.9/autoopts/mk-tpl-config.sh autogen-5.12/autoopts/mk-tpl-config.sh --- autogen-5.11.9/autoopts/mk-tpl-config.sh 2011-05-04 18:28:14.000000000 +0200 +++ autogen-5.12/autoopts/mk-tpl-config.sh 2011-06-06 17:08:10.000000000 +0200 @@ -13,8 +13,6 @@ exit 1 } -target=${1} ; shift - for d in top_srcdir srcdir top_builddir builddir do eval v=\${$d} @@ -36,7 +34,7 @@ printf '#include "%s"\n' $1 shift done -} > ${target} +} > libopts.c cd tpl diff -Nru autogen-5.11.9/autoopts/optionFileLoad.3 autogen-5.12/autoopts/optionFileLoad.3 --- autogen-5.11.9/autoopts/optionFileLoad.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionFileLoad.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionFileLoad 3 2011-05-06 "" "Programmer's Manual" +.TH optionFileLoad 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionFileLoad.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:41 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionFindNextValue.3 autogen-5.12/autoopts/optionFindNextValue.3 --- autogen-5.11.9/autoopts/optionFindNextValue.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionFindNextValue.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionFindNextValue 3 2011-05-06 "" "Programmer's Manual" +.TH optionFindNextValue 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionFindNextValue.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:41 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionFindValue.3 autogen-5.12/autoopts/optionFindValue.3 --- autogen-5.11.9/autoopts/optionFindValue.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionFindValue.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionFindValue 3 2011-05-06 "" "Programmer's Manual" +.TH optionFindValue 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionFindValue.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionFree.3 autogen-5.12/autoopts/optionFree.3 --- autogen-5.11.9/autoopts/optionFree.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionFree.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionFree 3 2011-05-06 "" "Programmer's Manual" +.TH optionFree 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionFree.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionGetValue.3 autogen-5.12/autoopts/optionGetValue.3 --- autogen-5.11.9/autoopts/optionGetValue.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionGetValue.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionGetValue 3 2011-05-06 "" "Programmer's Manual" +.TH optionGetValue 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionGetValue.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionLoadLine.3 autogen-5.12/autoopts/optionLoadLine.3 --- autogen-5.11.9/autoopts/optionLoadLine.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionLoadLine.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionLoadLine 3 2011-05-06 "" "Programmer's Manual" +.TH optionLoadLine 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionLoadLine.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionNextValue.3 autogen-5.12/autoopts/optionNextValue.3 --- autogen-5.11.9/autoopts/optionNextValue.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionNextValue.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionNextValue 3 2011-05-06 "" "Programmer's Manual" +.TH optionNextValue 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionNextValue.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionOnlyUsage.3 autogen-5.12/autoopts/optionOnlyUsage.3 --- autogen-5.11.9/autoopts/optionOnlyUsage.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionOnlyUsage.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionOnlyUsage 3 2011-05-06 "" "Programmer's Manual" +.TH optionOnlyUsage 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionOnlyUsage.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionProcess.3 autogen-5.12/autoopts/optionProcess.3 --- autogen-5.11.9/autoopts/optionProcess.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionProcess.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionProcess 3 2011-05-06 "" "Programmer's Manual" +.TH optionProcess 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionProcess.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionRestore.3 autogen-5.12/autoopts/optionRestore.3 --- autogen-5.11.9/autoopts/optionRestore.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionRestore.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionRestore 3 2011-05-06 "" "Programmer's Manual" +.TH optionRestore 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionRestore.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionSaveFile.3 autogen-5.12/autoopts/optionSaveFile.3 --- autogen-5.11.9/autoopts/optionSaveFile.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionSaveFile.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionSaveFile 3 2011-05-06 "" "Programmer's Manual" +.TH optionSaveFile 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionSaveFile.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionSaveState.3 autogen-5.12/autoopts/optionSaveState.3 --- autogen-5.11.9/autoopts/optionSaveState.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionSaveState.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionSaveState 3 2011-05-06 "" "Programmer's Manual" +.TH optionSaveState 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionSaveState.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionUnloadNested.3 autogen-5.12/autoopts/optionUnloadNested.3 --- autogen-5.11.9/autoopts/optionUnloadNested.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionUnloadNested.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionUnloadNested 3 2011-05-06 "" "Programmer's Manual" +.TH optionUnloadNested 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionUnloadNested.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/optionVersion.3 autogen-5.12/autoopts/optionVersion.3 --- autogen-5.11.9/autoopts/optionVersion.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/optionVersion.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH optionVersion 3 2011-05-06 "" "Programmer's Manual" +.TH optionVersion 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (optionVersion.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/po/usage-txt.pot autogen-5.12/autoopts/po/usage-txt.pot --- autogen-5.11.9/autoopts/po/usage-txt.pot 2011-05-06 16:06:42.000000000 +0200 +++ autogen-5.12/autoopts/po/usage-txt.pot 2011-06-26 16:39:39.000000000 +0200 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: autogen 5.11.9\n" +"Project-Id-Version: autogen 5.12\n" "Report-Msgid-Bugs-To: autogen-users@lists.sourceforge.net\n" -"POT-Creation-Date: 2011-05-06 07:06-0700\n" +"POT-Creation-Date: 2011-06-26 07:39-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: autoopts.c:76 +#: autoopts.c:70 msgid "malloc of %d bytes failed\n" #: configfile.c:1332 @@ -29,41 +29,47 @@ msgid "Automated Options Processing Error!\n" "\t%s called AutoOpts function with structure version %d:%d:%d.\n" -#: autoopts.c:89 +#: autoopts.c:83 msgid "realloc of %d bytes at 0x%p failed\n" #: configfile.c:1369 msgid "\tThis is less than the minimum library version: " -#: autoopts.c:102 +#: autoopts.c:96 msgid "strdup of %d byte string failed\n" #: version.c:109 msgid "Automated Options version %s\n" "\tcopyright (c) 1999-2011 by Bruce Korb - all rights reserved\n" -#: autoopts.c:685 +#: autoopts.c:351 msgid "AutoOpts lib error: defaulted to option with optional arg\n" #: alias.c:50 msgid "(AutoOpts bug): Aliasing option is out of range." -#: enumeration.c:464 +#: enum.c:464 msgid "all" #: usage.c:465 msgid "\t\t\t\t- an alternate for %s\n" -#: enumeration.c:207 +#: enum.c:207 msgid "%s error: the keyword `%s' is ambiguous for %s\n" -#: autoopts.c:401 -msgid "%s: ambiguous option -- %s\n" +#: find.c:78 +msgid " The following options match:\n" -#: autoopts.c:1037 +#: find.c:260 +msgid "%s: ambiguous option name: %s (matches %d options)\n" + +#: find.c:81 find.c:86 +msgid " %s%s\n" + +#: check.c:157 msgid "%s: Command line arguments required\n" -#: alias.c:74 autoopts.c:234 +#: alias.c:74 autoopts.c:228 msgid "%d %s%s options allowed\n" #: usage.c:713 @@ -78,7 +84,7 @@ "\t'c' - version and copyright\n" "\t'n' - version and copyright notice\n" -#: autoopts.c:975 +#: check.c:58 msgid "ERROR: %s option conflicts with the %s option\n" #: restore.c:109 @@ -96,7 +102,7 @@ #: usage.c:429 msgid "\t\t\t\t- disabled as --%s\n" -#: autoopts.c:359 autoopts.c:431 +#: find.c:184 find.c:326 msgid "%s: The ``%s'' option has been disabled" #: usage.c:686 @@ -108,10 +114,10 @@ #: usage.c:456 msgid "\t\t\t\t- enabled by default\n" -#: alias.c:69 autoopts.c:229 +#: alias.c:69 autoopts.c:223 msgid "-equivalence" -#: alias.c:71 autoopts.c:231 +#: alias.c:71 autoopts.c:225 msgid "ERROR: only " #: usage.c:752 @@ -136,7 +142,7 @@ #: configfile.c:1136 msgid "File error %d (%s) opening %s for loading options\n" -#: text_mmap.c:259 +#: text_mmap.c:98 msgid "fs error %d (%s) reading file %s\n" #: file.c:81 file.c:96 file.c:109 file.c:128 file.c:148 @@ -203,47 +209,47 @@ #: usage.c:804 usage.c:825 msgid "=str" -#: autoopts.c:469 reset.c:105 +#: find.c:365 reset.c:105 msgid "%s: illegal option -- %c\n" -#: autoopts.c:401 autoopts.c:559 reset.c:113 +#: find.c:238 find.c:455 reset.c:113 msgid "%s: illegal option -- %s\n" -#: autoopts.c:560 +#: find.c:456 msgid "illegal" -#: enumeration.c:155 enumeration.c:165 +#: enum.c:155 enum.c:165 msgid " or an integer from %d through %d\n" #: usage.c:654 msgid "AutoOpts ERROR: invalid option descriptor for %s\n" -#: enumeration.c:162 +#: enum.c:162 msgid " or an integer mask with any of the lower %d bits set\n" #: usage.c:489 msgid "\t\t\t\t- is a set membership option\n" -#: autoopts.c:624 +#: autoopts.c:290 msgid "%s: option `%s' requires an argument\n" -#: autoopts.c:181 +#: autoopts.c:175 msgid "Equivalenced option '%s' was equivalenced to both\n" "\t'%s' and '%s'" #: usage.c:509 msgid "\t\t\t\t- must appear between %d and %d times\n" -#: autoopts.c:1008 +#: check.c:90 msgid "ERROR: The %s option is required\n" -#: autoopts.c:714 +#: autoopts.c:380 msgid "%s: option `%s' cannot have an argument\n" #: tpl/optmain.tlib:74 msgid "%s: cannot allocate new argument vector\n" -#: autoopts.c:1027 +#: check.c:147 msgid "%s: Command line arguments not allowed\n" #: save.c:528 @@ -252,7 +258,7 @@ #: usage.c:269 msgid "Options are specified by single or double hyphens and their name.\n" -#: enumeration.c:207 +#: enum.c:207 msgid "%s error: `%s' does not match any %s keywords\n" #: usage.c:496 @@ -276,16 +282,16 @@ #: restore.c:150 msgid "%s(optionRestore): error: no saved option state\n" -#: enumeration.c:469 +#: enum.c:469 msgid "none" #: save.c:134 msgid "'%s' not defined\n" -#: autoopts.c:746 +#: autoopts.c:409 msgid "'%s' is not a command line option\n" -#: autoopts.c:1007 +#: check.c:89 msgid "ERROR: The %s option must appear %d times\n" #: configfile.c:1146 makeshell.c:982 save.c:258 @@ -309,7 +315,7 @@ #: usage.c:805 usage.c:814 msgid " " -#: alias.c:76 autoopts.c:236 +#: alias.c:76 autoopts.c:230 msgid "one %s%s option allowed\n" #: usage.c:270 @@ -372,7 +378,7 @@ #: reset.c:83 msgid "The --reset-option has not been configured.\n" -#: autoopts.c:963 +#: check.c:45 msgid "ERROR: %s option requires the %s option\n" #: usage.c:873 usage.c:879 @@ -390,7 +396,7 @@ #: configfile.c:1393 msgid "-_^" -#: enumeration.c:163 +#: enum.c:163 msgid "or you may use a numeric representation. Preceding these with a '!' will\n" "clear the bits, specifying 'none' will clear all bits, and 'all' will set them\n" "all. Multiple entries may be passed as an option argument list.\n" @@ -457,6 +463,6 @@ #: usage.c:501 msgid "\t\t\t\t- may appear up to %d times\n" -#: enumeration.c:73 +#: enum.c:73 msgid "The valid \"%s\" option keywords are:\n" diff -Nru autogen-5.11.9/autoopts/proto.h autogen-5.12/autoopts/proto.h --- autogen-5.11.9/autoopts/proto.h 2011-05-06 16:06:48.000000000 +0200 +++ autogen-5.12/autoopts/proto.h 2011-06-26 16:39:46.000000000 +0200 @@ -1,7 +1,7 @@ /* -*- buffer-read-only: t -*- vi: set ro: * * Prototypes for autoopts - * Generated Fri May 6 07:06:48 PDT 2011 + * Generated Sun Jun 26 07:39:46 PDT 2011 */ #ifndef AUTOOPTS_PROTO_H_GUARD #define AUTOOPTS_PROTO_H_GUARD 1 @@ -28,18 +28,18 @@ handle_opt(tOptions* pOpts, tOptState* pOptState); LOCAL tSuccess -longOptionFind(tOptions* pOpts, char* pzOptName, tOptState* pOptState); - -LOCAL tSuccess -shortOptionFind(tOptions* pOpts, uint_t optValue, tOptState* pOptState); - -LOCAL tSuccess doImmediateOpts(tOptions* pOpts); LOCAL tSuccess doRegularOpts(tOptions* pOpts); /* + * Extracted from check.c + */ +LOCAL ag_bool +is_consistent(tOptions * pOpts); + +/* * Extracted from configfile.c */ LOCAL void @@ -56,7 +56,7 @@ validateOptionsStruct(tOptions* pOpts, char const* pzProgram); /* - * Extracted from environment.c + * Extracted from env.c */ LOCAL void doPrognameEnv(tOptions* pOpts, teEnvPresetType type); @@ -65,6 +65,18 @@ doEnvPresets(tOptions* pOpts, teEnvPresetType type); /* + * Extracted from find.c + */ +LOCAL tSuccess +opt_find_long(tOptions * pOpts, char * opt_name, tOptState * pOptState); + +LOCAL tSuccess +opt_find_short(tOptions* pOpts, uint_t optValue, tOptState* pOptState); + +LOCAL tSuccess +find_opt(tOptions* pOpts, tOptState* pOptState); + +/* * Extracted from load.c */ LOCAL void diff -Nru autogen-5.11.9/autoopts/reset.c autogen-5.12/autoopts/reset.c --- autogen-5.11.9/autoopts/reset.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/autoopts/reset.c 2011-05-25 03:07:16.000000000 +0200 @@ -2,7 +2,7 @@ /** * \file reset.c * - * Time-stamp: "2010-07-10 10:56:34 bkorb" + * Time-stamp: "2011-05-24 18:07:16 bkorb" * * This file is part of AutoOpts, a companion to AutoGen. * AutoOpts is free software. @@ -100,7 +100,7 @@ return; } - succ = shortOptionFind(pOpts, (tAoUC)*pzArg, &opt_state); + succ = opt_find_short(pOpts, (tAoUC)*pzArg, &opt_state); if (! SUCCESSFUL(succ)) { fprintf(stderr, zIllOptChr, pOpts->pzProgPath, *pzArg); pOpts->pUsageProc(pOpts, EXIT_FAILURE); @@ -108,7 +108,7 @@ assert(0 == 1); } } else { - succ = longOptionFind(pOpts, (char *)pzArg, &opt_state); + succ = opt_find_long(pOpts, (char *)pzArg, &opt_state); if (! SUCCESSFUL(succ)) { fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg); pOpts->pUsageProc(pOpts, EXIT_FAILURE); diff -Nru autogen-5.11.9/autoopts/sort.c autogen-5.12/autoopts/sort.c --- autogen-5.11.9/autoopts/sort.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/autoopts/sort.c 2011-05-25 03:07:14.000000000 +0200 @@ -2,7 +2,7 @@ /* * \file sort.c * - * Time-stamp: "2010-07-17 10:34:15 bkorb" + * Time-stamp: "2011-05-24 18:07:14 bkorb" * * This module implements argument sorting. * @@ -132,7 +132,7 @@ char** ppzOpts, int* pOptsIdx) { while (*pzArg != NUL) { - if (FAILED(shortOptionFind(pOpts, (tAoUC)*pzArg, pOS))) + if (FAILED(opt_find_short(pOpts, (tAoUC)*pzArg, pOS))) return FAILURE; /* @@ -251,7 +251,7 @@ pOpts->origArgVect[ (pOpts->curOptIdx)++ ]; goto restOperands; } - res = longOptionFind(pOpts, pzArg+2, &os); + res = opt_find_long(pOpts, pzArg+2, &os); break; default: @@ -261,9 +261,9 @@ * short (i.e. single character) option. */ if ((pOpts->fOptSet & OPTPROC_SHORTOPT) == 0) { - res = longOptionFind(pOpts, pzArg+1, &os); + res = opt_find_long(pOpts, pzArg+1, &os); } else { - res = shortOptionFind(pOpts, (tAoUC)pzArg[1], &os); + res = opt_find_short(pOpts, (tAoUC)pzArg[1], &os); } break; } diff -Nru autogen-5.11.9/autoopts/strequate.3 autogen-5.12/autoopts/strequate.3 --- autogen-5.11.9/autoopts/strequate.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/strequate.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH strequate 3 2011-05-06 "" "Programmer's Manual" +.TH strequate 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (strequate.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/streqvcmp.3 autogen-5.12/autoopts/streqvcmp.3 --- autogen-5.11.9/autoopts/streqvcmp.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/streqvcmp.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH streqvcmp 3 2011-05-06 "" "Programmer's Manual" +.TH streqvcmp 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (streqvcmp.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/streqvmap.3 autogen-5.12/autoopts/streqvmap.3 --- autogen-5.11.9/autoopts/streqvmap.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/streqvmap.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH streqvmap 3 2011-05-06 "" "Programmer's Manual" +.TH streqvmap 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (streqvmap.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/strneqvcmp.3 autogen-5.12/autoopts/strneqvcmp.3 --- autogen-5.11.9/autoopts/strneqvcmp.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/strneqvcmp.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH strneqvcmp 3 2011-05-06 "" "Programmer's Manual" +.TH strneqvcmp 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (strneqvcmp.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/strtransform.3 autogen-5.12/autoopts/strtransform.3 --- autogen-5.11.9/autoopts/strtransform.3 2011-05-06 16:09:45.000000000 +0200 +++ autogen-5.12/autoopts/strtransform.3 2011-06-26 16:42:41.000000000 +0200 @@ -1,7 +1,7 @@ -.TH strtransform 3 2011-05-06 "" "Programmer's Manual" +.TH strtransform 3 2011-06-26 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (strtransform.3) .\" -.\" It has been AutoGen-ed May 6, 2011 at 07:09:45 AM by AutoGen 5.11.9 +.\" It has been AutoGen-ed June 26, 2011 at 07:42:42 AM by AutoGen 5.12 .\" From the definitions ./funcs.def .\" and the template file agman3.tpl .SH NAME diff -Nru autogen-5.11.9/autoopts/test/defs.in autogen-5.12/autoopts/test/defs.in --- autogen-5.11.9/autoopts/test/defs.in 2011-04-30 00:41:51.000000000 +0200 +++ autogen-5.12/autoopts/test/defs.in 2011-06-26 16:33:22.000000000 +0200 @@ -3,7 +3,7 @@ # # defs --- define the environment for autogen tests. # -# Time-stamp: "2011-04-29 15:41:51 bkorb" +# Time-stamp: "2011-06-26 07:33:22 bkorb" # Author: Bruce Korb ## ## This file is part of AutoOpts, a companion to AutoGen. @@ -52,6 +52,7 @@ set -a SED="@SED@" + AG_TIMEOUT=@AG_TIMEOUT@ progname=`echo "$1" | ${SED} 's,^.*/,,'` testname=`echo "$progname" | ${SED} 's,\..*$,,'` @@ -355,7 +356,8 @@ trap "failure 'test ${testname} killed on timeout'" 15 ( ( exec > /dev/null 2>&1 ## ## This file is part of AutoOpts, a companion to AutoGen. @@ -176,9 +176,9 @@ .RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \-\-\fIopt\-name\fP " [[=| ]\fIvalue\fP]]..." .PP All arguments must be options. -.SH DESCRIPTION +.SH "DESCRIPTION" There is no description for this command. -.SH OPTIONS +.SH "OPTIONS" .TP .BR \-o " \fIstring\fP, " \-\-option "=" \fIstring\fP The option option descrip. @@ -255,6 +255,8 @@ Any option that is not marked as \fInot presettable\fP may be preset by loading values from configuration ("RC" or ".INI") file(s). The file "\fI./keyword.cfg\fP" will be used, if present. +.SH "FILES" +See \fBOPTION PRESETS\fP for configuration files. .SH "EXIT STATUS" One of the following exit values will be returned: .TP @@ -263,9 +265,7 @@ .TP .BR 1 The operation failed or the command syntax was not valid. -.SH FILES -See \fBOPTION PRESETS\fP for configuration files. -.PP +.SH "NOTES" This manual page was \fIAutoGen\fP-erated from the \fBtest_keyword\fP option definitions. _EOMan_ @@ -285,8 +285,9 @@ .Dt TEST_KEYWORD 1 User Commands .Sh NAME .Nm test_keyword -.Nd Test AutoOpts for keyword.Sh SYNOPSIS -.Nm TEST_KEYWORD +.Nd Test AutoOpts for keyword +.Sh SYNOPSIS +.Nm .\" Mixture of short (flag) options and long options .Op Fl flags .Op Fl flag Ar value @@ -294,9 +295,9 @@ .Pp All arguments must be options. .Pp -.Sh DESCRIPTION +.Sh "DESCRIPTION" There is no description for this command. -.Sh OPTIONS +.Sh "OPTIONS" .Bl -tag .It \-o " \fIstring\fP, " \-\-option "=" \fIstring\fP The option option descrip. @@ -368,6 +369,8 @@ Any option that is not marked as \fInot presettable\fP may be preset by loading values from configuration ("RC" or ".INI") file(s). The file "\fI./keyword.cfg\fP" will be used, if present. +.Sh "FILES" +See \fBOPTION PRESETS\fP for configuration files. .Sh "EXIT STATUS" One of the following exit values will be returned: .Bl -tag @@ -376,9 +379,7 @@ .It 1 The operation failed or the command syntax was not valid. .El -.Sh FILES -See \fBOPTION PRESETS\fP for configuration files. -.Pp +.Sh "NOTES" This manual page was \fIAutoGen\fP-erated from the \fBtest_keyword\fP option definitions. _EOMan_ diff -Nru autogen-5.11.9/autoopts/test/usage.test autogen-5.12/autoopts/test/usage.test --- autogen-5.11.9/autoopts/test/usage.test 2011-02-02 20:58:46.000000000 +0100 +++ autogen-5.12/autoopts/test/usage.test 2011-06-26 16:35:50.000000000 +0200 @@ -3,7 +3,7 @@ # ---------------------------------------------------------------------- # usage.test --- test all the ways usage text can be printed. # -## Time-stamp: "2011-02-02 11:58:46 bkorb" +## Time-stamp: "2011-06-26 07:35:50 bkorb" # Author: Bruce Korb ## ## This file is part of AutoOpts, a companion to AutoGen. @@ -28,7 +28,7 @@ # # ---------------------------------------------------------------------- -kill_delay=90 +${VERBOSE} && kill_delay=10 || kill_delay=5 . ./defs # # # # # # # # # # HELP OUTPUT FILE # # # # # # # # # @@ -491,11 +491,12 @@ failure "AutoGen could not process $testname" } - ${SED} -e '1,/definition names looked up/d' \ - -e '/end of looked up def/,$d' ${defnames_raw} >> ${defnames_file} - ${defnames_raw} >> ${defnames_file} + ${SED} \ + -e '1,/definition names looked up/d' \ + -e '/end of looked up def/,$d' ${defnames_raw} \ + ${defnames_raw} >> ${defnames_file} compile ${helpstr} - ${SED} -e '/Extended usage information passed thru pager/q' \ + ${SED} -e '/Extended usage information passed thru pager/q' \ ${testname}.help > XXX mv XXX ${testname}.help cmp -s ${testname}.help ${testname}.hlp || \ @@ -514,6 +515,8 @@ * ) setx='' ;; esac +stime=$(date +%s) + for long_opts in true false do ${long_opts} && lname=L || lname=s @@ -552,6 +555,7 @@ sort -u -o ${defnames_file} ${defnames_file} cat > ${defnames_raw} <<- _EOF_ + aliases allow_errors arg_default arg_optional @@ -573,10 +577,12 @@ enabled environrc equivalence + exit_name explain export extract_code field + file_fail_code flag flag_code flag_proc @@ -595,6 +601,7 @@ lib_name library long_opts + main main_text main_type max @@ -604,8 +611,11 @@ name no_command no_libopts + no_misuse_usage no_preset no_xlate + nomem_fail_code + omitted_usage package prefix prefix_enum @@ -623,6 +633,7 @@ translators unstack_arg usage + usage_message usage_opt usage_type val_name diff -Nru autogen-5.11.9/autoopts/text_mmap.c autogen-5.12/autoopts/text_mmap.c --- autogen-5.11.9/autoopts/text_mmap.c 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/autoopts/text_mmap.c 2011-06-25 21:57:27.000000000 +0200 @@ -1,7 +1,9 @@ /** - * \file text_mmap.c + * @file text_mmap.c * - * Time-stamp: "2010-07-17 10:15:32 bkorb" + * Map a text file, ensuring the text always has an ending NUL byte. + * + * Time-stamp: "2011-06-25 11:42:22 bkorb" * * This file is part of AutoOpts, a companion to AutoGen. * AutoOpts is free software. @@ -23,10 +25,26 @@ * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3 * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd */ +#if defined(HAVE_MMAP) +# ifndef MAP_ANONYMOUS +# ifdef MAP_ANON +# define MAP_ANONYMOUS MAP_ANON +# endif +# endif -#ifndef MAP_ANONYMOUS -# ifdef MAP_ANON -# define MAP_ANONYMOUS MAP_ANON +# if ! defined(MAP_ANONYMOUS) && ! defined(HAVE_DEV_ZERO) + /* + * We must have either /dev/zero or anonymous mapping for + * this to work. + */ +# undef HAVE_MMAP + +# else +# ifdef _SC_PAGESIZE +# define GETPAGESIZE() sysconf(_SC_PAGESIZE) +# else +# define GETPAGESIZE() getpagesize() +# endif # endif #endif @@ -43,6 +61,182 @@ && ((_flg & (MAP_SHARED|MAP_PRIVATE)) == MAP_SHARED)) #define MAP_FAILED_PTR ((void*)MAP_FAILED) +/** + * Load the contents of a text file. There are two separate implementations, + * depending up on whether mmap(3) is available. + * + * If not available, malloc the file length plus one byte. Read it in + * and NUL terminate. + * + * If available, first check to see if the text file size is a multiple of a + * page size. If it is, map the file size plus an extra page from either + * anonymous memory or from /dev/zero. Then map the file text on top of the + * first pages of the anonymous/zero pages. Otherwise, just map the file + * because there will be NUL bytes provided at the end. + * + * @param mapinfo a structure holding everything we need to know + * about the mapping. + */ +static void +load_text_file(tmap_info_t * mapinfo) +{ +#if ! defined(HAVE_MMAP) + mapinfo->txt_data = AGALOC(mapinfo->txt_size+1, "file text"); + if (mapinfo->txt_data == NULL) { + mapinfo->txt_errno = ENOMEM; + return; + } + + { + size_t sz = mapinfo->txt_size; + char* pz = mapinfo->txt_data; + + while (sz > 0) { + ssize_t rdct = read(mapinfo->txt_fd, pz, sz); + if (rdct <= 0) { + mapinfo->txt_errno = errno; + fprintf(stderr, zFSErrReadFile, + errno, strerror(errno), pzFile); + free(mapinfo->txt_data); + return; + } + + pz += rdct; + sz -= rdct; + } + + *pz = NUL; + } + + mapinfo->txt_errno = 0; + +#else /* HAVE mmap */ + size_t const pgsz = GETPAGESIZE(); + void * map_addr = NULL; + + mapinfo->txt_full_size = (mapinfo->txt_size + pgsz) & ~(pgsz - 1); + if (mapinfo->txt_full_size == (mapinfo->txt_size + pgsz)) { + /* + * The text is a multiple of a page boundary. We must map an + * extra page so the text ends with a NUL. + */ +#if defined(MAP_ANONYMOUS) + map_addr = mmap(NULL, mapinfo->txt_full_size, PROT_READ|PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, AO_INVALID_FD, 0); +#else + mapinfo->txt_zero_fd = open("/dev/zero", O_RDONLY); + + if (mapinfo->txt_zero_fd == AO_INVALID_FD) { + mapinfo->txt_errno = errno; + return; + } + map_addr = mmap(NULL, mapinfo->txt_full_size, PROT_READ|PROT_WRITE, + MAP_PRIVATE, mapinfo->txt_zero_fd, 0); +#endif + if (map_addr == MAP_FAILED_PTR) { + mapinfo->txt_errno = errno; + return; + } + mapinfo->txt_flags |= MAP_FIXED; + } + + mapinfo->txt_data = + mmap(map_addr, mapinfo->txt_size, mapinfo->txt_prot, + mapinfo->txt_flags, mapinfo->txt_fd, 0); + + if (mapinfo->txt_data == MAP_FAILED_PTR) + mapinfo->txt_errno = errno; +#endif /* HAVE_MMAP */ +} + +/** + * Make sure all the parameters are correct: we have a file name that + * is a text file that we can read. + * + * @param fname the text file to map + * @param prot the memory protections requested (read/write/etc.) + * @param flags mmap flags + * @param mapinfo a structure holding everything we need to know + * about the mapping. + */ +static void +validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo) +{ + memset(mapinfo, 0, sizeof(*mapinfo)); +#if defined(HAVE_MMAP) && ! defined(MAP_ANONYMOUS) + mapinfo->txt_zero_fd = AO_INVALID_FD; +#endif + mapinfo->txt_fd = AO_INVALID_FD; + mapinfo->txt_prot = prot; + mapinfo->txt_flags = flags; + + /* + * Make sure we can stat the regular file. Save the file size. + */ + { + struct stat sb; + if (stat(fname, &sb) != 0) { + mapinfo->txt_errno = errno; + return; + } + + if (! S_ISREG(sb.st_mode)) { + mapinfo->txt_errno = errno = EINVAL; + return; + } + + mapinfo->txt_size = sb.st_size; + } + + /* + * Map mmap flags and protections into open flags and do the open. + */ + { + /* + * See if we will be updating the file. If we can alter the memory + * and if we share the data and we are *not* copy-on-writing the data, + * then our updates will show in the file, so we must open with + * write access. + */ + int o_flag = FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY; + + /* + * If you're not sharing the file and you are writing to it, + * then don't let anyone else have access to the file. + */ + if (((flags & MAP_SHARED) == 0) && (prot & PROT_WRITE)) + o_flag |= O_EXCL; + + mapinfo->txt_fd = open(fname, o_flag); + } + + if (mapinfo->txt_fd == AO_INVALID_FD) + mapinfo->txt_errno = errno; +} + +/** + * Close any files opened by the mapping. + * + * @param mi a structure holding everything we need to know about the map. + */ +static void +close_mmap_files(tmap_info_t * mi) +{ + if (mi->txt_fd == AO_INVALID_FD) + return; + + close(mi->txt_fd); + mi->txt_fd = AO_INVALID_FD; + +#if ! defined(MAP_ANONYMOUS) + if (mi->txt_zero_fd == AO_INVALID_FD) + return; + + close(mi->txt_zero_fd); + mi->txt_zero_fd = AO_INVALID_FD; +#endif +} + /*=export_func text_mmap * private: * @@ -61,20 +255,20 @@ * This routine will mmap a file into memory ensuring that there is at least * one @file{NUL} character following the file data. It will return the * address where the file contents have been mapped into memory. If there is a - * problem, then it will return @code{MAP_FAILED} and set @file{errno} + * problem, then it will return @code{MAP_FAILED} and set @code{errno} * appropriately. * - * The named file does not exist, @code{stat(2)} will set @file{errno} as it - * will. If the file is not a regular file, @file{errno} will be + * The named file does not exist, @code{stat(2)} will set @code{errno} as it + * will. If the file is not a regular file, @code{errno} will be * @code{EINVAL}. At that point, @code{open(2)} is attempted with the access * bits set appropriately for the requested @code{mmap(2)} protections and flag - * bits. On failure, @file{errno} will be set according to the documentation - * for @code{open(2)}. If @code{mmap(2)} fails, @file{errno} will be set as + * bits. On failure, @code{errno} will be set according to the documentation + * for @code{open(2)}. If @code{mmap(2)} fails, @code{errno} will be set as * that routine sets it. If @code{text_mmap} works to this point, a valid * address will be returned, but there may still be ``issues''. * * If the file size is not an even multiple of the system page size, then - * @code{text_map} will return at this point and @file{errno} will be zero. + * @code{text_map} will return at this point and @code{errno} will be zero. * Otherwise, an anonymous map is attempted. If not available, then an attempt * is made to @code{mmap(2)} @file{/dev/zero}. If any of these fail, the * address of the file's data is returned, bug @code{no} @file{NUL} characters @@ -96,197 +290,23 @@ * << use the data >> * text_munmap(&mi); =*/ -void* -text_mmap(char const* pzFile, int prot, int flags, tmap_info_t* pMI) +void * +text_mmap(char const * pzFile, int prot, int flags, tmap_info_t * mi) { - memset(pMI, 0, sizeof(*pMI)); -#ifdef HAVE_MMAP - pMI->txt_zero_fd = -1; -#endif - pMI->txt_fd = -1; - - /* - * Make sure we can stat the regular file. Save the file size. - */ - { - struct stat sb; - if (stat(pzFile, &sb) != 0) { - pMI->txt_errno = errno; - return MAP_FAILED_PTR; - } - - if (! S_ISREG(sb.st_mode)) { - pMI->txt_errno = errno = EINVAL; - return MAP_FAILED_PTR; - } - - pMI->txt_size = sb.st_size; - } - - /* - * Map mmap flags and protections into open flags and do the open. - */ - { - int o_flag; - /* - * See if we will be updating the file. If we can alter the memory - * and if we share the data and we are *not* copy-on-writing the data, - * then our updates will show in the file, so we must open with - * write access. - */ - if (FILE_WRITABLE(prot,flags)) - o_flag = O_RDWR; - else - o_flag = O_RDONLY; - - /* - * If you're not sharing the file and you are writing to it, - * then don't let anyone else have access to the file. - */ - if (((flags & MAP_SHARED) == 0) && (prot & PROT_WRITE)) - o_flag |= O_EXCL; - - pMI->txt_fd = open(pzFile, o_flag); - } - - if (pMI->txt_fd == AO_INVALID_FD) { - pMI->txt_errno = errno; + validate_mmap(pzFile, prot, flags, mi); + if (mi->txt_errno != 0) return MAP_FAILED_PTR; - } - -#ifdef HAVE_MMAP /* * * * * WITH MMAP * * * * * */ - /* - * do the mmap. If we fail, then preserve errno, close the file and - * return the failure. - */ - pMI->txt_data = - mmap(NULL, pMI->txt_size+1, prot, flags, pMI->txt_fd, (size_t)0); - if (pMI->txt_data == MAP_FAILED_PTR) { - pMI->txt_errno = errno; - goto fail_return; - } - - /* - * Most likely, everything will turn out fine now. The only difficult - * part at this point is coping with files with sizes that are a multiple - * of the page size. Handling that is what this whole thing is about. - */ - pMI->txt_zero_fd = -1; - pMI->txt_errno = 0; - - { - void* pNuls; -#ifdef _SC_PAGESIZE - size_t pgsz = sysconf(_SC_PAGESIZE); -#else - size_t pgsz = getpagesize(); -#endif - /* - * Compute the pagesize rounded mapped memory size. - * IF this is not the same as the file size, then there are NUL's - * at the end of the file mapping and all is okay. - */ - pMI->txt_full_size = (pMI->txt_size + (pgsz - 1)) & ~(pgsz - 1); - if (pMI->txt_size != pMI->txt_full_size) - return pMI->txt_data; - - /* - * Still here? We have to remap the trailing inaccessible page - * either anonymously or to /dev/zero. - */ - pMI->txt_full_size += pgsz; -#if defined(MAP_ANONYMOUS) - pNuls = mmap( - (void*)(((char*)pMI->txt_data) + pMI->txt_size), - pgsz, PROT_READ|PROT_WRITE, - MAP_ANONYMOUS|MAP_FIXED|MAP_PRIVATE, AO_INVALID_FD, (size_t)0); - - if (pNuls != MAP_FAILED_PTR) - return pMI->txt_data; - - pMI->txt_errno = errno; - -#elif defined(HAVE_DEV_ZERO) - pMI->txt_zero_fd = open("/dev/zero", O_RDONLY); - - if (pMI->txt_zero_fd == AO_INVALID_FD) { - pMI->txt_errno = errno; - - } else { - pNuls = mmap( - (void*)(((char*)pMI->txt_data) + pMI->txt_size), pgsz, - PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, - pMI->txt_zero_fd, 0 ); - - if (pNuls != MAP_FAILED_PTR) - return pMI->txt_data; - - pMI->txt_errno = errno; - close(pMI->txt_zero_fd); - pMI->txt_zero_fd = -1; - } -#endif - - pMI->txt_full_size = pMI->txt_size; - } - - { - void* p = AGALOC(pMI->txt_size+1, "file text"); - memcpy(p, pMI->txt_data, pMI->txt_size); - ((char*)p)[pMI->txt_size] = NUL; - munmap(pMI->txt_data, pMI->txt_size ); - pMI->txt_data = p; - } - pMI->txt_alloc = 1; - return pMI->txt_data; - -#else /* * * * * * no HAVE_MMAP * * * * * */ - - pMI->txt_data = AGALOC(pMI->txt_size+1, "file text"); - if (pMI->txt_data == NULL) { - pMI->txt_errno = ENOMEM; - goto fail_return; - } - { - size_t sz = pMI->txt_size; - char* pz = pMI->txt_data; + load_text_file(mi); - while (sz > 0) { - ssize_t rdct = read(pMI->txt_fd, pz, sz); - if (rdct <= 0) { - pMI->txt_errno = errno; - fprintf(stderr, zFSErrReadFile, - errno, strerror(errno), pzFile); - free(pMI->txt_data); - goto fail_return; - } + if (mi->txt_errno == 0) + return mi->txt_data; - pz += rdct; - sz -= rdct; - } + close_mmap_files(mi); - *pz = NUL; - } - - /* - * We never need a dummy page mapped in - */ - pMI->txt_zero_fd = -1; - pMI->txt_errno = 0; - - return pMI->txt_data; - -#endif /* * * * * * no HAVE_MMAP * * * * * */ - - fail_return: - if (pMI->txt_fd >= 0) { - close(pMI->txt_fd); - pMI->txt_fd = -1; - } - errno = pMI->txt_errno; - pMI->txt_data = MAP_FAILED_PTR; - return pMI->txt_data; + errno = mi->txt_errno; + mi->txt_data = MAP_FAILED_PTR; + return mi->txt_data; } @@ -298,7 +318,7 @@ * arg: tmap_info_t*, mapinfo, info about the mapping * * ret-type: int - * ret-desc: -1 or 0. @file{errno} will have the error code. + * ret-desc: -1 or 0. @code{errno} will have the error code. * * doc: * @@ -310,68 +330,31 @@ * err: Any error code issued by munmap(2) or close(2) is possible. =*/ int -text_munmap(tmap_info_t* pMI) +text_munmap(tmap_info_t * mi) { -#ifdef HAVE_MMAP - int res = 0; - if (pMI->txt_alloc) { - /* - * IF the user has write permission and the text is not mapped private, - * then write back any changes. Hopefully, nobody else has modified - * the file in the mean time. - */ - if ( ((pMI->txt_prot & PROT_WRITE) != 0) - && ((pMI->txt_flags & MAP_PRIVATE) == 0)) { - - if (lseek(pMI->txt_fd, (size_t)0, SEEK_SET) != 0) - goto error_return; - - res = (write(pMI->txt_fd, pMI->txt_data, pMI->txt_size) < 0) - ? errno : 0; - } - - AGFREE(pMI->txt_data); - errno = res; - } else { - res = munmap(pMI->txt_data, pMI->txt_full_size); - } - if (res != 0) - goto error_return; - - res = close(pMI->txt_fd); - if (res != 0) - goto error_return; - - pMI->txt_fd = -1; errno = 0; - if (pMI->txt_zero_fd != -1) { - res = close(pMI->txt_zero_fd); - pMI->txt_zero_fd = -1; - } - error_return: - pMI->txt_errno = errno; - return res; -#else /* HAVE_MMAP */ +#ifdef HAVE_MMAP + (void)munmap(mi->txt_data, mi->txt_full_size); - errno = 0; +#else /* don't HAVE_MMAP */ /* * IF the memory is writable *AND* it is not private (copy-on-write) * *AND* the memory is "sharable" (seen by other processes) - * THEN rewrite the data. + * THEN rewrite the data. Emulate mmap visibility. */ - if ( FILE_WRITABLE(pMI->txt_prot, pMI->txt_flags) - && (lseek(pMI->txt_fd, 0, SEEK_SET) >= 0) ) { - write(pMI->txt_fd, pMI->txt_data, pMI->txt_size); + if ( FILE_WRITABLE(mi->txt_prot, mi->txt_flags) + && (lseek(mi->txt_fd, 0, SEEK_SET) >= 0) ) { + write(mi->txt_fd, mi->txt_data, mi->txt_size); } - close(pMI->txt_fd); - pMI->txt_fd = -1; - pMI->txt_errno = errno; - free(pMI->txt_data); - - return pMI->txt_errno; + free(mi->txt_data); #endif /* HAVE_MMAP */ + + mi->txt_errno = errno; + close_mmap_files(mi); + + return mi->txt_errno; } /* diff -Nru autogen-5.11.9/autoopts/tpl/aginfo.tpl autogen-5.12/autoopts/tpl/aginfo.tpl --- autogen-5.11.9/autoopts/tpl/aginfo.tpl 2011-02-24 19:40:44.000000000 +0100 +++ autogen-5.12/autoopts/tpl/aginfo.tpl 2011-05-30 23:25:11.000000000 +0200 @@ -4,7 +4,7 @@ ## Documentation template ## -## Time-stamp: "2011-02-24 10:40:44 bkorb" +## Time-stamp: "2011-05-30 14:25:11 bkorb" ## Author: Bruce Korb ## ## This file is part of AutoOpts, a companion to AutoGen. @@ -71,8 +71,8 @@ This [=(string-downcase doc-level)=] was generated by @strong{AutoGen}, the aginfo template and the option descriptions for the @command{[= -prog-name =]} program. It documents the [= -prog-name =] usage text and option meanings.[= +prog-name =]} program. It documents the @command{[= +prog-name =]} usage text and option meanings.[= IF (exist? "copyright") =] diff -Nru autogen-5.11.9/autoopts/tpl/agman-cmd.tpl autogen-5.12/autoopts/tpl/agman-cmd.tpl --- autogen-5.11.9/autoopts/tpl/agman-cmd.tpl 2011-03-04 18:49:25.000000000 +0100 +++ autogen-5.12/autoopts/tpl/agman-cmd.tpl 2011-06-03 21:12:25.000000000 +0200 @@ -4,11 +4,11 @@ ## agman-cmd.tpl -- Template for command line man pages ## -## Time-stamp: "2011-03-04 09:49:25 bkorb" +## Time-stamp: "2011-06-03 12:12:25 bkorb" ## ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. -## AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved +## Copyright (c) 1992-2011 Bruce Korb - all rights reserved ## ## AutoOpts is available under any one of two licenses. The license ## in use must be one of these two and the choice is under the control @@ -67,16 +67,12 @@ .\" S Y N O P S I S .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE synopsis +DEFINE mk-synopsis :+][+: + (out-push-new file-name) \:+] +.SH SYNOPSIS +.B [+: prog-name :+][+: -:+] -.Sh SYNOPSIS -.Nm [+: (. UP-PROG-NAME) :+][+: - - IF (define use-flags (exist? "flag.value")) - (define named-mode (not (or use-flags (exist? "long-opts") ))) - use-flags - :+][+: + IF (. use-flags) :+][+: IF (exist? "long-opts") :+] .\" Mixture of short (flag) options and long options .RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \-\-\fIopt\-name\fP[+:# @@ -118,6 +114,8 @@ (string-append "\n.PP\n" (join "\n.PP\n" (stack "explain"))) ) :+][+: -ENDDEF synopsis +(out-pop) :+][+: + +ENDDEF mk-synopsis agman-cmd.tpl ends here :+] diff -Nru autogen-5.11.9/autoopts/tpl/agmdoc-cmd.tpl autogen-5.12/autoopts/tpl/agmdoc-cmd.tpl --- autogen-5.11.9/autoopts/tpl/agmdoc-cmd.tpl 2011-03-04 19:05:17.000000000 +0100 +++ autogen-5.12/autoopts/tpl/agmdoc-cmd.tpl 2011-06-06 16:45:24.000000000 +0200 @@ -4,7 +4,7 @@ ## agman-cmd.tpl -- Template for command line mdoc pages ## -## Time-stamp: "2011-03-04 10:05:17 bkorb" +## Time-stamp: "2011-06-06 07:45:24 bkorb" ## ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. @@ -44,9 +44,8 @@ :+] .Sh NAME .Nm [+: prog-name :+] -.Nd [+: prog-title :+][+: - -INVOKE build-doc :+][+: +.Nd [+: prog-title :+] +[+: INVOKE build-doc :+][+: (out-move (string-append (get "prog-name") "." man-sect)) :+][+:# @@ -55,36 +54,33 @@ .\" S Y N O P S I S .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE synopsis - -:+] +DEFINE mk-synopsis :+][+: + (out-push-new file-name) \:+] .Sh SYNOPSIS -.Nm [+: (. UP-PROG-NAME) :+][+: +.Nm[+: - IF (define use-flags (exist? "flag.value")) - (define named-mode (not (or use-flags (exist? "long-opts") ))) - use-flags - :+][+: + IF (. use-flags) :+][+: IF (exist? "long-opts") :+] .\" Mixture of short (flag) options and long options .Op Fl flags .Op Fl flag Ar value -.Op Fl \-option-name Ar value[+: - - ELSE no long options: :+] +.Op Fl \-option-name Ar value +[+: ELSE no long options: :+] .Op Fl flags -.Op Fl flag Ar value[+: - ENDIF +.Op Fl flag Ar value +[+: ENDIF :+][+: ELIF (exist? "long-opts") :+] .Op Fl \-option-name -.Op Fl \-option-name Ar value[+: +.Op Fl \-option-name Ar value +[+: ELIF (not (exist? "argument")) :+] .Op Ar option\-name Ar value .Pp -All arguments are named options.[+: +All arguments are named options. +[+: ENDIF :+][+: IF (exist? "argument") :+][+: @@ -99,7 +95,8 @@ :+] .Pp -All arguments must be options.[+: +All arguments must be options. +[+: ENDIF :+] .Pp @@ -109,6 +106,8 @@ explain :+][+: ENDFOR :+][+: -ENDDEF synopsis +(out-pop) :+][+: + +ENDDEF mk-synopsis agmdoc-cmd.tpl ends here :+] diff -Nru autogen-5.11.9/autoopts/tpl/agpl.lic autogen-5.12/autoopts/tpl/agpl.lic --- autogen-5.11.9/autoopts/tpl/agpl.lic 2011-04-22 16:14:31.000000000 +0200 +++ autogen-5.12/autoopts/tpl/agpl.lic 2011-06-09 20:24:22.000000000 +0200 @@ -1,7 +1,7 @@ Copyright (C) , all rights reserved. This is free software. It is licensed for use, modification and redistribution under the terms of the -GNU Affero GPL version 3 or later +GNU Affero GPL, version 3 or later is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -15,3 +15,5 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . + +GNU Affero GPL, version 3 or later diff -Nru autogen-5.11.9/autoopts/tpl/agtexi-cmd.tpl autogen-5.12/autoopts/tpl/agtexi-cmd.tpl --- autogen-5.11.9/autoopts/tpl/agtexi-cmd.tpl 2011-04-13 02:27:07.000000000 +0200 +++ autogen-5.12/autoopts/tpl/agtexi-cmd.tpl 2011-05-29 22:57:55.000000000 +0200 @@ -4,7 +4,7 @@ ## Documentation template ## -## Time-stamp: "2011-04-12 17:27:07 bkorb" +## Time-stamp: "2011-05-29 13:57:55 bkorb" ## Author: Bruce Korb ## ## This file is part of AutoOpts, a companion to AutoGen. @@ -117,20 +117,13 @@ ENDIF =][= -(sprintf "\n* %s %-24s %s" down-prog-name "exit codes::" - (string-append down-prog-name " exit codes") ) +(shell (string-append +"{ sort -u | while read line ; do test -n \"${line}\" && \ + printf '\\n* " down-prog-name " %-24s %s' \"${line}::\" \"${line}\" + done } <<-\\_EOF_\nexit status\n" + (string-capitalize! (stack-join "\n" "doc-section.ds-type")) + "\n_EOF_" )) =][=# -=][= - -FOR doc-section =][= - -(define opt-name (string-capitalize! (get "ds-type"))) -(sprintf "\n* %s %-24s %s" down-prog-name (string-append opt-name "::") - opt-name) =][= - -ENDFOR doc-section - -=][=# @c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =] @end menu @@ -213,35 +206,39 @@ ENDIF =][=# @c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =] -@node [= (. down-prog-name) =] exit codes -@[=(. sub-level)=] [=prog-name=] exit codes +@node [= (. down-prog-name) =] exit status +@[=(. sub-level)=] [=prog-name=] exit status One of the following exit values will be returned: @table @samp @item 0 [=(get "exit-desc[0]" "Successful program execution.")=] @item 1 -[=(get "exit-desc[1]" - "The operation failed or the command syntax was not valid.")=][= +[= (define doc-section "") + (get "exit-desc[1]" + "The operation failed or the command syntax was not valid.") =][= -FOR exit-desc (for-from 2) =][= +FOR exit-desc (for-from 2) =][= (sprintf "\n@item %d\n%s" (for-index) - (get (sprintf "exit-desc[%d]" (for-index)))) =][= -ENDFOR exit-desc =] -@end table -[= + (get (sprintf "exit-desc[%d]" (for-index)))) =][= +ENDFOR exit-desc =][= FOR doc-section =][= (define opt-name (string-capitalize! (get "ds-type"))) -(sprintf "\n\n@node %1$s %2$s\n@%3$s %1$s %2$s\n" - down-prog-name opt-name sub-level) +(set! tmp-str (sprintf "\n\n@node %1$s %2$s\n@%3$s %1$s %2$s\n" + down-prog-name opt-name sub-level)) + +(if (== opt-name "Exit Status") + (emit tmp-str) + (set! doc-section (string-append doc-section tmp-str)) ) =][= - (join "\n\n" (stack "ds-text")) -=][= -ENDFOR doc-section +ENDFOR doc-section \=] + +@end table +[= (. doc-section) =][=# @c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= @@ -607,6 +604,7 @@ (define was-diverted #f) (define diversion-type "") (define cvt-script "") + (define tmp-str "") (define divert-convert (lambda (src-type) (begin (set! diversion-type (get src-type "")) diff -Nru autogen-5.11.9/autoopts/tpl/cmd-doc.tlib autogen-5.12/autoopts/tpl/cmd-doc.tlib --- autogen-5.11.9/autoopts/tpl/cmd-doc.tlib 2011-03-04 20:08:00.000000000 +0100 +++ autogen-5.12/autoopts/tpl/cmd-doc.tlib 2011-06-13 17:30:13.000000000 +0200 @@ -4,11 +4,11 @@ ## cmd-doc.tlib -- Template for command line man/mdoc pages ## -## Time-stamp: "2011-03-04 11:08:00 bkorb" +## Time-stamp: "2011-06-13 08:30:13 bkorb" ## ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. -## AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved +## Copyright (c) 1992-2011 Bruce Korb - all rights reserved ## ## AutoOpts is available under any one of two licenses. The license ## in use must be one of these two and the choice is under the control @@ -38,6 +38,12 @@ (define tmp-val (getenv "MAN_SECTION")) (define man-sect (if (exist? "cmd-section") (get "cmd-section") "1")) +(define file-name "") +(define sect-name "") +(define macro-name "") +(define tmp-str "") +(define use-flags (exist? "flag.value")) +(define named-mode (not (or use-flags (exist? "long-opts") ))) (if (defined? 'tmp-val) (if (string? tmp-val) @@ -68,6 +74,11 @@ (define name-to-fname (lambda (nm) (string-tr (string-downcase sec-type) " " "-") )) +(define sect-line-fname (lambda () (begin + (out-push-new file-name) + (emit (string-append ".Sh \"" sect-name "\"\n")) + (string-append "mk-" macro-name) ))) + (make-tmp-dir) (define home-rc-files (exist? "homerc")) @@ -97,16 +108,27 @@ grep -E -v '^[ ]*$' ${tmp_dir}/$1 rm -f ${tmp_dir}/$1 } -for f in synopsis description options option-presets exit-status + +#.\" Insert these sections first, in the prescribed order +# +for f in synopsis description options option-presets do cat_n_rm $f ; done test -f ${tmp_dir}/name && rm -f ${tmp_dir}/name -for f in errors environment files conforming-to notes bugs \ - examples see-also author +#.\" These sections go last, in the prescribed order +# +for f in implementation-notes environment files examples exit-status errors \ + compatibility see-also conforming-to history authors copyright bugs notes do cat_n_rm $f ; done > ${tmp_dir}/.fini -set -- ${tmp_dir}/* -test -f "$1" && grep -E -v '^[ ]*$' $* +#.\" Insert the contents of all remaining files in alphabetic order, +#.\" except remove any blank lines. +# +set ${tmp_dir}/* +test -f "$1" && cat $* | grep -E -v '^[ ]*$' + +#.\" Now insert the sections we squirreled away for the end. +# cat ${tmp_dir}/.fini [+: (out-pop) (shell ". ${tmp_dir}/.assemble") :+][+: @@ -133,13 +155,10 @@ (if (not (defined? 'cvt-fn)) (error (sprintf "Cannot locate converter for %s" (get "ds-format" "man")))) - sec-type :+][+: - - *==* " " :+] -.Sh "[+: (. sec-type) :+]"[+: - == "" :+][+: - * :+] -.Sh [+: (. sec-type) :+][+: + sec-type :+][+: + == "" :+][+: (error "unnamed doc-section") :+][+: + *==* " " :+].Sh "[+: (. sec-type) :+]"[+: + * :+].Sh [+: (. sec-type) :+][+: ESAC :+] [+: (shell (string-append @@ -175,125 +194,145 @@ .\" .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE ao-sections :+][+: +DEFINE ao-sections :+][+: + +INVOKE cond-section sec = "OPTIONS" mode = "replace" :+][+: +INVOKE cond-section sec = "SYNOPSIS" mode = "alt" :+][+: +INVOKE cond-section sec = "DESCRIPTION" mode = "append" :+][+: +INVOKE cond-section sec = "EXIT STATUS" mode = "insert" :+][+: +INVOKE cond-section sec = "AUTHORS" mode = "alt" :+][+: +INVOKE cond-section sec = "BUGS" mode = "append" :+][+: +INVOKE cond-section sec = "NOTES" mode = "append" :+][+: -IF (set! tmp-val (string-append tmp-dir "/synopsis")) - (not (access? tmp-val R_OK)) :+][+: - (out-push-new tmp-val) :+][+: - INVOKE synopsis :+][+: - (out-pop) :+][+: +IF (exist? "copyright") :+][+: + INVOKE cond-section sec = "COPYRIGHT" mode = "alt" :+][+: ENDIF :+][+: +IF (or home-rc-files environ-init) :+][+: + INVOKE cond-section sec = "OPTION PRESETS" mode = "replace" :+][+: + IF (. home-rc-files) :+][+: + INVOKE cond-section sec = "FILES" mode = "append" :+][+: + ENDIF :+][+: + + IF (. environ-init) :+][+: + INVOKE cond-section sec = "ENVIRONMENT" mode = "append" :+][+: + ENDIF :+][+: -IF (set! tmp-val (string-append tmp-dir "/description")) - (access? tmp-val R_OK) :+][+: - (out-push-add tmp-val) :+][+: -ELSE :+][+: - (out-push-new tmp-val) :+][+: - INVOKE description :+][+: ENDIF :+][+: -IF (= (get "main.main-type") "for-each"):+][+: - - CASE main.handler-type :+][+: - ~* ^(name|file)|.*text :+] -.Pp -This program will perform its function for every file named on the command -line or every file named in a list read from stdin. The arguments or input -names must be pre\-existing files. The input list may contain comments, -which[+: +ENDDEF ao-sections - !E :+] -.Pp -This program will perform its function for every command line argument -or every non\-comment line in a list read from stdin. -The input list comments[+: +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +.\" C O N D I T I O N A L S E C T I O N +.\" +.\" Figure out what to do for AutoOpts required sections, depending on "mode" +.\" In all cases, if the file does not exist, invoke the "mk" macro to create +.\" a new file. If it does exist, then: +.\" +.\" alt Alternate -- emit no text +.\" replace throw away any pre-existing file. +.\" append invoke the "append" macro to emit additional text +.\" insert save the current contents, replacing the .Sh line with .Pp. +.\" invoke the "mk" macro then emit the saved text +.\" +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - * :+][+: - (error "the 'for-each' main has in invalid handler-type.") :+][+: - ESAC \:+] - are blank lines or lines beginning with a '[+: - ?% comment-char "%s" "#" :+]' character. -[+: +DEFINE cond-section :+][+: -ENDIF - "main" exists :+][+: -(out-pop) :+][+: + IF + (set! sect-name (string-upcase! (string-substitute + (get "sec") "-" " " ))) + (set! macro-name (string-downcase! (string-substitute + sect-name " " "-" ))) + (set! file-name (string-append tmp-dir "/" macro-name)) + (not (access? file-name R_OK)) :+][+: + INVOKE (sect-line-fname) :+][+: + (out-pop) :+][+: -INVOKE options :+][+: -INVOKE exit-status :+][+: -INVOKE author :+][+: + ELSE file exists :+][+: -IF (or home-rc-files environ-init) :+][+: + CASE (get "mode") :+][+: - INVOKE option-presets :+][+: + == replace :+][+: + INVOKE (sect-line-fname) :+][+: + (out-pop) :+][+: -ENDIF :+][+: + == append :+][+: + (out-push-add file-name) :+][+: + INVOKE (string-append "append-" macro-name) :+][+: + (out-pop) :+][+: -(define sec-fmt "\n.Sh %s%s") + == insert :+][+: + (set! tmp-str (shellf "sed '1s/.Sh .*/.Pp/' %s" file-name)) :+][+: + INVOKE (sect-line-fname) :+][+: + (emit tmp-str) + (out-pop) :+][+: -(if environ-init - (begin - (set! tmp-val (string-append tmp-dir "/environment")) - (if (access? tmp-val R_OK) - (begin - (out-push-add tmp-val) - (emit environ-text) - ) - (begin - (out-push-new tmp-val) - (ag-fprintf 0 sec-fmt "ENVIRONMENT" environ-text) - ) ) - (out-pop) -) ) + # * -- otherwise, do nothing :+][+: -(if home-rc-files - (begin - (set! tmp-val (string-append tmp-dir "/files")) - (if (access? tmp-val R_OK) - (begin - (out-push-add tmp-val) - (emit home-rc-text) - ) - (begin - (out-push-new tmp-val) - (ag-fprintf 0 sec-fmt "FILES" home-rc-text) - ) ) - (out-pop) -) ) :+][+: + ESAC :+][+: -ENDDEF ao-sections + ENDIF file existence/non-existence :+][+: +ENDDEF cond-section .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" D E S C R I P T I O N +.\" M K - D E S C R I P T I O N .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE description :+] -.Sh DESCRIPTION -[+: +DEFINE mk-description :+][+: (if (exist? "prog-man-descrip") - (join "\n.Pp\n" (stack "prog-man-descrip")) + (stack-join "\n.Pp\n" "prog-man-descrip") (if (exist? "detail") - (join "\n.Pp\n" (stack "detail")) + (stack-join "\n.Pp\n" "detail") "There is no description for this command." ) ) :+] [+: -ENDDEF description + INVOKE append-description :+][+: + +ENDDEF mk-description + +.\" = = = = = APPEND TO IT: :+][+: + +DEFINE append-description :+][+: + +IF (= (get "main.main-type") "for-each"):+][+: + + CASE main.handler-type :+][+: + ~* ^(name|file)|.*text \:+] +.Pp +This program will perform its function for every file named on the command +line or every file named in a list read from stdin. The arguments or input +names must be pre\-existing files. The input list may contain comments, +which[+: + + !E \:+] +.Pp +This program will perform its function for every command line argument +or every non\-comment line in a list read from stdin. +The input list comments[+: + + * :+][+: + (error "the 'for-each' main has in invalid handler-type.") :+][+: + ESAC \:+] + are blank lines or lines beginning with a '[+: + ?% comment-char "%s" "#" :+]' character. +[+: + +ENDIF - "main" exists :+][+: +ENDDEF append-description .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" O P T I O N S +.\" M K - O P T I O N S .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE options +DEFINE mk-options :+][+: -(set! tmp-val (string-append tmp-dir "/options")) -(out-push-new tmp-val) - (define opt-arg "") (define dis-name "") (define opt-name "") @@ -318,11 +357,9 @@ (set! o_nm (string-substitute o_nm "-" "\\-" )) o_nm ))) -:+] -.Sh OPTIONS[+: (if (exist? "option-info") - (string-append "\n.Pp\n" (get "option-info") "\n") ) -:+] + (string-append ".Pp\n" (get "option-info") "\n") ) +\:+] .Bl -tag[+: FOR flag :+][+: @@ -428,21 +465,13 @@ (out-pop #t) "\n_EndOfMdoc_" )) ) :+][+: - (out-pop) :+][+: - -ENDDEF options +ENDDEF mk-options .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" O P T I O N P R E S E T S +.\" M K - O P T I O N - P R E S E T S .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE option-presets :+][+: - -(set! tmp-val (string-append tmp-dir "/option-presets")) -(out-push-new tmp-val) - -:+] -.Sh "OPTION PRESETS" +DEFINE mk-option-presets \:+] Any option that is not marked as \fInot presettable\fP may be preset by loading values from [+: IF (. home-rc-files) @@ -490,21 +519,13 @@ is searched for within those directories.[+: ESAC :+][+: -(out-pop) :+][+: - -ENDDEF option-presets +ENDDEF mk-option-presets .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" E X I T S T A T U S +.\" M K - E X I T - S T A T U S .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE exit-status :+][+: - -(set! tmp-val (string-append tmp-dir "/exit-status")) -(out-push-new tmp-val) - -:+] -.Sh "EXIT STATUS" +DEFINE mk-exit-status \:+] One of the following exit values will be returned: .Bl -tag [+: @@ -518,61 +539,129 @@ FOR exit-desc (for-from 2) :+][+: (sprintf ".It %d\n%s\n" (for-index) (get "exit-desc")) :+][+: -ENDFOR exit-desc :+] +ENDFOR exit-desc :+][+: +(if (> (string-length tmp-str) 1) + (emit tmp-str)) :+] .El -[+: (out-pop) :+][+: +[+: ENDDEF exit-status .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" A U T H O R +.\" M K - A U T H O R S .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -DEFINE author :+][+: +DEFINE mk-authors :+][+: -IF (set! tmp-val (string-append tmp-dir "/author")) - (out-push-new tmp-val) - (set! tmp-val (get "copyright.author" (get "copyright.owner"))) - (> (string-length tmp-val) 0) :+] -.Sh AUTHOR -[+: (. tmp-val) :+][+: + (define remove-authors #t) - (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) - (if (> (string-length tmp-val) 0) - (string-append "\n.br\nPlease send bug reports to: " tmp-val) ) :+][+: + (set! tmp-val + (if (exist? "copyright.author") + (stack-join ",\n" "copyright.author") + (stack-join ",\n" "copyright.owner") )) - CASE copyright.type :+][+: - = gpl :+] -.Pp -Released under the GNU General Public License.[+: - = lgpl :+] -.Pp -Released under the GNU General Public License with Library Extensions.[+: - = bsd :+] -.Pp -Released under the Free BSD License.[+: - * :+][+: - IF (exist? "copyright.text") - :+] -.Pp -.nf -.na -[+: copyright.text :+] -.fi -.ad[+: - ELIF (exist? "copyright.date") :+] -.Pp -Released under an unspecified copyright license.[+: - ENDIF :+][+: - ESAC :+][+: -ENDIF copyright author/owner :+] + (if (> (string-length tmp-val) 1) + (string-append tmp-val "\n") + (delete-file file-name)) + + :+][+: + +ENDDEF mk-authors + +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +.\" M K - B U G S +.\" +.\" This section is guaranteed to be the last section in the man page +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: + +DEFINE mk-bugs :+][+: + + (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) + (if (> (string-length tmp-val) 1) + (string-append "Please send bug reports to: " tmp-val "\n") + (delete-file file-name) ) + :+][+: + +ENDDEF mk-bugs :+][+: + +DEFINE append-bugs :+][+: + + (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) + (if (> (string-length tmp-val) 1) + (string-append "Please send bug reports to: " tmp-val "\n") ) + :+][+: + +ENDDEF append-bugs + +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +.\" M K - C O P Y R I G H T (+ licensing) +.\" +.\" This section is guaranteed to be the last section in the man page +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: + +DEFINE mk-copyright \:+] +Copyright (C) [+: copyright.date :+] [+: + (get "copyright.owner" (get "copyright.author" (get "copyright.eaddr"))) + :+] all rights reserved. +[+: CASE (get "copyright.type") :+][+: + = note :+][+: (get "copyright.text") :+][+: + == '' :+]This program has an unspecified license.[+: + + * :+][+: + (string-append "This program is released under the terms of " + (license-name (get "copyright.type")) ".") :+][+: + + ESAC :+] +[+: +ENDDEF mk-copyright + +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +.\" M K - N O T E S +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: + +DEFINE mk-notes \:+] +This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP +option definitions. +[+: + +ENDDEF mk-notes + +.\" = = = = = APPEND TO IT: :+][+: + +DEFINE append-notes \:+] .Pp This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP option definitions.[+: -(out-pop) :+][+: +ENDDEF append-notes + +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +.\" M K - E N V I R O N M E N T +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: + +DEFINE mk-environment :+][+: + INVOKE append-environment :+][+: +ENDDEF mk-environment + +.\" = = = = = APPEND TO IT: :+][+: + +DEFINE append-environment :+][+: + (. environ-text) :+][+: +ENDDEF append-environment + +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +.\" M K - F I L E S +.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: -ENDDEF author +DEFINE mk-files :+][+: + INVOKE append-files :+][+: +ENDDEF mk-files + +.\" = = = = = APPEND TO IT: :+][+: + +DEFINE append-files :+][+: + (. home-rc-text) :+][+: +ENDDEF append-files .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = .\" E M I T F L A G T E X T diff -Nru autogen-5.11.9/autoopts/tpl/getopt.tpl autogen-5.12/autoopts/tpl/getopt.tpl --- autogen-5.11.9/autoopts/tpl/getopt.tpl 2011-01-26 18:08:32.000000000 +0100 +++ autogen-5.12/autoopts/tpl/getopt.tpl 2011-06-09 20:34:53.000000000 +0200 @@ -4,7 +4,7 @@ c=%s-temp.c +][+ `stamp=\`sed 's,.*stamp:,,' <<\_EOF_ - Time-stamp: "2011-01-26 09:08:32 bkorb" + Time-stamp: "2011-06-09 11:34:53 bkorb" _EOF_ \` ` +][+ @@ -34,12 +34,19 @@ (define PROG-NAME (string-upcase prog-name)) (out-move (string-append "getopt-" prog-name "." (suffix))) (dne " * " "/* " ) +] + *[+ + + IF (exist? "copyright") +] * -[+ CASE copyright.type +][+ - = gpl +][+ (gpl prog-name " * ") +][+ - = lgpl +][+ (lgpl prog-name (get "copyright.owner") " * ") +][+ - = note +][+ (prefix " * " (get "copyright.text")) +][+ - ESAC +] +[+ + CASE copyright.type +][+ + == "" +] * licensing type not specified.[+ + = note +][+ (prefix " * " (get "copyright.text")) +][+ + * +][+ + (license-description (get "copyright.type") prog-name " * " + (get "copyright.owner")) +][+ + ESAC +][+ + ENDIF +] * * Last template edit: [+ `echo $stamp` +] */[+ diff -Nru autogen-5.11.9/autoopts/tpl/gpl.lic autogen-5.12/autoopts/tpl/gpl.lic --- autogen-5.11.9/autoopts/tpl/gpl.lic 2011-04-22 16:14:21.000000000 +0200 +++ autogen-5.12/autoopts/tpl/gpl.lic 2011-06-09 20:24:02.000000000 +0200 @@ -16,3 +16,5 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . + +the GNU General Public License, version 3 or later diff -Nru autogen-5.11.9/autoopts/tpl/gplv2.lic autogen-5.12/autoopts/tpl/gplv2.lic --- autogen-5.11.9/autoopts/tpl/gplv2.lic 2011-04-22 16:14:14.000000000 +0200 +++ autogen-5.12/autoopts/tpl/gplv2.lic 2011-06-09 20:23:50.000000000 +0200 @@ -15,3 +15,5 @@ You should have received a copy of the GNU General Public License, version 2, along with this program. If not, see . + +the GNU General Public License, version 2 diff -Nru autogen-5.11.9/autoopts/tpl/lgpl.lic autogen-5.12/autoopts/tpl/lgpl.lic --- autogen-5.11.9/autoopts/tpl/lgpl.lic 2011-04-22 16:14:07.000000000 +0200 +++ autogen-5.12/autoopts/tpl/lgpl.lic 2011-06-09 20:23:37.000000000 +0200 @@ -16,3 +16,5 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see ."; + +the GNU Lesser General Public License, version 3 or later diff -Nru autogen-5.11.9/autoopts/tpl/mbsd.lic autogen-5.12/autoopts/tpl/mbsd.lic --- autogen-5.11.9/autoopts/tpl/mbsd.lic 2011-04-22 16:13:56.000000000 +0200 +++ autogen-5.12/autoopts/tpl/mbsd.lic 2011-06-09 20:23:05.000000000 +0200 @@ -27,3 +27,5 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +the Modified Berkeley Software Distribution License diff -Nru autogen-5.11.9/autoopts/tpl/mdoc2man.sh autogen-5.12/autoopts/tpl/mdoc2man.sh --- autogen-5.11.9/autoopts/tpl/mdoc2man.sh 2011-05-03 18:39:49.000000000 +0200 +++ autogen-5.12/autoopts/tpl/mdoc2man.sh 2011-05-30 23:17:42.000000000 +0200 @@ -1,8 +1,8 @@ #! /bin/sh -## texi2mdoc.sh -- script to convert texi-isms to mdoc-isms +## mdoc2mdoc.sh -- script to convert mdoc-isms to mdoc-isms ## -## Time-stamp: "2011-05-03 09:39:49 bkorb" +## Time-stamp: "2011-05-30 14:17:42 bkorb" ## ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. @@ -24,14 +24,14 @@ ## 06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3 ## 66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd -## This "library" converts texi-isms into man-isms. It gets included -## by the man page template at the point where texi-isms might start appearing +## This "library" converts mdoc-isms into man-isms. It gets included +## by the man page template at the point where mdoc-isms might start appearing ## and then "emit-man-text" is invoked when all the text has been assembled. ## ## Display the command line prototype, ## based only on the argument processing type. ## -## And run the entire output through "sed" to convert texi-isms +## And run the entire output through "sed" to convert mdoc-isms # /bin/sh on Solaris is too horrible for words # @@ -39,9 +39,9 @@ /bin/sh ) test -x /usr/xpg4/bin/sh && exec /usr/xpg4/bin/sh ${1+"$@"} ;; esac - parent_pid=$$ prog=`basename $0 .sh` +NmName= die() { echo "$prog error: $*" >&2 @@ -229,6 +229,25 @@ echo "\\fI${line}\\fR" } +do_NmName() { + # do we want to downcase the line first? Yes... + set -- `echo ${line#.Nm} | \ + sed -e 's/-/\\-/g' \ + -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + NmNameSfx= + + if test $# -gt 0 + then case "$1" in + [A-Za-z]* ) + NmName=$1 + shift + ;; + esac + + test $# -gt 0 && NmNameSfx=" $*" + fi + echo ".B $NmName$NmNameSfx" +} do_line() { case "${line}" in @@ -239,6 +258,8 @@ .Op' '* ) do_optional ;; .Fl' '* ) do_flag ;; .Ar' '* ) do_arg ;; + .Nm' '* ) do_NmName ;; + .Nm ) do_NmName ;; * ) echo "$line" ;; esac return 0 @@ -251,12 +272,7 @@ s/^\.Em/.I/ s/^\.Pp/.PP/ s/^.in *\\-/.in -/ - -/^.Nm /{ - y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - s/-/\\-/g - s/^.nm/.B/ -}' +' readonly easy_fixes set -f diff -Nru autogen-5.11.9/autoopts/tpl/opthead.tlib autogen-5.12/autoopts/tpl/opthead.tlib --- autogen-5.11.9/autoopts/tpl/opthead.tlib 2011-03-28 03:37:26.000000000 +0200 +++ autogen-5.12/autoopts/tpl/opthead.tlib 2011-05-26 17:56:40.000000000 +0200 @@ -488,10 +488,10 @@ #if defined(ENABLE_NLS) # ifndef _ # include - static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); - } +static inline char* aoGetsText(char const* pz) { + if (pz == NULL) return NULL; + return (char*)gettext(pz); +} # define _(s) aoGetsText(s) # endif /* _() */ diff -Nru autogen-5.11.9/autoopts/tpl/optlib.tlib autogen-5.12/autoopts/tpl/optlib.tlib --- autogen-5.11.9/autoopts/tpl/optlib.tlib 2011-04-22 23:14:06.000000000 +0200 +++ autogen-5.12/autoopts/tpl/optlib.tlib 2011-06-09 21:17:27.000000000 +0200 @@ -1,6 +1,6 @@ [= AutoGen5 Template Library -*- Mode: scheme -*- -# Time-stamp: "2011-04-19 14:46:03 bkorb" +# Time-stamp: "2011-06-09 12:17:27 bkorb" # ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. @@ -533,29 +533,17 @@ * * This source file is copyrighted and licensed under the following terms: * - * [=(sprintf "%s copyright (c) %s %s - all rights reserved" - prog-name (get "copyright.date") (get "copyright.owner") ) =][= - - CASE (get "copyright.type") =][= - - = gpl =] - * -[=(gpl prog-name " * " ) =][= - - = lgpl =] - * -[=(lgpl prog-name (get "copyright.owner") " * " ) =][= - - = bsd =] - * -[=(bsd prog-name (get "copyright.owner") " * " ) =][= - - = note =] - * -[=(prefix " * " (get "copyright.text"))=][= +[= + CASE copyright.type =][= + == "" =][= + (sprintf " * %s copyright (c) %s %s - all rights reserved\n * %s" + prog-name (get "copyright.date") (get "copyright.owner") + "licensing type not specified" ) =][= - * =] * <>[= + = note =][= (prefix " * " (get "copyright.text")) =][= + * =][= (license-full (get "copyright.type") prog-name " * " + (get "copyright.owner") (get "copyright.date")) =][= ESAC =][= ENDIF "copyright exists" =] */ diff -Nru autogen-5.11.9/autoopts/tpl/rc-sample.tpl autogen-5.12/autoopts/tpl/rc-sample.tpl --- autogen-5.11.9/autoopts/tpl/rc-sample.tpl 2011-01-27 22:02:24.000000000 +0100 +++ autogen-5.12/autoopts/tpl/rc-sample.tpl 2011-06-09 21:18:00.000000000 +0200 @@ -1,6 +1,6 @@ [= AutoGen5 Template rc -# Time-stamp: "2010-02-24 08:40:19 bkorb" +# Time-stamp: "2011-06-09 12:18:00 bkorb" ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. @@ -37,31 +37,21 @@ (set-writable) (exist? "copyright") -=] [=(sprintf "%s copyright %s %s - all rights reserved" - (get "prog-name") (get "copyright.date") (get "copyright.owner") ) =][= - - CASE (get "copyright.type") =][= - - = gpl =] -# -[=(gpl (get "prog-name") "# " ) =][= - - = lgpl =] -# -[=(lgpl (get "prog-name") (get "copyright.owner") "# " ) =][= - - = bsd =] -# -[=(bsd (get "prog-name") (get "copyright.owner") "# " ) =][= - - = note =] +\=] +# This source file is copyrighted and licensed under the following terms: # -[=(prefix "# " (get "copyright.text")) =][= - - * =] -# <>[= - - ESAC =][= +[= + CASE copyright.type =][= + == "" =][= + (sprintf "# %s copyright (c) %s %s - all rights reserved\n# %s" + prog-name (get "copyright.date") (get "copyright.owner") + "licensing type not specified" ) =][= + + = note =][= (prefix "# " (get "copyright.text")) =][= + + * =][= (license-full (get "copyright.type") prog-name "# " + (get "copyright.owner") (get "copyright.date")) =][= + ESAC =][= ENDIF "copyright exists" =][= diff -Nru autogen-5.11.9/autoopts/tpl/usage-txt.tpl autogen-5.12/autoopts/tpl/usage-txt.tpl --- autogen-5.11.9/autoopts/tpl/usage-txt.tpl 2011-04-27 02:04:24.000000000 +0200 +++ autogen-5.12/autoopts/tpl/usage-txt.tpl 2011-06-09 22:28:06.000000000 +0200 @@ -1,10 +1,8 @@ -[= AutoGen5 Template -*- Mode: text -*- +[= AutoGen5 Template - h + h pot - pot - -# Time-stamp: "2011-04-26 17:04:24 bkorb" +(define time-stamp "2011-06-09 13:28:06") ## This file is part of AutoOpts, a companion to AutoGen. ## AutoOpts is free software. @@ -41,7 +39,8 @@ * they may substitute translated strings using a procedure that steps through * all the string pointers. * -[= (lgpl "AutoOpts" "Bruce Korb" " * ") =] +[= (license-full "lgpl" "AutoOpts" " * " "Bruce Korb" (shell "date +1992-%Y")) + =] */ [= (make-header-guard "autoopts") @@ -186,4 +185,11 @@ ESAC +# Local Variables: +# Mode: text +# time-stamp-format: "\"%:y-%02m-%02d %02H:%02M:%02S\"" +# time-stamp-pattern: "(define time-stamp " +# time-stamp-end: ")" +# End: + \=] diff -Nru autogen-5.11.9/autoopts/value-type.h autogen-5.12/autoopts/value-type.h --- autogen-5.11.9/autoopts/value-type.h 2011-05-06 16:06:40.000000000 +0200 +++ autogen-5.12/autoopts/value-type.h 2011-06-26 16:39:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Generated header for gperf generated source Fri May 6 07:06:40 PDT 2011 + * Generated header for gperf generated source Sun Jun 26 07:39:38 PDT 2011 * This file enumerates the list of names and declares the * procedure for mapping string names to the enum value. */ diff -Nru autogen-5.11.9/autoopts/xat-attribute.h autogen-5.12/autoopts/xat-attribute.h --- autogen-5.11.9/autoopts/xat-attribute.h 2011-05-06 16:06:40.000000000 +0200 +++ autogen-5.12/autoopts/xat-attribute.h 2011-06-26 16:39:38.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Generated header for gperf generated source Fri May 6 07:06:40 PDT 2011 + * Generated header for gperf generated source Sun Jun 26 07:39:38 PDT 2011 * This file enumerates the list of names and declares the * procedure for mapping string names to the enum value. */ diff -Nru autogen-5.11.9/ChangeLog autogen-5.12/ChangeLog --- autogen-5.11.9/ChangeLog 2011-05-05 19:06:16.000000000 +0200 +++ autogen-5.12/ChangeLog 2011-06-25 22:12:43.000000000 +0200 @@ -1,3 +1,117 @@ +2011-06-25 Bruce Korb + + * agen5/expFormat.c: remove some unused globals, make global some + const variables needed in multiple functions, localize some globals + used only in one function. + * agen5/fmemopen.c (_IOWR): static code analysis cleanup + * autoopts/text_mmap.c: properly use MAP_ANONYMOUS. simplify code. + * agen5/opts.def (skip-suffix): make conflict with select-suffix + * autoopts/aoconf.tpl (libdir): do not include any of the directories: + /lib /lib64 /usr/lib /usr/lib64 + in the value. Just assume these are always searched. + * autoopts/tpl/cmd-doc.tlib (BUGS): if this section exists, it should + be appended to instead of replaced. + * config/misc.def (--with-guile): clarify that an installation prefix + is called for with this option. + +2011-06-11 Bruce Korb + + * autoopts/tpl/*.lic: add license names + * autoopts/tpl/getopt.tpl: use the new (license-description...) + * autoopts/tpl/cmd-doc.tlib: likewise + * autoopts/tpl/optlib.tlib: likewise + * autoopts/tpl/rc-sample.tpl: likewise + * autoopts/tpl/usage-txt.tpl: likewise + * config/bootstrap.local: skip debian stuff + * pkg/Makefile.am: likewise + * pkg/mkpkg.sh: likewise + * pkg/mkpkg.debian: obsolete, removed. + * doc/autogen-texi.txt: document this new licensing stuff better. + +2011-06-05 Bruce Korb + + * agen5/autogen.h (__func__): #define a replacement when needed + * agen5/expOutput.c : use it throughout + * agen5/tpProcess.c (out_close): new name for closeOutput() + * agen5/test/debug.test: adjust for new name + * agen5/expOutput.c: likewise + * agen5/autogen.c: likewise + * autoopts/tpl/agman-cmd.tpl (cond-section): new macro. Utilize it + throughout to "regularize" the creation of AutoOpts defined sections. + * autoopts/test/keyword.test: adjust for new templates + * agen5/*.c: change Doxygen file tag to @file + * doc/auto-opts.tpl (HOME): set it to our temp directory, instead + of emptying it. Debian has a problem when it is empty. + * agen5/fmemopen.c (ag_fmemioctl): do not compile. GNU Hurd + chokes on _IOWR('m', 1, fmemc_get_buf_addr_t) by token pasting + weird stuff and not being able to compile. It isn't used anyway. + * autoopts/bootstrap.dir (GENSCRIPTS): new list of files. + These must be "maintainerclean" and depend upon the mk-tpl-config.sh + script running. + * autoopts/Makefile.am (MAINTAINERCLEANFILES): use GENSCRIPTS. + * agen5/expFormat.c (assemble_full_desc): new extract of find_lic_text + (get_lic_name): procedure to return the license name from lic file + (find_lic_text): call that procedure when segment is "LSEG_NAME". + (ag_scm_license_name): implement new scheme functioon "license-name". + * autoopts/Makefile.am (GENSCRIPTS): new macro listing all the + scripts that convert one doc format to another. They are all + derives from either a source file or thin air. + * autoopts/bootstrap.dir (GENSCRIPTS): derive this list + +2011-05-30 Harlan Stenn + + * autoopts/tpl/mdoc2man.sh (do_NmName): handle the .Nm mdoc macro + +2011-05-29 Bruce Korb + + * autoopts/tpl/agtexi-cmd.tpl (exit status): include any "doc-section" + documentation pertaining to exit status. + * autoopts/tpl/cmd-doc.tlib (exit status): likewise + +2011-05-28 Bruce Korb + + * agen5/test/opts.test: adjust for changes in string names + * autoopts/Makefile.am (SHELL): replace with $(POSIX_SHELL) + * doc/Makefile.am: likewise + * pkg/Makefile.am: likewise + +2011-05-27 Bruce Korb + + Thanks to Harlen Stenn: + * autoopts/tpl/cmd-doc.tlib (bugs): separate bugs section from + "authors" section and make it last. + * doc/autogen-texi.txt (prog-*-descrip): make it clearer that these + are *deprecated*. + (detail): describe how it defaults for the DESCRIPTION section in man + * autoopts/test/keyword.test: adjust test. ".Sh FILES" precedes + the exit status section. + +2011-05-26 Bruce Korb + + Thanks to Ivo Shopov + * autoopts/bootstrap.dir (edta): remove tpl/usage.tlib and + add to pdta instead. (It needs to be installed.) + + * autoopts/find.c (parse_opt): new function, extracted from opt_find_long + (opt_ambiguities): likewise + (opt_match_ct): likewise + (opt_set): likewise + (opt_unknown): likewise + (opt_ambiguous): likewise, also add code to print 2 - 4 matching + options. Beyond that, use --help option. + (opt_find_long): make it smaller. Much smaller. + * autoopts/usage-txt.def: two new messages + * agen5/guile-iface.tpl (ag_scm2zchars): remove pre-Guile 1.7 version + * agen5/scmStrings.c (ag_scm2zchars): add pre-1.7 code to function + +2011-05-24 Bruce Korb + + * autoopts/autoopts.c: make it smaller + * autoopts/check.c: new + * autoopts/find.c: new + * autoopts/enum.c: renamed from enumeration.c + * autoopts/env.c: renamed from environment.c + 2011-05-02 Bruce Korb 5.11.9 released diff -Nru autogen-5.11.9/columns/opts.c autogen-5.12/columns/opts.c --- autogen-5.11.9/columns/opts.c 2011-05-06 16:07:16.000000000 +0200 +++ autogen-5.12/columns/opts.c 2011-06-26 16:40:14.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (opts.c) * - * It has been AutoGen-ed May 6, 2011 at 07:07:16 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:14 AM by AutoGen 5.11.10pre11 * From the definitions opts.def * and the template file options * @@ -18,21 +18,24 @@ * * This source file is copyrighted and licensed under the following terms: * - * columns copyright (c) 1999-2011 Bruce Korb - all rights reserved - * - * columns is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * columns is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - + * Copyright (C) 1999-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU General Public License, version 3 or later + * + * +PFX>columns is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * columns is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ #include diff -Nru autogen-5.11.9/columns/opts.h autogen-5.12/columns/opts.h --- autogen-5.11.9/columns/opts.h 2011-05-06 16:07:16.000000000 +0200 +++ autogen-5.12/columns/opts.h 2011-06-26 16:40:14.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (opts.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:16 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:14 AM by AutoGen 5.11.10pre11 * From the definitions opts.def * and the template file options * @@ -18,21 +18,24 @@ * * This source file is copyrighted and licensed under the following terms: * - * columns copyright (c) 1999-2011 Bruce Korb - all rights reserved - * - * columns is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * columns is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - + * Copyright (C) 1999-2011 Bruce Korb, all rights reserved. + * This is free software. It is licensed for use, modification and + * redistribution under the terms of the + * GNU General Public License, version 3 or later + * + * +PFX>columns is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * columns is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ /* * This file contains the programmatic interface to the Automated @@ -192,10 +195,10 @@ #if defined(ENABLE_NLS) # ifndef _ # include - static inline char* aoGetsText(char const* pz) { - if (pz == NULL) return NULL; - return (char*)gettext(pz); - } +static inline char* aoGetsText(char const* pz) { + if (pz == NULL) return NULL; + return (char*)gettext(pz); +} # define _(s) aoGetsText(s) # endif /* _() */ diff -Nru autogen-5.11.9/compat/strsignal.h autogen-5.12/compat/strsignal.h --- autogen-5.11.9/compat/strsignal.h 2011-05-06 16:06:59.000000000 +0200 +++ autogen-5.12/compat/strsignal.h 2011-06-26 16:39:59.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (strsignal.h) * - * It has been AutoGen-ed May 6, 2011 at 07:07:00 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:39:59 AM by AutoGen 5.11.10pre11 * From the definitions strsignal.def * and the template file strsignal * @@ -10,7 +10,7 @@ * * strsignal copyright (c) 1992-2011 by Bruce Korb - all rights reserved * - * AutoGen is free software: you can redistribute it and/or modify it +AutoGen is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -22,7 +22,6 @@ * * You should have received a copy of the GNU General Public License along * with this program. If not, see . - */ #ifndef MAX_SIGNAL_NUMBER #define MAX_SIGNAL_NUMBER 32 diff -Nru autogen-5.11.9/config/ag_macros.m4 autogen-5.12/config/ag_macros.m4 --- autogen-5.11.9/config/ag_macros.m4 2011-05-06 16:06:38.000000000 +0200 +++ autogen-5.12/config/ag_macros.m4 2011-06-26 16:39:37.000000000 +0200 @@ -2,7 +2,7 @@ dnl dnl DO NOT EDIT THIS FILE (ag_macros.m4) dnl -dnl It has been AutoGen-ed May 6, 2011 at 07:06:38 AM by AutoGen 5.11.9 +dnl It has been AutoGen-ed June 26, 2011 at 07:39:37 AM by AutoGen 5.11.10pre11 dnl From the definitions misc.def dnl and the template file conftest.tpl dnl @@ -686,7 +686,7 @@ # Check to see if sigsetjmp() links okay. AG_LINK_SIGSETJMP - # Check to see if a working libguile can be found. + # Check to see if prefix for a working libguile installation. AG_WITHLIB_GUILE # Check to see if the guile version. diff -Nru autogen-5.11.9/config/bootstrap.local autogen-5.12/config/bootstrap.local --- autogen-5.11.9/config/bootstrap.local 2011-05-05 18:37:32.000000000 +0200 +++ autogen-5.12/config/bootstrap.local 2011-06-25 18:29:54.000000000 +0200 @@ -3,7 +3,7 @@ # config/bootstrap.local --- maintainer's bootstrap script # # Author: Bruce Korb -# Time-stamp: "2011-05-05 09:37:32 bkorb" +# Time-stamp: "2011-06-25 09:29:54 bkorb" ## ## This file is part of AutoGen. ## AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved @@ -132,48 +132,41 @@ done >&3 exec 3>&- - cd pkg/debian - debver=$(echo 1:${AG_VERSION}-1 | sed 's/pre/~pre/') - fgrep "(${debver})" changelog && exit 0 - - reltype=$( - case "${AG_VERSION}" in - ( *pre* ) echo prerelease ;; - ( * ) echo release ;; - esac - ) - uname=$(finger $(id -n -u) | sed 's/.*Name: *//;1q') - exec 3> changelog-new - cat >&3 <<- _EOF_ - autogen (${debver}) experimental; urgency=low - - * New ${reltype}. - _EOF_ - sed '1,2d;/^$/q;s/^/ /' ${srcdir}/NEWS >&3 - cat >&3 <<- _EOF_ - - -- ${uname} <${EADDR}> $(date -R) - - _EOF_ - cat changelog >&3 - rm -f changelog - exec 3>&- - mv changelog-new changelog cd ${srcdir} - GNULIBDIR=~gnu/proj/gnulib + GNULIBDIR=${GNULIBDIR:-~gnu/proj/gnulib} cp ${GNULIBDIR}/lib/parse-duration.[ch] autoopts/. cp ${GNULIBDIR}/build-aux/gendocs.sh \ ${GNULIBDIR}/doc/gendocs_template doc/. + + fmemdir=~bkorb/tools/mine/lib/fmemopen + if test -f ${fmemdir}/fmemopen.c + then + test -f agen5/fmemopen.c && rm -f agen5/fmemopen.c + { + echo '#if defined(ENABLE_FMEMOPEN)' + echo '#include ' + echo + sed -n '/^typedef enum/,/_IOWR(/p' ${fmemdir}/libfmem.h + sed -e '/^#if defined(HAVE_FOPENCOOKIE)/p' \ + -e '/=--subblock/,/^#if defined(HAVE_FOPENCOOKIE)/d' \ + -e "s% @file .*% @file $(realpath ${fmemdir}/fmemopen.c)%" \ + ${fmemdir}/fmemopen.c + echo '#endif /* ENABLE_FMEMOPEN */' + } > agen5/fmemopen.c + + fi } check_tools() { - test -x "${AGexe}" -a -x "$GDexe" -a -x "$CLexe" || exit 1 - - ( $CLexe --version && \ - $GDexe --version && \ - $AGexe --version ) > /dev/null || exit 1 + local t e + for t in AG GD CL + do + eval e=\${${t}exe} + test -x "$e" || die "Not executable: \$${t}exe == '$e'" + $e --version || die "$e does not work" + done } tweak_Makefile_am() @@ -186,7 +179,10 @@ cd ${srcdir} { - sed '/^EXTRA_DIST /{ ; s/.*/misc_extra = \\/ ; q ; }' Makefile.am + sed '/^EXTRA_DIST /{ + s/.*/misc_extra = \\/ + q + }' Makefile.am find VERSION NOTES config/bootstrap* config/*.m4 \ autoopts/parse-duration.[ch] doc/gendocs* \ -type f | \ @@ -198,13 +194,13 @@ cd pkg { - sed '/^DEBIAN_FILES *=/{ ; s/=.*/= \\/ ; q ; }' Makefile.am - find mkpkg.debian debian/* -type f | \ - columns --spread=1 -I4 --line=' \' - printf '\nLIBOPTS_FILES = \\\n' + sed '/^LIBOPTS_FILES *=/{ + s/=.*/= \\/ + q + }' Makefile.am - find libopts -type f | \ - columns --spread=1 -I4 --line=" \\" + find libopts -type f -name '[a-zA-Z]*' | \ + columns --spread=1 -I4 --line=' \' echo sed '1,/LIBOPTS_FILES *=/d' Makefile.am @@ -218,13 +214,13 @@ dummy_texi=${srcdir}/doc/autogen.texi echo '@setfilename autogen.info' > ${dummy_texi} test -f ${srcdir}/configure && rm -f ${srcdir}/configure - check_tools + check_tools >/dev/null config_versions tweak_Makefile_am ;; ( post ) - rm -f ${dummy_texi} + test ${#dummy_texi} -gt 0 && rm -f ${dummy_texi} ;; esac diff -Nru autogen-5.11.9/config/libopts.m4 autogen-5.12/config/libopts.m4 --- autogen-5.11.9/config/libopts.m4 2011-05-06 16:06:37.000000000 +0200 +++ autogen-5.12/config/libopts.m4 2011-06-26 16:39:36.000000000 +0200 @@ -2,7 +2,7 @@ dnl dnl DO NOT EDIT THIS FILE (libopts.m4) dnl -dnl It has been AutoGen-ed May 6, 2011 at 07:06:37 AM by AutoGen 5.11.9 +dnl It has been AutoGen-ed June 26, 2011 at 07:39:36 AM by AutoGen 5.11.10pre11 dnl From the definitions libopts.def dnl and the template file conftest.tpl dnl diff -Nru autogen-5.11.9/configure autogen-5.12/configure --- autogen-5.11.9/configure 2011-05-06 16:06:58.000000000 +0200 +++ autogen-5.12/configure 2011-06-26 16:39:58.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for GNU AutoGen 5.11.9. +# Generated by GNU Autoconf 2.68 for GNU AutoGen 5.12. # # Report bugs to . # @@ -709,8 +709,8 @@ # Identity of this package. PACKAGE_NAME='GNU AutoGen' PACKAGE_TARNAME='autogen' -PACKAGE_VERSION='5.11.9' -PACKAGE_STRING='GNU AutoGen 5.11.9' +PACKAGE_VERSION='5.12' +PACKAGE_STRING='GNU AutoGen 5.12' PACKAGE_BUGREPORT='autogen-users@lists.sourceforge.net' PACKAGE_URL='http://www.gnu.org/software/autogen/' @@ -1497,7 +1497,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU AutoGen 5.11.9 to adapt to many kinds of systems. +\`configure' configures GNU AutoGen 5.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1568,7 +1568,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU AutoGen 5.11.9:";; + short | recursive ) echo "Configuration of GNU AutoGen 5.12:";; esac cat <<\_ACEOF @@ -1689,7 +1689,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU AutoGen configure 5.11.9 +GNU AutoGen configure 5.12 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2336,7 +2336,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU AutoGen $as_me 5.11.9, which was +It was created by GNU AutoGen $as_me 5.12, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3266,7 +3266,7 @@ # Define the identity of the package. PACKAGE='autogen' - VERSION='5.11.9' + VERSION='5.12' cat >>confdefs.h <<_ACEOF @@ -13909,7 +13909,7 @@ - # Check to see if a working libguile can be found. + # Check to see if prefix for a working libguile installation. # Check whether --with-libguile was given. @@ -16645,7 +16645,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU AutoGen $as_me 5.11.9, which was +This file was extended by GNU AutoGen $as_me 5.12, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16713,7 +16713,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU AutoGen config.status 5.11.9 +GNU AutoGen config.status 5.12 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -Nru autogen-5.11.9/configure.ac autogen-5.12/configure.ac --- autogen-5.11.9/configure.ac 2011-05-06 16:06:37.000000000 +0200 +++ autogen-5.12/configure.ac 2011-06-26 16:39:36.000000000 +0200 @@ -20,7 +20,7 @@ dnl You should have received a copy of the GNU General Public License along dnl with this program. If not, see . dnl -AC_INIT([GNU AutoGen],[5.11.9],[autogen-users@lists.sourceforge.net]) +AC_INIT([GNU AutoGen],[5.12],[autogen-users@lists.sourceforge.net]) AC_CONFIG_SRCDIR(agen5/autogen.c) AC_CONFIG_AUX_DIR(config) AC_CANONICAL_TARGET diff -Nru autogen-5.11.9/debian/changelog autogen-5.12/debian/changelog --- autogen-5.11.9/debian/changelog 2011-07-27 17:15:13.000000000 +0200 +++ autogen-5.12/debian/changelog 2011-07-27 17:15:14.000000000 +0200 @@ -1,3 +1,24 @@ +autogen (1:5.12-0.1ubuntu1) oneiric; urgency=low + + * Merge from debian unstable. (LP: #817044) Remaining changes: + - Use bash to build the package and run the tests. + * Dropped change, fixed in Debian: + - Avoid building and testing the package twice. + + -- Angel Abad Wed, 27 Jul 2011 17:03:16 +0200 + +autogen (1:5.12-0.1) unstable; urgency=low + + * Non-maintainer upload. + * New upstream release + - Don't set rpath for default search paths. (Closes: #630176) + - Fixes build issue on Hurd. + - Drop patch 02_home.diff, applied upstream + * Don't run the build target twice. Patch from Matthias Klose + (Closes: #629690) + + -- Kurt Roeckx Sun, 10 Jul 2011 15:05:23 +0200 + autogen (1:5.11.9-0.2ubuntu1) oneiric; urgency=low * Use bash to build the package and run the tests. LP: #794596. @@ -7,6 +28,7 @@ autogen (1:5.11.9-0.2) unstable; urgency=low + * Non-maintainer upload. * Apply patch from Bruce Korb to deal with non-existing $HOME (Closes: #629142) diff -Nru autogen-5.11.9/debian/control autogen-5.12/debian/control --- autogen-5.11.9/debian/control 2011-07-27 17:15:13.000000000 +0200 +++ autogen-5.12/debian/control 2011-07-27 17:15:14.000000000 +0200 @@ -1,7 +1,8 @@ Source: autogen Section: devel Priority: optional -Maintainer: Bradley Smith +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Bradley Smith Build-Depends: debhelper (>= 7), autotools-dev, gperf, guile-1.8-dev, libxml2-dev, texinfo, texlive, texi2html, quilt Standards-Version: 3.8.3 Homepage: http://www.gnu.org/software/autogen/ diff -Nru autogen-5.11.9/debian/patches/02_home.diff autogen-5.12/debian/patches/02_home.diff --- autogen-5.11.9/debian/patches/02_home.diff 2011-07-27 17:15:13.000000000 +0200 +++ autogen-5.12/debian/patches/02_home.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,38 +0,0 @@ ---- a/doc/auto-opts.tpl 2011-06-04 17:22:17.000000000 +0200 -+++ b/doc/auto-opts.tpl 2011-06-04 17:24:11.000000000 +0200 -@@ -200,16 +200,16 @@ - @example - [= (out-push-new) \=] - set -x --log_file=${HOME}/default-test-log.txt -+log_file=${tmp_dir}/ao-doc-log - exec 7>&2 ; exec 2>> ${log_file} -- - TOPDIR=`cd ${top_builddir} >/dev/null ; pwd` - OPTDIR=${TOPDIR}/autoopts - - { - cd ${tmp_dir} -+ chmod 666 *.def - echo 'config-header = "config.h";' >> default-test.def -- HOME='' run_ag default-test.def -+ HOME=${tmp_dir} run_ag default-test.def - test -f default-test.c || die 'NO default-test.c PROGRAM' - - opts="-o default-test -DTEST_DEFAULT_TEST_OPTS ${INCLUDES}" -@@ -218,9 +218,13 @@ - test -x ./default-test || die 'NO default-test EXECUTABLE' - } >&2 - --test $? -eq 0 || die "Check log file ${log_file}" -+test $? -eq 0 || { -+ printf '\n\ncannot build default test\n' -+ cat $log_file -+ die "cannot build AutoOpts doc" -+} 2>&7 1>&7 - --HOME='$HOME/.default_testrc' ${tmp_dir}/default-test --help | \ -+HOME=${tmp_dir} ${tmp_dir}/default-test --help | \ - sed 's, , ,g;s,\([@{}]\),@\1,g' - - exec 2>&7 7>&- diff -Nru autogen-5.11.9/debian/patches/series autogen-5.12/debian/patches/series --- autogen-5.11.9/debian/patches/series 2011-07-27 17:15:13.000000000 +0200 +++ autogen-5.12/debian/patches/series 2011-07-27 17:15:14.000000000 +0200 @@ -1,3 +1,2 @@ 00_fix_as-needed.diff 01_fix_hurd_FTBFS.diff -02_home.diff diff -Nru autogen-5.11.9/doc/autogen.info autogen-5.12/doc/autogen.info --- autogen-5.11.9/doc/autogen.info 2011-05-06 16:08:06.000000000 +0200 +++ autogen-5.12/doc/autogen.info 2011-06-26 16:41:02.000000000 +0200 @@ -1,7 +1,7 @@ This is autogen.info, produced by makeinfo version 4.13 from /old-home/bkorb/ag/ag/doc//agdoc.texi. -This manual is for GNU AutoGen version 5.11, updated May 2011. +This manual is for GNU AutoGen version 5.12, updated June 2011. Copyright (C) 1992-2011 by Bruce Korb. @@ -16,7 +16,7 @@ * AutoGen: (autogen). The Automated Program Generator END-INFO-DIR-ENTRY - This file documents GNU AutoGen Version 5.11. + This file documents GNU AutoGen Version 5.12. AutoGen copyright (C) 1992-2011 Bruce Korb AutoOpts copyright (C) 1992-2011 Bruce Korb snprintfv copyright (C) 1999-2000 Gary V. Vaughan @@ -36,43 +36,43 @@  Indirect: -autogen.info-1: 1455 -autogen.info-2: 300676 +autogen.info-1: 1456 +autogen.info-2: 300911  Tag Table: (Indirect) -Node: Top1455 -Node: Introduction2891 -Node: Generalities4415 -Node: Example Usage7219 -Node: csh/zsh caveat12466 -Node: Testimonial13831 -Node: Definitions File16042 -Node: Identification17947 -Node: Definitions19236 -Node: def-list20423 -Node: double-quote-string21312 -Node: single-quote-string21790 -Node: simple-string22525 -Node: shell-generated23284 -Node: scheme-generated23969 -Node: here-string24366 -Node: concat-string25980 -Node: Index Assignments26964 -Node: Dynamic Text28426 -Node: Directives29601 -Node: Predefines35222 -Node: Comments36985 -Node: Example37400 -Node: Full Syntax38134 -Node: Alternate Definition51587 -Node: Template File53662 -Node: pseudo macro55291 -Node: naming values60994 -Node: expression syntax62275 -Node: apply code63517 -Node: basic expression66063 -Node: AutoGen Functions68354 +Node: Top1456 +Node: Introduction2893 +Node: Generalities4417 +Node: Example Usage7221 +Node: csh/zsh caveat12468 +Node: Testimonial13833 +Node: Definitions File16044 +Node: Identification17949 +Node: Definitions19238 +Node: def-list20425 +Node: double-quote-string21314 +Node: single-quote-string21792 +Node: simple-string22527 +Node: shell-generated23286 +Node: scheme-generated23971 +Node: here-string24368 +Node: concat-string25982 +Node: Index Assignments26966 +Node: Dynamic Text28428 +Node: Directives29603 +Node: Predefines35224 +Node: Comments36987 +Node: Example37402 +Node: Full Syntax38136 +Node: Alternate Definition51589 +Node: Template File53664 +Node: pseudo macro55293 +Node: naming values60996 +Node: expression syntax62277 +Node: apply code63519 +Node: basic expression66065 +Node: AutoGen Functions68356 Node: SCM ag-fprintf72926 Node: SCM ag-function?73707 Node: SCM base-name74085 @@ -126,355 +126,357 @@ Node: SCM tpl-file-line101772 Node: SCM tpl-file-next-line102762 Node: SCM autogen-version103350 -Node: SCM c-file-line-fmt103721 -Node: Common Functions104142 -Node: SCM agpl109349 -Node: SCM bsd109807 -Node: SCM c-string110285 -Node: SCM error-source-line111052 -Node: SCM extract111586 -Node: SCM format-arg-count114935 -Node: SCM fprintf115844 -Node: SCM gperf116394 -Node: SCM gperf-code117124 -Node: SCM gpl118315 -Node: SCM hide-email118781 -Node: SCM html-escape-encode119245 -Node: SCM in?119746 -Node: SCM join120184 -Node: SCM kr-string120697 -Node: SCM lgpl121265 -Node: SCM license121789 -Node: SCM license-description122337 -Node: SCM license-full123091 -Node: SCM license-info124539 -Node: SCM make-gperf125494 -Node: SCM makefile-script126490 -Node: SCM max128779 -Node: SCM min129092 -Node: SCM prefix129396 -Node: SCM printf129922 -Node: SCM raw-shell-str130487 -Node: SCM shell131238 -Node: SCM shell-str131788 -Node: SCM shellf134713 -Node: SCM sprintf135161 -Node: SCM string-capitalize135544 -Node: SCM string-capitalize!136007 -Node: SCM *=*136348 -Node: SCM *==*136918 -Node: SCM string-downcase137326 -Node: SCM string-downcase!137738 -Node: SCM *~138099 -Node: SCM *~~138521 -Node: SCM *=138903 -Node: SCM *==139285 -Node: SCM ==139697 -Node: SCM ~140043 -Node: SCM =140514 -Node: SCM *~*141251 -Node: SCM *~~*141664 -Node: SCM ~~142060 -Node: SCM ~*142426 -Node: SCM ~~*142840 -Node: SCM =*143233 -Node: SCM ==*143621 -Node: SCM string-substitute144006 -Node: SCM string-table-add-ref144755 -Node: SCM string-table-new145329 -Node: SCM string-table-size147864 -Node: SCM string->c-name!148287 -Node: SCM string->camelcase148817 -Node: SCM string-tr149312 -Node: SCM string-tr!149790 -Node: SCM string-upcase150449 -Node: SCM string-upcase!150857 -Node: SCM sub-shell-str151219 -Node: SCM sum151671 -Node: SCM time-string->number152005 -Node: SCM version-compare152637 -Node: native macros153580 -Node: AGMacro syntax156479 -Node: CASE158627 -Node: COMMENT161347 -Node: DEBUG161891 -Node: DEFINE162757 -Node: ELIF164991 -Node: ELSE165467 -Node: ENDDEF165840 -Node: ENDFOR166105 -Node: ENDIF166405 -Node: ENDWHILE166683 -Node: ESAC166977 -Node: EXPR167259 -Node: FOR167738 -Node: IF170716 -Node: INCLUDE171753 -Node: INVOKE172401 -Node: SELECT173401 -Node: UNKNOWN173892 -Node: WHILE174421 -Node: output controls175162 -Node: Augmenting AutoGen177170 -Node: shell commands177720 -Node: guile macros178543 -Node: guile callouts179349 -Node: AutoGen macros181547 -Node: autogen Invocation182246 -Node: autogen usage185198 -Node: autogen base-name189892 -Node: autogen core191006 -Node: autogen define191690 -Node: autogen definitions192946 -Node: autogen equate193676 -Node: autogen lib-template194107 -Node: autogen load-functions194590 -Node: autogen load-scheme195134 -Node: autogen loop-limit195708 -Node: autogen make-dep196195 -Node: autogen no-fmemopen198380 -Node: autogen override-tpl199329 -Node: autogen select-suffix199852 -Node: autogen shell200478 -Node: autogen show-defs201161 -Node: autogen skip-suffix201682 -Node: autogen source-time202345 -Node: autogen templ-dirs202888 -Node: autogen timeout203467 -Node: autogen trace204092 -Node: autogen trace-out206131 -Node: autogen undefine206741 -Node: autogen used-defines207326 -Node: autogen writable208197 -Node: autogen option presets208655 -Node: autogen exit codes210782 -Node: autogen Description211531 -Node: autogen Examples212657 -Node: Installation213382 -Node: configuring213700 -Node: AutoGen CGI216551 -Node: signal names218978 -Node: installing220201 -Node: AutoOpts222985 -Node: Features224704 -Node: Licensing231862 -Node: Caveats232987 -Node: Quick Start235088 -Node: Option Definitions239117 -Node: program attributes241048 -Node: usage attributes242739 -Node: config attributes245437 -Node: programming attributes247606 -Node: presentation attributes251943 -Node: library attributes254902 -Node: lib and program255779 -Node: lib called258195 -Node: prog calls lib259482 -Node: information attributes260360 -Node: Generated main264799 -Node: main guile265979 -Node: main shell-process266886 -Node: main shell-parser268250 -Node: main main268896 -Node: main include269770 -Node: main invoke270574 -Node: main for-each271217 -Node: option attributes276676 -Node: Required Attributes278063 -Node: Common Attributes279763 -Node: Immediate Action283238 -Node: Option Conflict Attributes285555 -Node: opt-attr settable286341 -Node: opt-attr no-preset286932 -Node: opt-attr equivalence287292 -Node: opt-attr aliases289513 -Node: opt-attr default option290175 -Node: opt-attr documentation290984 -Node: opt-attr translators292097 -Node: Option Arguments292712 -Node: arg-type string294843 -Node: arg-type number295144 -Node: arg-type boolean297051 -Node: arg-type keyword297502 -Node: arg-type set membership299111 -Node: arg-type hierarchy300676 -Node: arg-type file name301456 -Node: arg-type time-duration302704 -Node: arg-type time-date304768 -Node: arg-keyword305552 -Node: arg-optional306407 -Node: arg-default307126 -Node: Option Argument Handling307485 -Node: Internationalizing Options310903 -Node: documentation attributes312801 -Node: automatic options315979 -Node: standard options321208 -Node: AutoOpts API325397 -Node: Option Processing Data328297 -Node: CLEAR_OPT331893 -Node: COUNT_OPT332217 -Node: DESC332622 -Node: DISABLE_OPT_name333040 -Node: ENABLED_OPT333597 -Node: ERRSKIP_OPTERR334036 -Node: ERRSTOP_OPTERR334367 -Node: HAVE_OPT334821 -Node: ISSEL_OPT335190 -Node: ISUNUSED_OPT335498 -Node: OPTION_CT335808 -Node: OPT_ARG336164 -Node: OPT_NO_XLAT_CFG_NAMES336717 -Node: OPT_NO_XLAT_OPT_NAMES337254 -Node: OPT_VALUE_name337735 -Node: OPT_XLAT_CFG_NAMES338199 -Node: OPT_XLAT_OPT_NAMES339065 -Node: RESTART_OPT339770 -Node: SET_OPT_name340239 -Node: STACKCT_OPT341189 -Node: STACKLST_OPT341971 -Node: START_OPT342791 -Node: STATE_OPT343047 -Node: USAGE343996 -Node: VALUE_OPT_name345462 -Node: VERSION346116 -Node: WHICH_IDX_name346700 -Node: WHICH_OPT_name347258 -Node: teOptIndex347826 -Node: OPTIONS_STRUCT_VERSION348415 -Node: libopts procedures349208 -Node: libopts-ao_string_tokenize350777 -Node: libopts-configFileLoad352799 -Node: libopts-optionFileLoad354106 -Node: libopts-optionFindNextValue355693 -Node: libopts-optionFindValue356888 -Node: libopts-optionFree357947 -Node: libopts-optionGetValue358595 -Node: libopts-optionLoadLine359670 -Node: libopts-optionNextValue361063 -Node: libopts-optionOnlyUsage362360 -Node: libopts-optionProcess363044 -Node: libopts-optionRestore364800 -Node: libopts-optionSaveFile365691 -Node: libopts-optionSaveState366937 -Node: libopts-optionUnloadNested368151 -Node: libopts-optionVersion368807 -Node: libopts-pathfind369376 -Node: libopts-strequate371079 -Node: libopts-streqvcmp371694 -Node: libopts-streqvmap372646 -Node: libopts-strneqvcmp373754 -Node: libopts-strtransform374806 -Node: Multi-Threading375507 -Node: option descriptor376503 -Node: Using AutoOpts377154 -Node: local use377764 -Node: binary not installed379394 -Node: binary pre-installed379898 -Node: source pre-installed380527 -Node: source not installed381589 -Node: Presetting Options382714 -Node: loading rcfile384977 -Node: saving rcfile386683 -Node: sample rcfile387192 -Node: environrc395813 -Node: config example397725 -Node: Config File Format399590 -Node: config name/string-value400636 -Node: config integer-values403477 -Node: config nested-values403981 -Node: config directives404465 -Node: config comments406277 -Node: shell options406702 -Node: binary-parser408525 -Node: script-parser410959 -Node: AutoInfo435783 -Node: command-info437225 -Node: library-info438268 -Node: AutoMan pages439513 -Node: man1439967 -Node: man3441430 -Node: getopt_long444652 -Node: i18n447546 -Node: Naming Conflicts448959 -Node: Option Define Names450347 -Node: Add-Ons461787 -Node: AutoFSM462778 -Node: AutoXDR463201 -Node: AutoEvents464032 -Node: columns Invocation465288 -Node: columns usage467678 -Node: columns by-columns470295 -Node: columns col-width470736 -Node: columns columns471148 -Node: columns ending471544 -Node: columns fill471815 -Node: columns first-indent472396 -Node: columns format473200 -Node: columns indent473583 -Node: columns input473961 -Node: columns line-separation474338 -Node: columns separation474694 -Node: columns sort475041 -Node: columns spread475486 -Node: columns tab-width475854 -Node: columns width476170 -Node: columns option presets476708 -Node: columns exit codes478836 -Node: columns See Also479178 -Node: getdefs Invocation479454 -Node: getdefs usage482896 -Node: getdefs agarg486204 -Node: getdefs assign486688 -Node: getdefs autogen487105 -Node: getdefs base-name487704 -Node: getdefs common-assign488317 -Node: getdefs copy488770 -Node: getdefs defs-to-get489182 -Node: getdefs filelist489597 -Node: getdefs first-index490056 -Node: getdefs input490479 -Node: getdefs linenum491201 -Node: getdefs listattr491691 -Node: getdefs ordering492518 -Node: getdefs output493138 -Node: getdefs srcfile493540 -Node: getdefs subblock494022 -Node: getdefs template495054 -Node: getdefs option presets495339 -Node: getdefs exit codes496947 -Node: getdefs See Also497289 -Node: xml2ag Invocation497565 -Node: xml2ag usage499877 -Node: xml2ag base-name503367 -Node: xml2ag core503619 -Node: xml2ag define504303 -Node: xml2ag definitions504652 -Node: xml2ag equate504897 -Node: xml2ag lib-template505148 -Node: xml2ag load-functions505511 -Node: xml2ag load-scheme505924 -Node: xml2ag loop-limit506193 -Node: xml2ag make-dep506446 -Node: xml2ag no-fmemopen506804 -Node: xml2ag output507066 -Node: xml2ag override-tpl507429 -Node: xml2ag select-suffix507696 -Node: xml2ag shell508066 -Node: xml2ag show-defs508316 -Node: xml2ag skip-suffix508563 -Node: xml2ag source-time508934 -Node: xml2ag templ-dirs509198 -Node: xml2ag timeout509564 -Node: xml2ag trace509817 -Node: xml2ag trace-out510460 -Node: xml2ag undefine510709 -Node: xml2ag used-defines511073 -Node: xml2ag writable511330 -Node: xml2ag exit codes511589 -Node: snprintfv512303 -Node: Future514820 -Node: Copying This Manual515159 -Node: Concept Index537700 -Node: Function Index557552 +Node: SCM c-file-line-fmt103719 +Node: Common Functions104140 +Node: SCM agpl109420 +Node: SCM bsd109878 +Node: SCM c-string110356 +Node: SCM error-source-line111123 +Node: SCM extract111657 +Node: SCM format-arg-count115006 +Node: SCM fprintf115915 +Node: SCM gperf116465 +Node: SCM gperf-code117195 +Node: SCM gpl118386 +Node: SCM hide-email118852 +Node: SCM html-escape-encode119316 +Node: SCM in?119817 +Node: SCM join120255 +Node: SCM kr-string120768 +Node: SCM lgpl121336 +Node: SCM license121860 +Node: SCM license-description122408 +Node: SCM license-full123162 +Node: SCM license-info125346 +Node: SCM license-name126303 +Node: SCM make-gperf126664 +Node: SCM makefile-script127660 +Node: SCM max129949 +Node: SCM min130262 +Node: SCM prefix130566 +Node: SCM printf131092 +Node: SCM raw-shell-str131657 +Node: SCM shell132408 +Node: SCM shell-str132958 +Node: SCM shellf135883 +Node: SCM sprintf136331 +Node: SCM string-capitalize136714 +Node: SCM string-capitalize!137177 +Node: SCM *=*137518 +Node: SCM *==*138088 +Node: SCM string-downcase138496 +Node: SCM string-downcase!138908 +Node: SCM *~139269 +Node: SCM *~~139691 +Node: SCM *=140073 +Node: SCM *==140455 +Node: SCM ==140867 +Node: SCM ~141213 +Node: SCM =141684 +Node: SCM *~*142421 +Node: SCM *~~*142834 +Node: SCM ~~143230 +Node: SCM ~*143596 +Node: SCM ~~*144010 +Node: SCM =*144403 +Node: SCM ==*144791 +Node: SCM string-substitute145176 +Node: SCM string-table-add-ref145925 +Node: SCM string-table-new146499 +Node: SCM string-table-size149034 +Node: SCM string->c-name!149457 +Node: SCM string->camelcase149987 +Node: SCM string-tr150482 +Node: SCM string-tr!150960 +Node: SCM string-upcase151619 +Node: SCM string-upcase!152027 +Node: SCM sub-shell-str152389 +Node: SCM sum152841 +Node: SCM time-string->number153175 +Node: SCM version-compare153807 +Node: native macros154750 +Node: AGMacro syntax157649 +Node: CASE159797 +Node: COMMENT162517 +Node: DEBUG163061 +Node: DEFINE163927 +Node: ELIF166161 +Node: ELSE166637 +Node: ENDDEF167010 +Node: ENDFOR167275 +Node: ENDIF167575 +Node: ENDWHILE167853 +Node: ESAC168147 +Node: EXPR168429 +Node: FOR168908 +Node: IF171886 +Node: INCLUDE172923 +Node: INVOKE173571 +Node: SELECT174571 +Node: UNKNOWN175062 +Node: WHILE175591 +Node: output controls176332 +Node: Augmenting AutoGen178340 +Node: shell commands178890 +Node: guile macros179713 +Node: guile callouts180519 +Node: AutoGen macros182717 +Node: autogen Invocation183416 +Node: autogen usage186361 +Node: autogen base-name191269 +Node: autogen core192383 +Node: autogen define193067 +Node: autogen definitions194323 +Node: autogen equate195053 +Node: autogen lib-template195484 +Node: autogen load-functions195967 +Node: autogen load-scheme196511 +Node: autogen loop-limit197085 +Node: autogen make-dep197572 +Node: autogen no-fmemopen199757 +Node: autogen override-tpl200706 +Node: autogen select-suffix201229 +Node: autogen shell201855 +Node: autogen show-defs202538 +Node: autogen skip-suffix203059 +Node: autogen source-time203814 +Node: autogen templ-dirs204357 +Node: autogen timeout204936 +Node: autogen trace205561 +Node: autogen trace-out207600 +Node: autogen undefine208210 +Node: autogen used-defines208795 +Node: autogen writable209666 +Node: autogen option presets210124 +Node: autogen exit status212252 +Node: autogen Description212970 +Node: autogen Examples213152 +Node: Installation213325 +Node: configuring213643 +Node: AutoGen CGI216494 +Node: signal names218921 +Node: installing220144 +Node: AutoOpts222928 +Node: Features224691 +Node: Licensing231849 +Node: Caveats232974 +Node: Quick Start235075 +Node: Option Definitions239104 +Node: program attributes241035 +Node: usage attributes242726 +Node: config attributes245424 +Node: programming attributes247593 +Node: presentation attributes251930 +Node: library attributes255137 +Node: lib and program256014 +Node: lib called258430 +Node: prog calls lib259717 +Node: information attributes260595 +Node: Generated main265034 +Node: main guile266214 +Node: main shell-process267121 +Node: main shell-parser268485 +Node: main main269131 +Node: main include270005 +Node: main invoke270809 +Node: main for-each271452 +Node: option attributes276911 +Node: Required Attributes278298 +Node: Common Attributes279998 +Node: Immediate Action283473 +Node: Option Conflict Attributes285790 +Node: opt-attr settable286576 +Node: opt-attr no-preset287167 +Node: opt-attr equivalence287527 +Node: opt-attr aliases289748 +Node: opt-attr default option290410 +Node: opt-attr documentation291219 +Node: opt-attr translators292332 +Node: Option Arguments292947 +Node: arg-type string295078 +Node: arg-type number295379 +Node: arg-type boolean297286 +Node: arg-type keyword297737 +Node: arg-type set membership299346 +Node: arg-type hierarchy300911 +Node: arg-type file name301691 +Node: arg-type time-duration302939 +Node: arg-type time-date305003 +Node: arg-keyword305787 +Node: arg-optional306642 +Node: arg-default307361 +Node: Option Argument Handling307720 +Node: Internationalizing Options311138 +Node: documentation attributes313036 +Node: automatic options318986 +Node: standard options324215 +Node: AutoOpts API328420 +Node: Option Processing Data331320 +Node: CLEAR_OPT334916 +Node: COUNT_OPT335240 +Node: DESC335645 +Node: DISABLE_OPT_name336063 +Node: ENABLED_OPT336620 +Node: ERRSKIP_OPTERR337059 +Node: ERRSTOP_OPTERR337390 +Node: HAVE_OPT337844 +Node: ISSEL_OPT338213 +Node: ISUNUSED_OPT338521 +Node: OPTION_CT338831 +Node: OPT_ARG339187 +Node: OPT_NO_XLAT_CFG_NAMES339740 +Node: OPT_NO_XLAT_OPT_NAMES340277 +Node: OPT_VALUE_name340758 +Node: OPT_XLAT_CFG_NAMES341222 +Node: OPT_XLAT_OPT_NAMES342088 +Node: RESTART_OPT342793 +Node: SET_OPT_name343262 +Node: STACKCT_OPT344212 +Node: STACKLST_OPT344994 +Node: START_OPT345814 +Node: STATE_OPT346070 +Node: USAGE347019 +Node: VALUE_OPT_name348485 +Node: VERSION349139 +Node: WHICH_IDX_name349723 +Node: WHICH_OPT_name350281 +Node: teOptIndex350849 +Node: OPTIONS_STRUCT_VERSION351438 +Node: libopts procedures352231 +Node: libopts-ao_string_tokenize353800 +Node: libopts-configFileLoad355822 +Node: libopts-optionFileLoad357129 +Node: libopts-optionFindNextValue358716 +Node: libopts-optionFindValue359911 +Node: libopts-optionFree360970 +Node: libopts-optionGetValue361618 +Node: libopts-optionLoadLine362693 +Node: libopts-optionNextValue364086 +Node: libopts-optionOnlyUsage365383 +Node: libopts-optionProcess366067 +Node: libopts-optionRestore367823 +Node: libopts-optionSaveFile368714 +Node: libopts-optionSaveState369960 +Node: libopts-optionUnloadNested371174 +Node: libopts-optionVersion371830 +Node: libopts-pathfind372399 +Node: libopts-strequate374102 +Node: libopts-streqvcmp374717 +Node: libopts-streqvmap375669 +Node: libopts-strneqvcmp376777 +Node: libopts-strtransform377829 +Node: Multi-Threading378530 +Node: option descriptor379526 +Node: Using AutoOpts380177 +Node: local use380787 +Node: binary not installed382417 +Node: binary pre-installed382921 +Node: source pre-installed383550 +Node: source not installed384612 +Node: Presetting Options385737 +Node: loading rcfile388000 +Node: saving rcfile389706 +Node: sample rcfile390215 +Node: environrc391258 +Node: config example393170 +Node: Config File Format395035 +Node: config name/string-value396081 +Node: config integer-values398922 +Node: config nested-values399426 +Node: config directives399910 +Node: config comments401722 +Node: shell options402147 +Node: binary-parser403970 +Node: script-parser406404 +Node: AutoInfo431229 +Node: command-info432671 +Node: library-info433714 +Node: AutoMan pages434959 +Node: man1435413 +Node: man3436876 +Node: getopt_long440098 +Node: i18n442992 +Node: Naming Conflicts444405 +Node: All Attribute Names445793 +Node: Option Define Names447964 +Node: Add-Ons459407 +Node: AutoFSM460398 +Node: AutoXDR460821 +Node: AutoEvents461652 +Node: columns Invocation462908 +Node: columns usage465291 +Node: columns by-columns467908 +Node: columns col-width468349 +Node: columns columns468761 +Node: columns ending469157 +Node: columns fill469428 +Node: columns first-indent470009 +Node: columns format470813 +Node: columns indent471196 +Node: columns input471574 +Node: columns line-separation471951 +Node: columns separation472307 +Node: columns sort472654 +Node: columns spread473099 +Node: columns tab-width473467 +Node: columns width473783 +Node: columns option presets474321 +Node: columns exit status476447 +Node: columns See Also476761 +Node: getdefs Invocation476941 +Node: getdefs usage480376 +Node: getdefs agarg483684 +Node: getdefs assign484168 +Node: getdefs autogen484585 +Node: getdefs base-name485184 +Node: getdefs common-assign485797 +Node: getdefs copy486250 +Node: getdefs defs-to-get486662 +Node: getdefs filelist487077 +Node: getdefs first-index487536 +Node: getdefs input487959 +Node: getdefs linenum488681 +Node: getdefs listattr489171 +Node: getdefs ordering489998 +Node: getdefs output490618 +Node: getdefs srcfile491020 +Node: getdefs subblock491502 +Node: getdefs template492534 +Node: getdefs option presets492819 +Node: getdefs exit status494425 +Node: getdefs See Also494739 +Node: xml2ag Invocation494919 +Node: xml2ag usage497225 +Node: xml2ag base-name500818 +Node: xml2ag core501070 +Node: xml2ag define501754 +Node: xml2ag definitions502103 +Node: xml2ag equate502348 +Node: xml2ag lib-template502599 +Node: xml2ag load-functions502962 +Node: xml2ag load-scheme503375 +Node: xml2ag loop-limit503644 +Node: xml2ag make-dep503897 +Node: xml2ag no-fmemopen504255 +Node: xml2ag output504517 +Node: xml2ag override-tpl504880 +Node: xml2ag select-suffix505147 +Node: xml2ag shell505517 +Node: xml2ag show-defs505767 +Node: xml2ag skip-suffix506014 +Node: xml2ag source-time506477 +Node: xml2ag templ-dirs506741 +Node: xml2ag timeout507107 +Node: xml2ag trace507360 +Node: xml2ag trace-out508003 +Node: xml2ag undefine508252 +Node: xml2ag used-defines508616 +Node: xml2ag writable508873 +Node: xml2ag exit status509133 +Node: snprintfv509850 +Node: Future512367 +Node: Copying This Manual512706 +Node: Concept Index535247 +Node: Function Index555099  End Tag Table diff -Nru autogen-5.11.9/doc/autogen.info-1 autogen-5.12/doc/autogen.info-1 --- autogen-5.11.9/doc/autogen.info-1 2011-05-06 16:08:06.000000000 +0200 +++ autogen-5.12/doc/autogen.info-1 2011-06-26 16:41:02.000000000 +0200 @@ -1,7 +1,7 @@ This is autogen.info, produced by makeinfo version 4.13 from /old-home/bkorb/ag/ag/doc//agdoc.texi. -This manual is for GNU AutoGen version 5.11, updated May 2011. +This manual is for GNU AutoGen version 5.12, updated June 2011. Copyright (C) 1992-2011 by Bruce Korb. @@ -16,7 +16,7 @@ * AutoGen: (autogen). The Automated Program Generator END-INFO-DIR-ENTRY - This file documents GNU AutoGen Version 5.11. + This file documents GNU AutoGen Version 5.12. AutoGen copyright (C) 1992-2011 Bruce Korb AutoOpts copyright (C) 1992-2011 Bruce Korb snprintfv copyright (C) 1999-2000 Gary V. Vaughan @@ -40,7 +40,7 @@ The Automated Program Generator ******************************* -This file documents AutoGen version 5.11. It is a tool designed for +This file documents AutoGen version 5.12. It is a tool designed for generating program files that contain repetitive text with varied substitutions. This document is very long because it is intended as a reference document. For a quick start example, *Note Example Usage::. @@ -52,7 +52,7 @@ Features::. Please see the "Add-on packages for AutoGen" section for additional programs and libraries associated with AutoGen. - This edition documents version 5.11, May 2011. + This edition documents version 5.12, June 2011. * Menu: @@ -1652,7 +1652,7 @@ * SCM tpl-file:: `tpl-file' - get the template file name * SCM tpl-file-line:: `tpl-file-line' - get the template file+line number * SCM tpl-file-next-line:: `tpl-file-next-line' - get the template file plus next line number -* SCM autogen-version:: `autogen-version' - ``5.11.9'' +* SCM autogen-version:: `autogen-version' - ``5.12'' * SCM c-file-line-fmt:: format file info as, ```#line nn "file"'''  @@ -2507,7 +2507,7 @@ ------------------------------------------------- This is a symbol defining the current AutoGen version number string. -It was first defined in AutoGen-5.2.14. It is currently "5.11.9". +It was first defined in AutoGen-5.2.14. It is currently "5.12".  File: autogen.info, Node: SCM c-file-line-fmt, Prev: SCM autogen-version, Up: AutoGen Functions @@ -2556,6 +2556,7 @@ * SCM license-description:: `license-description' - Emit a license description * SCM license-full:: `license-full' - Emit the licensing information and description * SCM license-info:: `license-info' - Emit the licensing information and copyright years +* SCM license-name:: `license-name' - Emit the name of the license * SCM make-gperf:: `make-gperf' - build a perfect hash function program * SCM makefile-script:: `makefile-script' - create makefile script * SCM max:: `max' - maximum value in list @@ -2994,7 +2995,21 @@ All of these depend upon the existence of a license file named after the `license' argument with a `.lic' suffix. That file should contain -two blocks of text separated by two or more newline characters. +three blocks of text, each separated by two or more newline characters. + + The first section describes copyright attribution and the name of +the usage licence. For GNU software, this should be the text that is +to be displayed with the program version. Four text markers can be +replaced: , , and . + + The second section is a short description of the terms of the +license. This is typically the kind of text that gets displayed in the +header of source files. The third section is strictly the name of the +license without any substitution markers. Only the , and + markers are substituted. + + The third section is strictly the name of the license. No marker +substitutions are performed. Copyright (C) , all rights reserved. This is free software. It is licensed for use, @@ -3006,6 +3021,8 @@ and/or modify it under the terms of the GNU General Public License as published by the Free Software ... + the GNU General Public License, version 3 or later + Arguments: license - name of license type prog-name - name of the program under the GPL @@ -3014,7 +3031,7 @@ years - Optional - copyright years  -File: autogen.info, Node: SCM license-info, Next: SCM make-gperf, Prev: SCM license-full, Up: Common Functions +File: autogen.info, Node: SCM license-info, Next: SCM license-name, Prev: SCM license-full, Up: Common Functions 3.5.20 `license-info' - Emit the licensing information and copyright years -------------------------------------------------------------------------- @@ -3035,9 +3052,21 @@ years - Optional - copyright years  -File: autogen.info, Node: SCM make-gperf, Next: SCM makefile-script, Prev: SCM license-info, Up: Common Functions +File: autogen.info, Node: SCM license-name, Next: SCM make-gperf, Prev: SCM license-info, Up: Common Functions + +3.5.21 `license-name' - Emit the name of the license +---------------------------------------------------- + +Usage: (license-name license) +Emit a string that contains the full name of the license. + + Arguments: +license - name of license type + + +File: autogen.info, Node: SCM make-gperf, Next: SCM makefile-script, Prev: SCM license-name, Up: Common Functions -3.5.21 `make-gperf' - build a perfect hash function program +3.5.22 `make-gperf' - build a perfect hash function program ----------------------------------------------------------- Usage: (make-gperf name strings ...) @@ -3063,7 +3092,7 @@  File: autogen.info, Node: SCM makefile-script, Next: SCM max, Prev: SCM make-gperf, Up: Common Functions -3.5.22 `makefile-script' - create makefile script +3.5.23 `makefile-script' - create makefile script ------------------------------------------------- Usage: (makefile-script text) @@ -3121,7 +3150,7 @@  File: autogen.info, Node: SCM max, Next: SCM min, Prev: SCM makefile-script, Up: Common Functions -3.5.23 `max' - maximum value in list +3.5.24 `max' - maximum value in list ------------------------------------ Usage: (max list ...) @@ -3133,7 +3162,7 @@  File: autogen.info, Node: SCM min, Next: SCM prefix, Prev: SCM max, Up: Common Functions -3.5.24 `min' - minimum value in list +3.5.25 `min' - minimum value in list ------------------------------------ Usage: (min list ...) @@ -3145,7 +3174,7 @@  File: autogen.info, Node: SCM prefix, Next: SCM printf, Prev: SCM min, Up: Common Functions -3.5.25 `prefix' - prefix lines with a string +3.5.26 `prefix' - prefix lines with a string -------------------------------------------- Usage: (prefix prefix text) @@ -3165,7 +3194,7 @@  File: autogen.info, Node: SCM printf, Next: SCM raw-shell-str, Prev: SCM prefix, Up: Common Functions -3.5.26 `printf' - format to stdout +3.5.27 `printf' - format to stdout ---------------------------------- Usage: (printf format [ format-arg ... ]) @@ -3181,7 +3210,7 @@  File: autogen.info, Node: SCM raw-shell-str, Next: SCM shell, Prev: SCM printf, Up: Common Functions -3.5.27 `raw-shell-str' - single quote shell string +3.5.28 `raw-shell-str' - single quote shell string -------------------------------------------------- Usage: (raw-shell-str string) @@ -3201,7 +3230,7 @@  File: autogen.info, Node: SCM shell, Next: SCM shell-str, Prev: SCM raw-shell-str, Up: Common Functions -3.5.28 `shell' - invoke a shell script +3.5.29 `shell' - invoke a shell script -------------------------------------- Usage: (shell command) @@ -3216,7 +3245,7 @@  File: autogen.info, Node: SCM shell-str, Next: SCM shellf, Prev: SCM shell, Up: Common Functions -3.5.29 `shell-str' - double quote shell string +3.5.30 `shell-str' - double quote shell string ---------------------------------------------- Usage: (shell-str string) @@ -3279,7 +3308,7 @@  File: autogen.info, Node: SCM shellf, Next: SCM sprintf, Prev: SCM shell-str, Up: Common Functions -3.5.30 `shellf' - format a string, run shell +3.5.31 `shellf' - format a string, run shell -------------------------------------------- Usage: (shellf format [ format-arg ... ]) @@ -3293,7 +3322,7 @@  File: autogen.info, Node: SCM sprintf, Next: SCM string-capitalize, Prev: SCM shellf, Up: Common Functions -3.5.31 `sprintf' - format a string +3.5.32 `sprintf' - format a string ---------------------------------- Usage: (sprintf format [ format-arg ... ]) @@ -3306,7 +3335,7 @@  File: autogen.info, Node: SCM string-capitalize, Next: SCM string-capitalize!, Prev: SCM sprintf, Up: Common Functions -3.5.32 `string-capitalize' - capitalize a new string +3.5.33 `string-capitalize' - capitalize a new string ---------------------------------------------------- Usage: (string-capitalize str) @@ -3320,7 +3349,7 @@  File: autogen.info, Node: SCM string-capitalize!, Next: SCM *=*, Prev: SCM string-capitalize, Up: Common Functions -3.5.33 `string-capitalize!' - capitalize a string +3.5.34 `string-capitalize!' - capitalize a string ------------------------------------------------- Usage: (string-capitalize! str) @@ -3332,7 +3361,7 @@  File: autogen.info, Node: SCM *=*, Next: SCM *==*, Prev: SCM string-capitalize!, Up: Common Functions -3.5.34 `string-contains-eqv?' - caseless substring +3.5.35 `string-contains-eqv?' - caseless substring -------------------------------------------------- Usage: (*=* text match) @@ -3348,7 +3377,7 @@  File: autogen.info, Node: SCM *==*, Next: SCM string-downcase, Prev: SCM *=*, Up: Common Functions -3.5.35 `string-contains?' - substring match +3.5.36 `string-contains?' - substring match ------------------------------------------- Usage: (*==* text match) @@ -3362,7 +3391,7 @@  File: autogen.info, Node: SCM string-downcase, Next: SCM string-downcase!, Prev: SCM *==*, Up: Common Functions -3.5.36 `string-downcase' - lower case a new string +3.5.37 `string-downcase' - lower case a new string -------------------------------------------------- Usage: (string-downcase str) @@ -3375,7 +3404,7 @@  File: autogen.info, Node: SCM string-downcase!, Next: SCM *~, Prev: SCM string-downcase, Up: Common Functions -3.5.37 `string-downcase!' - make a string be lower case +3.5.38 `string-downcase!' - make a string be lower case ------------------------------------------------------- Usage: (string-downcase! str) @@ -3387,7 +3416,7 @@  File: autogen.info, Node: SCM *~, Next: SCM *~~, Prev: SCM string-downcase!, Up: Common Functions -3.5.38 `string-end-eqv-match?' - caseless regex ending +3.5.39 `string-end-eqv-match?' - caseless regex ending ------------------------------------------------------ Usage: (*~ text match) @@ -3401,7 +3430,7 @@  File: autogen.info, Node: SCM *~~, Next: SCM *=, Prev: SCM *~, Up: Common Functions -3.5.39 `string-end-match?' - regex match end +3.5.40 `string-end-match?' - regex match end -------------------------------------------- Usage: (*~~ text match) @@ -3415,7 +3444,7 @@  File: autogen.info, Node: SCM *=, Next: SCM *==, Prev: SCM *~~, Up: Common Functions -3.5.40 `string-ends-eqv?' - caseless string ending +3.5.41 `string-ends-eqv?' - caseless string ending -------------------------------------------------- Usage: (*= text match) @@ -3429,7 +3458,7 @@  File: autogen.info, Node: SCM *==, Next: SCM ==, Prev: SCM *=, Up: Common Functions -3.5.41 `string-ends-with?' - string ending +3.5.42 `string-ends-with?' - string ending ------------------------------------------ Usage: (*== text match) @@ -3443,7 +3472,7 @@  File: autogen.info, Node: SCM ==, Next: SCM ~, Prev: SCM *==, Up: Common Functions -3.5.42 `string-equals?' - string matching +3.5.43 `string-equals?' - string matching ----------------------------------------- Usage: (== text match) @@ -3456,7 +3485,7 @@  File: autogen.info, Node: SCM ~, Next: SCM =, Prev: SCM ==, Up: Common Functions -3.5.43 `string-eqv-match?' - caseless regex match +3.5.44 `string-eqv-match?' - caseless regex match ------------------------------------------------- Usage: (~ text match) @@ -3471,7 +3500,7 @@  File: autogen.info, Node: SCM =, Next: SCM *~*, Prev: SCM ~, Up: Common Functions -3.5.44 `string-eqv?' - caseless string match +3.5.45 `string-eqv?' - caseless string match -------------------------------------------- Usage: (= text match) @@ -3491,7 +3520,7 @@  File: autogen.info, Node: SCM *~*, Next: SCM *~~*, Prev: SCM =, Up: Common Functions -3.5.45 `string-has-eqv-match?' - caseless regex contains +3.5.46 `string-has-eqv-match?' - caseless regex contains -------------------------------------------------------- Usage: (*~* text match) @@ -3505,7 +3534,7 @@  File: autogen.info, Node: SCM *~~*, Next: SCM ~~, Prev: SCM *~*, Up: Common Functions -3.5.46 `string-has-match?' - contained regex match +3.5.47 `string-has-match?' - contained regex match -------------------------------------------------- Usage: (*~~* text match) @@ -3519,7 +3548,7 @@  File: autogen.info, Node: SCM ~~, Next: SCM ~*, Prev: SCM *~~*, Up: Common Functions -3.5.47 `string-match?' - regex match +3.5.48 `string-match?' - regex match ------------------------------------ Usage: (~~ text match) @@ -3533,7 +3562,7 @@  File: autogen.info, Node: SCM ~*, Next: SCM ~~*, Prev: SCM ~~, Up: Common Functions -3.5.48 `string-start-eqv-match?' - caseless regex start +3.5.49 `string-start-eqv-match?' - caseless regex start ------------------------------------------------------- Usage: (~* text match) @@ -3547,7 +3576,7 @@  File: autogen.info, Node: SCM ~~*, Next: SCM =*, Prev: SCM ~*, Up: Common Functions -3.5.49 `string-start-match?' - regex match start +3.5.50 `string-start-match?' - regex match start ------------------------------------------------ Usage: (~~* text match) @@ -3561,7 +3590,7 @@  File: autogen.info, Node: SCM =*, Next: SCM ==*, Prev: SCM ~~*, Up: Common Functions -3.5.50 `string-starts-eqv?' - caseless string start +3.5.51 `string-starts-eqv?' - caseless string start --------------------------------------------------- Usage: (=* text match) @@ -3575,7 +3604,7 @@  File: autogen.info, Node: SCM ==*, Next: SCM string-substitute, Prev: SCM =*, Up: Common Functions -3.5.51 `string-starts-with?' - string starting +3.5.52 `string-starts-with?' - string starting ---------------------------------------------- Usage: (==* text match) @@ -3588,7 +3617,7 @@  File: autogen.info, Node: SCM string-substitute, Next: SCM string-table-add-ref, Prev: SCM ==*, Up: Common Functions -3.5.52 `string-substitute' - multiple global replacements +3.5.53 `string-substitute' - multiple global replacements --------------------------------------------------------- Usage: (string-substitute source match repl) @@ -3609,7 +3638,7 @@  File: autogen.info, Node: SCM string-table-add-ref, Next: SCM string-table-new, Prev: SCM string-substitute, Up: Common Functions -3.5.53 `string-table-add-ref' - Add an entry to a string table, get reference +3.5.54 `string-table-add-ref' - Add an entry to a string table, get reference ----------------------------------------------------------------------------- Usage: (string-table-add-ref st-name str-val) @@ -3623,7 +3652,7 @@  File: autogen.info, Node: SCM string-table-new, Next: SCM string-table-size, Prev: SCM string-table-add-ref, Up: Common Functions -3.5.54 `string-table-new' - create a string table +3.5.55 `string-table-new' - create a string table ------------------------------------------------- Usage: (string-table-new st-name) @@ -3695,7 +3724,7 @@  File: autogen.info, Node: SCM string-table-size, Next: SCM string->c-name!, Prev: SCM string-table-new, Up: Common Functions -3.5.55 `string-table-size' - print the current size of a string table +3.5.56 `string-table-size' - print the current size of a string table --------------------------------------------------------------------- Usage: (string-table-size st-name) @@ -3707,7 +3736,7 @@  File: autogen.info, Node: SCM string->c-name!, Next: SCM string->camelcase, Prev: SCM string-table-size, Up: Common Functions -3.5.56 `string->c-name!' - map non-name chars to underscore +3.5.57 `string->c-name!' - map non-name chars to underscore ----------------------------------------------------------- Usage: (string->c-name! str) @@ -3721,7 +3750,7 @@  File: autogen.info, Node: SCM string->camelcase, Next: SCM string-tr, Prev: SCM string->c-name!, Up: Common Functions -3.5.57 `string->camelcase' - make a string be CamelCase +3.5.58 `string->camelcase' - make a string be CamelCase ------------------------------------------------------- Usage: (string->camelcase str) @@ -3735,7 +3764,7 @@  File: autogen.info, Node: SCM string-tr, Next: SCM string-tr!, Prev: SCM string->camelcase, Up: Common Functions -3.5.58 `string-tr' - convert characters with new result +3.5.59 `string-tr' - convert characters with new result ------------------------------------------------------- Usage: (string-tr source match translation) @@ -3750,7 +3779,7 @@  File: autogen.info, Node: SCM string-tr!, Next: SCM string-upcase, Prev: SCM string-tr, Up: Common Functions -3.5.59 `string-tr!' - convert characters +3.5.60 `string-tr!' - convert characters ---------------------------------------- Usage: (string-tr! source match translation) @@ -3769,7 +3798,7 @@  File: autogen.info, Node: SCM string-upcase, Next: SCM string-upcase!, Prev: SCM string-tr!, Up: Common Functions -3.5.60 `string-upcase' - upper case a new string +3.5.61 `string-upcase' - upper case a new string ------------------------------------------------ Usage: (string-upcase str) @@ -3782,7 +3811,7 @@  File: autogen.info, Node: SCM string-upcase!, Next: SCM sub-shell-str, Prev: SCM string-upcase, Up: Common Functions -3.5.61 `string-upcase!' - make a string be upper case +3.5.62 `string-upcase!' - make a string be upper case ----------------------------------------------------- Usage: (string-upcase! str) @@ -3794,7 +3823,7 @@  File: autogen.info, Node: SCM sub-shell-str, Next: SCM sum, Prev: SCM string-upcase!, Up: Common Functions -3.5.62 `sub-shell-str' - back quoted (sub-)shell string +3.5.63 `sub-shell-str' - back quoted (sub-)shell string ------------------------------------------------------- Usage: (sub-shell-str string) @@ -3808,7 +3837,7 @@  File: autogen.info, Node: SCM sum, Next: SCM time-string->number, Prev: SCM sub-shell-str, Up: Common Functions -3.5.63 `sum' - sum of values in list +3.5.64 `sum' - sum of values in list ------------------------------------ Usage: (sum list ...) @@ -3820,7 +3849,7 @@  File: autogen.info, Node: SCM time-string->number, Next: SCM version-compare, Prev: SCM sum, Up: Common Functions -3.5.64 `time-string->number' - duration string to seconds +3.5.65 `time-string->number' - duration string to seconds --------------------------------------------------------- Usage: (time-string->number time_spec) @@ -3836,7 +3865,7 @@  File: autogen.info, Node: SCM version-compare, Prev: SCM time-string->number, Up: Common Functions -3.5.65 `version-compare' - compare two version numbers +3.5.66 `version-compare' - compare two version numbers ------------------------------------------------------ Usage: (version-compare op v1 v2) @@ -4631,9 +4660,9 @@ * autogen used-defines:: used-defines option * autogen writable:: writable option * autogen option presets:: presetting/configuring autogen -* autogen exit codes:: autogen exit codes * autogen Description:: Description * autogen Examples:: Examples +* autogen exit status:: exit status  File: autogen.info, Node: autogen usage, Next: autogen base-name, Up: autogen Invocation @@ -4643,7 +4672,7 @@ This is the automatically generated usage text for autogen: -autogen (GNU AutoGen) - The Automated Program Generator - Ver. 5.11.9 +autogen (GNU AutoGen) - The Automated Program Generator - Ver. 5.11.10pre11 USAGE: autogen [ - [] | --[{=| }] ]... [ ] Flg Arg Option-Name Description -L Str templ-dirs Template search directory list @@ -4661,9 +4690,13 @@ -S Str load-scheme Scheme code file to load -F Str load-functions Load scheme function library -s Str skip-suffix Omit the file with this suffix + - prohibits these options: + select-suffix - may not be preset - may appear multiple times -o opt select-suffix specify this output suffix + - prohibits these options: + skip-suffix - may not be preset - may appear multiple times no source-time set mod times to latest source @@ -4738,7 +4771,7 @@ AutoGen is a tool designed for generating program files that contain repetitive text with varied substitutions. -Packaged by Bruce (2011-05-05) +Packaged by Bruce (2011-06-19) Report autogen bugs to bkorb@gnu.org  @@ -5055,6 +5088,9 @@ * may not be preset with environment variables or configuration (rc/ini) files. + * must not appear in combination with any of the following options: + select-suffix. + Occasionally, it may not be desirable to produce all of the output files specified in the template. (For example, only the `.h' header file, but not the `.c' program text.) To do this specify @@ -5234,7 +5270,7 @@ files are read-only.  -File: autogen.info, Node: autogen option presets, Next: autogen exit codes, Prev: autogen writable, Up: autogen Invocation +File: autogen.info, Node: autogen option presets, Next: autogen Description, Prev: autogen writable, Up: autogen Invocation 5.26 presetting/configuring autogen =================================== @@ -5283,10 +5319,10 @@ searching the associated name/value pair list (see: optionFindValue).  -File: autogen.info, Node: autogen exit codes, Next: autogen Description, Prev: autogen option presets, Up: autogen Invocation +File: autogen.info, Node: autogen exit status, Prev: autogen Examples, Up: autogen Invocation -5.27 autogen exit codes -======================= +5.27 autogen exit status +======================== One of the following exit values will be returned: `0' @@ -5311,48 +5347,17 @@ seg fault signal and exit with code 5.  -File: autogen.info, Node: autogen Description, Next: autogen Examples, Prev: autogen exit codes, Up: autogen Invocation +File: autogen.info, Node: autogen Description, Next: autogen Examples, Prev: autogen option presets, Up: autogen Invocation 5.28 autogen Description ======================== -`AutoGen' is designed for generating program files that contain -repetitive text with varied substitutions. The goal is to simplify the -maintenance of programs that contain large amounts of repetitious text. -This is especially valuable if there are several blocks of such text -that must be kept synchronized. - - One common example is the problem of maintaining the code required -for processing program options. Processing options requires a minimum -of four different constructs be kept in proper order in different places -in your program. You need at least: The flag character in the flag -string, code to process the flag when it is encountered, a global state -variable or two, and a line in the usage text. You will need more -things besides this if you choose to implement long option names, -configuration file processing, environment variables and so on. - - All of this can be done mechanically; with the proper templates and -this program. -  -File: autogen.info, Node: autogen Examples, Prev: autogen Description, Up: autogen Invocation +File: autogen.info, Node: autogen Examples, Next: autogen exit status, Prev: autogen Description, Up: autogen Invocation 5.29 autogen Examples ===================== -Here is how the man page is produced: - autogen -Tagman-cmd.tpl -MFman-dep -MTstamp-man opts.def - - This command produced this man page from the AutoGen option -definition file. It overrides the template specified in `opts.def' -(normally `options.tpl') and uses `agman-cmd.tpl'. It also sets the -make file dependency output to `man-dep' and the sentinel file (time -stamp file) to `man-stamp'. The base of the file name is derived from -the defined `prog-name'. - - The texi invocation document is produced via: - autogen -Tagtexi-cmd.tpl -MFtexi-dep -MTtexi-stamp opts.def -  File: autogen.info, Node: Installation, Next: AutoOpts, Prev: autogen Invocation, Up: Top @@ -5625,6 +5630,7 @@ * getopt_long:: Using getopt(3C) * i18n:: Internationalizing AutoOpts * Naming Conflicts:: Naming Conflicts +* All Attribute Names:: All Attribute Names * Option Define Names:: Option Definition Name Index  @@ -5952,7 +5958,7 @@ Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report check bugs to bkorb@gnu.org Normally, however, you would compile `checkopt.c' as in: @@ -6307,13 +6313,18 @@ interface file. `long-opts' - Presence indicates GNU-standard long option processing. If any - options do not have an option value (flag character) specified, - and least one does specify such a value, then you must specify - `long-opts'. If none of your options specify an option value - (flag character) and you do not specify `long-opts', then command - line arguments are processed in "named option mode". This means - that: + Presence indicates GNU-standard long option processing. Partial + name matches are accepted, if they are at least two characters + long and the partial match is unique. The matching is not case + sensitive, and the underscore, hyphen and carat characters are all + equivalent (they match). + + If any options do not have an option value (flag character) + specified, and least one does specify such a value, then you must + specify `long-opts'. If none of your options specify an option + value (flag character) and you do not specify `long-opts', then + command line arguments are processed in "named option mode". This + means that: * Every command line argument must be a long option. diff -Nru autogen-5.11.9/doc/autogen.info-2 autogen-5.12/doc/autogen.info-2 --- autogen-5.11.9/doc/autogen.info-2 2011-05-06 16:08:06.000000000 +0200 +++ autogen-5.12/doc/autogen.info-2 2011-06-26 16:41:02.000000000 +0200 @@ -1,7 +1,7 @@ This is autogen.info, produced by makeinfo version 4.13 from /old-home/bkorb/ag/ag/doc//agdoc.texi. -This manual is for GNU AutoGen version 5.11, updated May 2011. +This manual is for GNU AutoGen version 5.12, updated June 2011. Copyright (C) 1992-2011 by Bruce Korb. @@ -16,7 +16,7 @@ * AutoGen: (autogen). The Automated Program Generator END-INFO-DIR-ENTRY - This file documents GNU AutoGen Version 5.11. + This file documents GNU AutoGen Version 5.12. AutoGen copyright (C) 1992-2011 Bruce Korb AutoOpts copyright (C) 1992-2011 Bruce Korb snprintfv copyright (C) 1999-2000 Gary V. Vaughan @@ -363,12 +363,6 @@ "doc" attribute in order to document the usage of the option in the generated man pages. -`man-doc' - Finally, if you need to add man page sections like `SEE ALSO' or - `USAGE' or other, put that text in a `man-doc' definition. This - text will be inserted verbatim in the man page after the `OPTIONS' - section and before the `AUTHOR' section. - `option-info' This text will be inserted as a lead-in paragraph in the `OPTIONS' section of the generated man page. @@ -376,17 +370,116 @@ `doc-section' This is a compound attribute that requires three subattributes: ds-type - This describes the section type. This is for use in man - pages. + This describes the section type. Basically, the title of the + section that will be added to all output documentation. + There may be only one `doc-section' for any given `ds-type'. + If there are duplicates, the results are undefined (it might + work, it might not). + + There are five categories of `ds-type' sections. They are + those that the documentation templates would otherwise: + 1. always create itself, ignoring any `ds-type's by this + name. These are marked, below, as `ao-only'. + + 2. create, if none have been provided. These are marked, + `alternate'. + + 3. create, but augment if the `doc-section' was provided. + These are marked, `augments'. + + 4. do nothing, but inserts them into the output in a + prescribed order. These are marked, `known' + + 5. knows nothing about them. They will be alphabetized and + inserted after the list of leading sections and before + the list of trailing sections. These are not marked + because I don't know their names. + + Some of these are emitted by the documentation templates only + if certain conditions are met. If there are conditions, they + are explained below. If there are no conditions, then you + will always see the named section in the output. + + The output sections will appear in this order: + `NAME' + `ao-only'. + + `SYNOPSIS' + `alternate'. + + `DESCRIPTION' + `augments'. + + `OPTIONS' + `ao-only'. + + `OPTION PRESETS' + `ao-only', if environment presets or configuration file + processing has been specified. + + `unknown' + At this point, the unknown, alphabetized sections are + inserted. + + `IMPLEMENTATION NOTES' + `known' + + `ENVIRONMENT' + `augments', if environment presets have been specified. + + `FILES' + `augments', if configuration file processing has been + specified. + + `EXAMPLES' + `known' + + `EXIT STATUS' + `augments'. + + `ERRORS' + `known' + + `COMPATIBILITY' + `known' + + `SEE ALSO' + `known' + + `CONFORMING TO' + `known' + + `HISTORY' + `known' + + `AUTHORS' + `alternate', if the `copyright' stanza has either an + `author' or an `owner' attribute. + + `COPYRIGHT' + `alternate', if there is a `copyright' stanza. + + `BUGS' + `augments', if the `copyright' stanza has an `eaddr' + attribute. + + `NOTES' + `augments'. ds-format This describes the format of the associated `ds-text' section. - `man', `mdoc' and `texi' formats are supported. + `man', `mdoc' and `texi' formats are supported. Regardless + of the chosen format, the formatting tags in the output text + will be converted to `man' macros for `man' pages, `mdoc' + macros for `mdoc' pages, and `texi' macros for `texinfo' + pages. ds-text This is the descriptive text, written according to the rules for `ds-format' documents. + Here is an example of a "doc-section" for a "SEE ALSO" type. + doc-section = { ds-type = 'SEE ALSO'; // or anything else ds-format = 'man'; // or texi or mdoc format @@ -398,16 +491,14 @@ `prog-man-descrip' `prog-info-descrip' - These attributes are now deprecated. Please use `doc-section' - stanzas. + These attributes are now deprecated. Please use a `doc-section' + stanza with a `ds-type' attribute set to `DESCRIPTION' instead. - Then, you need to supply a brief description of what your program - does. If you already have a `detail' definition, this may be - sufficient. If not, or if you need special formatting for one of - the manual formats, then you will need either a definition for - `prog-man-descrip' or `prog-info-descrip' or both. These will be - inserted verbatim in the man page document and the info document, - respectively. +`detail' + This attribute is used to add a very short explanation about what + a program is used for when the "title" attribute is insufficient. + If there is no "doc-section" stanza of type "DESCRIPTION", then + this text is used for the man page DESCRIPTION section, too.  File: autogen.info, Node: automatic options, Next: standard options, Prev: documentation attributes, Up: Option Definitions @@ -628,14 +719,14 @@ The following option preset mechanisms are supported: - reading file $$/../share/default-test - - reading file $HOME + - reading file $HOME/.default_testrc - reading file ./.default_testrc - examining environment variables named DEFAULT_TEST_* The valid "verbose" option keywords are: silent quiet brief informative verbose or an integer from 0 through 4 - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report default_test bugs to bkorb@gnu.org  @@ -2270,267 +2361,8 @@ file. I tend to be wordy in my `doc' attributes: # getdefs sample configuration file - # getdefs copyright 1999-2011 Bruce Korb - all rights reserved - # - # getdefs is free software: you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by the - # Free Software Foundation, either version 3 of the License, or - # (at your option) any later version. - # - # getdefs is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - # See the GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License along - # with this program. If not, see . - - - # defs_to_get -- Regexp to look for after the "/*=" - # - # - # - # - # If you want definitions only from a particular category, or even - # with names matching particular patterns, then specify this regular - # expression for the text that must follow the @code{/*=}. - # Example: - # - #defs_to_get reg-ex - - # ordering -- Alphabetize or use named file - # - # - # - # - # By default, ordering is alphabetical by the entry name. Use, - # @code{no-ordering} if order is unimportant. Use @code{ordering} - # with no argument to order without case sensitivity. Use - # @code{ordering=} if chronological order is important. - # getdefs will maintain the text content of @code{file-name}. - # @code{file-name} need not exist. - # Example: - # - #ordering file-name - - # first_index -- The first index to apply to groups - # - # This configuration value takes an integer number as its argument. - # - # - # By default, the first occurrence of a named definition will have an - # index of zero. Sometimes, that needs to be a reserved value. Provide - # this option to specify a different starting point. - # Example: - # - #first_index 0 - - # input -- Input file to search for defs - # - # - # - # - # All files that are to be searched for definitions must be named on - # the command line or read from @code{stdin}. If there is only one - # @code{input} option and it is the string, "-", then the input file - # list is read from @code{stdin}. If a command line argument is not - # an option name and does not contain an assignment operator - # (@code{=}), then it defaults to being an input file name. - # At least one input file must be specified. - # Example: - # - #input src-file - - # subblock -- subblock definition names - # - # - # - # - # This option is used to create shorthand entries for nested definitions. - # For example, with: - # @table @r - # @item using subblock thus - # @code{--subblock=arg=argname,type,null} - # @item and defining an @code{arg} thus - # @code{arg: this, char *} - # @item will then expand to: - # @code{arg = @{ argname = this; type = "char *"; @};} - # @end table - # The "this, char *" string is separated at the commas, with the - # white space removed. You may use characters other than commas by - # starting the value string with a punctuation character other than - # a single or double quote character. You may also omit intermediate - # values by placing the commas next to each other with no intervening - # white space. For example, "+mumble++yes+" will expand to: - # @* - # @code{arg = @{ argname = mumble; null = "yes"; @};}. - # Example: - # - #subblock sub-def - - # listattr -- attribute with list of values - # - # - # - # - # This option is used to create shorthand entries for definitions - # that generally appear several times. That is, they tend to be - # a list of values. For example, with: - # @* - # @code{listattr=foo} defined, the text: - # @* - # @code{foo: this, is, a, multi-list} will then expand to: - # @* - # @code{foo = 'this', 'is', 'a', 'multi-list';} - # @* - # The texts are separated by the commas, with the - # white space removed. You may use characters other than commas by - # starting the value string with a punctuation character other than - # a single or double quote character. - # Example: - # - #listattr def - - # filelist -- Insert source file names into defs - # - # - # - # - # Inserts the name of each input file into the output definitions. - # If no argument is supplied, the format will be: - # @example - # infile = '%s'; - # @end example - # If an argument is supplied, that string will be used for the entry - # name instead of @var{infile}. - # Example: - # - #filelist file - - # assign -- Global assignments - # + ## This source file is copyrighted and licensed under the following terms: # - # - # - # The argument to each copy of this option will be inserted into - # the output definitions, with only a semicolon attached. - # Example: - # - #assign ag-def - - # common_assign -- Assignments common to all blocks - # - # - # - # - # The argument to each copy of this option will be inserted into - # each output definition, with only a semicolon attached. - # Example: - # - #common_assign ag-def - - # copy -- File(s) to copy into definitions - # - # - # - # - # The content of each file named by these options will be inserted into - # the output definitions. - # Example: - # - #copy file - - # srcfile -- Insert source file name into each def - # - # - # - # - # Inserts the name of the input file where a definition was found - # into the output definition. - # If no argument is supplied, the format will be: - # @example - # srcfile = '%s'; - # @end example - # If an argument is supplied, that string will be used for the entry - # name instead of @var{srcfile}. - # Example: - # - #srcfile file - - # linenum -- Insert source line number into each def - # - # - # - # - # Inserts the line number in the input file where a definition - # was found into the output definition. - # If no argument is supplied, the format will be: - # @example - # linenum = '%s'; - # @end example - # If an argument is supplied, that string will be used for the entry - # name instead of @var{linenum}. - # Example: - # - #linenum def-name - - # output -- Output file to open - # - # - # - # - # If you are not sending the output to an AutoGen process, - # you may name an output file instead. - # Example: - # - #output file - - # autogen -- Invoke AutoGen with defs - # - # - # - # - # This is the default output mode. Specifying @code{no-autogen} is - # equivalent to @code{output=-}. If you supply an argument to this - # option, that program will be started as if it were AutoGen and - # its standard in will be set to the output definitions of this program. - # Example: - # - #autogen ag-cmd - - # template -- Template Name - # - # - # - # - # Specifies the template name to be used for generating the final output. - # Example: - # - #template file - - # agarg -- AutoGen Argument - # - # - # - # - # This is a pass-through argument. It allows you to specify any - # arbitrary argument to be passed to AutoGen. - # Example: - # - #agarg ag-opt - - # base_name -- Base name for output file(s) - # - # - # - # - # When output is going to AutoGen, a base name must either be supplied - # or derived. If this option is not supplied, then it is taken from - # the @code{template} option. If that is not provided either, then - # it is set to the base name of the current directory. - # Example: - # - #base_name name  File: autogen.info, Node: environrc, Next: config example, Prev: sample rcfile, Up: Presetting Options @@ -2928,7 +2760,7 @@ The following option preset mechanisms are supported: - reading file errorsRC - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report test_errors bugs to bkorb@gnu.org Using the invocation, @@ -2979,7 +2811,7 @@ If the script file already exists and contains Automated Option Processing text, the second line of the file through the ending tag will be replaced by the newly generated text. The first ``#!'' line will be regenerated. - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report genshellopt bugs to bkorb@gnu.org = = = = = = = = @@ -3018,17 +2850,17 @@ If no ``input'' argument is provided or is set to simply "-", and if ``stdin'' is not a ``tty'', then the list of input files will be read from ``stdin''. - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report getdefs bugs to bkorb@gnu.org Resulting in the following script: #! /bin/sh # # # # # # # # # # -- do not modify this marker -- # - # DO NOT EDIT THIS SECTION OF /old-home/bkorb/ag/ag/doc/ag-texi-22573.d/.ag-5X85ql/genshellopt.sh + # DO NOT EDIT THIS SECTION OF /old-home/bkorb/ag/ag/doc/ag-texi-16698.d/.ag-xCnGsY/genshellopt.sh # # From here to the next `-- do not modify this marker --', - # the text has been generated Friday May 6, 2011 at 07:08:05 AM PDT + # the text has been generated Sunday June 26, 2011 at 07:41:01 AM PDT # From the GETDEFS option definitions # GETDEFS_LONGUSAGE_TEXT='getdefs (GNU AutoGen) - AutoGen Definition Extraction Tool - Ver. 1.5 @@ -3100,7 +2932,7 @@ This program extracts AutoGen definitions from a list of source files. Definitions are delimited by ``/*= \n'\'''\'' and ``=*/\n'\'''\''. - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report getdefs bugs to bkorb@gnu.org' GETDEFS_USAGE_TEXT='getdefs (GNU AutoGen) - AutoGen Definition Extraction Tool - Ver. 1.5 @@ -3134,7 +2966,7 @@ If no ``input'\'''\'' argument is provided or is set to simply "-", and if ``stdin'\'''\'' is not a ``tty'\'''\'', then the list of input files will be read from ``stdin'\'''\''. - Packaged by Bruce (2011-05-06) + Packaged by Bruce (2011-06-26) Report getdefs bugs to bkorb@gnu.org' @@ -3989,7 +3821,7 @@ `_()' preprocessing macro.  -File: autogen.info, Node: Naming Conflicts, Next: Option Define Names, Prev: i18n, Up: AutoOpts +File: autogen.info, Node: Naming Conflicts, Next: All Attribute Names, Prev: i18n, Up: AutoOpts 7.17 Naming Conflicts ===================== @@ -4016,9 +3848,63 @@ emitted code will also `#undef'-ine the conflicting name.  -File: autogen.info, Node: Option Define Names, Prev: Naming Conflicts, Up: AutoOpts +File: autogen.info, Node: All Attribute Names, Next: Option Define Names, Prev: Naming Conflicts, Up: AutoOpts + +7.18 All Attribute Names +======================== + +This is the list of all the option attributes used in the various +option processing templates. There are several flavors of attributes, +and these are not distinguished here. + + * Valid, current attributes that you are encouraged to use. + + * Internally generated attributes that you cannot use at all. I + need to prefix these with a distinguished prefix. e.g. "ao-" + + * Valid attributes, but are deprecated. Alternates should be + documented. + + This list is derived by running many example option definitions +through the option generation and man page templates and noting which +attributes are actually used. There may be a few that are used but not +exercised in my testing. If so, I need to ferret those out and test +them, too. + + aliases allow-errors arg-default + arg-optional arg-range arg-type + argument call-proc code + config-header copyright default + deprecated descrip detail + disable documentation eaddr + enable enabled environrc + equivalence exit-name explain + export extract-code field + file-fail-code flag flag-code + flag-proc flags-cant flags-must + full-usage gnu-usage guard-option-names + help-value homerc ifdef + ifndef immed-disable immediate + include lib-name library + long-opts main main-text + main-type max min + more-help-value must-set name + no-command no-libopts no-misuse-usage + no-preset no-xlate nomem-fail-code + omitted-usage package prefix + prefix-enum preserve-case prog-name + prog-title reorder-args resettable + scaled settable short-usage + stack-arg std-value test-main + translators unstack-arg usage + usage-message usage-opt usage-type + val-name val-upname value + version + + +File: autogen.info, Node: Option Define Names, Prev: All Attribute Names, Up: AutoOpts -7.18 Option Definition Name Index +7.19 Option Definition Name Index ================================= [index] @@ -4049,6 +3935,8 @@ (line 6) * deprecated: Common Attributes. (line 29) * descrip: Required Attributes. (line 36) +* detail <1>: documentation attributes. + (line 164) * detail: information attributes. (line 42) * disable: Common Attributes. (line 34) @@ -4057,7 +3945,7 @@ * doc: documentation attributes. (line 18) * doc-section: documentation attributes. - (line 43) + (line 37) * documentation <1>: opt-attr documentation. (line 11) * documentation: lib and program. (line 17) @@ -4112,8 +4000,6 @@ * main-fini: main for-each. (line 123) * main-init: main for-each. (line 119) * main-type: Generated main. (line 12) -* man-doc: documentation attributes. - (line 33) * max: Common Attributes. (line 14) * min: Common Attributes. (line 20) * more-help-value: automatic options. (line 15) @@ -4126,12 +4012,12 @@ * no-misuse-usage: usage attributes. (line 46) * no-preset: opt-attr no-preset. (line 6) * no-xlate: presentation attributes. - (line 33) + (line 38) * omitted-usage: Common Attributes. (line 49) * open-file: arg-type file name. (line 23) * option-code: main main. (line 7) * option-info: documentation attributes. - (line 39) + (line 33) * opts-ptr: information attributes. (line 63) * owner: information attributes. @@ -4147,19 +4033,19 @@ (line 63) * prog-group: usage attributes. (line 54) * prog-info-descrip: documentation attributes. - (line 67) + (line 160) * prog-man-descrip: documentation attributes. - (line 67) + (line 160) * prog-name: program attributes. (line 15) * prog-title: program attributes. (line 19) * rcfile: config attributes. (line 51) * reorder-args <1>: information attributes. (line 93) * reorder-args: presentation attributes. - (line 47) + (line 52) * reset-value: automatic options. (line 15) * resettable: presentation attributes. - (line 64) + (line 69) * save-opts-value: automatic options. (line 19) * scaled: arg-type number. (line 15) * settable: opt-attr settable. (line 6) @@ -4317,8 +4203,8 @@ * columns tab-width:: tab-width option * columns width:: width option (-W) * columns option presets:: presetting/configuring columns -* columns exit codes:: columns exit codes * columns See Also:: See Also +* columns exit status:: exit status  File: autogen.info, Node: columns usage, Next: columns by-columns, Up: columns Invocation @@ -4375,7 +4261,7 @@ - reading file ./.columnsrc - reading file $HOME/.columnsrc - examining environment variables named COLUMNS_* -Packaged by Bruce (2011-05-06) +Packaged by Bruce (2011-06-26) Report columns bugs to bkorb@gnu.org  @@ -4560,7 +4446,7 @@ of output.  -File: autogen.info, Node: columns option presets, Next: columns exit codes, Prev: columns width, Up: columns Invocation +File: autogen.info, Node: columns option presets, Next: columns See Also, Prev: columns width, Up: columns Invocation 8.4.17 presetting/configuring columns ------------------------------------- @@ -4609,10 +4495,10 @@ searching the associated name/value pair list (see: optionFindValue).  -File: autogen.info, Node: columns exit codes, Next: columns See Also, Prev: columns option presets, Up: columns Invocation +File: autogen.info, Node: columns exit status, Prev: columns See Also, Up: columns Invocation -8.4.18 columns exit codes -------------------------- +8.4.18 columns exit status +-------------------------- One of the following exit values will be returned: `0' @@ -4622,14 +4508,11 @@ The operation failed or the command syntax was not valid.  -File: autogen.info, Node: columns See Also, Prev: columns exit codes, Up: columns Invocation +File: autogen.info, Node: columns See Also, Next: columns exit status, Prev: columns option presets, Up: columns Invocation 8.4.19 columns See Also ----------------------- -This program is documented more fully in the Columns section of the -Add-On chapter in the `AutoGen' Info system documentation. -  File: autogen.info, Node: getdefs Invocation, Next: xml2ag Invocation, Prev: columns Invocation, Up: Add-Ons @@ -4720,8 +4603,8 @@ * getdefs subblock:: subblock option * getdefs template:: template option * getdefs option presets:: presetting/configuring getdefs -* getdefs exit codes:: getdefs exit codes * getdefs See Also:: See Also +* getdefs exit status:: exit status  File: autogen.info, Node: getdefs usage, Next: getdefs agarg, Up: getdefs Invocation @@ -4800,7 +4683,7 @@ This program extracts AutoGen definitions from a list of source files. Definitions are delimited by ``/*= \n'' and ``=*/\n''. -Packaged by Bruce (2011-05-06) +Packaged by Bruce (2011-06-26) Report getdefs bugs to bkorb@gnu.org  @@ -5068,7 +4951,7 @@ used for generating the final output.  -File: autogen.info, Node: getdefs option presets, Next: getdefs exit codes, Prev: getdefs template, Up: getdefs Invocation +File: autogen.info, Node: getdefs option presets, Next: getdefs See Also, Prev: getdefs template, Up: getdefs Invocation 8.5.19 presetting/configuring getdefs ------------------------------------- @@ -5106,10 +4989,10 @@ searching the associated name/value pair list (see: optionFindValue).  -File: autogen.info, Node: getdefs exit codes, Next: getdefs See Also, Prev: getdefs option presets, Up: getdefs Invocation +File: autogen.info, Node: getdefs exit status, Prev: getdefs See Also, Up: getdefs Invocation -8.5.20 getdefs exit codes -------------------------- +8.5.20 getdefs exit status +-------------------------- One of the following exit values will be returned: `0' @@ -5119,14 +5002,11 @@ The operation failed or the command syntax was not valid.  -File: autogen.info, Node: getdefs See Also, Prev: getdefs exit codes, Up: getdefs Invocation +File: autogen.info, Node: getdefs See Also, Next: getdefs exit status, Prev: getdefs option presets, Up: getdefs Invocation 8.5.21 getdefs See Also ----------------------- -This program is documented more fully in the Getdefs section of the -Add-On chapter in the `AutoGen' Info system documentation. -  File: autogen.info, Node: xml2ag Invocation, Next: snprintfv, Prev: getdefs Invocation, Up: Add-Ons @@ -5175,7 +5055,7 @@ * xml2ag undefine:: undefine option (-U) * xml2ag used-defines:: used-defines option * xml2ag writable:: writable option -* xml2ag exit codes:: xml2ag exit codes +* xml2ag exit status:: exit status  File: autogen.info, Node: xml2ag usage, Next: xml2ag base-name, Up: xml2ag Invocation @@ -5185,7 +5065,7 @@ This is the automatically generated usage text for xml2ag: -xml2ag (GNU AutoGen) - XML to AutoGen Definiton Converter - Ver. 5.11.9 +xml2ag (GNU AutoGen) - XML to AutoGen Definiton Converter - Ver. 5.12 USAGE: xml2ag [ - [] | --[{=| }] ]... [ ] Flg Arg Option-Name Description -O Str output Output file in lieu of AutoGen processing @@ -5199,6 +5079,8 @@ -S Str load-scheme Scheme code file to load -F Str load-functions Load scheme function library -s Str skip-suffix Omit the file with this suffix + - prohibits these options: + select-suffix - may appear multiple times -o opt select-suffix specify this output suffix - may appear multiple times @@ -5247,7 +5129,7 @@ The ``base-name'' for the output will similarly be either: * the ``--base-name'' command line option * the base name of the .xml file -Packaged by Bruce (2011-05-06) +Packaged by Bruce (2011-06-26) Report xml2ag bugs to bkorb@gnu.org  @@ -5436,6 +5318,9 @@ This option has some usage constraints. It: * may appear an unlimited number of times. + * must not appear in combination with any of the following options: + select-suffix. + Pass-through AutoGen argument  @@ -5521,7 +5406,7 @@ argument  -File: autogen.info, Node: xml2ag writable, Next: xml2ag exit codes, Prev: xml2ag used-defines, Up: xml2ag Invocation +File: autogen.info, Node: xml2ag writable, Next: xml2ag exit status, Prev: xml2ag used-defines, Up: xml2ag Invocation 8.6.26 writable option ---------------------- @@ -5530,10 +5415,10 @@ AutoGen argument  -File: autogen.info, Node: xml2ag exit codes, Prev: xml2ag writable, Up: xml2ag Invocation +File: autogen.info, Node: xml2ag exit status, Prev: xml2ag writable, Up: xml2ag Invocation -8.6.27 xml2ag exit codes ------------------------- +8.6.27 xml2ag exit status +------------------------- One of the following exit values will be returned: `0' @@ -6449,6 +6334,7 @@ (line 6) * license-full: SCM license-full. (line 6) * license-info: SCM license-info. (line 6) +* license-name: SCM license-name. (line 6) * low-lim: SCM low-lim. (line 6) * make-gperf: SCM make-gperf. (line 6) * make-header-guard: SCM make-header-guard. (line 6) diff -Nru autogen-5.11.9/doc/autogen-texi.txt autogen-5.12/doc/autogen-texi.txt --- autogen-5.11.9/doc/autogen-texi.txt 2011-05-02 21:25:32.000000000 +0200 +++ autogen-5.12/doc/autogen-texi.txt 2011-06-25 22:36:35.000000000 +0200 @@ -1248,6 +1248,7 @@ * getopt_long:: Using getopt(3C) * i18n:: Internationalizing AutoOpts * Naming Conflicts:: Naming Conflicts +* All Attribute Names:: All Attribute Names * Option Define Names:: Option Definition Name Index @end menu @@ -1974,12 +1975,16 @@ @item long-opts @vindex long-opts @cindex named option mode -Presence indicates GNU-standard long option processing. If any options -do not have an option value (flag character) specified, and least one -does specify such a value, then you must specify @code{long-opts}. If -none of your options specify an option value (flag character) and you do -not specify @code{long-opts}, then command line arguments are processed -in "named option mode". This means that: +Presence indicates GNU-standard long option processing. Partial name +matches are accepted, if they are at least two characters long and the +partial match is unique. The matching is not case sensitive, and the +underscore, hyphen and carat characters are all equivalent (they match). + +If any options do not have an option value (flag character) specified, +and least one does specify such a value, then you must specify +@code{long-opts}. If none of your options specify an option value +(flag character) and you do not specify @code{long-opts}, then command +line arguments are processed in "named option mode". This means that: @itemize @bullet @item @@ -3505,13 +3510,6 @@ the usage text. All other options should have the ``doc'' attribute in order to document the usage of the option in the generated man pages. -@item man-doc -@vindex man-doc -Finally, if you need to add man page sections like @code{SEE ALSO} or -@code{USAGE} or other, put that text in a @code{man-doc} definition. This -text will be inserted verbatim in the man page after the @code{OPTIONS} -section and before the @code{AUTHOR} section. - @item option-info @vindex option-info This text will be inserted as a lead-in paragraph in the @code{OPTIONS} @@ -3522,15 +3520,98 @@ This is a compound attribute that requires three @i{sub}attributes: @table @i @item ds-type -This describes the section type. This is for use in man pages. +This describes the section type. Basically, the title of the section +that will be added to all output documentation. There may be only one +@code{doc-section} for any given @code{ds-type}. If there are duplicates, +the results are undefined (it might work, it might not). + +There are five categories of @code{ds-type} sections. +They are those that the documentation templates would otherwise: +@enumerate +@item +always create itself, ignoring any @code{ds-type}s by this name. +These are marked, below, as @code{ao-only}. +@item +create, if none have been provided. +These are marked, @code{alternate}. +@item +create, but augment if the @code{doc-section} was provided. +These are marked, @code{augments}. +@item +do nothing, but inserts them into the output in a prescribed order. +These are marked, @code{known} +@item +knows nothing about them. They will be alphabetized and inserted +after the list of leading sections and before the list of trailing +sections. These are not marked because I don't know their names. +@end enumerate + +Some of these are emitted by the documentation templates only if +certain conditions are met. If there are conditions, they are +explained below. If there are no conditions, then you will always +see the named section in the output. + +The output sections will appear in this order: +@table @samp +@item NAME +@code{ao-only}. +@item SYNOPSIS +@code{alternate}. +@item DESCRIPTION +@code{augments}. +@item OPTIONS +@code{ao-only}. +@item OPTION PRESETS +@code{ao-only}, if environment presets or configuration file processing +has been specified. +@item unknown +At this point, the unknown, alphabetized sections are inserted. +@item IMPLEMENTATION NOTES +@code{known} +@item ENVIRONMENT +@code{augments}, if environment presets have been specified. +@item FILES +@code{augments}, if configuration file processing has been specified. +@item EXAMPLES +@code{known} +@item EXIT STATUS +@code{augments}. +@item ERRORS +@code{known} +@item COMPATIBILITY +@code{known} +@item SEE ALSO +@code{known} +@item CONFORMING TO +@code{known} +@item HISTORY +@code{known} +@item AUTHORS +@code{alternate}, if the @code{copyright} stanza has either +an @code{author} or an @code{owner} attribute. +@item COPYRIGHT +@code{alternate}, if there is a @code{copyright} stanza. +@item BUGS +@code{augments}, if the @code{copyright} stanza has an +@code{eaddr} attribute. +@item NOTES +@code{augments}. +@end table + @item ds-format This describes the format of the associated @code{ds-text} section. @code{man}, @code{mdoc} and @code{texi} formats are supported. +Regardless of the chosen format, the formatting tags in the output +text will be converted to @code{man} macros for @code{man} pages, +@code{mdoc} macros for @code{mdoc} pages, and @code{texi} macros for +@code{texinfo} pages. @item ds-text This is the descriptive text, written according to the rules for @code{ds-format} documents. @end table +Here is an example of a ``doc-section'' for a ``SEE ALSO'' type. + @example doc-section = @{ ds-type = 'SEE ALSO'; // or anything else @@ -3546,14 +3627,16 @@ @itemx prog-info-descrip @vindex prog-man-descrip @vindex prog-info-descrip -These attributes are now deprecated. Please use @code{doc-section} stanzas. +These attributes are now deprecated. +Please use a @code{doc-section} stanza with a @code{ds-type} +attribute set to @code{DESCRIPTION} instead. -Then, you need to supply a brief description of what your program does. -If you already have a @code{detail} definition, this may be sufficient. -If not, or if you need special formatting for one of the manual formats, -then you will need either a definition for @code{prog-man-descrip} or -@code{prog-info-descrip} or both. These will be inserted verbatim -in the man page document and the info document, respectively. +@item detail +@vindex detail +This attribute is used to add a very short explanation about what +a program is used for when the ``title'' attribute is insufficient. +If there is no ``doc-section'' stanza of type ``DESCRIPTION'', then +this text is used for the man page DESCRIPTION section, too. @end table @node automatic options @@ -5398,6 +5481,60 @@ (@pxref{program attributes}). That emitted code will also @code{#undef}-ine the conflicting name. +@node All Attribute Names +@section All Attribute Names + +This is the list of all the option attributes used in the various +option processing templates. There are several flavors of attributes, +and these are not distinguished here. + +@itemize @bullet +@item +Valid, current attributes that you are encouraged to use. +@item +Internally generated attributes that you cannot use at all. +I need to prefix these with a distinguished prefix. e.g. ``ao-'' +@item +Valid attributes, but are deprecated. Alternates should be documented. +@end itemize + +This list is derived by running many example option definitions through the +option generation and man page templates and noting which attributes are +actually used. There may be a few that are used but not exercised in my +testing. If so, I need to ferret those out and test them, too. + +@example +aliases allow-errors arg-default +arg-optional arg-range arg-type +argument call-proc code +config-header copyright default +deprecated descrip detail +disable documentation eaddr +enable enabled environrc +equivalence exit-name explain +export extract-code field +file-fail-code flag flag-code +flag-proc flags-cant flags-must +full-usage gnu-usage guard-option-names +help-value homerc ifdef +ifndef immed-disable immediate +include lib-name library +long-opts main main-text +main-type max min +more-help-value must-set name +no-command no-libopts no-misuse-usage +no-preset no-xlate nomem-fail-code +omitted-usage package prefix +prefix-enum preserve-case prog-name +prog-title reorder-args resettable +scaled settable short-usage +stack-arg std-value test-main +translators unstack-arg usage +usage-message usage-opt usage-type +val-name val-upname value +version +@end example + @node Option Define Names @section Option Definition Name Index @printindex vr diff -Nru autogen-5.11.9/doc/auto-opts.tpl autogen-5.12/doc/auto-opts.tpl --- autogen-5.11.9/doc/auto-opts.tpl 2011-03-26 03:38:34.000000000 +0100 +++ autogen-5.12/doc/auto-opts.tpl 2011-06-03 23:36:26.000000000 +0200 @@ -200,16 +200,16 @@ @example [= (out-push-new) \=] set -x -log_file=${HOME}/default-test-log.txt +log_file=${tmp_dir}/ao-doc-log exec 7>&2 ; exec 2>> ${log_file} - TOPDIR=`cd ${top_builddir} >/dev/null ; pwd` OPTDIR=${TOPDIR}/autoopts { cd ${tmp_dir} + chmod 666 *.def echo 'config-header = "config.h";' >> default-test.def - HOME='' run_ag default-test.def + HOME=${tmp_dir} run_ag default-test.def test -f default-test.c || die 'NO default-test.c PROGRAM' opts="-o default-test -DTEST_DEFAULT_TEST_OPTS ${INCLUDES}" @@ -218,9 +218,13 @@ test -x ./default-test || die 'NO default-test EXECUTABLE' } >&2 -test $? -eq 0 || die "Check log file ${log_file}" +test $? -eq 0 || { + printf '\n\ncannot build default test\n' + cat $log_file + die "cannot build AutoOpts doc" +} 2>&7 1>&7 -HOME='$HOME/.default_testrc' ${tmp_dir}/default-test --help | \ +HOME=${tmp_dir} ${tmp_dir}/default-test --help | \ sed 's, , ,g;s,\([@{}]\),@\1,g' exec 2>&7 7>&- diff -Nru autogen-5.11.9/doc/Makefile.am autogen-5.12/doc/Makefile.am --- autogen-5.11.9/doc/Makefile.am 2011-05-04 02:40:57.000000000 +0200 +++ autogen-5.12/doc/Makefile.am 2011-05-28 18:36:47.000000000 +0200 @@ -59,6 +59,6 @@ gnudocs : $(srcdir)/gendocs_template agdoc.texi title=`sed -n 's/^@title *//p' agdoc.texi` ; \ opts='--texi2html' ; \ - $(SHELL) $(srcdir)/gendocs.sh $$opts autogen "$$title" + $(POSIX_SHELL) $(srcdir)/gendocs.sh $$opts autogen "$$title" # doc/Makefile.am ends here diff -Nru autogen-5.11.9/doc/Makefile.in autogen-5.12/doc/Makefile.in --- autogen-5.11.9/doc/Makefile.in 2011-05-06 16:06:57.000000000 +0200 +++ autogen-5.12/doc/Makefile.in 2011-06-26 16:39:56.000000000 +0200 @@ -713,7 +713,7 @@ gnudocs : $(srcdir)/gendocs_template agdoc.texi title=`sed -n 's/^@title *//p' agdoc.texi` ; \ opts='--texi2html' ; \ - $(SHELL) $(srcdir)/gendocs.sh $$opts autogen "$$title" + $(POSIX_SHELL) $(srcdir)/gendocs.sh $$opts autogen "$$title" # doc/Makefile.am ends here diff -Nru autogen-5.11.9/getdefs/proto.h autogen-5.12/getdefs/proto.h --- autogen-5.11.9/getdefs/proto.h 2011-05-06 16:06:59.000000000 +0200 +++ autogen-5.12/getdefs/proto.h 2011-06-26 16:39:59.000000000 +0200 @@ -1,7 +1,7 @@ /* -*- buffer-read-only: t -*- vi: set ro: * * Prototypes for getdefs - * Generated Fri May 6 07:06:59 PDT 2011 + * Generated Sun Jun 26 07:39:59 PDT 2011 */ #ifndef GETDEFS_PROTO_H_GUARD #define GETDEFS_PROTO_H_GUARD 1 diff -Nru autogen-5.11.9/NEWS autogen-5.12/NEWS --- autogen-5.11.9/NEWS 2011-05-06 16:06:37.000000000 +0200 +++ autogen-5.12/NEWS 2011-06-26 16:39:36.000000000 +0200 @@ -1,4 +1,17 @@ -New in 5.11.9 - May 2011 +New in 5.12 - June 2011 + +* man page templates have been regularized so it is now easier to + use doc-section stanzas in the option definition files. + +* The Guile interface glue layer has dropped Guile version 1.4 and + has coelesced around pre-1.7 vs. 1.7-and-later interfaces, yielding + only two forms for each interface. + +* text_mmap() was hardened. + +* The new licensing scheme is now used in the distributed templates. + +New in 5.11.9 May 2011 * licenses have been moved to separate files. They are no longer hard coded in autogen. Consequently, clients may add their own. diff -Nru autogen-5.11.9/pkg/debian/autogen.doc-base autogen-5.12/pkg/debian/autogen.doc-base --- autogen-5.11.9/pkg/debian/autogen.doc-base 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/autogen.doc-base 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -Document: autogen -Title: AutoGen - The Automated Program Generator -Author: Bruce Korb -Abstract: AutoGen is a tool designed for generating program files that - contain repetitive text with varied substitutions. Its goal is to simplify - the maintenance of programs that contain large amounts of repetitious text. - This is especially valuable if there are several blocks of such text that must - be kept synchronized. A common example where this would be useful is in - creating and maintaining the code required for processing program options. -Section: Apps/Programming - -Format: postscript -Files: /usr/share/doc/autogen/autogen.ps.gz - -Format: HTML -Index: /usr/share/doc/autogen/html/autogen.html -Files: /usr/share/doc/autogen/html/* - diff -Nru autogen-5.11.9/pkg/debian/autogen.docs autogen-5.12/pkg/debian/autogen.docs --- autogen-5.11.9/pkg/debian/autogen.docs 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/autogen.docs 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -doc/autogen.ps -doc/html diff -Nru autogen-5.11.9/pkg/debian/autogen.examples autogen-5.12/pkg/debian/autogen.examples --- autogen-5.11.9/pkg/debian/autogen.examples 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/autogen.examples 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -debian/main.c -debian/Makefile -debian/checkopt.def diff -Nru autogen-5.11.9/pkg/debian/autogen.files autogen-5.12/pkg/debian/autogen.files --- autogen-5.11.9/pkg/debian/autogen.files 2011-02-22 19:30:17.000000000 +0100 +++ autogen-5.12/pkg/debian/autogen.files 1970-01-01 01:00:00.000000000 +0100 @@ -1,31 +0,0 @@ -usr/lib/pkgconfig/autoopts.pc -usr/share/info/autogen.info* -usr/share/aclocal/autoopts.m4 -usr/share/autogen/aginfo.tpl -usr/share/autogen/aginfo3.tpl -usr/share/autogen/agman-lib.tpl -usr/share/autogen/agman-cmd.tpl -usr/share/autogen/agman3.tpl -usr/share/autogen/conftest.tpl -usr/share/autogen/confmacs.tpl -usr/share/autogen/getopt.tpl -usr/share/autogen/optcode.tpl -usr/share/autogen/opthead.tpl -usr/share/autogen/options.tpl -usr/share/autogen/optlib.tpl -usr/share/autogen/optmain.tpl -usr/share/autogen/rc-sample.tpl -usr/share/autogen/stdoptions.def -usr/share/autogen/fsm.tpl -usr/share/autogen/fsm-macro.tlib -usr/share/autogen/fsm-trans.tlib -usr/share/man/man1/autogen.1 -usr/share/man/man1/getdefs.1 -usr/share/man/man1/columns.1 -usr/share/man/man1/xml2ag.1 -usr/share/man/man1/autoopts-config.1 -usr/bin/autoopts-config -usr/bin/autogen -usr/bin/getdefs -usr/bin/columns -usr/bin/xml2ag diff -Nru autogen-5.11.9/pkg/debian/autogen.info autogen-5.12/pkg/debian/autogen.info --- autogen-5.11.9/pkg/debian/autogen.info 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/autogen.info 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -doc/autogen.info* diff -Nru autogen-5.11.9/pkg/debian/autogen.manpages autogen-5.12/pkg/debian/autogen.manpages --- autogen-5.11.9/pkg/debian/autogen.manpages 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/autogen.manpages 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -agen5/autogen.1 -getdefs/getdefs.1 -columns/columns.1 -autoopts/autoopts-config.1 diff -Nru autogen-5.11.9/pkg/debian/changelog autogen-5.12/pkg/debian/changelog --- autogen-5.11.9/pkg/debian/changelog 2011-05-06 16:06:39.000000000 +0200 +++ autogen-5.12/pkg/debian/changelog 1970-01-01 01:00:00.000000000 +0100 @@ -1,655 +0,0 @@ -autogen (1:5.11.9-1) experimental; urgency=low - - * New release. - * licenses have been moved to separate files. They are no longer - hard coded in autogen. Consequently, clients may add their own. - * BASH-ism fix. - - - -- Bruce Korb Fri, 06 May 2011 07:06:39 -0700 - -autogen (1:5.9.1-0) experimental; urgency=low - - * getopt.tpl template is fixed to not require the internal header - autoopts/autoopts.h. - * MAXPATHLEN will use _MAX_PATH on Windows platforms - * new libopts configuration option: --disable-optional-args This will #define - NO_OPTIONAL_OPT_ARGS in config.h and cause the built library to ignore the - OPTST_ARG_OPTIONAL bit in an option descriptor. autoopts generated code - compiled with NO_OPTIONAL_OPT_ARGS #defined will never have that bit set in - the option descriptors either. If libopts has been so configured, then the - installed options.h header will contain: #define NO_OPTIONAL_OPT_ARGS 1 so - that client code will generally be compiled with that flag set. - The OPTST_ARG_OPTIONAL bit is ignored regardless. - * Fixed up --load-opts environment variable processing. You can - now correctly suppress config file loading with either: - PROGRAM_LOAD_OPTS=no - PROGRAM=--no-load-opts - * added new auto-supported option, --usage. It is incorporated - by specifying ``usage-opt;'' in the option definitions file. - * libopts now uses several exit codes from sysexits.h: - EX_NOINPUT (66) - a specified config file cannot be found - EX_SOFTWARE (70) - libopts error - please file a bug report - EX_CONFIG (78) - a NULL option descriptor was passed in - user bug - - -- Bruce Korb Sat, 5 May 2007 12:00:00 -0800 - -autogen (1:5.9-0) experimental; urgency=low - - * remove gperf dependency. It is not necessary for build. - - -- Bruce Korb Sun, 11 Mar 2007 09:15:00 -0800 - -autogen (1:5.8.9-2) experimental; urgency=low - - * Decrement AO_AGE, closes: #409056. - - -- Matt Kraai Sat, 3 Feb 2007 08:22:50 -0800 - -autogen (1:5.8.9-1) experimental; urgency=low - - * New release. - - -- Matt Kraai Wed, 31 Jan 2007 06:27:15 -0800 - -autogen (1:5.8.8-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Tue, 19 Dec 2006 00:04:12 -0800 - -autogen (1:5.8.7-2) unstable; urgency=low - - * Remove an extra backslash in error.test. - * Ignore "Aborted" messages in error.test, closes: #373666. - - -- Matt Kraai Tue, 19 Dec 2006 00:03:34 -0800 - -autogen (1:5.8.7-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Sun, 3 Dec 2006 09:47:30 -0800 - -autogen (1:5.8.3-2) unstable; urgency=low - - * Fix the MIPS test failures, closes: #357990. - - -- Matt Kraai Wed, 22 Mar 2006 15:31:28 -0800 - -autogen (1:5.8.3-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Sat, 4 Feb 2006 07:57:44 -0800 - -autogen (1:5.8.2-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Wed, 1 Feb 2006 18:54:54 -0800 - -autogen (1:5.8.1-4) unstable; urgency=low - - * Add one to pMI->txt_size before passing it to mmap (closes: - Bug#340851). - - -- Matt Kraai Tue, 31 Jan 2006 18:45:05 -0800 - -autogen (1:5.8.1-3) unstable; urgency=low - - * Change the timeout in gperf.test to 30 seconds to allow enough time on - m68k. - * Add MAP_PRIVATE to a call to mmap. - * Change some occurrences of ' to ` in getdefs/opts.def, thanks to - Nicolas François (closes: Bug#349823). - - -- Matt Kraai Wed, 25 Jan 2006 22:49:14 -0800 - -autogen (1:5.8.1-2) unstable; urgency=low - - * Change the Standards-Version to 3.6.2. - - -- Matt Kraai Tue, 24 Jan 2006 20:54:54 -0800 - -autogen (1:5.8.1-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Fri, 13 Jan 2006 14:46:53 -0800 - -autogen (1:5.7.3+5.8.1pre4-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Fri, 6 Jan 2006 08:55:33 -0800 - -autogen (1:5.7.3+5.8pre6-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Sun, 27 Nov 2005 08:14:55 -0800 - -autogen (1:5.7.3+5.7.4pre2-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Tue, 25 Oct 2005 08:46:29 -0700 - -autogen (1:5.7.3-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Mon, 10 Oct 2005 14:23:21 -0700 - -autogen (1:5.7.2+5.7.3-pre3-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Mon, 5 Sep 2005 22:11:08 -0700 - -autogen (1:5.7.2+5.7.3-pre1-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Mon, 29 Aug 2005 16:20:27 -0700 - -autogen (1:5.7.2-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Thu, 28 Jul 2005 22:34:12 -0700 - -autogen (1:5.7-5) unstable; urgency=low - - * Define PATH_MAX if it isn't defined, thanks to Michael Banck (closes: - #319911). - - -- Matt Kraai Tue, 26 Jul 2005 10:12:33 -0700 - -autogen (1:5.7-4) unstable; urgency=low - - * Remove the build-dependency on procps (closes: #315387). - - -- Matt Kraai Thu, 23 Jun 2005 08:32:33 -0700 - -autogen (1:5.7-3) unstable; urgency=low - - * Include /usr/share/autogen/agman-lib.tpl, - /usr/share/autogen/getopt.tpl, and /usr/share/autogen/rc-sample.tpl in - autogen. - - -- Matt Kraai Thu, 9 Jun 2005 13:24:31 -0700 - -autogen (1:5.7-2) unstable; urgency=low - - * Remove debugging commands. - * Make libopts25 and libopts25-dev conflict with and replace libopts9 - and libopts9-dev, respectively (closes: #308218). - - -- Matt Kraai Sun, 8 May 2005 18:56:33 -0700 - -autogen (1:5.7-1) unstable; urgency=low - - * New release. - * Change libopts9 and libopts9-dev to libopts25 and libopts25-dev, - respectively. - - -- Matt Kraai Thu, 28 Apr 2005 09:13:02 -0700 - -autogen (1:5.6.6+5.6.7pre3-2) experimental; urgency=low - - * Build-depend on gperf and procps. - * Run the test suite. - - -- Matt Kraai Mon, 14 Feb 2005 16:09:59 -0800 - -autogen (1:5.6.6+5.6.7pre3-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Mon, 14 Feb 2005 15:13:59 -0800 - -autogen (1:5.6.6-2) unstable; urgency=low - - * Include autogen.info-1 and autogen.info-2, thanks to Sheplyakov Alexei - (closes: #298898). - - -- Matt Kraai Fri, 11 Mar 2005 06:28:03 -0800 - -autogen (1:5.6.6-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Sun, 6 Feb 2005 14:41:40 -0800 - -autogen (1:5.6.5+5.6.6pre5-1) experimental; urgency=low - - * New prerelease. - * Move /usr/include/options.h to /usr/include/autogen/options.h. - * Include /usr/include/autogen/usage-txt.h in libopts9-dev. - - -- Matt Kraai Mon, 31 Jan 2005 15:03:01 -0800 - -autogen (1:5.6.5-1) unstable; urgency=low - - * New release. - - -- Matt Kraai Sun, 2 Jan 2005 09:44:46 -0800 - -autogen (1:5.6.4+5.6.5pre9-1) experimental; urgency=low - - * New prerelease. - * Include autoopts.pc in the autogen package. - * Revise the descriptions of libopts9 and libopts9-dev. - - -- Matt Kraai Mon, 20 Dec 2004 15:17:29 -0800 - -autogen (1:5.6.4+5.6.5pre8-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Mon, 13 Dec 2004 12:47:20 -0800 - -autogen (1:5.6.4+5.6.5pre7-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Wed, 24 Nov 2004 12:36:31 -0800 - -autogen (1:5.6.4+5.6.5pre5-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Fri, 19 Nov 2004 15:29:13 -0800 - -autogen (1:5.6.4+5.6.5pre4-1) experimental; urgency=low - - * New prerelease. - - -- Matt Kraai Tue, 16 Nov 2004 11:31:48 -0800 - -autogen (1:5.6.4+5.6.5pre2-1) experimental; urgency=low - - * New prerelease. - * Use ${CLexe} instead of columns in directive.tpl. - - -- Matt Kraai Wed, 10 Nov 2004 10:10:59 -0800 - -autogen (1:5.6.4-1) unstable; urgency=low - - * New release. - * Remove the build-dependency on automake1.8 | automake. - * Add a build-dependency on autotools-dev. - - -- Matt Kraai Sun, 24 Oct 2004 17:16:18 -0700 - -autogen (1:5.6.2+5.6.3pre11-1) experimental; urgency=low - - * New upstream prerelease. - - -- Matt Kraai Fri, 15 Oct 2004 02:56:49 -0700 - -autogen (1:5.6.2+5.6.3pre9-1) experimental; urgency=low - - * New upstream prerelease. - - -- Matt Kraai Mon, 11 Oct 2004 21:24:18 -0700 - -autogen (1:5.6.2+5.6.3pre8-1) experimental; urgency=low - - * New upstream prerelease. - - -- Matt Kraai Thu, 07 Oct 2004 14:10:48 -0700 - -autogen (1:5.6.2+5.6.3pre7-1) experimental; urgency=low - - * New upstream prerelease. - - -- Matt Kraai Sun, 03 Oct 2004 15:21:27 -0700 - -autogen (1:5.6.2+5.6.3pre6-1) experimental; urgency=low - - * New upstream prerelease. - * Update the copyright file. - - -- Matt Kraai Mon, 27 Sep 2004 11:16:34 -0700 - -autogen (1:5.6.2-1) unstable; urgency=low - - * New upstream release (closes: #252522). - * New maintainer (closes: #266458). - * Change the build-dependency on automake1.4 | automake to automake1.8. - - -- Matt Kraai Wed, 15 Sep 2004 08:24:31 -0700 - -autogen (1:5.5.5-3) unstable; urgency=high - - * QA Upload - * Set maintainer to QA Group - - Acknowledge NMUs (Closes: #216646, #221356) - * Apply patch by Bruce Korb to - fix FTBFS (Closes: #264346) - - -- Frank Lichtenheld Thu, 19 Aug 2004 18:08:54 +0200 - -autogen (1:5.5.5-2.2) unstable; urgency=low - - * NMU during BSP. - * Undefined symbols in libopts9 fixed (closes: #220064). - Thanks to Jurij Smakov for the patch. - - -- Sebastian Muszynski Sun, 21 Mar 2004 16:47:56 +0100 - -autogen (1:5.5.5-2.1) unstable; urgency=low - - * NMU. - * Fix guile build dependency (closes: #216646). - - -- Matthias Klose Mon, 17 Nov 2003 22:19:49 +0100 - -autogen (1:5.5.5-2) unstable; urgency=low - - * fix override disparity - - -- Luca Filipozzi Sat, 14 Jun 2003 10:42:21 -0700 - -autogen (1:5.5.5-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sat, 14 Jun 2003 10:09:16 -0700 - -autogen (1:5.5.4-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Mon, 19 May 2003 21:37:02 -0700 - -autogen (1:5.5.3-2) unstable; urgency=low - - * fix override disparity - - -- Luca Filipozzi Sun, 16 Mar 2003 21:47:08 -0800 - -autogen (1:5.5.3-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sun, 16 Mar 2003 20:15:14 -0800 - -autogen (1:5.5.2-1) unstable; urgency=low - - * New upstream release - * FTBFS problem fixed by upstream author (Closes: Bug#174317) - - -- Luca Filipozzi Mon, 24 Feb 2003 19:32:07 -0800 - -autogen (1:5.4.8a-1) unstable; urgency=low - - * New upstream release - * upstream author posted an advisory on December 29th, 2002 stating that - the 5.5.x series should not be used under any circumstances... therefore - epoch is incremented to permit uploading of 5.4.8a - - -- Luca Filipozzi Sat, 4 Jan 2003 21:29:24 -0800 - -autogen (5.5-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Tue, 24 Dec 2002 20:14:18 -0800 - -autogen (5.4.6-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sun, 13 Oct 2002 14:15:39 -0700 - -autogen (5.4.5-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sat, 12 Oct 2002 13:26:31 -0700 - -autogen (5.4.4-1) unstable; urgency=low - - * New upstream release - * includes fix that allows it to be compiled by gcc-3.x (closes: #161837) - - -- Luca Filipozzi Sat, 28 Sep 2002 18:21:41 -0700 - -autogen (5.4.3-1) unstable; urgency=low - - * New upstream release (go figure) - - -- Luca Filipozzi Sat, 21 Sep 2002 16:53:14 -0700 - -autogen (5.4.2-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sat, 21 Sep 2002 14:18:19 -0700 - -autogen (5.3.9-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Fri, 12 Jul 2002 22:05:43 -0700 - -autogen (5.3.7-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sun, 2 Jun 2002 17:20:07 -0700 - -autogen (5.3.5-1) unstable; urgency=low - - * New upstream release - * debian/watch: uses uscan version 2 syntax - * debian/rules: added hack to touch getdefs/gen-stamp getdefs/opts-stamp - and columns/gen-stamp to prevent auto-regeneration of - distributed opts.c and opts.h files (Closes: Bug#142040) - - -- Luca Filipozzi Sat, 13 Apr 2002 11:05:35 -0700 - -autogen (5.3.3-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sat, 23 Mar 2002 15:49:16 -0800 - -autogen (5.3.2-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sat, 23 Feb 2002 23:57:48 -0800 - -autogen (5.3.1-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Sun, 17 Feb 2002 12:23:57 -0800 - -autogen (5.2.13-1) unstable; urgency=low - - * New upstream release (Closes: Bug#127081) - - -- Luca Filipozzi Mon, 31 Dec 2001 11:15:18 -0800 - -autogen (5.2.12-2) unstable; urgency=low - - * modified debian/control to create new binary package: libopts9-dev - noting that autogen depends on libopts9-dev - and that libopts9-dev depends on libopts9 (>=${Source-Version}) - we see that autogen depends on libopts9 (>=${Source-Version}) - (Closes: Bug#126396) - - -- Luca Filipozzi Wed, 26 Dec 2001 15:14:17 -0800 - -autogen (5.2.12-1) unstable; urgency=low - - * New upstream release - - -- Luca Filipozzi Wed, 19 Dec 2001 12:15:56 -0800 - -autogen (5.2.10-3) unstable; urgency=low - - * created debian/autogen.info (Closes: Bug#117674) - - -- Luca Filipozzi Mon, 5 Nov 2001 18:08:13 -0800 - -autogen (5.2.10-2) unstable; urgency=low - - * New Maintainer (well, it's still me, just fixed my name in debian/control) - - -- Luca Filipozzi Wed, 24 Oct 2001 16:06:25 -0700 - -autogen (5.2.10-1) unstable; urgency=low - - * New upstream release - * debian/control required a "Replaces: autogen" because libopts9 now - contains files previously in autogen (Closes: Bug#111195) - - -- Luca Filipozzi Tue, 23 Oct 2001 14:06:10 -0700 - -autogen (5.2.8-1) unstable; urgency=low - - * New Maintainer - * New upstream release (Closes: #106657, #42525) - * Completely reworked the debian/* files - * Installs autoopts-config for use in Makefile(s) - - -- Luca Filipozzi Sun, 12 Aug 2001 11:42:31 -0700 - -autogen (5.2.7-3) unstable; urgency=low - - * build-depend on libguile-dev vice libguile9-dev, link against - libguile9 rather than libguile6 (closes:bug#107592,bug#108004,bug#107914) - - -- James R. Van Zandt Fri, 10 Aug 2001 19:42:20 -0400 - -autogen (5.2.7-2) unstable; urgency=low - - * build-depend on tetex-bin and libguile9-dev (vice libguile6-dev) - (closes:bug#107267,bug#107280,bug#107592) - - -- James R. Van Zandt Sat, 4 Aug 2001 18:30:29 -0400 - -autogen (5.2.7-1) unstable; urgency=low - - * New upstream release (closes:bug#99470,bug#100599) - * debian/control: move Build-Depends line to source section - (closes:bug#104303), update to policy version 3.2.1, rename libopts3 - to libopts9. - * debian/control: build-depends on texinfo - * debian/rules: honor DEB_BUILD_OPTIONS. Install .info files. - * README.example, checkopt.def: update per example in autoopt.texi file - * debian/libopts9.postinst: call ldconfig - * Makefile.am: move $(GUILE_INC) to the end of the include directory - search path, so local files are found before those that may have been - installed in the same directory as guile, fix courtesy of Alexandre - Duret-Lutz (closes:bug#101666) - * upstream package now has recent config.guess and config.sub files - (closes:bug#96608) - * new maintainer email - - -- James R. Van Zandt Sat, 28 Jul 2001 13:33:33 -0400 - -autogen (5.1.4-1) unstable; urgency=low - - * New upstream release - * Build-Depends: libguile6-dev - * update URL in watch file - * update URL in copyright file - - -- James R. Van Zandt Sat, 17 Mar 2001 15:13:54 -0500 - -autogen (4.5.11-4) unstable; urgency=low - - * Build-Depends: debhelper (Closes:Bug#70222) - * libopts3.postinst: eliminate extra "exit 0" (Thanks to Gordon Sadler - Closes:Bug#74130) - - -- James R. Van Zandt Sun, 8 Oct 2000 21:33:34 -0400 - -autogen (4.5.11-3) unstable; urgency=low - - * install autogen.info (closes:Bug#69044) - - -- James R. Van Zandt Mon, 14 Aug 2000 21:21:45 -0400 - -autogen (4.5.11-2) unstable; urgency=low - - * update policy to 3.1.1 - * in copyright file, don't refer to former directory - * upload everything, since the package unaccountably disappeared from - unstable (closes:Bug#60308) - - -- James R. Van Zandt Sat, 4 Mar 2000 09:26:38 -0500 - -autogen (4.5.11-1) unstable; urgency=low - - * New upstream release - - -- James R. Van Zandt Mon, 8 Nov 1999 20:01:37 -0500 - -autogen (4.5.10-1) unstable; urgency=low - - * New upstream release - * Supply shlibs.local so autogen package declares its dependency on - libopts3. - - -- James R. Van Zandt Thu, 21 Oct 1999 20:10:56 -0400 - -autogen (4.5.8-1) unstable; urgency=low - - * New upstream release - - -- James R. Van Zandt Mon, 27 Sep 1999 17:10:43 -0400 - -autogen (4.5.6-2) unstable; urgency=low - - * Link against glibc2.1 - * update to FHS - * update GPL reference in copyright file - - -- James R. Van Zandt Sat, 4 Sep 1999 13:39:19 -0400 - -autogen (4.5.6-1) unstable; urgency=low - - * New upstream release - - -- James R. Van Zandt Sat, 21 Aug 1999 18:15:29 -0400 - -autogen (4.5.4-3) unstable; urgency=low - - * Actually revise description (Closes: Bug#42144). - - -- James R. Van Zandt Sat, 7 Aug 1999 14:45:47 -0400 - -autogen (4.5.4-2) unstable; urgency=low - - * Revise description (Closes: Bug#42144). - * In rules, add `-f' flag so that `rm snprintfv/snprintfv.h' does not fail - gratuitously (Closes: Bug#42070) - * In /usr/share/aclocal/autoopts.m4, put AC_LANG_* calls around the - AC_TRY_* calls, so that the C compiler is used no matter what language - mode the configure script is in when the macro(s) are called. - (Closes: Bug#42525) - - -- James R. Van Zandt Sat, 7 Aug 1999 08:26:46 -0400 - -autogen (4.5.4-1) unstable; urgency=low - - * New upstream release - - -- James R. Van Zandt Sun, 27 Jun 1999 21:35:03 -0400 - -autogen (4.5.3-1) unstable; urgency=low - - * Initial Release. - - -- James R. Van Zandt Fri, 18 Jun 1999 22:09:00 -0400 - - diff -Nru autogen-5.11.9/pkg/debian/checkopt.def autogen-5.12/pkg/debian/checkopt.def --- autogen-5.11.9/pkg/debian/checkopt.def 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/checkopt.def 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -AutoGen Definitions options; -prog_name = check; -prog_title = "Checkout Automated Options"; -long_opts; - -flag = { - name = check_dirs; - value = L; /* flag style option character */ - arg_type = string; /* option argument indication */ - max = NOLIMIT; /* occurrance limit (none) */ - stack_arg; /* save opt args in a stack */ - descrip = "Checkout directory list"; -}; - -flag = { - name = show_defs; - descrip = "Show the definition tree"; - name = show_defs; - descrip = "Show the definition tree"; - disable = dont; /* mark as enable/disable type */ - /* option. Disable as `dont-' */ -}; diff -Nru autogen-5.11.9/pkg/debian/control autogen-5.12/pkg/debian/control --- autogen-5.11.9/pkg/debian/control 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/control 1970-01-01 01:00:00.000000000 +0100 @@ -1,47 +0,0 @@ -Source: autogen -Section: devel -Priority: optional -Maintainer: Matt Kraai -Build-Depends: autotools-dev, debhelper (>=4), gperf, guile-1.6-dev | libguile-dev, libxml2-dev, texinfo, tetex-bin, texi2html -Standards-Version: 3.7.2 - -Package: autogen -Architecture: any -Depends: ${shlibs:Depends}, libopts25-dev (>=${Source-Version}) -Description: an automated text file generator - AutoGen is a tool designed for generating program files that contain - repetitive text with varied substitutions. This is especially - valuable if there are several blocks of such text that must be kept - synchronized. - . - Included with AutoGen is a tool that virtually eliminates the hassle - of processing options, keeping usage text up to date and so on. This - tool allows you to specify several program attributes, innumerable - options and option attributes, then it produces all the code necessary - to parse and handle the command line and initialization file options. - . - This package contains the development tools. libopts25-dev contains the static - libraries and header files. libopts25 contains the shared libraries. - -Package: libopts25 -Architecture: any -Depends: ${shlibs:Depends} -Conflicts: libopts9 -Replaces: autogen, libopts9 -Section: libs -Description: automated option processing library based on autogen - runtime - This package contains the shared libraries needed by binaries that - use autoopts for option processing. The package containing the - header files and static libraries is libopts25-dev. The package - containing the development tools is autogen. - -Package: libopts25-dev -Architecture: any -Depends: libopts25 (>=${Source-Version}) -Conflicts: libopts9-dev -Replaces: autogen, libopts9-dev -Section: libdevel -Description: automated option processing library based on autogen - development - This package contains the header files and static libraries used by - autoopts. The package containing the shared libraries is libopts25. - The package containing the development tools is autogen. diff -Nru autogen-5.11.9/pkg/debian/libopts25-dev.files autogen-5.12/pkg/debian/libopts25-dev.files --- autogen-5.11.9/pkg/debian/libopts25-dev.files 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/libopts25-dev.files 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -usr/lib/libopts.a -usr/lib/libopts.la -usr/lib/libopts.so -usr/lib/libguileopts.a -usr/lib/libguileopts.la -usr/lib/libguileopts.so -usr/include/autoopts/options.h -usr/include/autoopts/usage-txt.h -usr/share/man/man3/optionFree.3 -usr/share/man/man3/optionLoadLine.3 -usr/share/man/man3/optionProcess.3 -usr/share/man/man3/optionRestore.3 -usr/share/man/man3/optionSaveFile.3 -usr/share/man/man3/optionSaveState.3 -usr/share/man/man3/optionVersion.3 diff -Nru autogen-5.11.9/pkg/debian/libopts25.files autogen-5.12/pkg/debian/libopts25.files --- autogen-5.11.9/pkg/debian/libopts25.files 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/libopts25.files 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -usr/lib/libopts.so.* -usr/lib/libguileopts.so.* diff -Nru autogen-5.11.9/pkg/debian/main.c autogen-5.12/pkg/debian/main.c --- autogen-5.11.9/pkg/debian/main.c 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/main.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -#include "checkopt.h" - -main( int argc, char** argv ) -{ - { - int optct = optionProcess( &checkOptions, argc, argv ); - argc -= optct; - argv += optct; - } - if (ENABLED_OPT( SHOW_DEFS )) { - int dirct = STACKCT_OPT( CHECK_DIRS ); - char** dirs = STACKLST_OPT( CHECK_DIRS ); - while (dirct-- > 0) { - char* dir = *dirs++; - /* - ... - */ - } - } -} diff -Nru autogen-5.11.9/pkg/debian/Makefile autogen-5.12/pkg/debian/Makefile --- autogen-5.11.9/pkg/debian/Makefile 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/pkg/debian/Makefile 1970-01-01 01:00:00.000000000 +0100 @@ -1,46 +0,0 @@ - -## This file is part of AutoGen. -## AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved -## -## AutoGen is free software: you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## AutoGen is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -## See the GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License along -## with this program. If not, see . -# -# use autoopts-config to determine -# 1) the locatation autogen (autoopts-config --autogen) -# 2) the data dir for autogen (autoopts-config --pkgdatadir) -# 3) the include dir for autogen (autoopts-config --cflags) -# 4) the lib dir for autogen (autoopts-config --libs) - -AUTOGEN_PROGRAM=$(shell autoopts-config --autogen) -AUTOGEN_DATADIR=$(shell autoopts-config --pkgdatadir) -AUTOGEN_FLAGS=-L$(AUTOGEN_DATADIR) - -AUTOGEN_CFLAGS=$(shell autoopts-config --cflags) -AUTOGEN_LDFLAGS=$(shell autoopts-config --libs) - -CFLAGS+=$(AUTOGEN_CFLAGS) -DTEST_CHECK_OPTS -LDFLAGS+=$(AUTOGEN_LDFLAGS) - -.PHONY: build -build: main - -.PHONY: clean -clean: - rm -f *.o main checkopt.c checkopt.h - -main: checkopt.c main.c -checkopt.c checkopt.h: checkopt.def - -# additional rules -%.c: %.def - $(AUTOGEN_PROGRAM) $(AUTOGEN_FLAGS) $^ diff -Nru autogen-5.11.9/pkg/debian/README.Debian autogen-5.12/pkg/debian/README.Debian --- autogen-5.11.9/pkg/debian/README.Debian 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/README.Debian 1970-01-01 01:00:00.000000000 +0100 @@ -1,281 +0,0 @@ - -autoopts for Debian ----------------------- - - Here is a feature comparison of AutoOpts and several other command - line parser generators. All except argtable and argp share certain - characteristics: - * They read a file that describes the program options and produce - code to parse command line options. Each has their own format for - describing options. - * All versions support both short options (flags) and GNU-type long - options. clig, however, is unique in that you must choose one or - the other. Either way, clig options are introduced with a single - hyphen. The other packages identify long options with doubled - hyphens. - * They produce tailored code for parsing the command line. - * They support the C programming language. - * The global option state is stored in a global structure. - * They produce usage text. - - argtable and argp create the option parsing information by calling - functions and initializing data structures, respectively. - - The 9 parsers compared are: - 1. AutoOpts is a component of AutoGen. AutoGen has many capabilities, - but here we concentrate on the portion called AutoOpts. AutoOpts - is the most general of these programs, and has the most extensive - documentation. It is the only one that supports shell and Scheme - scripts as well as C programs. - 2. clig can generate either C or Tcl option parsing code. It can also - process multiple arguments per single option. - 3. genparse generates a wrapper around ``getopt_long()'' to parse the - command line options. - 4. gaa supports option input from a configuration file as well as the - command line. NOTE HOWEVER: gaa is not maintained. - 5. gengetopt generates a C function that uses ``getopt_long()'' - function to parse the command line options, to validate them and - fills a struct. - 6. opt is a subroutine library. Options are specified by calling a - registration routine in the library, instead of using a separate - option specification file. Global option state is stored in - variables passed by address to the registration routine. It has - some strange syntax for its own options: '@' says to read a config - file, '$' says to go into interactive mode. - 7. argtable is a little different from the others in that the - argument descriptor is built up dynamically with run time calls to - various constructor routines. There are eight argument descriptor - types (structure types) and three constructors for each type, plus - an ``end'' function. - Developers will need to incorporate the library into their - distribution. - 8. wyg uses flex and bison to generate a configuration file parser, - but uses getopt_long to parse the command line options. - 9. argp is a tiny step above ``getopts_long(3GNU)''. It handles - looping over the command line arguments, but does not handle the - individual options. It calls a hand crafted callback function that - must do a ``switch'' on the option key (flag character). The - needed information is conveyed to the ``argp_parse'' function via - a hand crafted complex data structure. - - If a feature is present (or absent) in only one or two - implementations, then the "yes" or "no" is emphasised. - - Comparative Analysis of 29 Differentiating Features - Feature \ Parser # 1 2 3 4 5 6 7 8 9 - shell script app YES no no no no no no no no - Scheme app YES no no no no no no no no - Perl app no no no no no YES no no no - config file input yes no no yes yes yes no yes no - config file output YES no no no no YES no no no - config file library YES no no no no no no no no - embedded options YES no no no no no no no no - environment input YES no no no no YES no no no - immediate handling YES no no no no no no no no - callback functions yes NO yes yes yes yes yes NO NO - getopt-long yes no yes no yes no yes yes no - multiple occurrence yes yes no no yes no yes no yes - option arg types [1] 4 5 5 11 [3] 8 4 [1] - enumeration opts YES no no no no no no no no - set membership opts YES no no no no no no no no - optional argument YES YES no no no no no no YES - standard opts YES no no no no no no no no - library options YES no no no no no no no YES - range checks YES YES YES no no no no no no - consistency checks YES no no no no no no no no - interactive no no no no no YES no no no - reset/restart YES no no no no no no no no - reordering yes no yes no yes no yes yes no - main procedure YES no no no no no no no no - man page YES YES no no no no no no no - texinfo invoking YES no no no no no no no no - i18n support YES no no no no no no no no - developer depends Guile tcl none none none none none bison none - flex - user dependencies [2] none none none none none none none none - - shell script app - This parser will either produce a shell script to parse - options, a program that emits digested information as a list of - environment variable assignments, or both. AutoOpts will - produce both. - - Scheme app - For the Guile variation on scheme, AutoOpts will insert the - results of parsing initialization files, environment variables - and command line options into Guile/Scheme variables. - - Perl app - This particular parser is primarily designed for Perl - applications. - - config file input - Option settings can be obtained from one or more configuration - files. - - config file output - By specifying the "--save-opts" option, the option processing - state will be saved to either a named file, or to the last - named search place (highest priority initialization file). - - config file library - A separately callable interface is provided so programs may use - the config file parser code without having to also use the - option processing code. - - embedded options - Option settings can be obtained from program input files. When - they are encountered, the text can be passed to a function that - will parse it and adjust the current option settings. - - environment input - Option settings can be obtained from environment variables. - - immediate handling - Sometimes it is necessary to handle options out of order. For - example, a command line option used to bypass initialization - files must be processed before processing initialization files. - Since command line options override initialization files, the - initialization files must be handled first. Option parsers that - have this "immediate handling" capability can process marked - options early. - - callback functions - A means is provided for calling a user-supplied function when a - particular option is encountered. - - getopt-long - Some developers are willing to forego some of the features of - AutoOpts in order to not have to futz with carrying a copy of - libopts with their project. AutoOpts can now generate an option - processing loop that uses getopt_long(3GNU) to parse the - options. Several other parsers require the library in order to - use it. - - multiple occurrence - options may appear multiple times on the command line. Some of - the parsers constrain options to appearing once only. - - option arg types - Some parsers have special treatment coded in for different - types of option arguments. "getopt", for example, treats them - all as strings. Others have a restricted list of handling - methods. (Converting integers to their binary values, for - example.) AutoOpts supports several, and also makes it easy to - roll your own via an integrated callback procedures. - - enumeration opts - A numeric value is specified by name. The values are set with - an enumeration. - - set membership opts - A set of bits are turned on, turned off and tested by name. - - optional argument - refers to the argument to an option. POSIX and most command - line parsers require an option to either not have an argument - or else the argument must be supplied on the command line. - GNU's getopt_long and some of these parsers support the notion - of letting the option argument be "optional". - - standard opts - are pre-defined options that can be trivially incorporated into - a user's set of options. They can also thereby be used for - standardizing on the flag character and option name. This can - also be viewed as a template for implementing project specific - standard options. - - library options - Is there a means for handling options for library code without - having to manually incorporate them into a program's option - processing code? This is often handled by invoking additional - parsers for unknown options. AutoOpt-ed programs calling - AutoOpt-ed libraries may combine their option information - automatically, yielding a very consistent ``look and feel''. - AutoOpt-ed programs and libraries may work with such code by - not error-failing on unknown options and instead performing the - necessary actions when such options are encountered. ``argp'' - code only works with libraries that support argp argument - handling functions. - - range checks - These parsers will (optionally) validate that integer option - arguments have a value that lies within a specified range. Some - (e.g. AutoOpts) will allow for multiple ranges. - - consistency checks - verify that conflicting options do not appear together, and - options that require other options are allowed only if those - other options are present. - - interactive - means that the option processing package is able to - interactively query the user for option state. - - reset/restart - means that you can save your current (possibly initial) - processing state and reprocess options. In this fashion, a - daemon process could reload its initialization (config) files. - - reordering - Some traditional programs also require intermixed command line - options and operands. AutoOpts can move all the command options - to the beginning of the argument list and process them. NB: - "reordering" is implemented by getopt_long(3GNU), so it is - automatically incorporated into parsers that use that library - function. - - main procedure - AutoOpts will produce any of several main procedures, including - versions for supporting shell scripts, Guile-based utilities, - mains that operate on either operand lists or lists read from - stdin, or even customized main procedures. - - man page - The utility will take the argument description and produce a - usable "command and utility" man page. - - texinfo invoking - The utility will take the argument description and produce a - usable "invoking" chapter or section for texinfo documentation. - - i18n support - By compiling your code with ENABLE_NLS defined, you will enable - a translation function generated into your code. By providing - translations of the strings found in the distributed header - file, ${prefix}/include/usage-txt.h, AutoOpts error messages - and usage text will be translated before processing begins. - - developer dependencies - An application developer that uses the parsing tool must have - the named tool(s) at his disposal. - - user dependencies - A user must either have the referenced C library installed, or - else the developer must ship a copy of the library with his - application. - - [1] Option argument handling is programmable. Several kinds of - argument attributes may be specified. See the list of features, Option - Argument Specification. - - [2] There is a user-visible dependency iff the developer does a - dynamic link to the libopts.so library. Developers are free to ship - libopts with their product in either source or binary form. See the - AutoOpts page for details on the open-source licensing options. - - A Debian package would need only a dependency on the package supplying - libopts (libopts-27, at present). - - [3] opt supports a different argument type for each fundamental type, - plus booleans, inverted booleans, toggling options and a couple - others. - - Also note that some of these parsers depend upon the GNU - getopt_long(3GNU) function. Those that do need to remember that it is - under the GNU LGPL license. Developers using the AutoOpts command line - parsing system may choose to use either the included libopts library - or getopt_long(3GNU) as the parsing engine. - - -- James R. Van Zandt - -- Bruce Korb diff -Nru autogen-5.11.9/pkg/debian/rules autogen-5.12/pkg/debian/rules --- autogen-5.11.9/pkg/debian/rules 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/rules 1970-01-01 01:00:00.000000000 +0100 @@ -1,83 +0,0 @@ -#!/usr/bin/make -f - -#export DH_VERBOSE=1 -export DH_OPTIONS= - -CONFIGUREFLAGS=$(if $(findstring debug,$(DEB_BUILD_OPTIONS)),--enable-debug,) -CFLAGS=$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),-O0,-O2) -export CFLAGS - -configure: configure-stamp -configure-stamp: - dh_testdir - ./configure $(CONFIGUREFLAGS) \ - --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info - touch $@ - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - $(MAKE) - $(MAKE) check - $(MAKE) -C doc autogen.ps info - ( cd doc ; \ - test ! -d html || rm -rf html ; \ - texi2html -split=chapter -subdir=html autogen.texi ; \ - test -d html || { mkdir html ; \ - set -- *.html ; test ! -f $${1} || mv $$* html/. ; } \ - ) - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f install-stamp build-stamp configure-stamp - rm -f snprintfv/snprintfv.h - rm -Rf doc/html - find -name '*.tar.gz' | xargs rm -f - -$(MAKE) distclean - dh_clean - for f in `find -name config.sub` ; do \ - cp -f /usr/share/misc/config.sub $$f ; \ - done - for f in `find -name config.guess` ; do \ - cp -f /usr/share/misc/config.guess $$f ;\ - done - -install: build -install: install-stamp -install-stamp: - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr - find . -type f | grep 'tar.gz' | xargs rm - dh_movefiles - touch $@ - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installexamples - dh_installman - dh_installinfo - dh_installchangelogs ChangeLog - dh_link - dh_strip - dh_compress - dh_fixperms - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff -Nru autogen-5.11.9/pkg/debian/watch autogen-5.12/pkg/debian/watch --- autogen-5.11.9/pkg/debian/watch 2010-07-10 20:08:57.000000000 +0200 +++ autogen-5.12/pkg/debian/watch 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -version=2 -http://download.sourceforge.net/autogen/autogen-([\d\.]+)\.tar\.gz debian uupdate diff -Nru autogen-5.11.9/pkg/libopts/.sdir autogen-5.12/pkg/libopts/.sdir --- autogen-5.11.9/pkg/libopts/.sdir 2011-05-06 16:06:36.000000000 +0200 +++ autogen-5.12/pkg/libopts/.sdir 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -/old-home/bkorb/ag/git-ag/pkg/libopts diff -Nru autogen-5.11.9/pkg/Makefile.am autogen-5.12/pkg/Makefile.am --- autogen-5.11.9/pkg/Makefile.am 2011-05-06 16:06:40.000000000 +0200 +++ autogen-5.12/pkg/Makefile.am 2011-06-26 16:39:38.000000000 +0200 @@ -1,7 +1,7 @@ ## -*- Mode: Makefile -*- ## Makefile.am --- process this file with automake to produce Makefile.in ## -## Time-stamp: "2011-05-05 08:54:39 bkorb" +## Time-stamp: "2011-06-11 12:02:49 bkorb" ## ## This file is part of AutoGen. ## AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved @@ -19,28 +19,15 @@ ## You should have received a copy of the GNU General Public License along ## with this program. If not, see . -DISTCLEANFILES = autogen.lsm - -DEBIAN_FILES = \ - mkpkg.debian debian/Makefile \ - debian/README.Debian debian/autogen.doc-base \ - debian/autogen.docs debian/autogen.examples \ - debian/autogen.files debian/autogen.info \ - debian/autogen.manpages debian/changelog \ - debian/checkopt.def debian/control \ - debian/libopts25-dev.files debian/libopts25.files \ - debian/main.c debian/rules \ - debian/watch - -LIBOPTS_FILES = \ +DISTCLEANFILES = autogen.lsm +LIBOPTS_FILES = \ libopts/libopts-add.m4 libopts/COPYING.lgplv3 libopts/COPYING.gplv3 \ - libopts/COPYING.mbsd libopts/mklibsrc.sh libopts/README \ - libopts/.sdir + libopts/COPYING.mbsd libopts/mklibsrc.sh libopts/README -TPL_FILES = lsm.tpl spec.tpl gnudir.tpl gnudoc.tpl -PKG_FILES = mkpkg.linux mkpkg.sh mkpkg.sun pkg-env.in $(DEBIAN_FILES) -EXTRA_DIST = $(TPL_FILES) $(LIBOPTS_FILES) $(PKG_FILES) -DOCENV = MAKE="$(MAKE)" +TPL_FILES = lsm.tpl spec.tpl gnudir.tpl gnudoc.tpl +PKG_FILES = mkpkg.linux mkpkg.sh mkpkg.sun pkg-env.in +EXTRA_DIST = $(TPL_FILES) $(LIBOPTS_FILES) $(PKG_FILES) +DOCENV = MAKE="$(MAKE)" all : $(DISTCLEANFILES) @@ -56,7 +43,7 @@ package : pkgtype=$(pkgtype) \ DESTDIR=`cd $(top_builddir) > /dev/null ; pwd`/stage-pkg \ - $(DOCENV) $(SHELL) $(srcdir)/mkpkg.sh + $(DOCENV) $(POSIX_SHELL) $(srcdir)/mkpkg.sh pkg : package diff -Nru autogen-5.11.9/pkg/Makefile.in autogen-5.12/pkg/Makefile.in --- autogen-5.11.9/pkg/Makefile.in 2011-05-06 16:06:57.000000000 +0200 +++ autogen-5.12/pkg/Makefile.in 2011-06-26 16:39:56.000000000 +0200 @@ -214,24 +214,12 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DISTCLEANFILES = autogen.lsm -DEBIAN_FILES = \ - mkpkg.debian debian/Makefile \ - debian/README.Debian debian/autogen.doc-base \ - debian/autogen.docs debian/autogen.examples \ - debian/autogen.files debian/autogen.info \ - debian/autogen.manpages debian/changelog \ - debian/checkopt.def debian/control \ - debian/libopts25-dev.files debian/libopts25.files \ - debian/main.c debian/rules \ - debian/watch - LIBOPTS_FILES = \ libopts/libopts-add.m4 libopts/COPYING.lgplv3 libopts/COPYING.gplv3 \ - libopts/COPYING.mbsd libopts/mklibsrc.sh libopts/README \ - libopts/.sdir + libopts/COPYING.mbsd libopts/mklibsrc.sh libopts/README TPL_FILES = lsm.tpl spec.tpl gnudir.tpl gnudoc.tpl -PKG_FILES = mkpkg.linux mkpkg.sh mkpkg.sun pkg-env.in $(DEBIAN_FILES) +PKG_FILES = mkpkg.linux mkpkg.sh mkpkg.sun pkg-env.in EXTRA_DIST = $(TPL_FILES) $(LIBOPTS_FILES) $(PKG_FILES) DOCENV = MAKE="$(MAKE)" all: all-am @@ -436,7 +424,7 @@ package : pkgtype=$(pkgtype) \ DESTDIR=`cd $(top_builddir) > /dev/null ; pwd`/stage-pkg \ - $(DOCENV) $(SHELL) $(srcdir)/mkpkg.sh + $(DOCENV) $(POSIX_SHELL) $(srcdir)/mkpkg.sh pkg : package diff -Nru autogen-5.11.9/pkg/mkpkg.debian autogen-5.12/pkg/mkpkg.debian --- autogen-5.11.9/pkg/mkpkg.debian 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/pkg/mkpkg.debian 1970-01-01 01:00:00.000000000 +0100 @@ -1,123 +0,0 @@ -#! /bin/sh - -## mkpkg.debian -- create a native package -## Time-stamp: "2010-07-16 15:22:32 bkorb" -## -## This file is part of AutoGen. -## AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved -## -## AutoGen is free software: you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## AutoGen is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -## See the GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License along -## with this program. If not, see . - -if test -z "${top_builddir}" -then - # this script is likely being invoked on a freshly unrolled tarball - # - subdir=$(set -- autogen[-_]*/pkg/mkpkg.debian - test -f ${1} && echo ${1%/pkg/mkpkg.debian} ) - - if test -d "${subdir}" - then cd ${subdir} - else - while test ! -f pkg/mkpkg.debian - do cd .. - test ${PWD} = / && echo cannot locate pkt/mkpkg.debian && exit 1 - done - fi - - top_builddir=${PWD} - top_srcdir=${PWD} - srcdir=${PWD}/pkg - builddir=${PWD}/pkg - . ./VERSION - PACKAGE_BUGREPORT="${EADDR}" - PACKAGE_NAME="${PACKAGE}" - PACKAGE_STRING="${PACKAGE} ${AG_VERSION}" - PACKAGE_TARNAME=autogen - PACKAGE_VERSION="${AG_VERSION}" -else - builddir=$(pwd) - cd ${top_builddir} || exit 1 -fi - - -debver=$(echo ${PACKAGE_VERSION} | sed 's/pre/~pre/') - -if test ! -f ../autogen_${debver}.orig.tar.gz -then - if test -f ../autogen?${PACKAGE_VERSION}.tar.gz - then ln ../autogen?${PACKAGE_VERSION}.tar.gz \ - ../autogen_${debver}.orig.tar.gz - else - ${MAKE:-make} dist || exit 1 - mv autogen-${PACKAGE_VERSION}.tar.gz \ - ../autogen_${debver}.orig.tar.gz || exit 1 - fi -fi - -set -e -test -d debian || mkdir debian -cd debian - -exec 3> copyright -cat >&3 <<- _EOF_ - This package was debianized by James R. Van Zandt - on Fri, 18 Jun 1999 21:23:48 -0400. - - The current maintainer is Matt Kraai . - - It was downloaded from - http://osdn.dl.sourceforge.net/autogen/autogen-${AG_VERSION}.tar.gz. - - Copyright & Licensing: - - _EOF_ - -( sed -n '/AutoGen copyright/,/^ \*\//p;50q' ${top_srcdir}/agen5/autogen.c - echo >&3 - sed -n '/Automated Options copyright/,/^ \*\//p;100q' \ - ${top_srcdir}/autoopts/autoopts.c -) | grep -v '^ \*/$' >&3 - -cat >&3 <<- _EOF_ - - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in '/usr/share/common-licenses/GPL'. - _EOF_ - -exec 3>&- -cp ${top_srcdir}/pkg/debian/* . - -case "$(set -o | egrep '^xtrace')" in -( *on ) sedcmd='s/.* DH_VERBOSE=.*/export DH_VERBOSE=1/' ;; -( *off) sedcmd='s/.* DH_VERBOSE=.*/#export DH_VERBOSE=0/' ;; -esac - -argchk=$(texi2html -split=chapter -subdir=html --help 2>&1 1>/dev/null) -test -n "${argchk}" && \ - sedcmd="${sedcmd};"'s/-split=chapter -subdir=html *//' - -sed "${sedcmd}" rules > XX -mv -f XX rules -chmod a+x rules - -cd .. -fakeroot dpkg-buildpackage -d - -## Local Variables: -## mode: shell-script -## indent-tabs-mode: nil -## sh-indentation: 2 -## sh-basic-offset: 2 -## End: -## mkpkg.debian ends here diff -Nru autogen-5.11.9/pkg/mkpkg.sh autogen-5.12/pkg/mkpkg.sh --- autogen-5.11.9/pkg/mkpkg.sh 2011-01-03 02:01:33.000000000 +0100 +++ autogen-5.12/pkg/mkpkg.sh 2011-06-11 20:52:37.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh set -x ## mkpkg.sh -- create a native package -## Time-stamp: "2010-07-16 15:22:13 bkorb" +## Time-stamp: "2011-06-11 11:52:37 bkorb" ## ## This file is part of AutoGen. ## AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved @@ -23,11 +23,8 @@ if test -z "${pkgtype}" then - if fakeroot dh_testroot 2>/dev/null 2>&1 - then pkgtype=debian - else pkgtype=`sh ${top_srcdir}/config/config.guess | \ + pkgtype=`sh ${top_srcdir}/config/config.guess | \ sed 's,-[^-]*$,,;s,.*-,,'` - fi fi if test ! -f ${srcdir}/mkpkg.${pkgtype} diff -Nru autogen-5.11.9/TODO autogen-5.12/TODO --- autogen-5.11.9/TODO 2011-05-06 16:06:39.000000000 +0200 +++ autogen-5.12/TODO 2011-06-26 16:39:38.000000000 +0200 @@ -3,3 +3,5 @@ * It should be possible to adjust AutoGen to use xpath naming. http://www.w3.org/TR/xpath http://www.w3schools.com/xpath/xpath_syntax.asp + +* [PATCH] getopt: for ambiguous options, enumerate the possibilities. diff -Nru autogen-5.11.9/VERSION autogen-5.12/VERSION --- autogen-5.11.9/VERSION 2011-05-05 19:07:13.000000000 +0200 +++ autogen-5.12/VERSION 2011-06-26 16:37:33.000000000 +0200 @@ -2,7 +2,7 @@ # -*- Mode: sh -*- # VERSION --- Set version info for GNU-ish tool use # -# Time-stamp: "2011-05-05 09:44:09 bkorb" +# Time-stamp: "2011-06-25 09:05:57 bkorb" MAINTAINER='Bruce Korb ' ## @@ -23,9 +23,9 @@ ## with this program. If not, see . AG_MAJOR_VERSION=5 -AG_MINOR_VERSION=11 +AG_MINOR_VERSION=12 AG_REVISION=$AG_MAJOR_VERSION.$AG_MINOR_VERSION -AG_PATCHLEVEL=".9" +AG_PATCHLEVEL="" AG_VERSION=$AG_REVISION$AG_PATCHLEVEL # Making releases: diff -Nru autogen-5.11.9/xml2ag/fork.c autogen-5.12/xml2ag/fork.c --- autogen-5.11.9/xml2ag/fork.c 2011-05-06 16:07:48.000000000 +0200 +++ autogen-5.12/xml2ag/fork.c 2011-06-26 16:40:46.000000000 +0200 @@ -2,7 +2,7 @@ * * DO NOT EDIT THIS FILE (fork.c) * - * It has been AutoGen-ed May 6, 2011 at 07:07:48 AM by AutoGen 5.11.9 + * It has been AutoGen-ed June 26, 2011 at 07:40:46 AM by AutoGen 5.12 * From the definitions ./xmlopts.def * and the template file fork.tpl *