CVS commit: src/crypto/external/bsd/netpgp/dist/src/libmj

2011-06-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jun 25 12:43:03 UTC 2011

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/libmj: libmj.3

Log Message:
Quote minus so it does not become a dash.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3

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/libmj/libmj.3
diff -u src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3:1.4 src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3:1.5
--- src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3:1.4	Sat Jun 25 00:37:44 2011
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3	Sat Jun 25 12:43:03 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: libmj.3,v 1.4 2011/06/25 00:37:44 agc Exp $
+.\ $NetBSD: libmj.3,v 1.5 2011/06/25 12:43:03 wiz Exp $
 .\
 .\ Copyright (c) 2010 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -217,7 +217,7 @@
 the stdarg fields, that of the string itself, and its length in bytes
 immediately after the string.
 A value of
-.Dv -1
+.Dv \-1
 may be used if the string length is not known.
 .Sh EXAMPLES
 The follow code fragment will make a JSON object



CVS commit: src/crypto/external/bsd/netpgp/dist/src/libmj

2010-11-04 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Nov  4 07:33:46 UTC 2010

Added Files:
src/crypto/external/bsd/netpgp/dist/src/libmj: Makefile.in

Log Message:
add a Makefile.in file for libmj


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.in

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/libmj/Makefile.in
diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.in:1.1
--- /dev/null	Thu Nov  4 07:33:46 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.in	Thu Nov  4 07:33:46 2010
@@ -0,0 +1,573 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+...@set_make@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR)  cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/lib
+DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/ax_check_openssl.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo $(srcdir) | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+$(srcdir)/*) f=`echo $$p | sed s|^$$srcdirstrip/||`;; \
+*) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = $(DESTDIR)$(libdir) $(DESTDIR)$(man3dir)
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libmj_la_LIBADD =
+am_libmj_la_OBJECTS = libmj_la-mj.lo
+libmj_la_OBJECTS = $(am_libmj_la_OBJECTS)
+DEFAULT_INCLUDES = -...@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/buildaux/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libmj_la_SOURCES)
+DIST_SOURCES = $(libmj_la_SOURCES)
+man3dir = $(mandir)/man3
+NROFF = nroff
+MANS = $(dist_man_MANS) $(man3_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOM4TE = @AUTOM4TE@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CANONICAL_HOST = @CANONICAL_HOST@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_INCLUDES = @OPENSSL_INCLUDES@
+OPENSSL_LDFLAGS = @OPENSSL_LDFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@

CVS commit: src/crypto/external/bsd/netpgp/dist/src/libmj

2010-11-04 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Nov  4 07:47:30 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/libmj: Makefile.am

Log Message:
use the correct manual page name


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am

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/libmj/Makefile.am
diff -u src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am:1.1 src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am:1.2
--- src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am:1.1	Sat Aug  7 04:13:57 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am	Thu Nov  4 07:47:30 2010
@@ -1,4 +1,4 @@
-## $NetBSD: Makefile.am,v 1.1 2010/08/07 04:13:57 agc Exp $
+## $NetBSD: Makefile.am,v 1.2 2010/11/04 07:47:30 agc Exp $
 
 AM_CFLAGS		= $(WARNCFLAGS)
 
@@ -9,6 +9,6 @@
 libmj_la_SOURCES	= \
 	mj.c \
 
-man3_MANS		= mj.3
+man3_MANS		= libmj.3
 
-dist_man_MANS		= mj.3
+dist_man_MANS		= libmj.3



CVS commit: src/crypto/external/bsd/netpgp/dist/src/libmj

2010-09-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Sep  8 22:17:27 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/libmj: libmj.3

Log Message:
Add RCS Id, use more markup, use standard section headers,
fill in more fields in ECMA-262 reference.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3

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/libmj/libmj.3
diff -u src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3:1.2 src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3:1.3
--- src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3:1.2	Wed Sep  8 03:21:22 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3	Wed Sep  8 22:17:27 2010
@@ -1,3 +1,4 @@
+.\ $NetBSD: libmj.3,v 1.3 2010/09/08 22:17:27 wiz Exp $
 .\
 .\ Copyright (c) 2010 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -102,7 +103,7 @@
 .Pp
 The
 .Nm
-library can be used to create a string in memory which contains a textutal
+library can be used to create a string in memory which contains a textual
 representation of a number of objects, arbitrarily structured.
 The library can also be used to reconstruct the structure.
 Data can thus be serialised easily and efficiently, and data structures
@@ -158,8 +159,9 @@
 .Fa depth
 and for the formatted output to be followed by a
 .Fa trailer
-string, which is usually NULL for external calls,
-but can be any valid string.
+string, which is usually
+.Dv NULL
+for external calls, but can be any valid string.
 Output is sent to the
 .Fa stream
 file stream.
@@ -188,8 +190,7 @@
 This restriction of values for an integer type may be removed at a later date.
 .Pp
 Within a JSON object, the key values can be iterated over using an integer
-index to access the individual
-JSON objects.
+index to access the individual JSON objects.
 The index can also be found using the
 .Fn mj_object_find
 function.
@@ -202,8 +203,7 @@
 Arrays are implemented as a simple array.
 Thus, to find an object in an array using
 .Fn mj_object_find ,
-a value of 1 should be used as the
-increment value.
+a value of 1 should be used as the increment value.
 This means that every entry in the internal array will be examined,
 and the first match after the starting point will be returned.
 For objects, an incremental value of 2 should be used,
@@ -212,13 +212,17 @@
 .Xr calloc 3 ,
 .Xr free 3
 .Rs
+.%Q Ecma International
+.%D December 2009
+.%T ECMA-262: ECMAScript Language Specification
 .%U http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf
+.%O 5th Edition
 .Re
 .Sh HISTORY
 The
 .Nm
 library first appeared in
 .Nx 6.0 .
-.Sh AUTHOR
+.Sh AUTHORS
 .An Alistair Crooks Aq a...@netbsd.org
 wrote this implementation and manual page.



CVS commit: src/crypto/external/bsd/netpgp/dist/src/libmj

2010-08-06 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sat Aug  7 04:13:57 UTC 2010

Added Files:
src/crypto/external/bsd/netpgp/dist/src/libmj: Makefile.am defs.h
libmj.3 mj.c mj.h

Log Message:
Move the minimalist JSON routines into their own library


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am \
src/crypto/external/bsd/netpgp/dist/src/libmj/defs.h \
src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3 \
src/crypto/external/bsd/netpgp/dist/src/libmj/mj.c \
src/crypto/external/bsd/netpgp/dist/src/libmj/mj.h

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/libmj/Makefile.am
diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am:1.1
--- /dev/null	Sat Aug  7 04:13:57 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/Makefile.am	Sat Aug  7 04:13:57 2010
@@ -0,0 +1,14 @@
+## $NetBSD: Makefile.am,v 1.1 2010/08/07 04:13:57 agc Exp $
+
+AM_CFLAGS		= $(WARNCFLAGS)
+
+lib_LTLIBRARIES		= libmj.la
+
+libmj_la_CPPFLAGS	= -I$(top_srcdir)/include
+
+libmj_la_SOURCES	= \
+	mj.c \
+
+man3_MANS		= mj.3
+
+dist_man_MANS		= mj.3
Index: src/crypto/external/bsd/netpgp/dist/src/libmj/defs.h
diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/libmj/defs.h:1.1
--- /dev/null	Sat Aug  7 04:13:57 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/defs.h	Sat Aug  7 04:13:57 2010
@@ -0,0 +1,95 @@
+/* $NetBSD: defs.h,v 1.1 2010/08/07 04:13:57 agc Exp $ */
+
+/*-
+ * Copyright (c) 2009 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.
+ */
+#ifndef DEFS_H_
+#define DEFS_H_
+
+#include sys/types.h
+#include sys/param.h
+
+#ifdef HAVE_INTTYPES_H
+#include inttypes.h
+#endif
+
+#ifdef HAVE_STDINT_H
+#include stdint.h
+#endif
+
+#include stdio.h
+#include stdlib.h
+#include string.h
+
+#define NEWARRAY(type,ptr,size,where,action) do {			\
+	if ((ptr = calloc(sizeof(type), (unsigned)(size))) == NULL) {	\
+		(void) fprintf(stderr, %s: can't allocate %lu bytes\n, \
+			where, (unsigned long)(size * sizeof(type)));	\
+		action;			\
+	}\
+} while( /* CONSTCOND */ 0)
+
+#define RENEW(type, _ptr, _size, _newsize, where, action) do {		\
+	type *_newptr;			\
+	_newptr = realloc(_ptr, (size_t)(_newsize) * sizeof(type));	\
+	if (_newptr == NULL) {		\
+		(void) fprintf(stderr, %s: can't realloc %lu bytes\n,	\
+			where, (unsigned long)((_newsize) * sizeof(type))); \
+		action;			\
+	} else {			\
+		(void) memset(_newptr[_size], 0x0,			\
+			(_newsize - _size) * sizeof(type));		\
+		_ptr = _newptr;		\
+		_size = _newsize;	\
+	}\
+} while( /* CONSTCOND */ 0)
+
+#define NEW(type, ptr, where, action)	NEWARRAY(type, ptr, 1, where, action)
+
+#define FREE(ptr)	free(ptr)
+
+#define ALLOC(type, v, size, c, init, incr, where, action) do {		\
+	uint32_t	_newsize = size;\
+	if (size == 0) {		\
+		_newsize = init;	\
+		NEWARRAY(type, v, _newsize, where : new, action);	\
+	} else if (c == size) {		\
+		_newsize = size + incr;	\
+		RENEW(type, v, size, _newsize, where : renew, action); \
+	}\
+	size = _newsize;		\
+} while( /* CONSTCOND */ 0)
+
+#define DEFINE_ARRAY(name, type)	\
+typedef struct name {			\
+	uint32_t	c;		\
+	uint32_t	size;		\
+	type	   *v;		\
+} name
+
+#endif /* !DEFS_H_ */
Index: src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3
diff -u /dev/null 

CVS commit: src/crypto/external/bsd/netpgp/dist/src/libmj

2010-08-06 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Sat Aug  7 04:50:35 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/libmj: mj.c

Log Message:
re-fix this typo once again...


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/netpgp/dist/src/libmj/mj.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/src/libmj/mj.c
diff -u src/crypto/external/bsd/netpgp/dist/src/libmj/mj.c:1.1 src/crypto/external/bsd/netpgp/dist/src/libmj/mj.c:1.2
--- src/crypto/external/bsd/netpgp/dist/src/libmj/mj.c:1.1	Sat Aug  7 04:13:57 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libmj/mj.c	Sat Aug  7 04:50:35 2010
@@ -274,7 +274,7 @@
 	case MJ_NULL:
 	case MJ_FALSE:
 	case MJ_TRUE:
-		atom-c = (unsigned)to;
+		atom-c = (unsigned)*to;
 		return gettok(s, from, to, tok);
 	case MJ_OPEN_BRACKET:
 		mj_create(atom, array);