CVS commit: othersrc/external/bsd/elex/dist
Module Name:othersrc Committed By: agc Date: Thu Jun 22 23:16:47 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: agcre.c elex.c elex.h main.c othersrc/external/bsd/elex/dist/tests: 28.expected Log Message: elex-20230622 + restore bug fix lost in previous - reset yyleng to 0 when deleting input from the parser + API change to make function name more descriptive in API + bring license up to date + bump version number for header file To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/elex/dist/tests/28.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/dist/agcre.c diff -u othersrc/external/bsd/elex/dist/agcre.c:1.4 othersrc/external/bsd/elex/dist/agcre.c:1.5 --- othersrc/external/bsd/elex/dist/agcre.c:1.4 Wed Jun 21 23:36:17 2023 +++ othersrc/external/bsd/elex/dist/agcre.c Thu Jun 22 23:16:46 2023 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013,2017 Alistair Crooks. All Rights reserved. + * Copyright (c) 2013,2017,2023 Alistair Crooks. All Rights reserved. * All rights reserved. * * Parts of this are: Index: othersrc/external/bsd/elex/dist/elex.c diff -u othersrc/external/bsd/elex/dist/elex.c:1.4 othersrc/external/bsd/elex/dist/elex.c:1.5 --- othersrc/external/bsd/elex/dist/elex.c:1.4 Wed Jun 21 23:36:17 2023 +++ othersrc/external/bsd/elex/dist/elex.c Thu Jun 22 23:16:46 2023 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2018,2021 Alistair Crooks + * Copyright (c) 2018,2021,2023 Alistair Crooks * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -252,6 +252,7 @@ static int delete_input(elex_t *elex, size_t n) { memmove(>s[elex->cc], >s[elex->cc + n], elex->len - elex->cc - n); + elex->yyleng = 0; elex->len -= n; elex->s[elex->len] = 0x0; return 1; @@ -696,7 +697,7 @@ elex_exec(elex_t *elex, const char *info /* one function to access string values */ void * -elex_exec_str(elex_t *elex, const char *info, uint64_t n, uint64_t *size) +elex_exec_mem(elex_t *elex, const char *info, uint64_t n, uint64_t *size) { uint64_t len; Index: othersrc/external/bsd/elex/dist/elex.h diff -u othersrc/external/bsd/elex/dist/elex.h:1.4 othersrc/external/bsd/elex/dist/elex.h:1.5 --- othersrc/external/bsd/elex/dist/elex.h:1.4 Wed Jun 21 23:36:17 2023 +++ othersrc/external/bsd/elex/dist/elex.h Thu Jun 22 23:16:46 2023 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2018,2021 Alistair Crooks + * Copyright (c) 2018,2021,2023 Alistair Crooks * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ELEX_H_ -#define ELEX_H_ 20230621 +#define ELEX_H_ 20230622 #include @@ -34,7 +34,7 @@ #define elex_new ELEX_NAMESPACE(LIB_NAMESPACE, elex_new) #define elex_dispose ELEX_NAMESPACE(LIB_NAMESPACE, elex_dispose) #define elex_exec ELEX_NAMESPACE(LIB_NAMESPACE, elex_exec) -#define elex_exec_str ELEX_NAMESPACE(LIB_NAMESPACE, elex_exec_str) +#define elex_exec_mem ELEX_NAMESPACE(LIB_NAMESPACE, elex_exec_mem) #define elex_make_new_rule ELEX_NAMESPACE(LIB_NAMESPACE, elex_make_new_rule) #endif @@ -59,7 +59,7 @@ int elex_dispose(elex_t **/*elex*/); /* these functions do ALL the work */ int64_t elex_exec(elex_t */*elex*/, const char */*info*/, uint64_t /*num*/, const char */*s*/, int64_t /*cc*/); -void *elex_exec_str(elex_t */*elex*/, const char */*info*/, uint64_t /*n*/, uint64_t */*size*/); +void *elex_exec_mem(elex_t */*elex*/, const char */*info*/, uint64_t /*n*/, uint64_t */*size*/); /* with one exeception - deal with states */ int elex_make_new_rule(elex_t */*elex*/, const char */*startstate*/, Index: othersrc/external/bsd/elex/dist/main.c diff -u othersrc/external/bsd/elex/dist/main.c:1.4 othersrc/external/bsd/elex/dist/main.c:1.5 --- othersrc/external/bsd/elex/dist/main.c:1.4 Wed Jun 21 23:36:17 2023 +++ othersrc/external/bsd/elex/dist/main.c Thu Jun 22 23:16:46 2023 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2018,2021 Alistair Crooks + * Copyright (c) 2018,2021,2023 Alistair Crooks * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -138,7 +138,7 @@ main(int argc, char **argv) } while (elex_exec(elex, "next-token", 0, NULL, 0) != 0) { type = elex_exec(elex, "get-yytype", 0, NULL, 0); - text = elex_exec_str(elex, "get-yytext", 0, ); + text = elex_exec_mem(elex, "get-yytext", 0, ); if (graphic) { switch(type) { case /* "IDENT" */ 0xdb8ea4d: Index: othersrc/external/bsd/elex/dist/tests/28.expected diff -u othersrc/external/bsd/elex/dist/tests/28.expected:1.4
CVS commit: othersrc/external/bsd/elex/dist
Module Name:othersrc Committed By: agc Date: Thu Jun 22 23:16:47 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: agcre.c elex.c elex.h main.c othersrc/external/bsd/elex/dist/tests: 28.expected Log Message: elex-20230622 + restore bug fix lost in previous - reset yyleng to 0 when deleting input from the parser + API change to make function name more descriptive in API + bring license up to date + bump version number for header file To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/elex/dist/tests/28.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/agcre/dist
Module Name:othersrc Committed By: agc Date: Wed Jun 21 23:48:08 UTC 2023 Modified Files: othersrc/external/bsd/agcre/dist: agcre.c agcre.h othersrc/external/bsd/agcre/dist/tests: 62.expected Log Message: agcre version 20230621 == + agcre - added internal magic numbers to agcre to attempt to catch if misbehaving programs overwrite sections of memory + agcre - check internal magic numbers before attempting to execute regex programs + agcre - bump agcre magic number in the external structure + agcre - bump version number in header file. Fix up tests to ensure correct operation To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/agcre/dist/agcre.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/tests/62.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/agcre/dist/agcre.c diff -u othersrc/external/bsd/agcre/dist/agcre.c:1.3 othersrc/external/bsd/agcre/dist/agcre.c:1.4 --- othersrc/external/bsd/agcre/dist/agcre.c:1.3 Fri Feb 24 19:01:10 2023 +++ othersrc/external/bsd/agcre/dist/agcre.c Wed Jun 21 23:48:08 2023 @@ -159,17 +159,26 @@ typedef struct threadlist_t { re_thread_t t[1]; /* the threads */ } threadlist_t; +#define MAGIC1 0xac1deaf0 +#define MAGIC2 0x41525345 +#define MAGIC3 0xd0d0d00d +#define MAGIC4 0x666f7572 + /* regular expression internals */ typedef struct re_t { + uint32_t magic1; /* magic number #1 */ instr_t *prog; /* start of instructions */ uint32_t instrc; /* # of instructions */ uint32_t gen; /* generation number */ uint32_t setc; /* # of sets */ uint32_t maxset; /* allocated # of sets */ + uint32_t magic2; /* magic number #2 */ set_t *sets; /* sets */ uint32_t flags; /* comp/exec flags */ context_t *ctxlist; /* list of contexts */ + uint32_t magic3; /* magic number #3 */ instr_t *pc; /* prog counter */ + uint32_t magic4; /* magic number #4 */ int msgc; /* # of chars in msg buffer */ char msg[256]; /* message buffer */ } re_t; @@ -2669,6 +2678,22 @@ growspace(char **buf, size_t *size, size return 1; } +/* check it was compiled properly */ +static inline int +good_struct(const agcre_regex_t *agcre) +{ + re_t *re; + + if (agcre == NULL || agcre->re_magic != AGCRE_MAGIC2) { + return 0; + } + if ((re = agcre->re_g) == NULL) { + return 0; + } + return re->magic1 = MAGIC1 && re->magic2 == MAGIC2 && + re->magic3 == MAGIC3 && re->magic4 == MAGIC4; +} + /***/ /* allocate a new structure and return it */ @@ -2697,7 +2722,13 @@ agcre_regcomp(agcre_regex_t *agcre, cons (agcre_regoff_t)(agcre->re_endp - in.s) : (agcre_regoff_t)strlen(in.s); memset(agcre, 0x0, sizeof(*agcre)); - agcre->re_g = re = in.re = calloc(1, sizeof(*re)); + if ((agcre->re_g = re = in.re = calloc(1, sizeof(*re))) == NULL) { + return AGCRE_REG_FAILURE; + } + re->magic1 = MAGIC1; + re->magic2 = MAGIC2; + re->magic3 = MAGIC3; + re->magic4 = MAGIC4; if (in.eo - in.so > AGCRE_MAX_EXPR_LENGTH) { re->msgc = snprintf(re->msg, sizeof(re->msg), "expression length %llu larger than %u", @@ -2739,7 +2770,7 @@ agcre_regcomp(agcre_regex_t *agcre, cons re->pc->op = OP_MATCH; re->pc += 1; re->instrc = re->pc - re->prog; - agcre->re_magic = AGCRE_MAGIC; + agcre->re_magic = AGCRE_MAGIC2; if (flags & AGCRE_REG_DUMP) { printprog(re); } @@ -2757,7 +2788,7 @@ agcre_regerror(int errcode, const agcre_ re_t *re; USE_ARG(errcode); - if (agcre == NULL || size == 0 || errbuf == NULL) { + if (!good_struct(agcre) || size == 0 || errbuf == NULL) { return 0; } re = agcre->re_g; @@ -2782,15 +2813,15 @@ agcre_regexec(agcre_regex_t *agcre, cons re_t *re; int ret; - if (agcre == NULL || vs == NULL || (matchc > 0 && m == NULL)) { + if (!good_struct(agcre) || vs == NULL || (matchc > 0 && m == NULL)) { return AGCRE_REG_FAILURE; } if ((re = agcre->re_g) == NULL) { return AGCRE_REG_FAILURE; } - if (agcre->re_magic != AGCRE_MAGIC) { + if (agcre->re_magic != AGCRE_MAGIC2) { re->msgc = snprintf(re->msg, sizeof(re->msg), - "bad magic number 0x%x, not 0x%x", agcre->re_magic, AGCRE_MAGIC); + "bad magic number 0x%x, not 0x%x", agcre->re_magic, AGCRE_MAGIC2); return AGCRE_REG_FAILURE; } if (matchc > AGCRE_MAX_SUBEXPR) { @@ -2942,6 +2973,9 @@ agcre_rev_regexec(agcre_regex_t *agcre, int found; int lastmatch; + if (!good_struct(agcre) || vs == NULL || (matchc > 0 && m == NULL)) { + return AGCRE_REG_FAILURE; + } if (flags & AGCRE_REG_STARTEND) { from = m[0].rm_so; to = m[0].rm_eo; @@ -2984,7 +3018,7 @@ agcre_regfree(agcre_regex_t *agcre) uint32_t i; re_t *re; - if (agcre) { + if (agcre && good_struct(agcre)) { if ((re = agcre->re_g) != NULL) { free(re->prog); for
CVS commit: othersrc/external/bsd/agcre/dist
Module Name:othersrc Committed By: agc Date: Wed Jun 21 23:48:08 UTC 2023 Modified Files: othersrc/external/bsd/agcre/dist: agcre.c agcre.h othersrc/external/bsd/agcre/dist/tests: 62.expected Log Message: agcre version 20230621 == + agcre - added internal magic numbers to agcre to attempt to catch if misbehaving programs overwrite sections of memory + agcre - check internal magic numbers before attempting to execute regex programs + agcre - bump agcre magic number in the external structure + agcre - bump version number in header file. Fix up tests to ensure correct operation To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/agcre/dist/agcre.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/tests/62.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Wed Jun 21 23:36:17 UTC 2023 Modified Files: othersrc/external/bsd/elex: TODO othersrc/external/bsd/elex/dist: Makefile agcre.c agcre.h elex.c elex.h main.c othersrc/external/bsd/elex/dist/tests: 28.expected othersrc/external/bsd/elex/lib: Makefile Added Files: othersrc/external/bsd/elex/dist: gap.c gap.h Removed Files: othersrc/external/bsd/elex/dist: striter.c striter.h Log Message: Elex version 20230621 = + agcre - added internal magic numbers to agcre to attempt to catch misbehaving programs overwriting sections of memory (extremely coarse- grained checks here). + agcre - check internal magic numbers before attempting to execute regex programs + agcre - bump agcre magic number in the external structure + elex - remove striter (simple) and move to using buffer gap functions + elex - fix a bug whereby we check if a rule has a return value before attempting to parse that return value. + elex - fix up tests for all of these fixes + elex - error out when reading rules if a bad rule is encountered (as the resulting lexer would be erroneous if we continued) + elex - bump elex version to 20230621 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/TODO cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/Makefile \ othersrc/external/bsd/elex/dist/agcre.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/dist/gap.c \ othersrc/external/bsd/elex/dist/gap.h cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/elex/dist/striter.c cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/elex/dist/striter.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/tests/28.expected cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/TODO diff -u othersrc/external/bsd/elex/TODO:1.1 othersrc/external/bsd/elex/TODO:1.2 --- othersrc/external/bsd/elex/TODO:1.1 Thu Dec 9 04:15:25 2021 +++ othersrc/external/bsd/elex/TODO Wed Jun 21 23:36:17 2023 @@ -44,3 +44,5 @@ get line number action bookmarks clone read-defs from read-grammar +bug fix - test we have an m[6] match before using it as return value +move from striter to gap functions Index: othersrc/external/bsd/elex/dist/Makefile diff -u othersrc/external/bsd/elex/dist/Makefile:1.2 othersrc/external/bsd/elex/dist/Makefile:1.3 --- othersrc/external/bsd/elex/dist/Makefile:1.2 Tue Apr 25 20:03:39 2023 +++ othersrc/external/bsd/elex/dist/Makefile Wed Jun 21 23:36:17 2023 @@ -1,7 +1,7 @@ PROG= elex SRCS+= agcre.c SRCS+= elex.c -SRCS+= striter.c +SRCS+= gap.c SRCS+= main.c MKMAN= no WARNS= 5 Index: othersrc/external/bsd/elex/dist/agcre.h diff -u othersrc/external/bsd/elex/dist/agcre.h:1.2 othersrc/external/bsd/elex/dist/agcre.h:1.3 --- othersrc/external/bsd/elex/dist/agcre.h:1.2 Wed Feb 22 01:01:39 2023 +++ othersrc/external/bsd/elex/dist/agcre.h Wed Jun 21 23:36:17 2023 @@ -53,7 +53,7 @@ #define REG_SUCCESS AGCRE_REG_SUCCESS #define REG_FAILURE AGCRE_REG_FAILURE #define REG_NOMATCH AGCRE_REG_FAILURE -#define REG_MAGIC AGCRE_MAGIC +#define REG_MAGIC AGCRE_MAGIC2 #define REG_MAX_SUBEXPR AGCRE_MAX_SUBEXPR #define REG_MAX_EXPR_LENGTH AGCRE_MAX_EXPR_LENGTH #define REG_ANCHOR AGCRE_REG_ANCHOR @@ -89,7 +89,7 @@ #define AGCRE_REG_SUCCESS 0 #define AGCRE_REG_FAILURE 1 -#define AGCRE_MAGIC 0x20170801 +#define AGCRE_MAGIC2 0x20230621 /* limits we impose on expressions */ #define AGCRE_MAX_SUBEXPR 100 Index: othersrc/external/bsd/elex/dist/agcre.c diff -u othersrc/external/bsd/elex/dist/agcre.c:1.3 othersrc/external/bsd/elex/dist/agcre.c:1.4 --- othersrc/external/bsd/elex/dist/agcre.c:1.3 Thu Feb 23 19:36:07 2023 +++ othersrc/external/bsd/elex/dist/agcre.c Wed Jun 21 23:36:17 2023 @@ -159,17 +159,26 @@ typedef struct threadlist_t { re_thread_t t[1]; /* the threads */ } threadlist_t; +#define MAGIC1 0xac1deaf0 +#define MAGIC2 0x41525345 +#define MAGIC3 0xd0d0d00d +#define MAGIC4 0x666f7572 + /* regular expression internals */ typedef struct re_t { + uint32_t magic1; /* magic number #1 */ instr_t *prog; /* start of instructions */ uint32_t instrc; /* # of instructions */ uint32_t gen; /* generation number */ uint32_t setc; /* # of sets */ uint32_t maxset; /* allocated # of sets */ + uint32_t magic2; /* magic number #2 */ set_t *sets; /* sets */ uint32_t flags; /* comp/exec flags */ context_t *ctxlist; /* list of contexts */ + uint32_t magic3; /* magic number #3 */ instr_t *pc; /* prog counter */ + uint32_t magic4; /* magic number #4 */ int msgc; /* # of
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Wed Jun 21 23:36:17 UTC 2023 Modified Files: othersrc/external/bsd/elex: TODO othersrc/external/bsd/elex/dist: Makefile agcre.c agcre.h elex.c elex.h main.c othersrc/external/bsd/elex/dist/tests: 28.expected othersrc/external/bsd/elex/lib: Makefile Added Files: othersrc/external/bsd/elex/dist: gap.c gap.h Removed Files: othersrc/external/bsd/elex/dist: striter.c striter.h Log Message: Elex version 20230621 = + agcre - added internal magic numbers to agcre to attempt to catch misbehaving programs overwriting sections of memory (extremely coarse- grained checks here). + agcre - check internal magic numbers before attempting to execute regex programs + agcre - bump agcre magic number in the external structure + elex - remove striter (simple) and move to using buffer gap functions + elex - fix a bug whereby we check if a rule has a return value before attempting to parse that return value. + elex - fix up tests for all of these fixes + elex - error out when reading rules if a bad rule is encountered (as the resulting lexer would be erroneous if we continued) + elex - bump elex version to 20230621 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/TODO cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/Makefile \ othersrc/external/bsd/elex/dist/agcre.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/dist/gap.c \ othersrc/external/bsd/elex/dist/gap.h cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/elex/dist/striter.c cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/elex/dist/striter.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/elex/dist/tests/28.expected cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Tue Apr 25 20:03:40 UTC 2023 Modified Files: othersrc/external/bsd/elex/bin: Makefile othersrc/external/bsd/elex/dist: Makefile Added Files: othersrc/external/bsd/elex/dist/tests: 31.expected 31.in 32.expected 32.in json.lex Log Message: Add an example json lexer, and some tests for it. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/bin/Makefile cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/Makefile cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/dist/tests/31.expected \ othersrc/external/bsd/elex/dist/tests/31.in \ othersrc/external/bsd/elex/dist/tests/32.expected \ othersrc/external/bsd/elex/dist/tests/32.in \ othersrc/external/bsd/elex/dist/tests/json.lex Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/bin/Makefile diff -u othersrc/external/bsd/elex/bin/Makefile:1.2 othersrc/external/bsd/elex/bin/Makefile:1.3 --- othersrc/external/bsd/elex/bin/Makefile:1.2 Fri Feb 24 23:07:54 2023 +++ othersrc/external/bsd/elex/bin/Makefile Tue Apr 25 20:03:39 2023 @@ -143,3 +143,11 @@ t: ${PROG} env LD_LIBRARY_PATH=${LIB_ELEX_DIR} ./${PROG} -g -f ${DIST}/tests/30.lex ${DIST}/tests/21.in > 30.out diff ${DIST}/tests/30.expected 30.out rm -f 30.out + @echo "31. json" + env LD_LIBRARY_PATH=${LIB_ELEX_DIR} ./${PROG} -f ${DIST}/tests/json.lex ${DIST}/tests/31.in > 31.out + diff ${DIST}/tests/31.expected 31.out + rm -f 31.out + @echo "32. more json" + env LD_LIBRARY_PATH=${LIB_ELEX_DIR} ./${PROG} -f ${DIST}/tests/json.lex ${DIST}/tests/32.in > 32.out + diff ${DIST}/tests/32.expected 32.out + rm -f 32.out Index: othersrc/external/bsd/elex/dist/Makefile diff -u othersrc/external/bsd/elex/dist/Makefile:1.1 othersrc/external/bsd/elex/dist/Makefile:1.2 --- othersrc/external/bsd/elex/dist/Makefile:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/Makefile Tue Apr 25 20:03:39 2023 @@ -1,6 +1,7 @@ PROG= elex SRCS+= agcre.c SRCS+= elex.c +SRCS+= striter.c SRCS+= main.c MKMAN= no WARNS= 5 Added files: Index: othersrc/external/bsd/elex/dist/tests/31.expected diff -u /dev/null othersrc/external/bsd/elex/dist/tests/31.expected:1.1 --- /dev/null Tue Apr 25 20:03:40 2023 +++ othersrc/external/bsd/elex/dist/tests/31.expected Tue Apr 25 20:03:40 2023 @@ -0,0 +1,65 @@ +[6] 1 '{' +[1] 10 '"glossary"' +[9] 1 ':' +[6] 1 '{' +[1] 7 '"title"' +[9] 1 ':' +[1] 18 '"example glossary"' +[8] 1 ',' +[1] 10 '"GlossDiv"' +[9] 1 ':' +[6] 1 '{' +[1] 7 '"title"' +[9] 1 ':' +[1] 3 '"S"' +[8] 1 ',' +[1] 11 '"GlossList"' +[9] 1 ':' +[6] 1 '{' +[1] 12 '"GlossEntry"' +[9] 1 ':' +[6] 1 '{' +[1] 4 '"ID"' +[9] 1 ':' +[1] 6 '"SGML"' +[8] 1 ',' +[1] 8 '"SortAs"' +[9] 1 ':' +[1] 6 '"SGML"' +[8] 1 ',' +[1] 11 '"GlossTerm"' +[9] 1 ':' +[1] 38 '"Standard Generalized Markup Language"' +[8] 1 ',' +[1] 9 '"Acronym"' +[9] 1 ':' +[1] 6 '"SGML"' +[8] 1 ',' +[1] 8 '"Abbrev"' +[9] 1 ':' +[1] 15 '"ISO 8879:1986"' +[8] 1 ',' +[1] 10 '"GlossDef"' +[9] 1 ':' +[6] 1 '{' +[1] 6 '"para"' +[9] 1 ':' +[1] 74 '"A meta-markup language, used to create markup languages such as DocBook."' +[8] 1 ',' +[1] 14 '"GlossSeeAlso"' +[9] 1 ':' +[4] 1 '[' +[1] 5 '"GML"' +[8] 1 ',' +[1] 5 '"XML"' +[5] 1 ']' +[7] 1 '}' +[8] 1 ',' +[1] 10 '"GlossSee"' +[9] 1 ':' +[1] 8 '"markup"' +[7] 1 '}' +[7] 1 '}' +[7] 1 '}' +[7] 1 '}' +[7] 1 '}' Index: othersrc/external/bsd/elex/dist/tests/31.in diff -u /dev/null othersrc/external/bsd/elex/dist/tests/31.in:1.1 --- /dev/null Tue Apr 25 20:03:40 2023 +++ othersrc/external/bsd/elex/dist/tests/31.in Tue Apr 25 20:03:40 2023 @@ -0,0 +1,22 @@ +{ +"glossary": { +"title": "example glossary", + "GlossDiv": { +"title": "S", + "GlossList": { +"GlossEntry": { +"ID": "SGML", + "SortAs": "SGML", + "GlossTerm": "Standard Generalized Markup Language", + "Acronym": "SGML", + "Abbrev": "ISO 8879:1986", + "GlossDef": { +"para": "A meta-markup language, used to create markup languages such as DocBook.", + "GlossSeeAlso": ["GML", "XML"] +}, + "GlossSee": "markup" +} +} +} +} +} Index: othersrc/external/bsd/elex/dist/tests/32.expected diff -u /dev/null othersrc/external/bsd/elex/dist/tests/32.expected:1.1 --- /dev/null Tue Apr 25 20:03:40 2023 +++ othersrc/external/bsd/elex/dist/tests/32.expected Tue Apr 25 20:03:40 2023 @@ -0,0 +1,335 @@ +[6] 1 '{' +[1] 9 '"web-app"' +[9] 1 ':' +[6] 1 '{' +[1] 9 '"servlet"' +[9] 1 ':' +[4] 1 '[' +[6] 1 '{' +[1] 14 '"servlet-name"' +[9] 1 ':' +[1] 10 '"cofaxCDS"' +[8] 1 ',' +[1] 15 '"servlet-class"' +[9] 1 ':' +[1] 26 '"org.cofax.cds.CDSServlet"' +[8] 1 ',' +[1] 12 '"init-param"' +[9] 1 ':' +[6] 1 '{' +[1] 31 '"configGlossary:installationAt"' +[9] 1 ':' +[1] 18
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Tue Apr 25 20:03:40 UTC 2023 Modified Files: othersrc/external/bsd/elex/bin: Makefile othersrc/external/bsd/elex/dist: Makefile Added Files: othersrc/external/bsd/elex/dist/tests: 31.expected 31.in 32.expected 32.in json.lex Log Message: Add an example json lexer, and some tests for it. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/bin/Makefile cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/Makefile cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/dist/tests/31.expected \ othersrc/external/bsd/elex/dist/tests/31.in \ othersrc/external/bsd/elex/dist/tests/32.expected \ othersrc/external/bsd/elex/dist/tests/32.in \ othersrc/external/bsd/elex/dist/tests/json.lex Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Fri Feb 24 23:08:17 UTC 2023 Modified Files: othersrc/external/bsd/elex: README Log Message: document the "namespace" action in the README file To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/README diff -u othersrc/external/bsd/elex/README:1.2 othersrc/external/bsd/elex/README:1.3 --- othersrc/external/bsd/elex/README:1.2 Thu Feb 23 19:16:31 2023 +++ othersrc/external/bsd/elex/README Fri Feb 24 23:08:17 2023 @@ -285,6 +285,7 @@ elex_exec_str: allocated space "get-yystate" - get the name of the current state in allocated space "get-yytext" - get the full text of the current match in allocated space +"namespace" - return the name space of the embedded library used (if any) Designing elex definition files ===
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Fri Feb 24 23:08:17 UTC 2023 Modified Files: othersrc/external/bsd/elex: README Log Message: document the "namespace" action in the README file To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Fri Feb 24 23:07:54 UTC 2023 Modified Files: othersrc/external/bsd/elex/bin: Makefile othersrc/external/bsd/elex/lib: Makefile Log Message: add inclusion of any lib namespace (if there is oneChanges missed from yesterday's commit include the library namespace, if there is one To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/bin/Makefile cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/bin/Makefile diff -u othersrc/external/bsd/elex/bin/Makefile:1.1 othersrc/external/bsd/elex/bin/Makefile:1.2 --- othersrc/external/bsd/elex/bin/Makefile:1.1 Thu Dec 9 04:15:25 2021 +++ othersrc/external/bsd/elex/bin/Makefile Fri Feb 24 23:07:54 2023 @@ -12,6 +12,8 @@ CPPFLAGS+= -g -O0 LDFLAGS+= -g -O0 .endif +.sinclude "../namespace.mk" + LIB_ELEX_DIR!= cd ${.CURDIR}/../lib && ${PRINTOBJDIR} DIST= ${.CURDIR}/../dist Index: othersrc/external/bsd/elex/lib/Makefile diff -u othersrc/external/bsd/elex/lib/Makefile:1.1 othersrc/external/bsd/elex/lib/Makefile:1.2 --- othersrc/external/bsd/elex/lib/Makefile:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/lib/Makefile Fri Feb 24 23:07:54 2023 @@ -6,6 +6,8 @@ CPPFLAGS+= -I${DIST} MKMAN= no WARNS= 5 +.sinclude "../namespace.mk" + # set symbol visibility for .so CPPFLAGS+= -DHIDE_AGCRE=1 CPPFLAGS+= -DHIDE_STRITER=1
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Fri Feb 24 23:07:54 UTC 2023 Modified Files: othersrc/external/bsd/elex/bin: Makefile othersrc/external/bsd/elex/lib: Makefile Log Message: add inclusion of any lib namespace (if there is oneChanges missed from yesterday's commit include the library namespace, if there is one To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/bin/Makefile cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/agcre
Module Name:othersrc Committed By: agc Date: Fri Feb 24 19:01:11 UTC 2023 Modified Files: othersrc/external/bsd/agcre/bin: Makefile othersrc/external/bsd/agcre/dist: agcre.c agcre.h othersrc/external/bsd/agcre/dist/tests: 54.expected 62.expected othersrc/external/bsd/agcre/lib: Makefile Added Files: othersrc/external/bsd/agcre: namespace.mk Log Message: Update agcre (yet another regexp library) to version 20230224 + revamp the reverse searching functionality + bug fixes + don't terminate searches too early + update namespace protection to just use simple definitions + bump version to 20230224 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/agcre/namespace.mk cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/bin/Makefile cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/agcre/dist/agcre.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/tests/54.expected cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/tests/62.expected cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/agcre/bin/Makefile diff -u othersrc/external/bsd/agcre/bin/Makefile:1.1 othersrc/external/bsd/agcre/bin/Makefile:1.2 --- othersrc/external/bsd/agcre/bin/Makefile:1.1 Wed Aug 16 23:38:13 2017 +++ othersrc/external/bsd/agcre/bin/Makefile Fri Feb 24 19:01:10 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2017/08/16 23:38:13 agc Exp $ +# $NetBSD: Makefile,v 1.2 2023/02/24 19:01:10 agc Exp $ .include @@ -9,6 +9,8 @@ CPPFLAGS+= -I${DIST} MAN= agcre.1 WARNS= 5 +.sinclude "../namespace.mk" + DIST= ${.CURDIR}/../dist .PATH: ${DIST} Index: othersrc/external/bsd/agcre/dist/agcre.c diff -u othersrc/external/bsd/agcre/dist/agcre.c:1.2 othersrc/external/bsd/agcre/dist/agcre.c:1.3 --- othersrc/external/bsd/agcre/dist/agcre.c:1.2 Sat Dec 4 01:54:51 2021 +++ othersrc/external/bsd/agcre/dist/agcre.c Fri Feb 24 19:01:10 2023 @@ -223,6 +223,7 @@ static int unicode_isOther_Uppercase(uin static int unicode_isPattern_White_Space(uint32_t /*ch*/); static int unicode_isalnum(uint32_t /*ch*/); static int unicode_isalpha(uint32_t /*ch*/); +static int unicode_ispunct2(uint32_t /*ch*/); static int unicode_isblank(uint32_t /*ch*/); static int unicode_iscntrl(uint32_t /*ch*/); static int unicode_isdigit(uint32_t /*ch*/); @@ -233,7 +234,7 @@ static int unicode_ispunct(uint32_t /*ch static int unicode_isspace(uint32_t /*ch*/); static int unicode_isupper(uint32_t /*ch*/); static int unicode_isxdigit(uint32_t /*ch*/); -static int unicode_isident(uint32_t /*ch*/); +static int unicode_isword(uint32_t /*ch*/); static uint32_t unicode_tolower(uint32_t /*ch*/); static uint32_t unicode_toupper(uint32_t /*ch*/); @@ -417,7 +418,7 @@ emit(re_t *re, retoken_t *tok) (tok->ch == 'd' || tok->ch == 'D') ? unicode_isdigit : (tok->ch == 'p' || tok->ch == 'P') ? unicode_isprint : (tok->ch == 's' || tok->ch == 'S') ? unicode_isspace : -unicode_isident, +unicode_isword, unicode_isupper(tok->ch)); re->pc++; return 1; @@ -1169,16 +1170,16 @@ isendline(re_t *re, input_t *in) static inline int isbegword(re_t *re, input_t *in) { - return (isbegline(re, in) || !unicode_isident(in->prevch)) && - unicode_isident(in->ch); + return (isbegline(re, in) || !unicode_isword(in->prevch)) && + unicode_isword(in->ch); } /* return 1 at end of words */ static inline int isendword(re_t *re, input_t *in) { - return (isendline(re, in) || (in->c > in->so && unicode_isident(in->prevch))) && - (!unicode_isident(in->ch)); + return (isendline(re, in) || (in->c > in->so && unicode_isword(in->prevch))) && + (!unicode_isword(in->ch)); } /* do the chars match? */ @@ -1577,10 +1578,6 @@ rec_posix_class(input_t *in, set_t *set) set_add_callback(set, unicode_isgraph, 0); in->c += 8; return 1; - case /* ":ident:]" */ 0x8a1572f1: - set_add_callback(set, unicode_isident, 0); - in->c += 8; - return 1; case /* ":lower:]" */ 0x8bfc6af8: set_add_callback(set, unicode_islower, 0); in->c += 8; @@ -1593,6 +1590,10 @@ rec_posix_class(input_t *in, set_t *set) set_add_callback(set, unicode_ispunct, 0); in->c += 8; return 1; + case /* ":punct2:]" */ 0xf09af6aa: + set_add_callback(set, unicode_ispunct2, 0); + in->c += 9; + return 1; case /* ":space:]" */ 0xa876bcf2: set_add_callback(set, unicode_isspace, 0); in->c += 8; @@ -1605,6 +1606,10 @@ rec_posix_class(input_t *in, set_t *set) set_add_callback(set, unicode_isxdigit, 0); in->c += 9; return 1; + case /* ":word:]" */ 0x96b11914: + set_add_callback(set, unicode_isword, 0); + in->c += 7; + return 1; default: return 0; } @@ -1661,7 +1666,7 @@ rec_set(input_t *in) (token->ch == 'd' ||
CVS commit: othersrc/external/bsd/agcre
Module Name:othersrc Committed By: agc Date: Fri Feb 24 19:01:11 UTC 2023 Modified Files: othersrc/external/bsd/agcre/bin: Makefile othersrc/external/bsd/agcre/dist: agcre.c agcre.h othersrc/external/bsd/agcre/dist/tests: 54.expected 62.expected othersrc/external/bsd/agcre/lib: Makefile Added Files: othersrc/external/bsd/agcre: namespace.mk Log Message: Update agcre (yet another regexp library) to version 20230224 + revamp the reverse searching functionality + bug fixes + don't terminate searches too early + update namespace protection to just use simple definitions + bump version to 20230224 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/agcre/namespace.mk cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/bin/Makefile cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/agcre/dist/agcre.h cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/tests/54.expected cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/tests/62.expected cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Thu Feb 23 19:36:08 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: agcre.c elex.c elex.h main.c striter.c othersrc/external/bsd/elex/dist/tests: 28.expected Added Files: othersrc/external/bsd/elex: namespace.mk Log Message: Update elex to version 20230223 + add introspection - add a "namespace" action to elex_exec_str to return any embedded library namespace used when compiling + move LIB_NAMESPACE from embedded definitions to be defined in Makefiles, and include the makefile snippet if it exists + README typo fixes and added clarification from Brad Harder + bump version to 20230223 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/namespace.mk cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c \ othersrc/external/bsd/elex/dist/striter.c cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/tests/28.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/dist/agcre.c diff -u othersrc/external/bsd/elex/dist/agcre.c:1.2 othersrc/external/bsd/elex/dist/agcre.c:1.3 --- othersrc/external/bsd/elex/dist/agcre.c:1.2 Wed Feb 22 01:01:39 2023 +++ othersrc/external/bsd/elex/dist/agcre.c Thu Feb 23 19:36:07 2023 @@ -36,7 +36,6 @@ #include #include -#define LIB_NAMESPACE elex_ #include "agcre.h" /* callback struct */ Index: othersrc/external/bsd/elex/dist/elex.c diff -u othersrc/external/bsd/elex/dist/elex.c:1.2 othersrc/external/bsd/elex/dist/elex.c:1.3 --- othersrc/external/bsd/elex/dist/elex.c:1.2 Wed Feb 22 01:01:39 2023 +++ othersrc/external/bsd/elex/dist/elex.c Thu Feb 23 19:36:07 2023 @@ -33,7 +33,6 @@ #include #include -#define LIB_NAMESPACE elex_ #include "agcre.h" #include "striter.h" #include "elex.h" @@ -672,13 +671,17 @@ elex_exec(elex_t *elex, const char *info return 0; } +/* used to stringify the namespace we're using */ +#define ELEX_STRINGIFY(_x) ELEX_STRINGIFY2(_x) +#define ELEX_STRINGIFY2(_x) #_x + /* one function to access string values */ void * elex_exec_str(elex_t *elex, const char *info, uint64_t n, uint64_t *size) { uint64_t len; - if (elex == NULL || info == NULL) { + if (elex == NULL || info == NULL || size == NULL) { return NULL; } switch(djbhash(info)) { @@ -698,6 +701,9 @@ elex_exec_str(elex_t *elex, const char * return allocate(elex->states[elex->yystate].name, strlen(elex->states[elex->yystate].name), size); case /* "get-yytext" */ 0x88065864: return allocate(elex->yytext, elex->yyleng, size); + case /* "namespace" */ 0x41041c23: + return allocate(ELEX_STRINGIFY(LIB_NAMESPACE), + strlen(ELEX_STRINGIFY(LIB_NAMESPACE)), size); } return NULL; } Index: othersrc/external/bsd/elex/dist/elex.h diff -u othersrc/external/bsd/elex/dist/elex.h:1.2 othersrc/external/bsd/elex/dist/elex.h:1.3 --- othersrc/external/bsd/elex/dist/elex.h:1.2 Wed Feb 22 01:01:39 2023 +++ othersrc/external/bsd/elex/dist/elex.h Thu Feb 23 19:36:07 2023 @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ELEX_H_ -#define ELEX_H_ 20230221 +#define ELEX_H_ 20230223 #include Index: othersrc/external/bsd/elex/dist/main.c diff -u othersrc/external/bsd/elex/dist/main.c:1.2 othersrc/external/bsd/elex/dist/main.c:1.3 --- othersrc/external/bsd/elex/dist/main.c:1.2 Wed Feb 22 01:01:39 2023 +++ othersrc/external/bsd/elex/dist/main.c Thu Feb 23 19:36:07 2023 @@ -32,7 +32,6 @@ #include #include -#define LIB_NAMESPACE elex_ #include "elex.h" #define STRINGIFY(x) #x Index: othersrc/external/bsd/elex/dist/striter.c diff -u othersrc/external/bsd/elex/dist/striter.c:1.2 othersrc/external/bsd/elex/dist/striter.c:1.3 --- othersrc/external/bsd/elex/dist/striter.c:1.2 Wed Feb 22 01:20:52 2023 +++ othersrc/external/bsd/elex/dist/striter.c Thu Feb 23 19:36:07 2023 @@ -33,7 +33,6 @@ #include #include -#define LIB_NAMESPACE elex_ #include "striter.h" /* a string iterator structure */ Index: othersrc/external/bsd/elex/dist/tests/28.expected diff -u othersrc/external/bsd/elex/dist/tests/28.expected:1.2 othersrc/external/bsd/elex/dist/tests/28.expected:1.3 --- othersrc/external/bsd/elex/dist/tests/28.expected:1.2 Wed Feb 22 01:01:40 2023 +++ othersrc/external/bsd/elex/dist/tests/28.expected Thu Feb 23 19:36:08 2023 @@ -1 +1 @@ -elex version 20230221 +elex version 20230223 Added files: Index: othersrc/external/bsd/elex/namespace.mk diff -u /dev/null othersrc/external/bsd/elex/namespace.mk:1.1 --- /dev/null Thu Feb 23 19:36:08 2023 +++ othersrc/external/bsd/elex/namespace.mk Thu Feb 23 19:36:07 2023 @@ -0,0 +1 @@ +CPPFLAGS+= -DLIB_NAMESPACE="elex_"
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Thu Feb 23 19:36:08 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: agcre.c elex.c elex.h main.c striter.c othersrc/external/bsd/elex/dist/tests: 28.expected Added Files: othersrc/external/bsd/elex: namespace.mk Log Message: Update elex to version 20230223 + add introspection - add a "namespace" action to elex_exec_str to return any embedded library namespace used when compiling + move LIB_NAMESPACE from embedded definitions to be defined in Makefiles, and include the makefile snippet if it exists + README typo fixes and added clarification from Brad Harder + bump version to 20230223 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/elex/namespace.mk cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c \ othersrc/external/bsd/elex/dist/striter.c cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/elex/dist/tests/28.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Thu Feb 23 19:16:31 UTC 2023 Modified Files: othersrc/external/bsd/elex: README Log Message: Fix typos and case issues, and properly hyphenate words. From Brad Harder. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Thu Feb 23 19:16:31 UTC 2023 Modified Files: othersrc/external/bsd/elex: README Log Message: Fix typos and case issues, and properly hyphenate words. From Brad Harder. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/README diff -u othersrc/external/bsd/elex/README:1.1 othersrc/external/bsd/elex/README:1.2 --- othersrc/external/bsd/elex/README:1.1 Thu Dec 9 04:15:25 2021 +++ othersrc/external/bsd/elex/README Thu Feb 23 19:16:31 2023 @@ -3,7 +3,7 @@ Elex - an embeddable regexp-based lexer I have found myself fairly often needing a lexer utility to tokenise input (for configuration files, for various file-scanning utilities, -and for other applciations), but using full-blown lex(1) program to do +and for other applications), but using full-blown lex(1) program to do this is overkill, or designed for a separate process, which doesn't fit well with the design - syntax-coloring editors, for example. @@ -35,13 +35,13 @@ another side effect is the ability to us such as perl escapes, UTF-8 matching, in-subexpression ignore case, etc. elex implements start states, similar to flex. These are useful for -recognising multiline comments (almost any language), or multi-line +recognising multi-line comments (almost any language), or multi-line strings (perl, python, lua etc). elex dynamically sizes the regmatch arrays used to accommodate the largest regexp in the input, and matching subexpressions can be returned to the caller. The 0'th subexpression is the whole matching -expression, and is the same as "yytext". +expression, and is the same as "yytext" in lex(1). And so on to an elex definition which recognises C and some C++: @@ -81,7 +81,7 @@ And so on to an elex definition which re #[ \t]*(define|el(se|if)|endif|error|if|ifn?def|include|line|pragma|undef)[^\n]* { return PREPROC; } Start states are explicitly used for rules, since it is easier to read -in practice. Elex comments are eol-style comments, beginning '#' and +in practice. elex comments are eol-style comments, beginning '#' and ending with '\n'. Types can be defined using the "%type" directive, and the unsigned 32bit value they take will be returned. This is more work than using magic constants, but much more readable in practice - @@ -102,7 +102,7 @@ Start states can be defined using the %s transitioned to using the BEGIN() action, in the same way as standard lex(1). -Elex provides bookmarks, which are numbered numerically from 0. +elex provides bookmarks, which are numbered numerically from 0. Assuming a mark has already been successfully created using "set-mark", the bookmark offset can be retrieved by using its index using "get-mark", and the user can then seek to that offset. This @@ -300,7 +300,7 @@ return to the calling program. Since a input, it is advised to define return types starting at 1. Historically, in lex definitions, the user-defined types started at 256, and it was common to return ASCII values for single characters up -to 256. Since this is no longer acceptable in a world with multibyte +to 256. Since this is no longer acceptable in a world with multi-byte characters, and because we tend to tokenise based on types of input tokens, hopefully this practice will never be used again. @@ -330,7 +330,7 @@ in this. Usually, when tokenising programming language, there would be a number of definitions for reserved words, and standard identifiers. There would also be definitions for punctuation, and numeric and string constants. -Some languages have definitions for multiline strings. +Some languages have definitions for multi-line strings. Alistair Croooks Thu Nov 18 16:57:44 PST 2021
CVS commit: othersrc/external/bsd/elex/dist
Module Name:othersrc Committed By: agc Date: Wed Feb 22 01:20:52 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: striter.c striter.h Log Message: Commit elex string iterator changes missed in previous commit: + move to a more extensible embedded library namespace protection To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/striter.c \ othersrc/external/bsd/elex/dist/striter.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex/dist
Module Name:othersrc Committed By: agc Date: Wed Feb 22 01:20:52 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: striter.c striter.h Log Message: Commit elex string iterator changes missed in previous commit: + move to a more extensible embedded library namespace protection To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/striter.c \ othersrc/external/bsd/elex/dist/striter.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/dist/striter.c diff -u othersrc/external/bsd/elex/dist/striter.c:1.1 othersrc/external/bsd/elex/dist/striter.c:1.2 --- othersrc/external/bsd/elex/dist/striter.c:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/striter.c Wed Feb 22 01:20:52 2023 @@ -33,6 +33,7 @@ #include #include +#define LIB_NAMESPACE elex_ #include "striter.h" /* a string iterator structure */ @@ -102,14 +103,14 @@ addtext(striter_t *str, const char *s, u /*/ /* make a new string */ -STRITER_EXPORT striter_t * +striter_t * striter_new(void) { return calloc(1, sizeof(striter_t)); } /* dispose of string */ -STRITER_EXPORT int +int striter_dispose(striter_t **str) { if (str && *str) { @@ -122,7 +123,7 @@ striter_dispose(striter_t **str) } /* command with integer return */ -STRITER_EXPORT int +int striter_exec(striter_t *str, const char *info, const char *s, uint64_t n) { if (str == NULL || info == NULL) { @@ -136,7 +137,7 @@ striter_exec(striter_t *str, const char } /* command with char string return */ -STRITER_EXPORT char * +char * striter_exec_mem(striter_t *str, const char *info, size_t *size) { if (str == NULL || info == NULL || size == NULL) { Index: othersrc/external/bsd/elex/dist/striter.h diff -u othersrc/external/bsd/elex/dist/striter.h:1.1 othersrc/external/bsd/elex/dist/striter.h:1.2 --- othersrc/external/bsd/elex/dist/striter.h:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/striter.h Wed Feb 22 01:20:52 2023 @@ -23,42 +23,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef STRITER_H_ -#define STRITER_H_ 20211121 +#define STRITER_H_ 20230222 #include -struct striter_t; -typedef struct striter_t striter_t; - -#ifndef USE_VISIBILITY -# if defined(__GNUC__) -#if __GNUC__ >= 4 -#define USE_VISIBILITY 1 -#else -#define USE_VISIBILITY 0 -#endif -# else -#define USE_VISIBILITY 0 -# endif -#endif - -#if USE_VISIBILITY -# define DLL_PUBLIC __attribute__ ((visibility ("default"))) -# define DLL_LOCAL __attribute__ ((visibility ("hidden"))) -#else -# define DLL_PUBLIC -# define DLL_LOCAL -#endif - -#ifndef HIDE_STRITER -#define HIDE_STRITER 0 +#ifdef LIB_NAMESPACE +#define SI_CONCAT(x, y) x##y +#define SI_NAMESPACE(x, y) SI_CONCAT(x, y) +#define striter_t SI_NAMESPACE(LIB_NAMESPACE, striter_t) +#define striter_new SI_NAMESPACE(LIB_NAMESPACE, striter_new) +#define striter_dispose SI_NAMESPACE(LIB_NAMESPACE, striter_dispose) +#define striter_exec SI_NAMESPACE(LIB_NAMESPACE, striter_exec) +#define striter_exec_mem SI_NAMESPACE(LIB_NAMESPACE, striter_exec_mem) #endif -#if HIDE_STRITER -#define STRITER_EXPORT DLL_LOCAL -#else -#define STRITER_EXPORT DLL_PUBLIC -#endif +struct striter_t; +typedef struct striter_t striter_t; #ifndef __BEGIN_DECLS # if defined(__cplusplus) @@ -72,10 +52,10 @@ typedef struct striter_t striter_t; __BEGIN_DECLS -STRITER_EXPORT striter_t *striter_new(void); -STRITER_EXPORT int striter_dispose(striter_t **/*str*/); -STRITER_EXPORT int striter_exec(striter_t */*str*/, const char */*info*/, const char */*s*/, uint64_t /*n*/); -STRITER_EXPORT char *striter_exec_mem(striter_t */*str*/, const char */*info*/, size_t */*size*/); +striter_t *striter_new(void); +int striter_dispose(striter_t **/*str*/); +int striter_exec(striter_t */*str*/, const char */*info*/, const char */*s*/, uint64_t /*n*/); +char *striter_exec_mem(striter_t */*str*/, const char */*info*/, size_t */*size*/); __END_DECLS
CVS commit: othersrc/external/bsd/elex/dist
Module Name:othersrc Committed By: agc Date: Wed Feb 22 01:01:40 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: agcre.c agcre.h elex.c elex.h main.c othersrc/external/bsd/elex/dist/tests: 28.expected Log Message: Update to elex version 20230221 20230221 + protect elex embedded name space in a more extensible way + properly protect elex_make_new_rule + don't filter on symbol visibility, use LIB_NAMESPACE definition + sync agcre with bug fixes and reverse searching and other functionality updates + when searching elex start state names, use a hash value + bump version to 20230221 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/agcre.h \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/tests/28.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/dist/agcre.c diff -u othersrc/external/bsd/elex/dist/agcre.c:1.1 othersrc/external/bsd/elex/dist/agcre.c:1.2 --- othersrc/external/bsd/elex/dist/agcre.c:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/agcre.c Wed Feb 22 01:01:39 2023 @@ -36,6 +36,7 @@ #include #include +#define LIB_NAMESPACE elex_ #include "agcre.h" /* callback struct */ @@ -223,6 +224,7 @@ static int unicode_isOther_Uppercase(uin static int unicode_isPattern_White_Space(uint32_t /*ch*/); static int unicode_isalnum(uint32_t /*ch*/); static int unicode_isalpha(uint32_t /*ch*/); +static int unicode_ispunct2(uint32_t /*ch*/); static int unicode_isblank(uint32_t /*ch*/); static int unicode_iscntrl(uint32_t /*ch*/); static int unicode_isdigit(uint32_t /*ch*/); @@ -233,7 +235,7 @@ static int unicode_ispunct(uint32_t /*ch static int unicode_isspace(uint32_t /*ch*/); static int unicode_isupper(uint32_t /*ch*/); static int unicode_isxdigit(uint32_t /*ch*/); -static int unicode_isident(uint32_t /*ch*/); +static int unicode_isword(uint32_t /*ch*/); static uint32_t unicode_tolower(uint32_t /*ch*/); static uint32_t unicode_toupper(uint32_t /*ch*/); @@ -417,7 +419,7 @@ emit(re_t *re, retoken_t *tok) (tok->ch == 'd' || tok->ch == 'D') ? unicode_isdigit : (tok->ch == 'p' || tok->ch == 'P') ? unicode_isprint : (tok->ch == 's' || tok->ch == 'S') ? unicode_isspace : -unicode_isident, +unicode_isword, unicode_isupper(tok->ch)); re->pc++; return 1; @@ -1169,16 +1171,16 @@ isendline(re_t *re, input_t *in) static inline int isbegword(re_t *re, input_t *in) { - return (isbegline(re, in) || !unicode_isident(in->prevch)) && - unicode_isident(in->ch); + return (isbegline(re, in) || !unicode_isword(in->prevch)) && + unicode_isword(in->ch); } /* return 1 at end of words */ static inline int isendword(re_t *re, input_t *in) { - return (isendline(re, in) || (in->c > in->so && unicode_isident(in->prevch))) && - (!unicode_isident(in->ch)); + return (isendline(re, in) || (in->c > in->so && unicode_isword(in->prevch))) && + (!unicode_isword(in->ch)); } /* do the chars match? */ @@ -1577,10 +1579,6 @@ rec_posix_class(input_t *in, set_t *set) set_add_callback(set, unicode_isgraph, 0); in->c += 8; return 1; - case /* ":ident:]" */ 0x8a1572f1: - set_add_callback(set, unicode_isident, 0); - in->c += 8; - return 1; case /* ":lower:]" */ 0x8bfc6af8: set_add_callback(set, unicode_islower, 0); in->c += 8; @@ -1593,6 +1591,10 @@ rec_posix_class(input_t *in, set_t *set) set_add_callback(set, unicode_ispunct, 0); in->c += 8; return 1; + case /* ":punct2:]" */ 0xf09af6aa: + set_add_callback(set, unicode_ispunct2, 0); + in->c += 9; + return 1; case /* ":space:]" */ 0xa876bcf2: set_add_callback(set, unicode_isspace, 0); in->c += 8; @@ -1605,6 +1607,10 @@ rec_posix_class(input_t *in, set_t *set) set_add_callback(set, unicode_isxdigit, 0); in->c += 9; return 1; + case /* ":word:]" */ 0x96b11914: + set_add_callback(set, unicode_isword, 0); + in->c += 7; + return 1; default: return 0; } @@ -1661,7 +1667,7 @@ rec_set(input_t *in) (token->ch == 'd' || token->ch == 'D') ? unicode_isdigit : (token->ch == 'p' || token->ch == 'P') ? unicode_isprint : (token->ch == 's' || token->ch == 'S') ? unicode_isspace : - unicode_isident, + unicode_isword, unicode_isupper((uint8_t)token->ch)); break; } @@ -2612,11 +2618,20 @@ unicode_isxdigit(uint32_t ch) } static int -unicode_isident(uint32_t ch) +unicode_isword(uint32_t ch) { return unicode_isalnum(ch) || ch == '_'; } +static int +unicode_ispunct2(uint32_t ch) +{ + if (!unicode_isprint(ch) || unicode_isspace(ch) || unicode_isword(ch)) { + return 0; + } + return 1; +} + static uint32_t
CVS commit: othersrc/external/bsd/elex/dist
Module Name:othersrc Committed By: agc Date: Wed Feb 22 01:01:40 UTC 2023 Modified Files: othersrc/external/bsd/elex/dist: agcre.c agcre.h elex.c elex.h main.c othersrc/external/bsd/elex/dist/tests: 28.expected Log Message: Update to elex version 20230221 20230221 + protect elex embedded name space in a more extensible way + properly protect elex_make_new_rule + don't filter on symbol visibility, use LIB_NAMESPACE definition + sync agcre with bug fixes and reverse searching and other functionality updates + when searching elex start state names, use a hash value + bump version to 20230221 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/agcre.c \ othersrc/external/bsd/elex/dist/agcre.h \ othersrc/external/bsd/elex/dist/elex.c \ othersrc/external/bsd/elex/dist/elex.h \ othersrc/external/bsd/elex/dist/main.c cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/tests/28.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/merkletree
Module Name:othersrc Committed By: agc Date: Tue Feb 15 19:32:32 UTC 2022 Modified Files: othersrc/external/bsd/merkletree/bin: Makefile othersrc/external/bsd/merkletree/dist/tests: 16.expected Log Message: ... and point merkletree at the correct test directory To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/merkletree/bin/Makefile cvs rdiff -u -r1.2 -r1.3 \ othersrc/external/bsd/merkletree/dist/tests/16.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/merkletree/bin/Makefile diff -u othersrc/external/bsd/merkletree/bin/Makefile:1.3 othersrc/external/bsd/merkletree/bin/Makefile:1.4 --- othersrc/external/bsd/merkletree/bin/Makefile:1.3 Tue Feb 15 19:29:07 2022 +++ othersrc/external/bsd/merkletree/bin/Makefile Tue Feb 15 19:32:32 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2022/02/15 19:29:07 agc Exp $ +# $NetBSD: Makefile,v 1.4 2022/02/15 19:32:32 agc Exp $ .include @@ -102,7 +102,7 @@ t: ${PROG} rm -f 15.out @echo "16. -p path" d=$$(./mktestdir.sh ${TESTDIR});\ - env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} -l -p ${TESTDIR}/dir . > 16.out; \ + env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} -l -p $$d . > 16.out; \ diff ${TESTDIR}/16.expected 16.out || exit 1; \ rm -rf $$d rm -f 16.out Index: othersrc/external/bsd/merkletree/dist/tests/16.expected diff -u othersrc/external/bsd/merkletree/dist/tests/16.expected:1.2 othersrc/external/bsd/merkletree/dist/tests/16.expected:1.3 --- othersrc/external/bsd/merkletree/dist/tests/16.expected:1.2 Tue Feb 15 19:29:07 2022 +++ othersrc/external/bsd/merkletree/dist/tests/16.expected Tue Feb 15 19:32:32 2022 @@ -1,8 +1,12 @@ -sha512/1024 (./CVS/Template) -[0:0] 40809df6cf9c38ab2d5e7202f14ab4b9e76084f29741be8c4c93b2c439a606a821d591a622f2cb259ef38333eb8da177db6343d81d47ccc026cff245e1835d5c -sha512/1024 (./CVS/Repository) -[0:0] d3fb8cbff5170a47fe0e1aad14d24e0e1ae69640fe579411d8be476809f7ec9ceb5ed18bf9529e8af6f50211363719bcc47cdf7d0d82735155166ba54e0eb77f -sha512/1024 (./CVS/Entries) -[0:0] 0341365c2dc7fc5fa09fa295e3c819b39f5adefbdbfbbd8af91d515de3bfe272eef7a2c32b55c96ca4768a22eeca06786c51314b44946435eeef6e79cf941602 -sha512/1024 (./CVS/Root) -[0:0] 25bb805fa05ceb08a96fef703303dbaa164fb1f46cd3e1324b1c6e9fb7b7913ce0e5de38aec31520dfa0ef3a0a20fb1a6712d725ff18e4279d35c3cf51a4 +sha512/1024 (./1.in) +[0:0] e481d5d54aa2e1372bcc0f2f61250a5f3f9da4897dbea76033d4b86fcf227253c35d0951ccfa99e05a9d45d6a3f796e13e97f471a0956c5ef2f372a536f13543 +[0:1024] 1b51d590e649ba166b69713000dc476e7625fc19940f978aa5b3a3ddd560ae19059ea47ef531da833b21911a96229bb879c2f415ab1125492f736f4c289143e0 +[0:2048] e4ec3182f61352cf6eff2345f9e81e3cc8a98f2f36aead5ebd632c193606ba188e31b7e7eb150c679c97ca95745b40eef3817e5fb7e2a1066cc1df3fe4364256 +[0:3072] 99b961e0a45b52a99cd4a6876cd6fe54738131ff4662c04a33a318b6ffd2040c8fa9dc2ea7c9d52c2d0c9ee6d106219f9f4d986ac100e939bb7c4b7961acdf01 +[1:0] 902387724175187f42a6bce7ab7f1a88a4ce536662880747347dc5ea761fed5a7dac5e98962c60b5c3d7988258c0c9e2a14e37cfeb7972fe9086e693381324c8 +sha512/1024 (./1.expected) +[0:0] f4fd1ca9cb7d3833fd3824f103cae3e9901eeace852f30a76199f052ec9e5d1d32969b734adc3cb2f248cfeffe66a6e6db671b053eeb146c69fc3337edf505f1 +sha512/1024 (./7.expected) +[0:0] a1d931bfa74a61e669fec43531c1d62d4c3aa5e4172f35dc494a4728ccbea9dd49ad47b476da282aad1d4435f012cfc97207f42de1bf77c3a3119e35bbe5e1e3 +sha512/1024 (./1.symlink) +[0:0] c92811be76681fe89507f4cd767b16d80f61a9afc27d3d71608b617eba73d4e85cfcd3bf33e9cfcfa44c1f907ab4aaa54748b469fd63bce5d87e14a5af4840ff
CVS commit: othersrc/external/bsd/merkletree
Module Name:othersrc Committed By: agc Date: Tue Feb 15 19:32:32 UTC 2022 Modified Files: othersrc/external/bsd/merkletree/bin: Makefile othersrc/external/bsd/merkletree/dist/tests: 16.expected Log Message: ... and point merkletree at the correct test directory To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/merkletree/bin/Makefile cvs rdiff -u -r1.2 -r1.3 \ othersrc/external/bsd/merkletree/dist/tests/16.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/merkletree
Module Name:othersrc Committed By: agc Date: Tue Feb 15 19:29:07 UTC 2022 Modified Files: othersrc/external/bsd/merkletree/bin: Makefile othersrc/external/bsd/merkletree/dist/tests: 15.expected 16.expected Added Files: othersrc/external/bsd/merkletree/bin: mktestdir.sh Removed Files: othersrc/external/bsd/merkletree/bin: 1.expected 1.in 1.sum 10.expected 11.expected 12.expected 13.expected 14.expected 15.expected 2.expected 2.in 3.expected 4.expected 5.expected 6.expected 7.expected 8.expected 9.expected othersrc/external/bsd/merkletree/dist/tests/dir: 1.expected 1.in 1.symlink 7.expected Log Message: clean up old test files do the path and directory test in a different way (cvs has issues with symlinks, yay - create the test directory on the fly each time remove the hardcoded test directory To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/merkletree/bin/1.expected \ othersrc/external/bsd/merkletree/bin/1.sum \ othersrc/external/bsd/merkletree/bin/10.expected \ othersrc/external/bsd/merkletree/bin/11.expected \ othersrc/external/bsd/merkletree/bin/12.expected \ othersrc/external/bsd/merkletree/bin/13.expected \ othersrc/external/bsd/merkletree/bin/14.expected \ othersrc/external/bsd/merkletree/bin/15.expected \ othersrc/external/bsd/merkletree/bin/2.expected \ othersrc/external/bsd/merkletree/bin/2.in \ othersrc/external/bsd/merkletree/bin/3.expected \ othersrc/external/bsd/merkletree/bin/4.expected \ othersrc/external/bsd/merkletree/bin/5.expected \ othersrc/external/bsd/merkletree/bin/6.expected \ othersrc/external/bsd/merkletree/bin/7.expected \ othersrc/external/bsd/merkletree/bin/8.expected \ othersrc/external/bsd/merkletree/bin/9.expected cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/merkletree/bin/1.in cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/merkletree/bin/Makefile cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/merkletree/bin/mktestdir.sh cvs rdiff -u -r1.1 -r1.2 \ othersrc/external/bsd/merkletree/dist/tests/15.expected \ othersrc/external/bsd/merkletree/dist/tests/16.expected cvs rdiff -u -r1.1 -r0 \ othersrc/external/bsd/merkletree/dist/tests/dir/1.expected \ othersrc/external/bsd/merkletree/dist/tests/dir/1.in \ othersrc/external/bsd/merkletree/dist/tests/dir/1.symlink \ othersrc/external/bsd/merkletree/dist/tests/dir/7.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/merkletree/bin/Makefile diff -u othersrc/external/bsd/merkletree/bin/Makefile:1.2 othersrc/external/bsd/merkletree/bin/Makefile:1.3 --- othersrc/external/bsd/merkletree/bin/Makefile:1.2 Tue Feb 15 18:48:32 2022 +++ othersrc/external/bsd/merkletree/bin/Makefile Tue Feb 15 19:29:07 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2022/02/15 18:48:32 agc Exp $ +# $NetBSD: Makefile,v 1.3 2022/02/15 19:29:07 agc Exp $ .include @@ -95,12 +95,16 @@ t: ${PROG} diff ${TESTDIR}/14.expected 14.out rm -f 14.out @echo "15. json, path directory and symlinks" - env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} -j -p ${TESTDIR}/dir . > 15.out - diff ${TESTDIR}/15.expected 15.out + d=$$(./mktestdir.sh ${TESTDIR});\ + env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} -j -p $$d . > 15.out; \ + diff ${TESTDIR}/15.expected 15.out || exit 1; \ + rm -rf $$d rm -f 15.out @echo "16. -p path" - env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} -l -p ${TESTDIR}/dir . > 16.out - diff ${TESTDIR}/16.expected 16.out + d=$$(./mktestdir.sh ${TESTDIR});\ + env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} -l -p ${TESTDIR}/dir . > 16.out; \ + diff ${TESTDIR}/16.expected 16.out || exit 1; \ + rm -rf $$d rm -f 16.out @echo "17. non-existent file" -env LD_LIBRARY_PATH=${LIB_MERKLETREE_DIR} ./${PROG} skdjvsjfsvdfjbnldkbmdgkb Index: othersrc/external/bsd/merkletree/dist/tests/15.expected diff -u othersrc/external/bsd/merkletree/dist/tests/15.expected:1.1 othersrc/external/bsd/merkletree/dist/tests/15.expected:1.2 --- othersrc/external/bsd/merkletree/dist/tests/15.expected:1.1 Tue Feb 15 18:48:32 2022 +++ othersrc/external/bsd/merkletree/dist/tests/15.expected Tue Feb 15 19:29:07 2022 @@ -1,4 +1,4 @@ {"name":"./1.in","blocksize":1024,"digest":"sha512","1:0":"902387724175187f42a6bce7ab7f1a88a4ce536662880747347dc5ea761fed5a7dac5e98962c60b5c3d7988258c0c9e2a14e37cfeb7972fe9086e693381324c8"} -{"name":"./7.expected","blocksize":1024,"digest":"sha512","0:0":"e4f51d07a871d2a74660fe327cfd6ff8183bebb011dbe442d8115e45a744af09ee9907427f968cc9c0db5a9fc8b03f57e942a8964c8e75701cd3b66db60ead3f"} +{"name":"./1.expected","blocksize":1024,"digest":"sha512","0:0":"f4fd1ca9cb7d3833fd3824f103cae3e9901eeace852f30a76199f052ec9e5d1d32969b734adc3cb2f248cfeffe66a6e6db671b053eeb146c69fc3337edf505f1"}
CVS commit: othersrc/external/bsd/merkletree
Module Name:othersrc Committed By: agc Date: Tue Feb 15 19:29:07 UTC 2022 Modified Files: othersrc/external/bsd/merkletree/bin: Makefile othersrc/external/bsd/merkletree/dist/tests: 15.expected 16.expected Added Files: othersrc/external/bsd/merkletree/bin: mktestdir.sh Removed Files: othersrc/external/bsd/merkletree/bin: 1.expected 1.in 1.sum 10.expected 11.expected 12.expected 13.expected 14.expected 15.expected 2.expected 2.in 3.expected 4.expected 5.expected 6.expected 7.expected 8.expected 9.expected othersrc/external/bsd/merkletree/dist/tests/dir: 1.expected 1.in 1.symlink 7.expected Log Message: clean up old test files do the path and directory test in a different way (cvs has issues with symlinks, yay - create the test directory on the fly each time remove the hardcoded test directory To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/merkletree/bin/1.expected \ othersrc/external/bsd/merkletree/bin/1.sum \ othersrc/external/bsd/merkletree/bin/10.expected \ othersrc/external/bsd/merkletree/bin/11.expected \ othersrc/external/bsd/merkletree/bin/12.expected \ othersrc/external/bsd/merkletree/bin/13.expected \ othersrc/external/bsd/merkletree/bin/14.expected \ othersrc/external/bsd/merkletree/bin/15.expected \ othersrc/external/bsd/merkletree/bin/2.expected \ othersrc/external/bsd/merkletree/bin/2.in \ othersrc/external/bsd/merkletree/bin/3.expected \ othersrc/external/bsd/merkletree/bin/4.expected \ othersrc/external/bsd/merkletree/bin/5.expected \ othersrc/external/bsd/merkletree/bin/6.expected \ othersrc/external/bsd/merkletree/bin/7.expected \ othersrc/external/bsd/merkletree/bin/8.expected \ othersrc/external/bsd/merkletree/bin/9.expected cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/merkletree/bin/1.in cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/merkletree/bin/Makefile cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/merkletree/bin/mktestdir.sh cvs rdiff -u -r1.1 -r1.2 \ othersrc/external/bsd/merkletree/dist/tests/15.expected \ othersrc/external/bsd/merkletree/dist/tests/16.expected cvs rdiff -u -r1.1 -r0 \ othersrc/external/bsd/merkletree/dist/tests/dir/1.expected \ othersrc/external/bsd/merkletree/dist/tests/dir/1.in \ othersrc/external/bsd/merkletree/dist/tests/dir/1.symlink \ othersrc/external/bsd/merkletree/dist/tests/dir/7.expected Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/merkletree
Module Name:othersrc Committed By: agc Date: Tue Feb 15 18:48:32 UTC 2022 Modified Files: othersrc/external/bsd/merkletree: Makefile othersrc/external/bsd/merkletree/bin: 1.in Makefile othersrc/external/bsd/merkletree/dist: Makefile libmerkletree.3 main.c merkletree.1 merkletree.h othersrc/external/bsd/merkletree/lib: Makefile Added Files: othersrc/external/bsd/merkletree/dist: blake2.c blake2.h blake2b-hl.c blake2b.c blake2b.h blake2s-hl.c blake2s.c blake2s.h edstring.c edstring.h keccak.c keccak.h libdigest.c libdigest.h merkletree.c sha2.c sha2.h sha3.c sha3.h sha3hl.c othersrc/external/bsd/merkletree/dist/tests: 1.expected 1.in 10.expected 11.expected 12.expected 13.expected 14.expected 15.expected 16.expected 19.expected 2.expected 20.expected 21.expected 22.expected 3.expected 4.expected 5.expected 6.expected 7.expected 9.expected othersrc/external/bsd/merkletree/dist/tests/dir: 1.expected 1.in 1.symlink 7.expected Removed Files: othersrc/external/bsd/merkletree/dist: Makefile.in Makefile.lib.in Makefile.libtool.in Log Message: This is the updated version of the Merkletree code, version 20220204 Digests supported are a bit more up to date: blake2b blake2s sha256 sha3_256 sha3_512 sha512 The default algorithm is sha512, with an input blocksize of 1024. Input can either be in the form of files, other directory entries, or from standard input. Output is in either standard format (similar to digest(1)), % merkletree 1.in sha512/1024 (1.in) 902387724175187f42a6bce7ab7f1a88a4ce536662880747347dc5ea761fed5a7dac5e98962c60b5c3d7988258c0c9e2a14e37cfeb7972fe9086e693381324c8 % merkletree < 1.in 902387724175187f42a6bce7ab7f1a88a4ce536662880747347dc5ea761fed5a7dac5e98962c60b5c3d7988258c0c9e2a14e37cfeb7972fe9086e693381324c8 % or can be in JSON format: {"name":"1.in","blocksize":1024,"digest":"sha512","1:0":"902387724175187f42a6bce7ab7f1a88a4ce536662880747347dc5ea761fed5a7dac5e98962c60b5c3d7988258c0c9e2a14e37cfeb7972fe9086e693381324c8"} (or, run through jq): % jq . < dist/tests/11.expected { "name": "1.in", "blocksize": 1024, "digest": "sha512", "1:0": "902387724175187f42a6bce7ab7f1a88a4ce536662880747347dc5ea761fed5a7dac5e98962c60b5c3d7988258c0c9e2a14e37cfeb7972fe9086e693381324c8" } % The input blocksize can be specified by the user, but must be twice the size of the selected digest's algorithm in raw bytes. It is possible to run merkletree on a hierarchy by using the "-p path" argument: % merkletree -a sha3_256 -p / bin sha3_256/1024 (bin/chgrp) 39e8cc74388ffe34469b1ca91f63d49982662b1c942c9afbd32f48185c3df5ca sha3_256/1024 (bin/cat) edc35ffbe3ee8c022bb7914530562a3da46680a5e7f3b37749f04ee04cb87cdb sha3_256/1024 (bin/chmod) c58fca83a80c83f645e80365374be1d9191324cd490a78b99e3ab33fedebacb5 sha3_256/1024 (bin/chio) d8a00ff730bc8a4a108d170ab6f2d690e7f6c201b164b23f256f6013ee08ffef sha3_256/1024 (bin/domainname) b04a2dafa1a9b14257f63e49acac8c91150c09649519daa3fc0e2f6add79644e sha3_256/1024 (bin/cp) 7c97f28d4257e6743e315b46d8119baa3718adf6b1b25e4221016dd90db266c6 sha3_256/1024 (bin/cpio) 7e2371ff80c900f31783e147ded8a5a2b87cebdff6eda3638d52611aefe63243 sha3_256/1024 (bin/csh) 16e4e9acd76b3ca6de71a796c77a0593e365048037d0e433cba96d5a8d2b27d4 sha3_256/1024 (bin/date) 05891939e39d7180e8bf252b8b8fc087b309a46e4845b4980bbc3fea1f5307ae sha3_256/1024 (bin/dd) 67b28e1d3399a2edef52b39683a0d8b56f812fa37b56aeda92a427b0db50dfb8 sha3_256/1024 (bin/df) a360c756b2d64003247140924b8223b1dbe161f9b70ce96a915c85d9bab23e51 sha3_256/1024 (bin/hostname) ddba878bc063a3123cdb4cf8d272a0438ab2f6a4141618e70726fda45f41b1cb sha3_256/1024 (bin/echo) cd3c415f168bb4a8df2e2f12b1238137b7004453affa5497741175761e516cc0 sha3_256/1024 (bin/ed) 7a915104df73a5682d091fb0214af110e4c1c6bec306d9ccf2ffd527c09c856e sha3_256/1024 (bin/expr) aaf51c742e02ca40abc402a6fdd283488c11d3e549039d0d62e7c29795987185 sha3_256/1024 (bin/mkdir) e425ae2f2c7771d4e4bfae0f335c44016548a37eb1915b5ed665ba4e4feeb1b6 sha3_256/1024 (bin/kill) 999a17e8c03e022180fe842e92273f7656719027618bb9de90b46ada48ab518f sha3_256/1024 (bin/ksh) a862c37708a7417a4e35ed04363ef3d83c141efc5659eb04c141063fe0ec7ba2 sha3_256/1024 (bin/ln) a0e93d49eba74b0b48a712fa143faaf9735cf7a82343e992cb12b3cc8fa485c2 sha3_256/1024 (bin/ls) 006d65534a13845efa9af7c252174e54a75c142a1db4dfd86c78f95c7f5297b6 sha3_256/1024 (bin/pax) 0fb2c7557feb33ea9073b36db01a44ef4b2609386a4fb771db21ad44fd48064f sha3_256/1024 (bin/sleep)
CVS commit: othersrc/external/bsd/elex/dist/tests
Module Name:othersrc Committed By: agc Date: Thu Dec 9 04:18:00 UTC 2021 Modified Files: othersrc/external/bsd/elex/dist/tests: 14.expected 14.in 20.expected 20.in Log Message: Omit RCS Ids from test input and expected output files. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/tests/14.expected \ othersrc/external/bsd/elex/dist/tests/14.in \ othersrc/external/bsd/elex/dist/tests/20.expected \ othersrc/external/bsd/elex/dist/tests/20.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/elex/dist/tests/14.expected diff -u othersrc/external/bsd/elex/dist/tests/14.expected:1.1 othersrc/external/bsd/elex/dist/tests/14.expected:1.2 --- othersrc/external/bsd/elex/dist/tests/14.expected:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/tests/14.expected Thu Dec 9 04:18:00 2021 @@ -2,10 +2,6 @@ [1] 2 ' ' -[3] 61 '# $NetBSD: 14.expected,v 1.1 2021/12/09 04:15:26 agc Exp $' -[1] 2 ' - -' [3] 53 '# Copyright (c) 2013 Alistair Crooks ' [1] 1 ' ' Index: othersrc/external/bsd/elex/dist/tests/14.in diff -u othersrc/external/bsd/elex/dist/tests/14.in:1.1 othersrc/external/bsd/elex/dist/tests/14.in:1.2 --- othersrc/external/bsd/elex/dist/tests/14.in:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/tests/14.in Thu Dec 9 04:18:00 2021 @@ -1,7 +1,5 @@ #! /bin/sh -# $NetBSD: 14.in,v 1.1 2021/12/09 04:15:26 agc Exp $ - # Copyright (c) 2013 Alistair Crooks # All rights reserved. # Index: othersrc/external/bsd/elex/dist/tests/20.expected diff -u othersrc/external/bsd/elex/dist/tests/20.expected:1.1 othersrc/external/bsd/elex/dist/tests/20.expected:1.2 --- othersrc/external/bsd/elex/dist/tests/20.expected:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/tests/20.expected Thu Dec 9 04:18:00 2021 @@ -1,9 +1,6 @@ [3] 9 '#!/bin/sh' [1] 1 ' ' -[3] 91 '# $Header: /cvsroot/othersrc/external/bsd/elex/dist/tests/20.expected,v 1.1 2021/12/09 04:15:26 agc Exp $' -[1] 1 ' -' [3] 1 '#' [1] 1 ' ' Index: othersrc/external/bsd/elex/dist/tests/20.in diff -u othersrc/external/bsd/elex/dist/tests/20.in:1.1 othersrc/external/bsd/elex/dist/tests/20.in:1.2 --- othersrc/external/bsd/elex/dist/tests/20.in:1.1 Thu Dec 9 04:15:26 2021 +++ othersrc/external/bsd/elex/dist/tests/20.in Thu Dec 9 04:18:00 2021 @@ -1,5 +1,4 @@ #!/bin/sh -# $Header: /cvsroot/othersrc/external/bsd/elex/dist/tests/20.in,v 1.1 2021/12/09 04:15:26 agc Exp $ # # Install Perl scripts, adjusting for the correct pathname # $1 = name of perl program
CVS commit: othersrc/external/bsd/elex/dist/tests
Module Name:othersrc Committed By: agc Date: Thu Dec 9 04:18:00 UTC 2021 Modified Files: othersrc/external/bsd/elex/dist/tests: 14.expected 14.in 20.expected 20.in Log Message: Omit RCS Ids from test input and expected output files. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/elex/dist/tests/14.expected \ othersrc/external/bsd/elex/dist/tests/14.in \ othersrc/external/bsd/elex/dist/tests/20.expected \ othersrc/external/bsd/elex/dist/tests/20.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/elex
Module Name:othersrc Committed By: agc Date: Thu Dec 9 04:15:26 UTC 2021 Added Files: othersrc/external/bsd/elex: Makefile README TODO othersrc/external/bsd/elex/bin: Makefile othersrc/external/bsd/elex/dist: Makefile agcre.c agcre.h elex.c elex.h main.c striter.c striter.h othersrc/external/bsd/elex/dist/tests: 1.expected 1.in 1.lex 10.expected 10.in 11.expected 11.in 12.expected 12.lex 13.expected 13.lex 14.expected 14.in 14.lex 15.expected 15.in 15.lex 16.expected 16.in 16.lex 17.expected 17.in 17.lex 18.expected 18.in 18.lex 19.expected 19.in 19.lex 2.expected 2.in 20.expected 20.in 20.lex 21.expected 21.in 21.lex 22.expected 22.lex 23.expected 23.lex 24.expected 24.lex 25.expected 25.lex 26.expected 26.lex 27.expected 27.lex 28.expected 29.expected 29.in 29.lex 3.expected 3.in 3.lex 30.expected 30.lex 4.expected 4.lex 5.expected 5.in 5.lex 6.expected 6.in 6.lex 7.expected 7.in 7.lex 8.expected 8.in 8.lex 9.expected 9.in 9.lex othersrc/external/bsd/elex/lib: Makefile shlib_version Log Message: Elex - an embeddable regexp-based lexer === I have found myself fairly often needing a lexer utility to tokenise input (for configuration files, for various file-scanning utilities, and for other applciations), but using full-blown lex(1) program to do this is overkill, or designed for a separate process, which doesn't fit well with the design - syntax-coloring editors, for example. This utility, elex, is a regexp-based tokenizer, an embedded lexer, which can be used for various uses. It usually takes a lexer file (similar to lex input files), although the API allows lexers to be built on the fly by just issuing the calls to make new rules. Implementation == Normal lex(1) is implemented (usually) as a conglomeration of all the regular expressions for a start state - if multiple matches are found, the largest match is the one used. I've found that, in practice, this constrains the way a number of things are done. So I've implemented elex, using a multiple, prioritised multiple regexp matching scheme. This supercedes the usual way of distinguishing reserved words and identifiers in the lexer - recognising all "words" first, and searching for each word through a number of tables; if a match is not found, then the word recognized is an identifier. elex works around this by using a regexp to match reserved words first, and then to recognise the word as an identifier after that. Since normal regular expressions usually progress through the input trying to find a match, the regular expressions used in elex are constrained by anchoring the search, not allowing progression through the input. In practice, this makes for more efficient matching. another side effect is the ability to use more modern regexp features, such as perl escapes, UTF-8 matching, in-subexpression ignore case, etc. elex implements start states, similar to flex. These are useful for recognising multiline comments (almost any language), or multi-line strings (perl, python, lua etc). elex dynamically sizes the regmatch arrays used to accommodate the largest regexp in the input, and matching subexpressions can be returned to the caller. The 0'th subexpression is the whole matching expression, and is the same as "yytext". And so on to an elex definition which recognises C and some C++: # start state %state COMMENT # the types we define %type IDENT 0xdb8ea4d %type PUNCT 0xe454e3a %type NUMBER0xca1edaec %type COMMENT 0xee5ae423 %type CONSTANT 0xd497741f %type PREPROC 0xdcf9b98d %type RESWORD1 0xb5ac6a6a %type RESWORD2 0xb5ac6a6b # and finally... the rules (auto|char|class|const|double|enum|extern|float|friend|inline|int|long|mutable|namespace|new|private|protected|public|register|requires|short|signed|static|this|struct|this|typedef|union|unsigned|void|volatile)\> { return RESWORD1; } (asm|break|case|catch|continue|default|do|else|for|goto|if|return|switch|throw|try|while)\> { return RESWORD2; } [a-zA-Z_][0-9a-zA-Z_]* { return IDENT; } ([1-9][0-9]*|0x[0-9a-f]|0X[0-9A-F]+|0[0-7]*|'(\\.|[^'])*') { return NUMBER; } [ \t\n\r]+ { return PUNCT; } /\* { BEGIN(COMMENT); return COMMENT; } [^\n]*\*/ { BEGIN(INITIAL); return COMMENT; } \n|[^\n]+ { return COMMENT; } //[^\n]*{ return COMMENT; } "(\\.|[^"])*" { return CONSTANT; } (==|[-]>|!=|<=|>=|~=|%=|&=|[*]=|[-]=|[+]=|[|]=|(<<|>>)=?) { return PUNCT; } [\u005b;(){}\u005d*<>,+/%~!\u005e&=|.?:\u002d] { return
CVS commit: othersrc/external/bsd/agcre/dist
Module Name:othersrc Committed By: agc Date: Sat Dec 4 03:40:29 UTC 2021 Modified Files: othersrc/external/bsd/agcre/dist: agcre.h Log Message: Change HIDE_AGCRE to be a 0/1 value, rather than defined/undef By default, don't hide (i.e. export all symbols) NFC To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/agcre/dist/agcre.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/agcre/dist
Module Name:othersrc Committed By: agc Date: Sat Dec 4 01:54:51 UTC 2021 Modified Files: othersrc/external/bsd/agcre/dist: agcre.c agcre.h Log Message: Add visibility definitions for agcre. For any sources embedding these routines, simply define HIDE_AGCRE, before including the agcre.h header file, and the routines will have the hidden visibility attribute set on them. For more information on that, see https://gcc.gnu.org/wiki/Visibility To stop agcre routines being exported in a .so, simply define HIDE_AGCRE - I've been doing this successfully in library Makefiles, for example, this is from elex/lib/Makefile (elex is a library that calls the agcre functions): # set symbol visibility for .so CPPFLAGS+= -DHIDE_AGCRE and the agcre symbols will be found just fine when linking and running, but will not be exported by the linker. This can save headaches, and weird crashes, especially when combined with ASLR (when two libraries define the same symbol, but with different structs or arguments). BEFORE: [2021/12/03 Fri 17:47:19] agc@netbsd-002 ~/local/elex-2025 [13781] > nm -D lib/libelex.so w _Jv_RegisterClasses w __cxa_finalize w __deregister_frame_info U __fstat50 w __register_frame_info U __sF 0020f198 D _end c240 T _fini 0ea0 T _init aa13 T agcre_new bc48 T agcre_regasub aa28 T agcre_regcomp adde T agcre_regerror ae48 T agcre_regexec b8fd T agcre_regfree b9a2 T agcre_regnsub b7e8 T agcre_rev_regexec U asprintf U calloc 27f6 T elex_dispose 2b6a T elex_exec 2f5b T elex_exec_str 2982 T elex_make_new_rule 27bb T elex_new U fclose U fopen U fprintf U free U fwrite U memchr U memcmp U memcpy U memmove U memset U mmap U munmap U printf U putchar U realloc U snprintf U strchr U strcmp U strdup c10c T striter_dispose c165 T striter_exec c1da T striter_exec_mem c0f7 T striter_new U strlen U strtol U strtoul U vsnprintf U warn U warnx [2021/12/03 Fri 17:47:22] agc@netbsd-002 ~/local/elex-2025 [13782] > AFTER adding HIDE_AGCRE (and HIDE_STRITER) to elex/lib/Makefile: [2021/12/03 Fri 17:47:45] agc@netbsd-002 ~/local/elex-2025 [13774] > nm -D lib/libelex.so w _Jv_RegisterClasses w __cxa_finalize w __deregister_frame_info U __fstat50 w __register_frame_info U __sF 0020e160 D _end bf30 T _fini 0c00 T _init U asprintf U calloc 24e6 T elex_dispose 285a T elex_exec 2c4b T elex_exec_str 2672 T elex_make_new_rule 24ab T elex_new U fclose U fopen U fprintf U free U fwrite U memchr U memcmp U memcpy U memmove U memset U mmap U munmap U printf U putchar U realloc U snprintf U strchr U strcmp U strdup U strlen U strtol U strtoul U vsnprintf U warn U warnx To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u
CVS commit: src
Module Name:src Committed By: agc Date: Mon Nov 1 03:09:59 UTC 2021 Modified Files: src/external/apache2/argon2/dist/phc-winner-argon2/src: argon2.c core.c src/lib/libcrypt: Makefile Log Message: Remove the COPTS.*+= -Wno-error=.* lines for building argon2 sources, by fixing the problems at source. Addresses Rin Okuyama's concerns on tech-userlevel/tech-crypto in Message-ID: To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c cvs rdiff -u -r1.2 -r1.3 \ src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c cvs rdiff -u -r1.32 -r1.33 src/lib/libcrypt/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c diff -u src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c:1.1 src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c:1.2 --- src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c:1.1 Wed Oct 9 13:13:09 2019 +++ src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c Mon Nov 1 03:09:59 2021 @@ -283,7 +283,7 @@ int argon2_verify(const char *encoded, c goto fail; } -ctx.pwd = (uint8_t *)pwd; +ctx.pwd = __UNCONST(pwd); ctx.pwdlen = (uint32_t)pwdlen; ret = decode_string(, encoded, type); @@ -346,7 +346,7 @@ int argon2_verify_ctx(argon2_context *co return ret; } -if (argon2_compare((uint8_t *)hash, context->out, context->outlen)) { +if (argon2_compare((const uint8_t *)hash, context->out, context->outlen)) { return ARGON2_VERIFY_MISMATCH; } Index: src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c diff -u src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c:1.2 src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c:1.3 --- src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c:1.2 Sun Oct 17 10:44:21 2021 +++ src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c Mon Nov 1 03:09:59 2021 @@ -414,7 +414,7 @@ int validate_inputs(const argon2_context } } -if (ARGON2_MIN_PWD_LENGTH > context->pwdlen) { +if (ARGON2_MIN_PWD_LENGTH + 1 > context->pwdlen + 1) { return ARGON2_PWD_TOO_SHORT; } @@ -443,7 +443,7 @@ int validate_inputs(const argon2_context return ARGON2_SECRET_PTR_MISMATCH; } } else { -if (ARGON2_MIN_SECRET > context->secretlen) { +if (ARGON2_MIN_SECRET + 1 > context->secretlen + 1) { return ARGON2_SECRET_TOO_SHORT; } if (ARGON2_MAX_SECRET < context->secretlen) { @@ -457,7 +457,7 @@ int validate_inputs(const argon2_context return ARGON2_AD_PTR_MISMATCH; } } else { -if (ARGON2_MIN_AD_LENGTH > context->adlen) { +if (ARGON2_MIN_AD_LENGTH + 1 > context->adlen + 1) { return ARGON2_AD_TOO_SHORT; } if (ARGON2_MAX_AD_LENGTH < context->adlen) { @@ -470,7 +470,7 @@ int validate_inputs(const argon2_context return ARGON2_MEMORY_TOO_LITTLE; } -if (ARGON2_MAX_MEMORY < context->m_cost) { +if (ARGON2_MAX_MEMORY - 1 < context->m_cost - 1) { return ARGON2_MEMORY_TOO_MUCH; } Index: src/lib/libcrypt/Makefile diff -u src/lib/libcrypt/Makefile:1.32 src/lib/libcrypt/Makefile:1.33 --- src/lib/libcrypt/Makefile:1.32 Sun Oct 31 09:16:08 2021 +++ src/lib/libcrypt/Makefile Mon Nov 1 03:09:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2021/10/31 09:16:08 nia Exp $ +# $NetBSD: Makefile,v 1.33 2021/11/01 03:09:58 agc Exp $ USE_FORT?= yes # cryptographic software @@ -28,8 +28,6 @@ SRCS+= crypt-argon2.c SRCS+= ${src} COPTS.${src}+= -fvisibility=hidden . endfor -COPTS.argon2.c+= -Wno-error=cast-qual -COPTS.core.c+= -Wno-error=type-limits . if ${MACHINE} == "vax" COPTS.blake2b.c+= -O0 . endif
CVS commit: src
Module Name:src Committed By: agc Date: Mon Nov 1 03:09:59 UTC 2021 Modified Files: src/external/apache2/argon2/dist/phc-winner-argon2/src: argon2.c core.c src/lib/libcrypt: Makefile Log Message: Remove the COPTS.*+= -Wno-error=.* lines for building argon2 sources, by fixing the problems at source. Addresses Rin Okuyama's concerns on tech-userlevel/tech-crypto in Message-ID: To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/apache2/argon2/dist/phc-winner-argon2/src/argon2.c cvs rdiff -u -r1.2 -r1.3 \ src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c cvs rdiff -u -r1.32 -r1.33 src/lib/libcrypt/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/bufgap/dist
Module Name:othersrc Committed By: agc Date: Tue Oct 12 04:12:30 UTC 2021 Modified Files: othersrc/external/bsd/bufgap/dist: gap.c gap.h Log Message: Add buffer gap accessor to return the complete text of the buffer as a string Bump version number To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.c cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/gap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/bufgap/dist/gap.c diff -u othersrc/external/bsd/bufgap/dist/gap.c:1.1 othersrc/external/bsd/bufgap/dist/gap.c:1.2 --- othersrc/external/bsd/bufgap/dist/gap.c:1.1 Thu Sep 30 22:01:03 2021 +++ othersrc/external/bsd/bufgap/dist/gap.c Tue Oct 12 04:12:30 2021 @@ -805,6 +805,16 @@ gap_exec_string(gap_t *gap, const char * *n = cc; } return s; + case /* "text?" */ 0x10eee6dd: + cc = gap->lhsc + gap->rhsc; + s = calloc(1, cc + 1); + memcpy(s, gap->v, gap->lhsc); + memcpy([gap->lhsc], >v[rhssub(gap->size, gap->rhsc)], gap->rhsc); + s[cc] = 0x0; + if (n != NULL) { + *n = cc; + } + return s; } return NULL; } Index: othersrc/external/bsd/bufgap/dist/gap.h diff -u othersrc/external/bsd/bufgap/dist/gap.h:1.2 othersrc/external/bsd/bufgap/dist/gap.h:1.3 --- othersrc/external/bsd/bufgap/dist/gap.h:1.2 Thu Sep 30 22:16:57 2021 +++ othersrc/external/bsd/bufgap/dist/gap.h Tue Oct 12 04:12:30 2021 @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef GAP_H_ -#define GAP_H_ 20210930 +#define GAP_H_ 20211011 #include
CVS commit: othersrc/external/bsd/bufgap/dist
Module Name:othersrc Committed By: agc Date: Tue Oct 12 04:12:30 UTC 2021 Modified Files: othersrc/external/bsd/bufgap/dist: gap.c gap.h Log Message: Add buffer gap accessor to return the complete text of the buffer as a string Bump version number To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.c cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/gap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/agcre
Module Name:othersrc Committed By: agc Date: Tue Oct 5 22:17:15 UTC 2021 Modified Files: othersrc/external/bsd/agcre/dist: libagcre.3 othersrc/external/bsd/agcre/lib: Makefile Log Message: add MLINKS for rev_regexec and reg[an]sub functions To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/agcre/dist/libagcre.3 cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/agcre/dist/libagcre.3 diff -u othersrc/external/bsd/agcre/dist/libagcre.3:1.4 othersrc/external/bsd/agcre/dist/libagcre.3:1.5 --- othersrc/external/bsd/agcre/dist/libagcre.3:1.4 Tue Oct 5 18:56:24 2021 +++ othersrc/external/bsd/agcre/dist/libagcre.3 Tue Oct 5 22:17:15 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: libagcre.3,v 1.4 2021/10/05 18:56:24 uwe Exp $ +.\" $NetBSD: libagcre.3,v 1.5 2021/10/05 22:17:15 agc Exp $ .\" .\" Copyright (c) 2017,2020,2021 Alistair Crooks .\" All rights reserved. @@ -162,6 +162,18 @@ expression, the individual virtual machi will be printed on standard output. .It Dv AGCRE_REG_TRACE Traces execution of the regular expression. +.It Dv AGCRE_REG_CTAGS +This is used where a regular expression pattern was generated by the +.Xr ctags 1 +program, since the syntax generated does not conform to a standard +basic regular expression. +In particular, +.Xr ctags 1 +outputs function location patterns which contain an unescaped +.Ql * +character, whereas basic regular expressions will only +recognise an asterisk as a standard character if it appears +at the start of an expression. .\".It Dv AGCRE_IN_8BITS .\"This indicates to the .\".Fn agcre_regcomp @@ -240,18 +252,6 @@ should therefore use the definition. Anchoring can be specified at expression compile time, and/or at expression execution time. -.It Dv AGCRE_REG_ANCHOR -This is used where a regular expression pattern was generated by the -.Xr ctags 1 -program, since the syntax generated does not conform to a standard -basic regular expression. -In particular, -.Xr ctags 1 -outputs function location patterns which contain an unescaped -.Ql * -character, whereas basic regular expressions will only -recognise an asterisk as a standard character if it appears -at the start of an expression. .\".It Dv AGCRE_IN_8BITS .\"This indicates to the .\".Fn agcre_regexec @@ -318,7 +318,7 @@ and character sets, ranges and character classes. .Pp Because a virtual machine is used, -there are no real limits top the size of regular expression +there are no real limits to the size of regular expression which can be compiled. However, to avoid abuse, certain arbitrary limits are set: .Bl -bullet -offset indent -compact @@ -332,6 +332,51 @@ the maximum number of is set at compile-time to 1024 .El .Pp +To deallocate storage in the compiled regular expression, the +.Fn agcre_regfree +is used. +Once the storage is deallocated, it cannot be used again +without another compilation using +.Fn agcre_regcomp . +.Pp +If storage for the regular expression was allocated using +.Fn agcre_new +then that storage should be deallocated using the +.Xr free 3 +function. +.Pp +The +.Fn agcre_regnsub +and +.Fn agcre_regasub +functions perform substitutions using +.Xr sed 1 +like syntax. +They return the length of +the string that would have been created if there was enough space or -1 on error, setting errno. +The result is +placed in buf which is user-supplied in +.Fn agcre_regnsub +and dynamically allocated in +.Fn agcre_regasub . +The sub argument +contains a substitution string which might refer to the first 9 regular expression strings using +.Ql \e +to refer +to the nth matched item, or +.Ql & +(which is equivalent to +.Ql \e0 ) +to refer to the full match. +The match array must be +at least 10 elements long, +and should contain the result of the matches from a previous +.Fn agcre_regexec +call. +Only 10 +elements of the rm array can be used. +The str argument contains the source string in which transformations will be substituted. +.Pp To show the value of constant-time execution, especially for regular expressions which may be subject to abuse, the standard Index: othersrc/external/bsd/agcre/lib/Makefile diff -u othersrc/external/bsd/agcre/lib/Makefile:1.2 othersrc/external/bsd/agcre/lib/Makefile:1.3 --- othersrc/external/bsd/agcre/lib/Makefile:1.2 Tue Oct 5 01:23:39 2021 +++ othersrc/external/bsd/agcre/lib/Makefile Tue Oct 5 22:17:15 2021 @@ -1,17 +1,19 @@ -# $NetBSD: Makefile,v 1.2 2021/10/05 01:23:39 agc Exp $ +# $NetBSD: Makefile,v 1.3 2021/10/05 22:17:15 agc Exp $ LIB= agcre SRCS+= agcre.c MAN= libagcre.3 agcre_format.7 MLINKS+= libagcre.3 agcre_regcomp.3 MLINKS+= libagcre.3 agcre_regexec.3 +MLINKS+= libagcre.3 agcre_rev_regexec.3 MLINKS+= libagcre.3 agcre_regfree.3 MLINKS+= libagcre.3 agcre_regerror.3 +MLINKS+= libagcre.3
CVS commit: othersrc/external/bsd/agcre
Module Name:othersrc Committed By: agc Date: Tue Oct 5 22:17:15 UTC 2021 Modified Files: othersrc/external/bsd/agcre/dist: libagcre.3 othersrc/external/bsd/agcre/lib: Makefile Log Message: add MLINKS for rev_regexec and reg[an]sub functions To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/agcre/dist/libagcre.3 cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/agcre
Module Name:othersrc Committed By: agc Date: Tue Oct 5 01:23:39 UTC 2021 Modified Files: othersrc/external/bsd/agcre/dist: Makefile.bsd Makefile.in Makefile.lib.in Makefile.libtool.in agcre.h libagcre.3 main.c othersrc/external/bsd/agcre/dist/tests: 54.expected 62.expected othersrc/external/bsd/agcre/lib: Makefile shlib_version Added Files: othersrc/external/bsd/agcre/dist: agcre.c Removed Files: othersrc/external/bsd/agcre/dist: comp.c error.c exec.c free.c internal.h lex.c lex.h new.c set.c set.h unicode.c unicode.h Log Message: Update agcre to version 20211001 20211001 + move to a single source file, which can just be included as a single file (the library method can still be used for this as well - sometimes, it's just easier to drop in a single file to other projects) + add AGCRE_EMBED_CTAGS as a primary regular expresion type (same as basic regexps, but where a '*' occurs as a non-column 0 element of the pattern, it is assumed to be a standard character, as produced by ctags(1) output; basic regular expressions only accept '*' as a standard character as the first element of the expression). Yay. + make the version string in the program a real string, so it can be found using strings(1) + add an agcre_rev_regexec(3) function, which searches the text in an efficient, reverse manner, a la strrchr(3) or memrchr(3) fashion. + add agcre_regnsub(3) and agcre_regasub(3) functions + bump the shared lib version to 1.0 + cut version 20211001 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/dist/Makefile.bsd \ othersrc/external/bsd/agcre/dist/Makefile.in \ othersrc/external/bsd/agcre/dist/Makefile.lib.in \ othersrc/external/bsd/agcre/dist/Makefile.libtool.in \ othersrc/external/bsd/agcre/dist/agcre.h \ othersrc/external/bsd/agcre/dist/main.c cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/agcre/dist/comp.c \ othersrc/external/bsd/agcre/dist/error.c cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/agcre/dist/exec.c cvs rdiff -u -r1.1 -r0 othersrc/external/bsd/agcre/dist/free.c \ othersrc/external/bsd/agcre/dist/internal.h \ othersrc/external/bsd/agcre/dist/lex.c \ othersrc/external/bsd/agcre/dist/lex.h \ othersrc/external/bsd/agcre/dist/new.c \ othersrc/external/bsd/agcre/dist/set.c \ othersrc/external/bsd/agcre/dist/set.h \ othersrc/external/bsd/agcre/dist/unicode.c \ othersrc/external/bsd/agcre/dist/unicode.h cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/libagcre.3 cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/tests/54.expected cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/dist/tests/62.expected cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/lib/Makefile \ othersrc/external/bsd/agcre/lib/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/agcre/dist/Makefile.bsd diff -u othersrc/external/bsd/agcre/dist/Makefile.bsd:1.1 othersrc/external/bsd/agcre/dist/Makefile.bsd:1.2 --- othersrc/external/bsd/agcre/dist/Makefile.bsd:1.1 Wed Aug 16 23:38:13 2017 +++ othersrc/external/bsd/agcre/dist/Makefile.bsd Tue Oct 5 01:23:39 2021 @@ -1,11 +1,5 @@ PROG= agcre -SRCS+= comp.c -SRCS+= error.c -SRCS+= exec.c -SRCS+= free.c -SRCS+= lex.c -SRCS+= set.c -SRCS+= unicode.c +SRCS+= agcre.c SRCS+= main.c MAN= libagcre.3 WARNS= 5 Index: othersrc/external/bsd/agcre/dist/Makefile.in diff -u othersrc/external/bsd/agcre/dist/Makefile.in:1.1 othersrc/external/bsd/agcre/dist/Makefile.in:1.2 --- othersrc/external/bsd/agcre/dist/Makefile.in:1.1 Wed Aug 16 23:38:13 2017 +++ othersrc/external/bsd/agcre/dist/Makefile.in Tue Oct 5 01:23:39 2021 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.in,v 1.1 2017/08/16 23:38:13 agc Exp $ +# $NetBSD: Makefile.in,v 1.2 2021/10/05 01:23:39 agc Exp $ PROG= agcre -OBJS= comp.o error.o exec.o free.o lex.o new.o set.o unicode.o main.o +OBJS= agcre.o main.o PREFIX=@PREFIX@ MANDIR=@MANDIR@ Index: othersrc/external/bsd/agcre/dist/Makefile.lib.in diff -u othersrc/external/bsd/agcre/dist/Makefile.lib.in:1.1 othersrc/external/bsd/agcre/dist/Makefile.lib.in:1.2 --- othersrc/external/bsd/agcre/dist/Makefile.lib.in:1.1 Wed Aug 16 23:38:13 2017 +++ othersrc/external/bsd/agcre/dist/Makefile.lib.in Tue Oct 5 01:23:39 2021 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.lib.in,v 1.1 2017/08/16 23:38:13 agc Exp $ +# $NetBSD: Makefile.lib.in,v 1.2 2021/10/05 01:23:39 agc Exp $ LIB= libagcre.a - OBJS= comp.o error.o exec.o free.o lex.o new.o set.o unicode.o +OBJS= agcre.o PREFIX=@PREFIX@ MANDIR=@MANDIR@ Index: othersrc/external/bsd/agcre/dist/Makefile.libtool.in diff -u
CVS commit: othersrc/external/bsd/agcre
Module Name:othersrc Committed By: agc Date: Tue Oct 5 01:23:39 UTC 2021 Modified Files: othersrc/external/bsd/agcre/dist: Makefile.bsd Makefile.in Makefile.lib.in Makefile.libtool.in agcre.h libagcre.3 main.c othersrc/external/bsd/agcre/dist/tests: 54.expected 62.expected othersrc/external/bsd/agcre/lib: Makefile shlib_version Added Files: othersrc/external/bsd/agcre/dist: agcre.c Removed Files: othersrc/external/bsd/agcre/dist: comp.c error.c exec.c free.c internal.h lex.c lex.h new.c set.c set.h unicode.c unicode.h Log Message: Update agcre to version 20211001 20211001 + move to a single source file, which can just be included as a single file (the library method can still be used for this as well - sometimes, it's just easier to drop in a single file to other projects) + add AGCRE_EMBED_CTAGS as a primary regular expresion type (same as basic regexps, but where a '*' occurs as a non-column 0 element of the pattern, it is assumed to be a standard character, as produced by ctags(1) output; basic regular expressions only accept '*' as a standard character as the first element of the expression). Yay. + make the version string in the program a real string, so it can be found using strings(1) + add an agcre_rev_regexec(3) function, which searches the text in an efficient, reverse manner, a la strrchr(3) or memrchr(3) fashion. + add agcre_regnsub(3) and agcre_regasub(3) functions + bump the shared lib version to 1.0 + cut version 20211001 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/dist/Makefile.bsd \ othersrc/external/bsd/agcre/dist/Makefile.in \ othersrc/external/bsd/agcre/dist/Makefile.lib.in \ othersrc/external/bsd/agcre/dist/Makefile.libtool.in \ othersrc/external/bsd/agcre/dist/agcre.h \ othersrc/external/bsd/agcre/dist/main.c cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/agcre/dist/agcre.c cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/agcre/dist/comp.c \ othersrc/external/bsd/agcre/dist/error.c cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/agcre/dist/exec.c cvs rdiff -u -r1.1 -r0 othersrc/external/bsd/agcre/dist/free.c \ othersrc/external/bsd/agcre/dist/internal.h \ othersrc/external/bsd/agcre/dist/lex.c \ othersrc/external/bsd/agcre/dist/lex.h \ othersrc/external/bsd/agcre/dist/new.c \ othersrc/external/bsd/agcre/dist/set.c \ othersrc/external/bsd/agcre/dist/set.h \ othersrc/external/bsd/agcre/dist/unicode.c \ othersrc/external/bsd/agcre/dist/unicode.h cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/libagcre.3 cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/agcre/dist/tests/54.expected cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/dist/tests/62.expected cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/agcre/lib/Makefile \ othersrc/external/bsd/agcre/lib/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/bufgap/dist
Module Name:othersrc Committed By: agc Date: Thu Sep 30 22:16:57 UTC 2021 Modified Files: othersrc/external/bsd/bufgap/dist: gap.h main.c Log Message: make the test program print the current version when invoked with -V To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.h cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/bufgap/dist/gap.h diff -u othersrc/external/bsd/bufgap/dist/gap.h:1.1 othersrc/external/bsd/bufgap/dist/gap.h:1.2 --- othersrc/external/bsd/bufgap/dist/gap.h:1.1 Thu Sep 30 22:01:03 2021 +++ othersrc/external/bsd/bufgap/dist/gap.h Thu Sep 30 22:16:57 2021 @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef GAP_H_ -#define GAP_H_ 20210920 +#define GAP_H_ 20210930 #include Index: othersrc/external/bsd/bufgap/dist/main.c diff -u othersrc/external/bsd/bufgap/dist/main.c:1.2 othersrc/external/bsd/bufgap/dist/main.c:1.3 --- othersrc/external/bsd/bufgap/dist/main.c:1.2 Thu Sep 30 22:01:03 2021 +++ othersrc/external/bsd/bufgap/dist/main.c Thu Sep 30 22:16:57 2021 @@ -29,6 +29,10 @@ #include "gap.h" +#define STRINGIFY(x) #x + +#define GAP_VERSION_STRING(x) STRINGIFY(x) + /* print stats for current position */ static int printstats(gap_t *gap) @@ -70,7 +74,12 @@ main(int argc, char **argv) int ok; int i; - while ((i = getopt(argc, argv, "")) != -1) { + while ((i = getopt(argc, argv, "V")) != -1) { + switch(i) { + case 'V': + printf("%s: gap version: " GAP_VERSION_STRING(GAP_H_) "\n", *argv); + exit(EXIT_SUCCESS); + } } gap = gap_new(); while ((s = fgetln(stdin, )) != NULL) {
CVS commit: othersrc/external/bsd/bufgap/dist
Module Name:othersrc Committed By: agc Date: Thu Sep 30 22:16:57 UTC 2021 Modified Files: othersrc/external/bsd/bufgap/dist: gap.h main.c Log Message: make the test program print the current version when invoked with -V To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.h cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/bufgap/dist
Module Name:othersrc Committed By: agc Date: Thu Sep 30 22:11:59 UTC 2021 Modified Files: othersrc/external/bsd/bufgap/dist: libgap.3 Log Message: Update the date for this man page Also add the explanation for the string parameters to gap_exec_string() To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/libgap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/bufgap/dist/libgap.3 diff -u othersrc/external/bsd/bufgap/dist/libgap.3:1.1 othersrc/external/bsd/bufgap/dist/libgap.3:1.2 --- othersrc/external/bsd/bufgap/dist/libgap.3:1.1 Thu Sep 30 22:01:03 2021 +++ othersrc/external/bsd/bufgap/dist/libgap.3 Thu Sep 30 22:11:59 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: libgap.3,v 1.1 2021/09/30 22:01:03 agc Exp $ +.\" $NetBSD: libgap.3,v 1.2 2021/09/30 22:11:59 agc Exp $ .\" .\" Copyright (c) 2021 Alistair Crooks .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 24, 2020 +.Dd September 30, 2021 .Dt LIBGAP 3 .Os .Sh NAME @@ -353,6 +353,26 @@ command in the .Xr vi 1 editor. .Ed +The list of verbs for +.Fo gap_exec_string +.Fc +is as follows +.Bl -tag -width XXXLHSRHSXXX +.It Dv lhs? +Return the contents of the buffer gap to the left of the pointer as a byte array. +The number of bytes is returned in the area pointed to by +.Fa *n +.It Dv name? +Return the contents of the filename associated with the buffer gap as +a byte array. +.It Dv rhs? +Return the contents of the buffer gap to the right of the pointer as a byte array. +The number of bytes is returned in the area pointed to by +.Fa *n +.Ed +The caller is responsible for calling +.Xr free 3 +to release the storage allocated for these byte arrays. .Sh SEE ALSO .Xr agcre 1 , .Xr vi 1
CVS commit: othersrc/external/bsd/bufgap/dist
Module Name:othersrc Committed By: agc Date: Thu Sep 30 22:11:59 UTC 2021 Modified Files: othersrc/external/bsd/bufgap/dist: libgap.3 Log Message: Update the date for this man page Also add the explanation for the string parameters to gap_exec_string() To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/libgap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/bufgap
Module Name:othersrc Committed By: agc Date: Thu Sep 30 22:01:04 UTC 2021 Modified Files: othersrc/external/bsd/bufgap: Makefile othersrc/external/bsd/bufgap/dist: main.c Added Files: othersrc/external/bsd/bufgap/bin: 1.data 1.expected 1.in 2.data 2.expected 2.in 3.expected 3.in 4.expected 4.in 5.expected 5.in 6.expected 6.in 7.expected 7.in Makefile othersrc/external/bsd/bufgap/dist: Makefile TODO agcre-embed.c agcre-embed.h gap.c gap.h libgap.3 othersrc/external/bsd/bufgap/lib: Makefile shlib_version Removed Files: othersrc/external/bsd/bufgap/bufgap: Makefile othersrc/external/bsd/bufgap/dist: bufgap bufgap.1 bufgap.3 bufgap.c bufgap.h defs.h othersrc/external/bsd/bufgap/libbufgap: Makefile config.h shlib_version Log Message: Update buffer gap routines to the latest API and functionality - 20210930. The API has been consolidated around 4 functions: 1. gap_new() - returns a new (opaque) buffer gap structure 2. gap_dispose() - dispose of a previously allocated buffer gap structure 3. gap_exec() - perform operations on the buffer gap which expect an integer return value 4. gap_exec_string() - perform operations on the buffer gap which return a byte array (typically return buffer contents, or the buffer name) All of the "verbs" are described in the libgap.3 manual page, found in the dist directory. The main.c test program, again found in the dist directory, gives 7 worked examples of how to use the functionality to achieve desired ends, and there are 7 test input files, along with expected results, which are provided as a regression test suite - accessible using "make t" from the top level directory. The buffer gap routines use a copy of the embedded agcre regexp library to provide bounded (non-exponential time) results for regexp searching forwards and backwards - for more information, see the agcre directory at the same level as this code, or the source code in dist/agcre-embed.[ch]. Also move to a more usual reachover infrastructure To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/bufgap/Makefile cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/bufgap/bin/1.data \ othersrc/external/bsd/bufgap/bin/1.expected \ othersrc/external/bsd/bufgap/bin/1.in \ othersrc/external/bsd/bufgap/bin/2.data \ othersrc/external/bsd/bufgap/bin/2.expected \ othersrc/external/bsd/bufgap/bin/2.in \ othersrc/external/bsd/bufgap/bin/3.expected \ othersrc/external/bsd/bufgap/bin/3.in \ othersrc/external/bsd/bufgap/bin/4.expected \ othersrc/external/bsd/bufgap/bin/4.in \ othersrc/external/bsd/bufgap/bin/5.expected \ othersrc/external/bsd/bufgap/bin/5.in \ othersrc/external/bsd/bufgap/bin/6.expected \ othersrc/external/bsd/bufgap/bin/6.in \ othersrc/external/bsd/bufgap/bin/7.expected \ othersrc/external/bsd/bufgap/bin/7.in \ othersrc/external/bsd/bufgap/bin/Makefile cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/bufgap/bufgap/Makefile cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/bufgap/dist/Makefile \ othersrc/external/bsd/bufgap/dist/TODO \ othersrc/external/bsd/bufgap/dist/agcre-embed.c \ othersrc/external/bsd/bufgap/dist/agcre-embed.h \ othersrc/external/bsd/bufgap/dist/gap.c \ othersrc/external/bsd/bufgap/dist/gap.h \ othersrc/external/bsd/bufgap/dist/libgap.3 cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/bufgap/dist/bufgap \ othersrc/external/bsd/bufgap/dist/defs.h cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/bufgap/dist/bufgap.1 \ othersrc/external/bsd/bufgap/dist/bufgap.c cvs rdiff -u -r1.4 -r0 othersrc/external/bsd/bufgap/dist/bufgap.3 cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/bufgap/dist/bufgap.h cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/bufgap/dist/main.c cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/bufgap/lib/Makefile \ othersrc/external/bsd/bufgap/lib/shlib_version cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/bufgap/libbufgap/Makefile \ othersrc/external/bsd/bufgap/libbufgap/config.h \ othersrc/external/bsd/bufgap/libbufgap/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Mon Mar 8 08:56:03 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c Log Message: ensure that we have an element in the array before we try to store a value in it. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Mon Mar 8 07:37:24 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO configure configure.ac src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c packet-parse.c packet-print.c version.h src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile src/crypto/external/bsd/netpgp/dist/src/netpgpverify: Makefile verify.c Log Message: Changes to 1.99.22/20100307 + add key expiry information to public key information display To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/crypto/external/bsd/netpgp/dist/TODO cvs rdiff -u -r1.25 -r1.26 src/crypto/external/bsd/netpgp/dist/configure cvs rdiff -u -r1.26 -r1.27 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.29 -r1.30 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c cvs rdiff -u -r1.30 -r1.31 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c cvs rdiff -u -r1.27 -r1.28 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c cvs rdiff -u -r1.28 -r1.29 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h cvs rdiff -u -r1.10 -r1.11 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile cvs rdiff -u -r1.9 -r1.10 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/TODO diff -u src/crypto/external/bsd/netpgp/dist/TODO:1.33 src/crypto/external/bsd/netpgp/dist/TODO:1.34 --- src/crypto/external/bsd/netpgp/dist/TODO:1.33 Fri Mar 5 19:58:38 2010 +++ src/crypto/external/bsd/netpgp/dist/TODO Mon Mar 8 07:37:23 2010 @@ -1,5 +1,6 @@ To Do = +add revocation information to public key display agent agentctl trust subpackets @@ -91,3 +92,4 @@ hkpd hkpclient netbsd/pkgsrc pr 42922 +add expiry information to public key display Index: src/crypto/external/bsd/netpgp/dist/configure diff -u src/crypto/external/bsd/netpgp/dist/configure:1.25 src/crypto/external/bsd/netpgp/dist/configure:1.26 --- src/crypto/external/bsd/netpgp/dist/configure:1.25 Fri Mar 5 19:58:38 2010 +++ src/crypto/external/bsd/netpgp/dist/configure Mon Mar 8 07:37:24 2010 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.25 . +# From configure.ac Revision: 1.26 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for netpgp 20100305. +# Generated by GNU Autoconf 2.63 for netpgp 20100307. # # Report bugs to Alistair Crooks a...@netbsd.org c0596823. # @@ -751,8 +751,8 @@ # Identity of this package. PACKAGE_NAME='netpgp' PACKAGE_TARNAME='netpgp' -PACKAGE_VERSION='20100305' -PACKAGE_STRING='netpgp 20100305' +PACKAGE_VERSION='20100307' +PACKAGE_STRING='netpgp 20100307' PACKAGE_BUGREPORT='Alistair Crooks a...@netbsd.org c0596823' ac_unique_file=src/netpgp/netpgp.c @@ -1483,7 +1483,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 netpgp 20100305 to adapt to many kinds of systems. +\`configure' configures netpgp 20100307 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1553,7 +1553,7 @@ if test -n $ac_init_help; then case $ac_init_help in - short | recursive ) echo Configuration of netpgp 20100305:;; + short | recursive ) echo Configuration of netpgp 20100307:;; esac cat \_ACEOF @@ -1660,7 +1660,7 @@ test -n $ac_init_help exit $ac_status if $ac_init_version; then cat \_ACEOF -netpgp configure 20100305 +netpgp configure 20100307 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1674,7 +1674,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by netpgp $as_me 20100305, which was +It was created by netpgp $as_me 20100307, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2561,7 +2561,7 @@ # Define the identity of the package. PACKAGE='netpgp' - VERSION='20100305' + VERSION='20100307' cat confdefs.h _ACEOF @@ -22306,7 +22306,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log= -This file was extended by netpgp $as_me 20100305, which was +This file was extended by netpgp $as_me 20100307, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -22369,7 +22369,7 @@ _ACEOF cat $CONFIG_STATUS _ACEOF || ac_write_fail=1 ac_cs_version=\\ -netpgp config.status 20100305 +netpgp config.status 20100307 configured by $0, generated by GNU Autoconf 2.63, with options
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Fri Mar 5 16:30:05 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c netpgp.c Log Message: clean up some lint that crept in. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c cvs rdiff -u -r1.41 -r1.42 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Fri Mar 5 19:58:39 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO configure configure.ac src/crypto/external/bsd/netpgp/dist/src/lib: fastctype.h types.h version.h src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile src/crypto/external/bsd/netpgp/dist/src/netpgpverify: Makefile verify.c Log Message: Changes to 1.99.21/20100305 + clean up some lint + the obligatory ''build on mac os x fixes'' - inttypes.h header file To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/crypto/external/bsd/netpgp/dist/TODO cvs rdiff -u -r1.24 -r1.25 src/crypto/external/bsd/netpgp/dist/configure cvs rdiff -u -r1.25 -r1.26 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/lib/fastctype.h cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/netpgp/dist/src/lib/types.h cvs rdiff -u -r1.27 -r1.28 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h cvs rdiff -u -r1.9 -r1.10 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile cvs rdiff -u -r1.8 -r1.9 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/TODO diff -u src/crypto/external/bsd/netpgp/dist/TODO:1.32 src/crypto/external/bsd/netpgp/dist/TODO:1.33 --- src/crypto/external/bsd/netpgp/dist/TODO:1.32 Fri Mar 5 16:01:09 2010 +++ src/crypto/external/bsd/netpgp/dist/TODO Fri Mar 5 19:58:38 2010 @@ -3,10 +3,10 @@ agent agentctl trust subpackets +make netpgpkeys work - add, import, commit, update, sign, passphrase convert to and from ascii armored sigs gpgme compat lib --list-sigs - these come out in __ops_check_subkey_sig() -make netpgpkeys work - add, import, commit, update, sign, passphrase return userids from successful verify, and then print id out if required is get_passphrase_cb needed? error logging Index: src/crypto/external/bsd/netpgp/dist/configure diff -u src/crypto/external/bsd/netpgp/dist/configure:1.24 src/crypto/external/bsd/netpgp/dist/configure:1.25 --- src/crypto/external/bsd/netpgp/dist/configure:1.24 Fri Mar 5 16:01:09 2010 +++ src/crypto/external/bsd/netpgp/dist/configure Fri Mar 5 19:58:38 2010 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.24 . +# From configure.ac Revision: 1.25 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for netpgp 20100304. +# Generated by GNU Autoconf 2.63 for netpgp 20100305. # # Report bugs to Alistair Crooks a...@netbsd.org c0596823. # @@ -751,8 +751,8 @@ # Identity of this package. PACKAGE_NAME='netpgp' PACKAGE_TARNAME='netpgp' -PACKAGE_VERSION='20100304' -PACKAGE_STRING='netpgp 20100304' +PACKAGE_VERSION='20100305' +PACKAGE_STRING='netpgp 20100305' PACKAGE_BUGREPORT='Alistair Crooks a...@netbsd.org c0596823' ac_unique_file=src/netpgp/netpgp.c @@ -1483,7 +1483,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 netpgp 20100304 to adapt to many kinds of systems. +\`configure' configures netpgp 20100305 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1553,7 +1553,7 @@ if test -n $ac_init_help; then case $ac_init_help in - short | recursive ) echo Configuration of netpgp 20100304:;; + short | recursive ) echo Configuration of netpgp 20100305:;; esac cat \_ACEOF @@ -1660,7 +1660,7 @@ test -n $ac_init_help exit $ac_status if $ac_init_version; then cat \_ACEOF -netpgp configure 20100304 +netpgp configure 20100305 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1674,7 +1674,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by netpgp $as_me 20100304, which was +It was created by netpgp $as_me 20100305, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2561,7 +2561,7 @@ # Define the identity of the package. PACKAGE='netpgp' - VERSION='20100304' + VERSION='20100305' cat confdefs.h _ACEOF @@ -22306,7 +22306,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log= -This file was extended by netpgp $as_me 20100304, which was +This file was extended by netpgp $as_me 20100305, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -22369,7 +22369,7 @@ _ACEOF cat $CONFIG_STATUS _ACEOF || ac_write_fail=1 ac_cs_version=\\ -netpgp
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Fri Mar 5 19:58:39 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO configure configure.ac src/crypto/external/bsd/netpgp/dist/src/lib: fastctype.h types.h version.h src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile src/crypto/external/bsd/netpgp/dist/src/netpgpverify: Makefile verify.c Log Message: Changes to 1.99.21/20100305 + clean up some lint + the obligatory ''build on mac os x fixes'' - inttypes.h header file To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/crypto/external/bsd/netpgp/dist/TODO cvs rdiff -u -r1.24 -r1.25 src/crypto/external/bsd/netpgp/dist/configure cvs rdiff -u -r1.25 -r1.26 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/lib/fastctype.h cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/netpgp/dist/src/lib/types.h cvs rdiff -u -r1.27 -r1.28 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h cvs rdiff -u -r1.9 -r1.10 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile cvs rdiff -u -r1.8 -r1.9 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/hkpd
Module Name:src Committed By: agc Date: Mon Mar 1 07:41:57 UTC 2010 Added Files: src/crypto/external/bsd/netpgp/dist/src/hkpd: Makefile hkpd.c hkpd.h main.c Log Message: add an embryonic httpd key server (hkpd) to netpgp. this is based on the discontinued draft for hkp servers, in lieu of any official rfc. the post method for adding keys to the server has not been implemented. not until i've gone through all of the implications, anyway. hkp servers serve up pgp public keys over http. the default port is 11371, but it can be any port, specifiable at run time. whilst this hkpd will return valid html to browsers, it is aimed at the ''machine readable'' side, using the ''options=mr'' option to the http get string. this hkpd server will get hooked into the build at a later date. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile \ src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c \ src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.h \ src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile:1.1 --- /dev/null Mon Mar 1 07:41:57 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile Mon Mar 1 07:41:56 2010 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2010/03/01 07:41:56 agc Exp $ + +PROG=hkpd +SRCS=hkpd.c main.c +CPPFLAGS+=-g # -DHAVE_CONFIG_H=1 +LDFLAGS+=-g +LDADD+= -lnetpgp +MKMAN=no +WARNS=0 # anything over 0 will fail at the link stage with IDEA errors + +.include bsd.prog.mk Index: src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c:1.1 --- /dev/null Mon Mar 1 07:41:57 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c Mon Mar 1 07:41:56 2010 @@ -0,0 +1,275 @@ +/*- + * Copyright (c) 2009,2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Alistair Crooks (a...@netbsd.org) + * + * 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 + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 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. + */ + +#include sys/types.h +#include sys/param.h +#include sys/socket.h +#include sys/stat.h +#include sys/param.h + +#include netinet/in.h + +#include errno.h +#include netdb.h +#include netpgp.h +#include regex.h +#include stdio.h +#include stdlib.h +#include string.h +#include unistd.h + +#include hkpd.h + +/* make the string have %xx - %c */ +static size_t +frompercent(char *in, size_t insize, char *out, size_t outsize) +{ + size_t outcc; + char *next; + char *pc; + + outcc = 0; + for (pc = in ; (next = strchr(pc, '%')) != NULL ; pc = next + 3) { + (void) memcpy(out[outcc], pc, (size_t)(next - pc)); + outcc += (size_t)(next - pc); + out[outcc++] = (char)strtol(next + 1, NULL, 16); + } + (void) memcpy(out[outcc], pc, insize - (int)(pc - in)); + outcc += insize - (int)(pc - in); + out[outcc] = 0x0; + return outcc; +} + +#define HKP_HTTP_LEVEL HTTP/1.0 +#define HKP_NAME hkpd +#define HKP_MIME_GET application/pgp-keys +#define HKP_MIME_INDEX text/plain +#define HKP_MACHREAD info:1:1\r\n + +#define HKP_SUCCESS 200 +#define HKP_NOT_FOUND 404 + +/* make into html */ +static int +htmlify(char *buf, size_t size, const int code, const int get, const char *title, const int mr, const char *body) +{ + return snprintf(buf, size, + %s %d %s\r\n + Server: %s/%d\r\n + Content-type: %s\r\n + \r\n + %s + %s, + HKP_HTTP_LEVEL, code, (code == HKP_SUCCESS) ? OK : not found, + HKP_NAME,
CVS commit: src/crypto/external/bsd/netpgp/dist/src/hkpd
Module Name:src Committed By: agc Date: Mon Mar 1 07:41:57 UTC 2010 Added Files: src/crypto/external/bsd/netpgp/dist/src/hkpd: Makefile hkpd.c hkpd.h main.c Log Message: add an embryonic httpd key server (hkpd) to netpgp. this is based on the discontinued draft for hkp servers, in lieu of any official rfc. the post method for adding keys to the server has not been implemented. not until i've gone through all of the implications, anyway. hkp servers serve up pgp public keys over http. the default port is 11371, but it can be any port, specifiable at run time. whilst this hkpd will return valid html to browsers, it is aimed at the ''machine readable'' side, using the ''options=mr'' option to the http get string. this hkpd server will get hooked into the build at a later date. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/netpgp/dist/src/hkpd/Makefile \ src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.c \ src/crypto/external/bsd/netpgp/dist/src/hkpd/hkpd.h \ src/crypto/external/bsd/netpgp/dist/src/hkpd/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/hkpclient
Module Name:src Committed By: agc Date: Mon Mar 1 07:52:21 UTC 2010 Added Files: src/crypto/external/bsd/netpgp/dist/src/hkpclient: hkpclient.lua optparse.lua tst Log Message: add the scripts used to test the hkpd. fwiw, the hkp client script is - essentially - 7 lines of lua, using libcurl for the http transport. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpclient.lua \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/optparse.lua \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/tst Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpclient.lua diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpclient.lua:1.1 --- /dev/null Mon Mar 1 07:52:21 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpclient.lua Mon Mar 1 07:52:21 2010 @@ -0,0 +1,74 @@ +#! /usr/bin/env lua + +-- +-- Copyright (c) 2010 The NetBSD Foundation, Inc. +-- All rights reserved. +-- +-- This code is derived from software contributed to The NetBSD Foundation +-- by Alistair Crooks (a...@netbsd.org) +-- +-- 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 +--notice, this list of conditions and the following disclaimer. +-- 2. Redistributions in binary form must reproduce the above copyright +--notice, this list of conditions and the following disclaimer in the +--documentation and/or other materials provided with the distribution. +-- +-- THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +-- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 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. +-- + +-- a short HKP client + +require(cURL) + +-- command line args +dofile optparse.lua + +opt = OptionParser{usage=%prog [options] file, version=20100226} + +opt.add_option{-V, --version, action=store_true, dest=version, + help=--version} +opt.add_option{-m, --mr, action=store_true, dest=mr, help=-m} +opt.add_option{-o, --op, action=store, dest=op, help=-o op} +opt.add_option{-p, --port, action=store, dest=port, help=-p port} +opt.add_option{-s, --server, action=store, dest=server, help=-s server} + +-- parse command line args +options,args = opt.parse_args() + +-- set defaults +local server = options.server or pgp.mit.edu +local port = options.port or 11371 +local op = options.op or get +local mr = +if options.mr then mr = options=mr end + +-- get output stream +f = io.output() + +c = cURL.easy_init() + +-- setup url +c:setopt_url(http://; .. server .. : .. port .. + /pks/lookup?op= .. op .. search= .. args[1] .. mr) + +-- perform, invokes callbacks +c:perform({writefunction = function(str) +f:write(str) + end}) + +-- close output file +f:close() + Index: src/crypto/external/bsd/netpgp/dist/src/hkpclient/optparse.lua diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/hkpclient/optparse.lua:1.1 --- /dev/null Mon Mar 1 07:52:21 2010 +++ src/crypto/external/bsd/netpgp/dist/src/hkpclient/optparse.lua Mon Mar 1 07:52:21 2010 @@ -0,0 +1,123 @@ +-- Lua command line option parser. +-- Interface based on Pythons optparse. +-- http://docs.python.org/lib/module-optparse.html +-- (c) 2008 David Manura, Licensed under the same terms as Lua (MIT license) +-- +-- To be used like this: +-- t={usage=some usage message, version=version string} +-- op=OptionParser(t) +-- op=add_option{opt, action=action, dest=dest, help=help message for this option} +-- +-- with : +-- opt the option string to be used (can be anything, if one letter opt, then should be -x val, more letters: -xy=val ) +-- action one of +-- - store: store in options as key, val +-- - store_true: stores key, true +-- - store_false: stores key, false +-- dest is the key under which the option is saved +--
CVS commit: src/crypto/external/bsd/netpgp/dist/src/hkpclient
Module Name:src Committed By: agc Date: Mon Mar 1 07:52:21 UTC 2010 Added Files: src/crypto/external/bsd/netpgp/dist/src/hkpclient: hkpclient.lua optparse.lua tst Log Message: add the scripts used to test the hkpd. fwiw, the hkp client script is - essentially - 7 lines of lua, using libcurl for the http transport. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpclient.lua \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/optparse.lua \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/tst Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/tre/agrep
Module Name:src Committed By: agc Date: Thu Feb 25 08:06:43 UTC 2010 Added Files: src/external/bsd/tre/agrep: Makefile agrep.1 Log Message: add reachover logic for agrep - an approximate grep program which uses the newly added libtre, which is the free and portable approximate regex matching library. the manual page is not yet in standard format To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/tre/agrep/Makefile \ src/external/bsd/tre/agrep/agrep.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/tre/libtre
Module Name:src Committed By: agc Date: Fri Feb 26 05:23:18 UTC 2010 Added Files: src/external/bsd/tre/libtre: shlib_version Log Message: add reachover shlib version file To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/tre/libtre/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/tre/libtre
Module Name:src Committed By: agc Date: Fri Feb 26 05:23:18 UTC 2010 Added Files: src/external/bsd/tre/libtre: shlib_version Log Message: add reachover shlib version file To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/tre/libtre/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/tre/libtre/shlib_version diff -u /dev/null src/external/bsd/tre/libtre/shlib_version:1.1 --- /dev/null Fri Feb 26 05:23:18 2010 +++ src/external/bsd/tre/libtre/shlib_version Fri Feb 26 05:23:18 2010 @@ -0,0 +1,2 @@ +major=0 +minor=8
CVS commit: src/external/bsd/tre/dist
Module Name:src Committed By: agc Date: Thu Feb 25 07:33:20 UTC 2010 Update of /cvsroot/src/external/bsd/tre/dist In directory ivanova.netbsd.org:/tmp/cvs-serv24396 Log Message: initial import of tre-0.8.0 into the external sources framework. with many thanks to ville laurikari for writing tre in the first place and for changing the licensing to a 2-clause bsd license; thanks also to matthias-christian ott for his work on the google summer of code 2009 project. this import brings the distribution to src/external - the reachover build files will follow Status: Vendor Tag: LAURIKARI Release Tags: tre-0-8-0-base N src/external/bsd/tre/dist/NEWS N src/external/bsd/tre/dist/Makefile.am N src/external/bsd/tre/dist/ChangeLog N src/external/bsd/tre/dist/tre.pc.in N src/external/bsd/tre/dist/AUTHORS N src/external/bsd/tre/dist/config.h.in N src/external/bsd/tre/dist/THANKS N src/external/bsd/tre/dist/LICENSE N src/external/bsd/tre/dist/tre.spec.in N src/external/bsd/tre/dist/README N src/external/bsd/tre/dist/configure N src/external/bsd/tre/dist/Makefile.in N src/external/bsd/tre/dist/ABOUT-NLS N src/external/bsd/tre/dist/configure.ac N src/external/bsd/tre/dist/TODO N src/external/bsd/tre/dist/aclocal.m4 N src/external/bsd/tre/dist/INSTALL N src/external/bsd/tre/dist/python/example.py N src/external/bsd/tre/dist/python/setup.py N src/external/bsd/tre/dist/python/tre-python.c N src/external/bsd/tre/dist/doc/tre-syntax.html N src/external/bsd/tre/dist/doc/Makefile.am N src/external/bsd/tre/dist/doc/default.css N src/external/bsd/tre/dist/doc/Makefile.in N src/external/bsd/tre/dist/doc/agrep.1.in N src/external/bsd/tre/dist/doc/tre-api.html N src/external/bsd/tre/dist/utils/mkinstalldirs N src/external/bsd/tre/dist/utils/config.guess N src/external/bsd/tre/dist/utils/Makefile.am N src/external/bsd/tre/dist/utils/build-rpm.sh N src/external/bsd/tre/dist/utils/missing N src/external/bsd/tre/dist/utils/install-sh N src/external/bsd/tre/dist/utils/Makefile.in N src/external/bsd/tre/dist/utils/depcomp N src/external/bsd/tre/dist/utils/autogen.sh N src/external/bsd/tre/dist/utils/config.sub N src/external/bsd/tre/dist/utils/compile N src/external/bsd/tre/dist/utils/ltmain.sh N src/external/bsd/tre/dist/utils/config.rpath N src/external/bsd/tre/dist/lib/tre-match-backtrack.c N src/external/bsd/tre/dist/lib/tre-config.h.in N src/external/bsd/tre/dist/lib/tre-internal.h N src/external/bsd/tre/dist/lib/tre-compile.h N src/external/bsd/tre/dist/lib/Makefile.am N src/external/bsd/tre/dist/lib/tre-parse.c N src/external/bsd/tre/dist/lib/xmalloc.h N src/external/bsd/tre/dist/lib/tre-stack.c N src/external/bsd/tre/dist/lib/xmalloc.c N src/external/bsd/tre/dist/lib/tre-match-approx.c N src/external/bsd/tre/dist/lib/regerror.c N src/external/bsd/tre/dist/lib/tre-compile.c N src/external/bsd/tre/dist/lib/regcomp.c N src/external/bsd/tre/dist/lib/tre-stack.h N src/external/bsd/tre/dist/lib/Makefile.in N src/external/bsd/tre/dist/lib/regexec.c N src/external/bsd/tre/dist/lib/tre-ast.c N src/external/bsd/tre/dist/lib/regex.h N src/external/bsd/tre/dist/lib/tre-ast.h N src/external/bsd/tre/dist/lib/tre-parse.h N src/external/bsd/tre/dist/lib/README N src/external/bsd/tre/dist/lib/tre-match-utils.h N src/external/bsd/tre/dist/lib/tre-mem.c N src/external/bsd/tre/dist/lib/tre.h N src/external/bsd/tre/dist/lib/tre-mem.h N src/external/bsd/tre/dist/lib/tre-match-parallel.c N src/external/bsd/tre/dist/tests/build-tests.sh N src/external/bsd/tre/dist/tests/Makefile.am N src/external/bsd/tre/dist/tests/test-str-source.c N src/external/bsd/tre/dist/tests/randtest.c N src/external/bsd/tre/dist/tests/retest.c N src/external/bsd/tre/dist/tests/bench.c N src/external/bsd/tre/dist/tests/Makefile.in N src/external/bsd/tre/dist/tests/agrep/exitstatus.input N src/external/bsd/tre/dist/tests/agrep/Makefile.am N src/external/bsd/tre/dist/tests/agrep/delimiters.ok N src/external/bsd/tre/dist/tests/agrep/run-tests.sh N src/external/bsd/tre/dist/tests/agrep/records.args N src/external/bsd/tre/dist/tests/agrep/delimiters.input N src/external/bsd/tre/dist/tests/agrep/delimiters.args N src/external/bsd/tre/dist/tests/agrep/exitstatus.ok N src/external/bsd/tre/dist/tests/agrep/basic.input N src/external/bsd/tre/dist/tests/agrep/exitstatus.args N src/external/bsd/tre/dist/tests/agrep/basic.args N src/external/bsd/tre/dist/tests/agrep/Makefile.in N src/external/bsd/tre/dist/tests/agrep/records.ok N src/external/bsd/tre/dist/tests/agrep/records.input N src/external/bsd/tre/dist/tests/agrep/basic.ok N src/external/bsd/tre/dist/m4/ax_decl_wchar_max.m4 N src/external/bsd/tre/dist/m4/intlmacosx.m4 N src/external/bsd/tre/dist/m4/Makefile.am N src/external/bsd/tre/dist/m4/iconv.m4 N src/external/bsd/tre/dist/m4/lib-prefix.m4 N src/external/bsd/tre/dist/m4/gettext.m4 N src/external/bsd/tre/dist/m4/progtest.m4 N src/external/bsd/tre/dist/m4/po.m4 N src/external/bsd/tre/dist/m4/nls.m4 N
CVS commit: src/crypto/external/bsd/netpgp/dist/src
Module Name:src Committed By: agc Date: Tue Feb 23 01:24:45 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c validate.c src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.1 Log Message: fix a bug in verifying memory. add two examples to the netpgp(1) manual page outlining how to sign and encrypt via a pipeline, and how to decrypt and verify/cat using a pipeline. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.29 -r1.30 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.39 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.40 --- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.39 Fri Feb 12 03:38:48 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Tue Feb 23 01:24:44 2010 @@ -34,7 +34,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: netpgp.c,v 1.39 2010/02/12 03:38:48 agc Exp $); +__RCSID($NetBSD: netpgp.c,v 1.40 2010/02/23 01:24:44 agc Exp $); #endif #include sys/types.h @@ -1014,6 +1014,9 @@ } signedmem = __ops_memory_new(); __ops_memory_add(signedmem, in, size); + if (out) { + cat = __ops_memory_new(); + } ret = __ops_validate_mem(io, result, signedmem, (out) ? cat : NULL, armored, netpgp-pubring); Index: src/crypto/external/bsd/netpgp/dist/src/lib/validate.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.29 src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.30 --- src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.29 Fri Feb 12 03:38:48 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c Tue Feb 23 01:24:44 2010 @@ -54,7 +54,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: validate.c,v 1.29 2010/02/12 03:38:48 agc Exp $); +__RCSID($NetBSD: validate.c,v 1.30 2010/02/23 01:24:44 agc Exp $); #endif #include sys/types.h @@ -949,7 +949,7 @@ __ops_teardown_memory_read(stream, mem); /* this is triggered only for --cat output */ - if (*cat) { + if (cat) { /* need to send validated output somewhere */ *cat = validation.mem; } else { Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.7 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.8 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.7 Sat Feb 6 02:24:34 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 Tue Feb 23 01:24:45 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: netpgp.1,v 1.7 2010/02/06 02:24:34 agc Exp $ +.\ $NetBSD: netpgp.1,v 1.8 2010/02/23 01:24:45 agc Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -406,6 +406,10 @@ netpgp passphrase: % .Ed +.Pp +This simple (and contrived) example shows that +.Nm +commands can be used together in a pipeline to produce the desired effect. .Bd -literal % netpgp --sign \*[Lt] a | netpgp --cat \*[Gt] b netpgp: default key set to C0596823 @@ -428,6 +432,43 @@ uid Alistair Crooks (Yahoo!) \*[lt]agcro...@yahoo-inc.com\*[gt] % .Ed +.Pp +For operations like signing and encrypting a file at the same time, +the best way is to make use of pipelines: +.Bd -literal +% netpgp --sign \*[Lt] example | netpgp --encrypt --userid=c0596823 \*[Gt] example.gpg +netpgp: default key set to C0596823 +pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 +Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 +uid Alistair Crooks \*[lt]alist...@hockley-crooks.com\*[gt] +uid Alistair Crooks \*[lt]...@pkgsrc.org\*[gt] +uid Alistair Crooks \*[lt]...@netbsd.org\*[gt] +uid Alistair Crooks \*[lt]...@alistaircrooks.com\*[gt] +uid Alistair Crooks (Yahoo!) \*[lt]agcro...@yahoo-inc.com\*[gt] +netpgp passphrase: +% netpgp --decrypt \*[Lt] example.gpg | netpgp --cat +netpgp: default key set to C0596823 +netpgp: default key set to C0596823 +pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 +Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 +uid Alistair Crooks \*[lt]alist...@hockley-crooks.com\*[gt] +uid Alistair Crooks \*[lt]...@pkgsrc.org\*[gt] +uid Alistair Crooks \*[lt]...@netbsd.org\*[gt] +uid Alistair Crooks \*[lt]...@alistaircrooks.com\*[gt] +uid Alistair Crooks (Yahoo!) \*[lt]agcro...@yahoo-inc.com\*[gt] +netpgp passphrase: +Good
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Sat Feb 13 00:14:00 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: signature.h Log Message: let's get modern int types defined so that netpgp will build on mac os x To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/netpgp/dist/src/lib/signature.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Thu Feb 11 17:46:09 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: configure.ac src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c version.h Log Message: changes to 1.99.18/20100211 small steps, but lots of them - this is the first one. + print out the correct key information when signing files and memory. what used to be printed out was the copy of the public key which is stored as part of the private key(!). does not address the info shown when decrypting, since that is done in a different way, by callback. this whole part needs to be re-written, but will have to wait for two good hands. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.37 -r1.38 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.24 -r1.25 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Fri Feb 12 03:38:48 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO configure.ac src/crypto/external/bsd/netpgp/dist/src/lib: create.c crypto.c crypto.h keyring.h netpgp.c packet-print.c reader.c validate.c version.h src/crypto/external/bsd/netpgp/dist/src/netpgpverify: verify.c Log Message: Changes to 1.99.19/20100212 + plug some memory leaks, from cppcheck via Thomas Klausner (thanks!) + make the singular of time units read correctly + print decryption key info properly when prompting for passphrase To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/crypto/external/bsd/netpgp/dist/TODO cvs rdiff -u -r1.23 -r1.24 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.21 -r1.22 \ src/crypto/external/bsd/netpgp/dist/src/lib/create.c cvs rdiff -u -r1.19 -r1.20 \ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h cvs rdiff -u -r1.20 -r1.21 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.h cvs rdiff -u -r1.38 -r1.39 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.25 -r1.26 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h cvs rdiff -u -r1.29 -r1.30 \ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c cvs rdiff -u -r1.28 -r1.29 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Mon Feb 8 17:19:12 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO configure configure.ac src/crypto/external/bsd/netpgp/dist/src/lib: crypto.c crypto.h packet-print.c packet.h reader.c validate.c version.h src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile src/crypto/external/bsd/netpgp/dist/src/netpgpverify: Makefile Log Message: Update netpgp to version 1.99.17/20100208 Changes to 1.99.17/20100208 + get rid of last 2 static variables - use the __ops_printstate_t struct passed down, and add the indent variable here too + get rid of 3 occurrences in reader.c where an automatic buffer was addressed (as part of a subsequent callback) by a struct field from a calling scope, and only valid within the callback. Found by Flexelint and phk - many thanks. + print filename/memory when time problems occur when validating signatures To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/crypto/external/bsd/netpgp/dist/TODO cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/netpgp/dist/configure cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.18 -r1.19 \ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c cvs rdiff -u -r1.14 -r1.15 \ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h cvs rdiff -u -r1.24 -r1.25 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c cvs rdiff -u -r1.17 -r1.18 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet.h cvs rdiff -u -r1.28 -r1.29 \ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c cvs rdiff -u -r1.27 -r1.28 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.23 -r1.24 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Sat Feb 6 02:24:34 UTC 2010 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO configure configure.ac tst src/crypto/external/bsd/netpgp/dist/include: netpgp.h src/crypto/external/bsd/netpgp/dist/src/lib: crypto.h keyring.c keyring.h netpgp.c netpgpsdk.h openssl_crypto.c packet-parse.c packet-print.c packet.h reader.c signature.c signature.h ssh2pgp.c validate.c validate.h version.h src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile netpgp.1 netpgp.c src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.1 netpgpkeys.c src/crypto/external/bsd/netpgp/dist/src/netpgpverify: Makefile Log Message: Changes to 1.99.16/20100205 + minor simplifications to netpgp(1) internally + fix a bug in netpgp_verify_file where a non-existent file while listing packets would cause a SIGSEGV + add duration arg to netpgp(1), and check for validity when verifying signatures + add birthtime arg to netpgp(1), and check for validity when verifying signatures + add netpgp commands to print pubkey, if desired + allow the passphrase for the signature to be taken from --pass-fd + get rid of static indent value when printing packet contents + print signature validity times when verifying a file's signature To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/crypto/external/bsd/netpgp/dist/TODO cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/netpgp/dist/configure cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/netpgp/dist/configure.ac cvs rdiff -u -r1.18 -r1.19 src/crypto/external/bsd/netpgp/dist/tst cvs rdiff -u -r1.14 -r1.15 \ src/crypto/external/bsd/netpgp/dist/include/netpgp.h cvs rdiff -u -r1.13 -r1.14 \ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h cvs rdiff -u -r1.26 -r1.27 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c cvs rdiff -u -r1.19 -r1.20 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.h cvs rdiff -u -r1.36 -r1.37 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgpsdk.h cvs rdiff -u -r1.18 -r1.19 \ src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c cvs rdiff -u -r1.27 -r1.28 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c \ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c cvs rdiff -u -r1.23 -r1.24 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c cvs rdiff -u -r1.16 -r1.17 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet.h cvs rdiff -u -r1.24 -r1.25 \ src/crypto/external/bsd/netpgp/dist/src/lib/signature.c cvs rdiff -u -r1.14 -r1.15 \ src/crypto/external/bsd/netpgp/dist/src/lib/signature.h cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c cvs rdiff -u -r1.25 -r1.26 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.11 -r1.12 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.h cvs rdiff -u -r1.22 -r1.23 \ src/crypto/external/bsd/netpgp/dist/src/lib/version.h cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 cvs rdiff -u -r1.10 -r1.11 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1 cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.