Full history from the git log
-----------------------------

2020-01-10  Reini Urban  <rurban@cpan.org>

	Release 0.10.1
	de/encode: protect more class overflows and NULL
	reset num_classes with r2007. check NULL dwg.
	check NULL dwg->classes.
	found via fuzzing

	remove outdated dejagnu deps
	we dont depend on it anymore for some time already

	cirrus: add p5-Convert-Binary-C

	switch cirrus to freebsd-12-1-snap
	See https://cirrus-ci.org/guide/FreeBSD/
	They are using Google Cloud Compute images:
	13-0-snap, 12-1-snap (stable), 12-1 (release)
	12-0, 11-3-snap and 11-3. Not our old image anymore,
	hence the python problems

	switch cirrus to py37
	py36-libxml2 does not exist anymore

	dwg2SVG: protect from wrong style
	id's 144 and 109 of GH #182
	Closes GH #182

	htmslescape: fix off-by-one and overflow
	ditto.
	Fixes GH #182

	htmlescape: fix off-by-one and overflow
	need \0 termination to do strcat.
	don't skip the very first char.
	Fixes GH #182

	dwg2SVG: skip nan values

	dwg2SVG: skip NULL text_value
	Fixes Case 1 of GH #182

2020-01-09  Reini Urban  <rurban@cpan.org>

	add reedsolomon.h
	we will use it soon

	reedsolomon: missing config.h
	needed for HAVE_MALLOC_H

	consistent logging handlers, no fprintf, stderr in the lib
	library users want to catch fprintf and/or stderr.
	Closes GH #181

	indxf: silence clang -Wdouble-promotion
	use (double)NAN, as it's apparently only float there,
	__builtin_nanf().

	decode eed: accept raw with unknown codes
	For dwgrewrite passes it through, and let data be empty.
	And fixes a EED raw leak with such unknown codes.

2020-01-08  Reini Urban  <rurban@cpan.org>

	dwgrewrite: fix leaks on early errors

2020-01-08  Reini Urban  <rurban@cpan.org>

	Release 0.10
	Major bugfixes:
	  * Improved building the perl5 binding, proper dependencies.
	    Set proper -I and -L paths, create LibreDWG.c not swig_perl.c
	  * Harmonized INDXFB with INDXF, removed extra src/in_dxfb.c (#134).
	    Slimmed the .so size by 260Kb. Still untested though.
	  * Fixed encoding of added r2000 AUXHEADER address (broken since 0.9)
	  * Fixed EED encoding from dwgrewrite (a dxf2dwg regression from 0.9) (#180)
	See NEWS and ChangeLog

        decode: protect xdata overflows
        reset the lengths when stopped reading invalig xdata,
        which would overflow later.

	api: rename BLOCK_HEADER.preview_data to preview
	analog to the entities. In the headers called PreviewIcon.

	encode: fix LOG_TF crash on null field

	encode: fix EED writing
	which was broken with indxf. don't write raw
	plus data (from the next indices), when a previous
	raw already covered it.
	Fixes GH #180

2020-01-07  Reini Urban  <rurban@cpan.org>

	encode: enable TF logging
	-v3 or -v5

	decode: disable -v5 object_map printing
	printing the whole object for the handle (again) makes no sense.
	maybe later print the object name of the handle

	encode: eed entity formatting logging

	fix endless loop in 2004 decompression
	on dat overflow.
	This fixes all remaining fuzzed dwgrewrite hangs

	indxf: fix endless MULTILEADER loop
	with unknown DXF groups.
	This fixes all fuzzed indxf hangs.

	decode: fix a -Wsign-compare
	and some -Wformat

	protect strncpy from truncation
	without ending \0

	fix TIMEOUT_30 duplicate
	remove the automake hack

	decode: fix bytes_left calc. in decompress_R2004_section
	and add various counterchecks. missed the final lit_length

2020-01-07  Reini Urban  <rurban@cpan.org>

	hangs: protect from overlarge mallocs
	when using user-provided section sizes.
	max_decomp_size, decomp_data_size, ... max ~790Mb per compressed section

	Fixes a few fuzzer hangs.

2020-01-07  Reini Urban  <rurban@cpan.org>

	indxf: add only full classes
	with all names and mandatory DXF fields

2020-01-06  Reini Urban  <rurban@cpan.org>

	dwg: enhance the dxf2dwg timeout to 30
	larger DXF need longer

	indxf: skip setting buffers twice,
	with the exception of 310 previews, as in PROXY_ENTITY
	and Surfaces.

	indxf: avoid hang when reading illegal numbers
	advance the ptr before erroring out

	indxf: fix CLASSES hang
	2 CLASSES must be followed by 0 CLASS, else
	it might realloc constantly, leading to DOS/hang.

	faster aligned bit_read_fixed, bit_write_TF
	when aligned use memcpy, esp. for large data blocks

	indxf: fix double entity.preview write
	which would corrupt the previous preview, not matching
	the preview_size. we dont append, we rather ERROR

	protect bit_utf8_to_TU from invalid UTF-8
	count len, not to overflow the utf8 string.
	e.g. "4è^C"

	indxf: stabilize adding BLOCK_CONTROL.entries
	fuzzed DXF could lead to heap overflows (wrong i)

	indxf: protect SUMMARY header fields
	by checking NULL and the code 1

2020-01-06  Reini Urban  <rurban@cpan.org>

	indxf: fix invalid free of static obj->dxfname
	when dxfname came from dwg_encode_get_class() ->
	dxf_encode_alias() returning a static string.

	This should fix all the remaining fuzzing crashes. (for now)

2020-01-06  Reini Urban  <rurban@cpan.org>

	decode_r2007: protect from section overflow
	when reading invalid section pages

	decode: protect from empty dat sections r2007+
	e.g. wrong summaryinfo, objects or handles.
	some of these dont return a critical error

	protect xdata overflows
	in encode and decode. proper error handling, esp. with fuzzed wrong data.

	Update docs for 2020

	encode: add LOG_INSANE_TF EED logging
	still broken. GH #180

	Bump Copyright years to 2020
	of all changed files so far, with more than a few lines

	encode: add LOG_TF from decode
	fixes xdata[] binary logging

2020-01-06  Reini Urban  <rurban@cpan.org>

	Add AFL_COMPILER persistent llvm_mode support to dwgrewrite
	Instrument overly long functions as such.
	Support persistent llvm_mode, via afl-clang-fast for dwgrewrite.

	export AFL_PATH=/usr/local/lib/afl
	PERL=cperl5.30.0-nt \
	CC="afl-clang-fast" \
	CFLAGS="-O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer" \
	    ../configure --disable-shared --disable-dxf --disable-bindings

	export ASAN_OPTIONS="abort_on_error=1:detect_leaks=0:symbolize=0:allocator_may_return_null=1"

	AFL_USE_ASAN=1 make -j4 -s -C src
	AFL_USE_ASAN=1 make -j4 -s -C programs dwgrewrite

	AFL_SKIP_CPUFREQ=1 afl-fuzz $@ -m none -i ../.fuzz-in -o .fuzz-out programs/dwgrewrite -v0 @@ /dev/null

2020-01-06  Reini Urban  <rurban@cpan.org>

	decode: eed logging
	searching EED leaks with fuzzed DWGs.
	let the last invalid EED[idx] leak in this case

	init bit_read_TF
	when bit_read_fixed failed earlier with overflows,
	set the bits to 0. valgrind with fuzzing

2020-01-06  Reini Urban  <rurban@cpan.org>

	api: add int *isnew param to all dynapi _utf8text functions
	we really need to know exactly if the returned string is freshly
	malloced (from a r2007+ wide string), or the original string,
	which may NOT be freed.

	Fixes the remaining fuzzing double-free's, where the dwg/obj
	version or string TF type might disagree. Tried hard to avoid this.

2020-01-06  Reini Urban  <rurban@cpan.org>

	dwg_find_dictionary: add NULL ptr protections

	indxf: add xcalloc, exit on Out of Memory

	indxf: protect invalid double DOS
	advance endptr, with nums like 28ABC....

	indxf: protect invalid DIMASSOC_Ref index

	indxf: protect DIMSTYLE_CONTROL.morehandles[j]
	gracefully

	fixup check bytes_left for decompress_R2004_section 32bit
	the overflow check does not work with 32bit, only 64.
	Fixes up 80d17da65507ca1242c48ffe3b31afa48a0859aa

2020-01-05  Reini Urban  <rurban@cpan.org>

	Update NEWS

	dxf_read_file: properly end DXF
	with a final \n and \0 for libc strtol/strtod readers,
	to avoid internal errors on truncated files we cannot avoid.

	indxf: more truncated DXF protections
	but not exhaustive. We really need to add a final \n to the read chain

	indxf: stricter MLEADER subclasses
	On unknown DXF code break the loop, and continue
	with the main MLEADER loop. Add a few more array index asserts.
	Fixes a few fuzzing cases.

	indxf: protect from MLEADER blk/txt mixup
	a union

2020-01-04  Reini Urban  <rurban@cpan.org>

	indxf: fix truncated dxf
	gracefully end on EOF or invalid ctrl object.
	prevent indxf buf and most dat overflows.

	indxf: fix double-free of BLOCK_HEADER.*Model_Space
	when reusing it. Check if not already done before

	fix dwgrewrite for preR13 with VPORT_ENTITY table
	yet unsupported, dont add its num_objects to the table.

	auxheader: protect from NULL HEADER.HANDSEED
	usually with encode

	encode: protect from NULL obj->parent
	when erroring out early

	decode_r2007: add decode_rs src overflow check
	add the size of the src, to overvoid reading past it.
	and use the actual computed src_size args, not the user-provided ones.

	improve r2007 copy_compressed_bytes check
	check for overflows before the loop. better than
	c893d847716aa6d64c2ff25834c80b43c4806f9b

	check bytes_left for decompress_R2004_section
	Fixes heap overflows with fuzzed section values

	fix bit_read_fixed overflow

	fix bit_search_sentinel overflow
	with empty dat chain

	indxf: add_SPLINE cosmetics

	indxf: set WIPEOUT.clip_verts[]
	num_clip_verts got reset every pair

	indxf: dxf sources are always utf8
	for dynapi. without is_utf we assume the source is already TU.
	no changes <r2007.

	indxf: convert *Model_Space name to TU earlier
	when $ACADVER is read.

	more dwg_find_tablehandle protections
	and some cosmetics.
	analyzing a r2007 *Model_Space use-after-free
	where BLOCK_HEADER.name stays the initial <r2007, due
	to DXF errors.

	indxf: protect from some NULL _obj->name
	Fixes a few fuzzing cases

	encode: fix 2NDHEADER address
	needs to be recomputed, even with dwgrewrite.
	Fixes section[3] address or size overflow with r2000 DWGs

	encode: detect section address or size overflow
	already in encode, not just later in decode.
	i.e. only with r2000 DWGs

	encode: always set 2ndheader section addresses
	even with dwgrewrite.

	dwgrewrite: fix filename_out leaks
	use a var when suffix is used.

	dxf2dwg, dwg2dxf: allow /dev/null sinks

	dwg_write_file: allow /dev/null sink

2020-01-03  Reini Urban  <rurban@cpan.org>

	indxf: fix TABLESTYLE rowstyles init

	indxf: more NULL pair protections

	dwg2svg2: protect from empty BLOCK_HEADERs
	name is not really needed

	add r2007 Page out of bounds check
	Fixes case 1 of GH #179

	fix bit_search_sentinel out of range check
	off by 16, the sentinel length. Fixes case 2 of GH #179

	fix read_R2004_section_info out of range check
	forgot 32. Fixes case 3 of GH #179

	protect r2007 section.num_pages overflow
	skip section when >0xf0000. Fixes case 4 if GH #179

	protect r2007 decode compression length
	length is a user value, add src_end. Fixes GH #179, case 5

	Fix NULL ptr deref in get_next_owned_entity
	Fixes case 6 in GH #179

	dwg2svg2: fail on NULL _hdr
	Fixes GH #179, id:000026 (case 7)

	dwg: add missing dynapi.h
	code added with 0.9,
	commit 359502ac86b389b248a9080c9ba8462aff1058ee
	relevant only for --disable-dxf

	indxf: more NULL pair protections

2020-01-03  Reini Urban  <rurban@cpan.org>

	api: move 2 DIMENSION handles to DIMENSION_COMMON
	with in_dxf when changing the type this would change the
	offset of DIMENSION.block and DIMENSION.dimstyle, leading
	to invalid pointers. found via fuzzing, fixes 3 cases.

	TODO: block has still DXF code 0, maybe indxf read DXF 2 into that.
	Need a testcase for that.

2020-01-03  Reini Urban  <rurban@cpan.org>

	encode: add OVERFLOW_NULL_CHECK_LV
	to check the ptr before loops

2020-01-03  Reini Urban  <rurban@cpan.org>

	indxf: skip creating empty invalid objects
	rather dont create them than leaving them without type or name.
	not unknown, but DWG_TYPE_UNUSED.
	We dont want to check all object[i] loops.

	Reverts the previous commit for a fuzzing testcase.

2020-01-03  Reini Urban  <rurban@cpan.org>

	dwg_find_table_control: protect from NULL object.name
	which might happen somehow via fuzzing.

	indxf: LEADER.points array protections
	with asserts

	indxf: replace IMAGE.clip_verts asserts
	with graceful logic. Actually failed in the good tests,
	not just with fuzzing

	indxf: IMAGE.clip_verts array protections
	with asserts

	indxf: add_HATCH array protections
	with asserts

	indxf: add_SPLINE array protections
	but here do it gracefully, no asserts

	indxf: more eed point protections

	indxf: add new_LWPOLYLINE asserts
	on illegal array accesses. Here we rather abort.

	indxf: NULL pair protections in new_LWPOLYLINE
	fixes a few fuzzing cases

	fix bit_write_CRC* overflows
	analog to read, fixes some fuzzing cases

	dwg2dxf: fix leaks on section overflow error

2020-01-02  Reini Urban  <rurban@cpan.org>

	indxf: protect eed points with wrong codes
	found via fuzzing

	indxf: some more ptr protections

	fix strange dwg_class_is_entity miscompilation
	where it returned wrong results.
	(comparing a short field with an const int, without zeroing the previous short)
	Add various measures.

	indxf: fix postprocess_SEQEND use-after-free
	the owner handles are used, they are not copied.

2020-01-02  Reini Urban  <rurban@cpan.org>

	fix write-as leaks
	In free check from_version in the spec, not
	the version we were last using (writing to).

	Fixes most dwgrewrite leaks, just one eed leak remaining,
	from the 2nd r2000 read.

2020-01-02  Reini Urban  <rurban@cpan.org>

	bits: avoid uninitialized reads on bit realloc
	in bit_calc_CRC

	encode: Fix -Wpointer-bool-conversion
	address of data->u.eed_0.string is always true

	encode: fix Too many sections
	when down-converting from r2004+ to r2000, with
	typically 10-30 num_sections.

	enable dwgrewrite with --disable-dxf
	for fuzzing

	api: Add LIBREDWG_VERSION et al to include/dwg.h

	api: renamed CLASS.wasazombie to is_zombie
	i.e. was_proxy, or class not loaded

	indxf: is_entity logging for CLASS 281

	adjust dynapi_test for LAYER_INDEX
	layer_entries was renamed with e3374397f386fd1b38b8d732a6ef601ddf7ec592
	(0.9) and then later again.

	adjust dynapi_test for SORTENTSTABLE
	sort_handles was renamed with e3374397f386fd1b38b8d732a6ef601ddf7ec592
	(0.9)

	dynapi: add nan checks TODO

	add DEBUGGING_CLASS_CPP
	and use it for TABLECONTENT.
	This is more stable than CLASS_DXF in cases when
	TABLE is mixed up with TABLECONTENT. See e.g.
	GH #178, where it fixes the heap_overflow2 case.

	prepare 0.10 NEWS

2020-01-01  Reini Urban  <rurban@cpan.org>

	decode ERROR cosmetics

	api: remove DWG_SUPERTYPE_UNKNOWN fully
	we now have only entity or object, unknown_bits
	are parts of these.

	xmlsuite: proper add_helix

	indxf: fix num_entries/i underflow
	for the i = -1 case. (Fuzzing)

	free: fix invalid dwg_free_LAYOUT

	dynapi: remove UNKNOWN tests
	as the obj->name does not fit the fixedtype anymore
	for partially handled classes, like TABLE or ARC_DIMENSION

2019-12-31  Reini Urban  <rurban@cpan.org>

	cleanup tio.unknown
	not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common
	entity_data.
	Fixes GH #178 heap_overflow2

	encode: object.size overflow
	decode fails when it overflows, but encode does not
	know its final dat->size, so introduce a sensible limit.
	Fixes the dos testcase of GH #178

	decode: protect from preR13 section size overflow
	More fuzzing testcase in GH #176 with some broken
	sections

	decode: protect from section size/address overflow
	There is one fuzzing testcase in GH #176 with some broken
	sections

	dwg_free_object: avoid uninitialized is_entity warning
	even if logically impossible.

	encode: protect dwg_encode_eed_data overflows

	encode: protect NULL eed string

	indxf: more NULL ptr protections
	fixes more fuzzer testcases

	free: protect freeing obj->dxfname
	dont set INDXF when HANDSEED is missing.
	e.g. GH #178 null_pointer2 testcase

	indxf: fix rootcause for prev. commit
	Fail on duplicate CLASS groups, i.e. when O CLASS is replaced
	by 2 CLASS.

	free: fail on Wrong DATATABLE.type 529
	for obj [index]: != MULTILEADER.
	wrong class, maybe a dwg_encode_get_class() failure.
	Fixes several fuzzing crashes.

	encode: fix empty FIELD_2DD_VECTOR
	Fixes GH #178 null_pointer1 case

	encode: protect from stack under-flow
	From GH #178 fuzzing

	encode: protect some NULL pointers
	Fixes some GH #178 fuzzing

2019-12-30  Reini Urban  <rurban@cpan.org>

	indxf: fix r2007+ dwg_find_tablehandle() leaks
	dwg_find_tablehandle searches by name, dwg_dynapi_entity_utf8text creates
	fresh utf8 names, which were not freed.

	This fixed now most of the indxf leaks, GH #151

2019-12-30  Reini Urban  <rurban@cpan.org>

	free: fix more indxf leaks
	the underlying cause is that indxf already adds
	DEBUGGING classes, for which no dwg_free_OBJECT code exists.
	i.e. TABLE.preview (common entity data), or TABLE colors.
	Let dwg_free_UNKNOWN_ENT handle that and leak the rest

	classes.inc: formatting only

2019-12-30  Reini Urban  <rurban@cpan.org>

	fixup indxf, wrong NULL pair check
	at dwg_read_dxf the initial pair is NULL,
	so empty DWGs were produced.

	also harmonize dat opts with dwg opts

2019-12-30  Reini Urban  <rurban@cpan.org>

	programs leaks comments

	indxf: fix name "*Model_Space" free
	must not be constant. broken with
	27a4380702667391668d4693ea7bdfdc9cf823c7

	indxf: more pair NULL protections
	found via fuzzing

	indxf: protect types in dxf_blocks_read
	when reading mspace or pspace BLOCK's, its owners are
	not a BLOCK_HEADER, but BLOCK_CONTROL.
	Found via fuzzing

2019-12-29  Reini Urban  <rurban@cpan.org>

	more free indxf fuzzing fixes
	skip color names, not assigned yet, and failing.
	only free unknown if type is UNKNOWN, otherwise
	it will free illegal reactors, ...

	indxf: protect NULL pair
	this time in dxf_classes_read. Fixes some fuzzer cases

	in_dxf: improve new_object speed by 2x
	make ADD_OBJECT/ADD_ENTITY linear search 2x faster, by aborting
	on found.

	improve dwg_encode_get_class
	require more than one invalid klass->dxfname to switch
	over to search by index, and never do it with indxf, because
	there we do have the proper name already, and we just need the dynamic type

	Fix off-by-one class indices

	encode: protect from NULL klass->dxfname
	only relevant with fuzzed dxf data.

	rm .build-asan/dxf-check
	accidently added

	decode, dwg.h: add more restrict

2019-12-29  Reini Urban  <rurban@cpan.org>

	indxf: protect NULL pair
	in dxf_header_read on overflowed values.
	try a 2nd time then.

	Fixes ERROR: dxf_read_rs: RS overflow 860276 (at 314)
	ERROR: Invalid DXF group code: 8308
	Segmentation fault (core dumped)

2019-12-29  Reini Urban  <rurban@cpan.org>

	indxf: protect null-dereference in dxf_fixup_header
	found by fuzzing dxf2dwg

	define 2 pline api funcs for afl-fuzz
	needed by dwg2ps.

	fix outdxf cquote buffer-overflow
	stack or heap, detected by fuzzing. using for cquote 2*len+1 is enough,
	but also protect from stack-overflow in cquote and json_cquote.

	encode: add missing restrict

	dxf <=> dwg helper
	harmonize helpers, analog to log.
	log creates a dwgread log file.
	dxf should create a dxf from dwg,
	dwg should create a dwg from dxf.

	free: enable indxf VALUE_HANDLE logic
	actually set dat->opts to detect global HULL handles,
	which may not be double-freed

2019-12-29  Reini Urban  <rurban@cpan.org>

	alive.test: skip dxf2dwg leak test
	this helps under asan/lsan when custom ASAN_OPTIONS are set.

	writers do not hang anymore.

2019-12-29  Reini Urban  <rurban@cpan.org>

	indxf: clear realloced buffers
	avoid uninitialized data and pointers, esp. for free
	and valgrind.

	indxf move_out_BLOCK_CONTROL: fix for j>1
	when pspace is at entry 2 we need to avoid a classic heap-overflow

	XDICOBJHANDLE
	when add xdicobjhandle ref failed, set xdic_missing_flag

	dxf: support --force-free
	as dxf2dwg does. needed for leak debugging

	harmonize some ACIS ERROR newlines

	make: extract VALGRIND_OPTS for check-dwg-valgrind
	it is now overridable

	add LTEXEC for --enable-shared (the default)
	for some top test targets

	add dwg helper for dwg2dxf analog to dxf
	Maybe the name is a bit unfortunate, but it is only
	an internal helper

	free: omit Free object pointer
	so that all logs are diffable

	fix MULTILEADER.ctx.lline[] handles <r2010+
	unlike ODA I dont see them in the wild, only r2010+.
	the logs do make sense now.

	fix SummaryInfo leak
	when summaryinfo.spec fails in one field
	we forgot to restore dat (harmless), also to free
	the decomp chain. E.g. DS_libereco_R2010.dwg

	fix entity.ownerhandle leak
	the double-free from #43 was fixed with 38bc21c643451c2e31af0cc631cc7d651b310e54.
	ownerhandles are not really stored in the ref vector.

	outdxf: fix null-dereference in dxf_process_INSERT
	detected via dwg2dxf fuzzing

	*.spec formatting
	space after (
	but beware of gen-dynapi.c: no wrapping in REPEAT or FIELD

	common_entity_handle_data.spec formatting
	space after (

	fix eed leaks with UNKNOWN objects
	when the overflowed early.
	Found via fuzzing.

2019-12-29  Reini Urban  <rurban@cpan.org>

	Support SHAPE.style_id for DXF as name [2]
	renamed from SHAPE.shape_no (changed API).
	for out_dxf look up the name from the STYLE index,
	for in_dxf still ignored.

	BTW: We still don't have a testcase for SHAPE, but the afl
	fuzzer was nice to create a proper one to detect this case!

2019-12-29  Reini Urban  <rurban@cpan.org>

	free: fix VALUE_HANDLE for INDXF
	NULLIFY ref only if really freed. Fixes a few leaks and double-frees.

	make -C src .ic: keep a physical backup, not just in git

2019-12-28  Reini Urban  <rurban@cpan.org>

	free: fix the dxf pair leaks
	before each new_object.
	The INDXF obj->dxfname is heap allocated, the obj->name const.

	Biggest part of #151
	Now leftovers are mostly some dynamic dynapi strings and SPLINE callocs.

2019-12-28  Reini Urban  <rurban@cpan.org>

	free: more indxf leaks
	free pair on DXF_CHECK_EOF, DXF_RETURN_EOF. GH #151

	free: work on indxf leaks
	Keep the first BLOCK_HEADER name static, as all the others.
	See GH #151

	adjust gen-dynapi.pl line numbers +1 not -1

2019-12-27  Reini Urban  <rurban@cpan.org>

	dxf2dwg: add experimental --force-free option
	to be able to debug into dwg_free leaks, as found by
	valgrind

	outdxf: protect from NULL HATCH.boundary_handles
	found via fuzzing

	outdxf: fix some dxf_tables_write null-dereferences
	leading to fuzzing crashes

	outdxf: fix 1 dxf_classes_write null-dereferences
	leading to fuzzing crashes

	outdxf: fix 3 header null-dereferences
	leading to fuzzing crashes

	No -Wformat-truncation warnings anymore.
	Add an assert. The old code ran out of var-tracking size,
	but the assert now makes it clear.

	indxf: fix some nonnull warnings

	Fix some -Wunused-but-set-variable
	detected by clang-analyzer

	Avoid -Wformat-truncation, add RETURNS_NONNULL attribute
	mark dxf_format() and dxf_codepage() as __attribute__((returns_nonnull)),
	avoiding clang warnings warning: null format string [-Wformat-truncation=]
	       snprintf (buf, 255, _fmt, value);

	indxfb: fix dxf_read_rd
	copy pasta

	indxf: fix -Wformat with 32bit

2019-12-26  Reini Urban  <rurban@cpan.org>

	indxf: init MLEADER counts
	in REPEAT check num_vars before accessing the array,
	which might still be NULL. esp. with indxf

	indxf: fix DXF_*_EOF logic
	treat NULL pair as EOF, and return immediately

	indxf: support 3DSOLID.history_id
	and for all its children (AcDb3dSolid). r2007+

	indxf: fix color.alpha
	at least since r2007 alpha is seperately at 440

	indxf: dxf_read_pair() pair leak

	indxf: dxf_thumbnail_read pair leak

	indxf dxf_expect_code: use-after-free
	and -Wnull-dereference

	fix decomp leak in read_2004_compressed_section
	with empty sections

	fix preR13 PREP_TABLE memory leak

	fix dwg2dxf filename_out memory leak

	fix some dwg_api point memory leaks

	refactor perl5 bindings
	set proper -I and -L paths, create LibreDWG.c not swig_perl.c

	fix dwgwrite outfile memory leak

	fix 2 dwgrewrite filename_out memory leaks

	indxf: fix postprocess_SEQEND memory leak

	indxf new_object: -Wnull-dereference
	(the last one)

	indxf new_LWPOLYLINE: fix 91 vertexids type
	detected by scan-build

	in_dxf add_MULTILEADER_leaders: fix -Wnull-dereference

	Harmonize out_dxfb.c with out_dxf.c
	Fixes GH #173, esp. add the new mspace improvements.

	in_dxf add_MULTILEADER_lines: fix -Wnull-dereference

	dxf_header_read: add a strlen nonnull check

	dxf_tables_read: -Wnull-dereference

	abstract DWG_OPTS for dat->opts and dwg->opts
	use constants

2019-12-26  Reini Urban  <rurban@cpan.org>

	remove in_dxfb.c GH #134
	add some is_binary logic to in_dxf.c
	use dat->opts flag 0x20 for DXFB

	reduced size of the .so from 30521368 - 30260552 = 260816 byte.
	It should be a bit slower though, but many indxf funcs are now static,
	and there are no silly code duplicates anymore.

	Closes GH #134

2019-12-26  Reini Urban  <rurban@cpan.org>

	in_dxfb.c: merge with in_dxf.c
	add all the missing logic.

	See GH #134, we really wanted to avoid that code duplication.

2019-12-26  Reini Urban  <rurban@cpan.org>

	in_dxf: pair->value.s nonnull as version
	Argument with 'nonnull' attribute passed null

	in_dxf: STRADD pair->value.s nonnull
	Argument with 'nonnull' attribute passed null
	STRADD with NULL pair->value.s

	sec_dat.chain nonnull
	Argument with 'nonnull' attribute passed null
	Harmonize read_2004_section_preview with r2007 variant,
	sec_dat.chain could be NULL

	Type casting inconsistency #174
	Avoid overflows by casting to the larger type, zero-extended

2019-12-25  Reini Urban  <rurban@cpan.org>

	examples: add unknown.pi to EXTRA_DIST
	make unknown didnt work in checkouts with picat

	Makefile: refman-pdf is not a prime-target
	and does not work

2019-12-25  Reini Urban  <rurban@cpan.org>

	Release 0.9.3

2019-12-25  Reini Urban  <rurban@cpan.org>

	enable ax_restrict
	re-format docs: autoconf-archive is pretty strict
	gcc-9.2 on fedora has it fixed.

	enable it.  we do have several small inlined functions with loops on arrays,
	so it might affects us. See GH #141

2019-12-25  Reini Urban  <rurban@cpan.org>

	fix -Wcpp warning with AX_ADD_FORTIFY_SOURCE

	protect from invalid preR13 table numbers
	various int overflows. Fixes GH #176, case 8.

	add more preR13 error handling.
	Fixes the remaining GH #176 case 9

	more illegal preR13 protections
	and optional byte overflow counter to abort >200
	errors. Helpful in fuzzing, but not really useful for
	libs, the program must install a SIGABRT handler then.
	Fixes part of the remaining GH #176 case 9 (id:000024)

2019-12-24  Reini Urban  <rurban@cpan.org>

	fix REPEAT overflow check for <r2004
	earlier DWGs can also be broken to include wrong REPEAT counts.
	Fixes Case 3 of GH #176

	fix ref double-free on error
	Let the ref loop in dwg_free() free those refs.
	Fixes case 5 of GH #176.

	fix illegal SPLINE scenarios
	from fuzzed DWGs, See GH #176, case 1

2019-12-20  Reini Urban  <rurban@cpan.org>

	fix dwg_find_table_extname -Wnull-dereference

	use format(ms_printf) only on _WIN32
	silences a few warnings

	fix theoretical strncpy truncations
	gcc-9 warns too much to my taste.

2019-11-07  Reini Urban  <rurban@cpan.org>

	geom: fix transform_OCS
	normalized the wrong vector, ax => az typo,
	worked with random stack values.

	fix PROXY_ENTITY.ownerhandle leak
	found in example r13 DWGs

	extnames: add documentation
	Closes GH #167

	dwg_find_table_extname improved
	find more ACAD_XREC_ROUNDTRIP, not only at the first index.
	find the correct XRECORD via the xdic itemhandles[], no need to search
	the next or all XRECORDs

	extnames: only for r13-r14
	EXTNAMES do not exist since r2000. just ignore it
	and return the normal layer name

	extnames: abstract is_extnames_xrecord
	and xdata_string_match, which catches now
	linked xrecs, which are not EXTNAMES

	DICTIONARY.itemhandles always
	i.e. also for r13 and r14, where it is needed for XRECORD
	EXTNAMES

	implement dwg_find_table_extname
	See GH #167

2019-11-06  Reini Urban  <rurban@cpan.org>

	extnames: use dwg_find_table_extname
	to be implemented yet

	prepare dwglayers --extnames
	see GH #167

2019-11-05  Reini Urban  <rurban@cpan.org>

	fixup gen-dynapi.pl for HANDLE_VECTOR_N
	to generate the same docs (dxf 331)

2019-11-05  Reini Urban  <rurban@cpan.org>

	fix SORTENTSTABLE leak
	HANDLE_VECTOR does an overflow check, with resetting the
	num_ents field. Which does not free the sort_ents then anymore.

	Note that SORTENTSTABLE.ents can be empty in some dwgs. They are
	filled with NULLs then.

2019-11-05  Reini Urban  <rurban@cpan.org>

	fixup dwglayers, add asserts
	and flush each layer line. It can error during the loop.

	fix dwglayers
	on empty layer_control.entries.
	Closes GH #166, thanks to @fpmalard for the testcase

	fflush (stdout) before dwg_free
	on programs printing to stdout. They might fail there.
	See GH #166, thanks to @fpmalard.

2019-10-31  Reini Urban  <rurban@cpan.org>

	update TODO

2019-10-30  Reini Urban  <rurban@cpan.org>

	rm README-alpha
	already beta since 0.9

	more geom.h use
	use M_PI

	change extrusion types from 3DPOINT,3BD to BE

2019-10-30  Reini Urban  <rurban@cpan.org>

	dwg2SVG: add POLYLINE_2D and LWPOLYLINE
	basic lines only. no arcs (bulges), no other curve_types (spline, bezier)
	no widths.

	Closes GH #137

2019-10-30  Reini Urban  <rurban@cpan.org>

	fix geom normalize div by zero

	add programs/geom.c utilities
	for dwg2SVG and dwg2ps

	dwg2SVG: add transform_OCS
	See #165

	add OCS doc Closes #165

2019-10-29  Reini Urban  <rurban@cpan.org>

	add FIELD_BE logging to decode
	some .x values are flipped when extrusion.z is -1.0. see GH #165

	more fixup illegal bitsizes

	document codepage names

2019-10-28  Reini Urban  <rurban@cpan.org>

	set aligned_access_required on ubsan

	fail with illegal section_info num_desc2
	with a fuzzed dwg. cannot continue then

	fix bit_read_RC overflow
	found when fuzzing on 32bit.
	fixup illegal bitsize's.

2019-10-28  Reini Urban  <rurban@cpan.org>

	Release 0.9.1

	Implement ALIGNED_ACCESS_REQUIRED bit_convert_TU
	when the wstr pointer is unaligned. E.g. for ubsan

	check for ALIGNED_ACCESS_REQUIRED
	stricter risc machines, like sparc, alpha.
	but also settable for intel or with ubsan.

2019-10-27  Reini Urban  <rurban@cpan.org>

	fix r2007 Invalid section->pages[%d].*size
	via fuzzing. skip invalid sections. replace assert
	with proper error

	fix xdata hang
	on buf overflow. check for advance

	fix info->sections[0] NULL deref
	found by fuzzing

	fix xdata hangs
	error with wrong xdata types

	fix decode_R13_R2000 stack-overflow
	with too many sections (i.e. 8)

2019-10-26  Reini Urban  <rurban@cpan.org>

	fix VECTOR_CHKCOUNT overflow
	e.g. with num_owned = 2147483899 * unsigned, overflowing to a low int (512)

	fix divide by zero in VPORT.aspect_ratio

	fix ub in bit_reset_chain overflow
	ubsan runtime error: addition of unsigned offset to 0x00010a401800
	overflowed to 0x00010a4014c1, asan fuzzing.

	fix decode_3DSOLID VECTOR_CHKCOUNT
	where obj->nam may be realloced but not cleared, resulting
	in an invalid free

2019-10-25  Reini Urban  <rurban@cpan.org>

	fail with VALUEOUTOFBOUNDS ent num_reactors
	usually only found when fuzzing

	fix #162 decompression DOS
	check while loops for exhaustion.

	fix #163 header.section[SECTION_HEADER_R13].size - 34
	overflow, with empty size. Illegal fuzzed dwg only.

	fix #162 Null pointer dereference in check_POLYLINE_handles
	fuzzed DWG only, not a real one

2019-10-24  Reini Urban  <rurban@cpan.org>

	skip test with x86_64-mingw-w64 gcc-9.2.0 miscompilation
	in bit_read_H with val[i]: (%rbx) being dat+1.
	Previous compilers are fine.
	similar errors also in other packages.

	warn about this problem, to use an older working compiler.

2019-10-24  Reini Urban  <rurban@cpan.org>

	fix section[].size overflow
	Fixes GH #160

	fix Overflow section_array_size dos
	Only allow a certain amount of overflows, to repair it later.
	Fixes GH #161

	fix decode 2004 literal_length overflow
	Fixes GH #159.
	Check the initial literal_length also, not only in the loop

	fix Null pointer dereference in decode_R13_R2000 #158

	unit-testing: fix -Wunused-function warning
	ok is unused in dynapi_test.c

	probe for attribute format(ms_printf)

2019-10-23  Reini Urban  <rurban@cpan.org>

	decode: fix more leaks on DWG_ERR_VALUEOUTOFBOUNDS
	found by e.g. GH #156 fuzzing testcases, bailing out early
	on REPEAT_CHKCOUNT

	decode: fix thumbnail sentinel mismatch leak
	detected by GH #156

	bits_test: fix Conditional jump or move depends on uninitialised value
	bitchain.opts was left uninitialized on the stack, needed for LOG_TRACE

	probe for attribute format(gnu_printf)

	bits_test: more leaks
	all now

	bits_test: fix leaks

	fix bit_read_4BITS
	off-by-one for the first bit.
	Only detected by mingw-w64-x86_64

2019-10-22  Reini Urban  <rurban@cpan.org>

	fix win32 multiple definition of `dwg_version_type
	in test/unit-testing/decode_test

	add dwg_version_type()
	a printable release version string

	_FORTIFY_SOURCE: and add -fstack-protector
	on mingw32-w64 for broken _FORTIFY_SOURCE.
	This adds -lssp (needed for _FORTIFY_SOURCE)
	and is useful in its own acount.

2019-10-19  Reini Urban  <rurban@cpan.org>

	fixup prev. ax_add_fortify_source
	[] needs to be quoted. use something else.

2019-10-19  Reini Urban  <rurban@cpan.org>

	fix AX_ADD_FORTIFY_SOURCE for msys2
	msys2 bug with headers-git-7.0.0.5546.d200317d-1
	either add -fstack-protector for -lssp to be added,
	or omit adding -D_FORTIFY_SOURCE=2 to CPPFLAGS.
	See https://github.com/msys2/MINGW-packages/issues/5868

	actually try to link it, to catch it

2019-10-18  Reini Urban  <rurban@cpan.org>

	fix REPEAT -Wtype-limits checks
	uint32_t has only 4 byte. check for signedness overflow.

	indxf: protect NULL derefs
	detected by mingw gcc only

	fix win32 decode logging
	eed wstring

2019-10-18  Reini Urban  <rurban@cpan.org>

	dwg2SVG: honor TTF font styles => Verdana or Courier.
	Translate font-styles to svg font-families.
	Use Courier for all non-ttf fonts, and Arial or Verdana for ttf fonts.
	There's no SIMPLEX or COMPLEX in svg imho.

	Closes #156

2019-10-18  Reini Urban  <rurban@cpan.org>

	fix leak in r2007+ dwg_ref_tblname logging
	a temp. utf8 handle ref name

2019-10-08  Reini Urban  <rurban@cpan.org>

	spec: LIGHT.shadow_map_size
	see unknown LIGHT.pi

	unknown: minor fixes

2019-10-06  Reini Urban  <rurban@cpan.org>

	Release 0.9

2019-10-05  Reini Urban  <rurban@cpan.org>

	indxf: fix VIEW_CONTROL 70 -1
	which appears in the wild.

	fix get_next_owned_entity
	esp needed for dwg2dxf, which missed the very last
	block entity. Fixes GH #143, thanks to @soundd1

	dxf: fix BLOCK.base_pt
	take it from the BLOCK_HEADER. see GH #143

	fix bit_convert_TU for >U+0800
	a major blunder. wrong order of bytes AND wrong numbers.
	thanks to some chinese examples with chinese application names,
	esp. GH #109 and #143

2019-10-04  Reini Urban  <rurban@cpan.org>

	fix int overflows
	detected by lgtm

	dxf: VALUEOUTOFBOUNDS CellStyle.num_borders
	overflow with gh143/testBlock

	regen broken 2000/TS1.dxf example
	it could not even be loaded by acad

	dxf: fix FIELD_BSd formatting
	%6i, not %d.
	E.g. $DIMLWE

	bindings: add dynapi

2019-10-04  lorenz  <looooo@users.noreply.github.com>

	swig: swig4 needs  "stdint.i" to be included (PR #153)

2019-10-02  Reini Urban  <rurban@cpan.org>

	dxf: encode all r2007+ strings as utf-8
	see e.g. GH #109 and #143

	dxf-check: we start with dxf not dwg

	dynapi: add dxf for VISUALSTYLE.unknown_float45
	even if unused in DWG

	indxf: add_LTYPE_dashes

	spec: restrict POLYLINE_MESH to max 100000 vertices
	alloc failure with 32bit fuzzing there

	dwg2SVG: ignore empty pspaces
	We also assume all refs are resolved already.
	Fixes GH #109

	decode: fix more -Wsign-compare
	and -Wtype-limits

	decode: fix a -Wsign-compare

	fuzz: skip corrupt classes
	avoid strcmp on NULL

	fuzz: fail on corrupt es.fields.address
	protect from overflow segv, found via fuzzing.
	Turn asserts into an error

	fuzz: more section repair protection
	segv on i = 0 with [i - 1]

2019-10-02  Reini Urban  <rurban@cpan.org>

	fuzz: protect from dat overflow
	ERROR: bit_read_RC buffer overflow at 18446744073709549374
	bits.c:103:14: runtime error: addition of unsigned offset to 0x7ff41c4a9800 overflowed
	undefined-behavior

	dont advance already overflowed pointer

2019-10-02  Reini Urban  <rurban@cpan.org>

	decode: fix NULL strcmp
	found via fuzzing, with corrupt input

	decode: fix double-free
	with corrupt compressed sections.
	Found via fuzzing

	fixup htmlescape in src/out_json.h
	this is not library specific, just for helper programs.
	moved to programs/escape.h

2019-10-01  Reini Urban  <rurban@cpan.org>

	new programs/escape.c,h
	extract from out_json, because we dont want
	to add these to the API

2019-10-01  Reini Urban  <rurban@cpan.org>

	dwg2SVG: htmlescape strings and names
	and for widestrings escape to hex.
	Also protect from a few NULL strings.

	Closes GH #149

2019-10-01  Reini Urban  <rurban@cpan.org>

	spec: splice TABLECONTENT into TABLE r2010+
	as macro, not to duplicate it.

	spec: merge TABLECONTENT into TABLE r2010+
	a call will not work. TABLECONTENT is only an object, not an entity
	and has totally different offsets.
	Either put it into a macro or duplicate it.

2019-10-01  Reini Urban  <rurban@cpan.org>

	indxf: resolve_postponed_object_refs
	some TABLE/BLOCK/OBJECT field handles neeed to be resolved
	at the end, when the blocks and tables are all read.
	e.g. INSERT.block_header and various layer or other entity names

	Fixes GH #150, INSERT.block_header missing

2019-10-01  Reini Urban  <rurban@cpan.org>

	encode: fix VPORT.VIEWMODE
	bit_write_4BITS was broken, and the indxf calculation was missing.
	simplify the 4BITS reader and writer, add proper bit logging.

	indxf: set UCSFOLLOW and VIEWMODE

2019-10-01  Reini Urban  <rurban@cpan.org>

	decode: better pt logging
	print the proper point types, not just RD or BD

	indxf: fix VPORT.aspect_ratio
	r13+ aspect_ratio is calculated, the internal field
	really is VPORT.viewwidth. added to the API.
	calculate both.

	indxf: more default points values
	e.g. VPORT.view_target.z (GH #150)

2019-09-30  Reini Urban  <rurban@cpan.org>

	indxf: fix default points values
	e.g. WIPEOUT.uvec  (GH #150)

	indxf: IMAGE,WIPEOUT.imagedefreactor is code 3
	not 5.

2019-09-30  Reini Urban  <rurban@cpan.org>

	change DIMASSOC, indxf: add_DIMASSOC
	change the spec a bit.
	H 331 seems to be repeated with main_subent_type 73,
	H 332 with intsect_subent_type 74

	The other handles seem to be superfluous.
	Change the order of order of some fields to allow proper dxf
	roundtrips.
	(just rotated_type fails still)

	Only the indices with the bit set in associativity are filled. (no change)

2019-09-30  Reini Urban  <rurban@cpan.org>

	indxf: add_PERSSUBENTMANAGER, add_ASSOCDEPENDENCY
	but some of them are not yet encoded.

	encode: implement encode_3dsolid
	for most cases no encryption needed.
	decode has it already, indxf also

	indxf: add postprocess_TEXTlike and MTEXT defaults
	to minimize defaults to dataflags,
	and set default style handle.

2019-09-29  Reini Urban  <rurban@cpan.org>

	json: work on TABLE segv
	when it errored on decode TABLE after num_owned.

	Don't decode a r2010+ TABLE/CONTENT object header twice, only
	process the fields, because it's an entity afterall, not an object.

	But now we need to share the struct fields somehow.

2019-09-29  Reini Urban  <rurban@cpan.org>

	indxf: add_TABLESTYLE
	for the subfields.

	We need a seperate Dwg_TABELSTYLE_border from Dwg_BorderStyle
	because of two major differences: BL visible vs B invisible, and
	BL vs BS linewt.

2019-09-29  Reini Urban  <rurban@cpan.org>

	harmonize REPEAT names
	  _ adds idx
	  C does no checks
	  N does constant times (else _obj->times)
	    (and cannot reset times to 0 on error)
	  F does not calloc/free

	spec: VALUEOUTOFBOUNDS TABLEGEOMETRY cell.num_geom_data
	as it happens in example_r13.dwg

	more DEBUG: unstable TABLESTYLE
	promote TABLESTYLE from debugging-only to unstable (just r2010+ is unhandled).

2019-09-28  Reini Urban  <rurban@cpan.org>

	more DEBUG: check CELLSTYLEMAP overflow
	samples with too small CELLSTYLEMAP survive now roundtrips.
	fix MATERIAL color types

	decode: check for bits string overflows

	encode: better point logging

	indxf: fix new_LWPOLYLINE
	no bulges unless needed.
	properly encode flags from dxf, honor defaults.
	e.g. no const_width if 0.0.

2019-09-28  Reini Urban  <rurban@cpan.org>

	spec: add TABLESTYLE
	at least until r2010.

	reformat wrong dwg_api.
	also fix a few minor ASSOCACTION decl problems.

2019-09-27  Reini Urban  <rurban@cpan.org>

	DOCUMENTOPTIONS is alias for CSACDOCUMENTOPTIONS

	dxf, log: shorter make

2019-09-27  Reini Urban  <rurban@cpan.org>

	encode: fix entity bitsize calculation
	set START_HANDLE_STREAM for entities in COMMON_ENTITY_HANDLE_DATA.

	Fixes GH #142, the very first version which imports most entities.

2019-09-27  Reini Urban  <rurban@cpan.org>

	indxf: comments, logging only

	dxf-check for 2000/TS1
	use the proper basename

	indxf: encode OLE2FRAME.data 310

2019-09-27  Reini Urban  <rurban@cpan.org>

	indxf: fix new_MLINESTYLE_lines
	forgot to set MLINESTYLE.num_lines

	also improve some obj->type checks. by int, not by name

2019-09-27  Reini Urban  <rurban@cpan.org>

	api: add dwg_find_dicthandle
	fixes dwg_find_tablehandle for dicts.
	We need to search for the name in the dict given by the first NOD search.
	Not just returning this dict. With MLSTYLE we need to return the
	MLINESTYLE object ref.

	Also use the absolute refs, even if dict handles are code 2, not 4.

2019-09-27  Reini Urban  <rurban@cpan.org>

	indxf: cosmetics only
	HEADER.CMLSTYLE is still pointing to the wrong
	MLEADERSTYLE object, not MLINESTYLE.

	decode: more stable eed decoder
	with overflow, e.g. when dat does not advance error earlier.
	avoid endless loops on eed decoding errors.

	indxf: more eed size fixes
	the final string \0 does not count. It is just allocated
	for better logging.

	indxf: add DIMSTYLE defaults

2019-09-27  Reini Urban  <rurban@cpan.org>

	indxf: fix LAYOUT subclass conflicts
	groups 70 and 1 are in both subclasses.

	rename two LAYOUT fields:
	  pspace_block_record => block_header,
	  last_viewport => active_viewport.

	fix setting mspace_block_header and active_viewport from dxf.

2019-09-26  Reini Urban  <rurban@cpan.org>

	log BLOCK_HEADER.num_inserts
	for de,encode consistently

	indxf: fix BLOCK_HEADER first|last_entity to abs
	Fixes Reading handle 1F object type AcDbBlockTableRecord
	Error 34 (eWrongObjectType) Object discarded

	indxf: nolinks = 0 for BLOCK
	always add r2000 prev_entity + next_entity BLOCK, even
	if 0

	decode eed: fix data decoding
	dont jump to a wrong end pos

	encode eed: no codepage r2007+
	and add a bunch of LOG_POS dat->byte locations for debugging.

	indxf: collect eed sizes
	only add a new EED size block with a new handle.
	else add size to previous block

	encode: fix encode_eed
	always write the handle after each new sized data block.
	not just the first

	add dwg_find_tablehandle_silent
	and use it in in_dxf.
	not exported for now.

	encode: fix -Wtautological-constant-out-of-range-compare
	warnings. case size to long to compare same types

	doc: fix ENTITIES summary line

	doc: add Structures for EED and XDATA.
	Maybe more special structs later

	indxf: add postprocess_BLOCK_HEADER
	Closes GH #146

	encode: - logging prefix
	for patched sizes

2019-09-25  Reini Urban  <rurban@cpan.org>

	indxf: more abs/rel ownerhandle logic
	dwg_add_handleref: when searching for existing refs,
	DICTIONARY, XRECORD or class may need to be relative.
	skip the search for existing absolute ref then.

	< GROUP needs to be abs, MLINESTYLE e.g. not, is rel.

2019-09-25  Reini Urban  <rurban@cpan.org>

	indxf: resolve class types earlier
	via dwg_encode_get_class, from encode.
	improve the abs/rel ownerhandle logic for DICTIONARY and XRECORD

	sample_2000.dxf: add THUMBNAILIMAGE section

2019-09-24  Reini Urban  <rurban@cpan.org>

	indxf: ownerhandle abs logic
	abs for all old-style types < 500
	rel for all classes
	WIP dwg_encode_get_class

	indxf: WIP skip eed[0].size for handles
	still wrong though

	indxf: preserve eed[0] handle
	and size.
	handle is unfortunately stored at eed[0], and was
	cleared by the first non-handle value at eed[0].

	indxf: no SEQEND nor ENDBLK prev entities

	indxf: no 2x XRECORD.ownerhandle
	xdata then

	encode: prefer class->number over old type
	When a class with the same type exists, such as
	ACDBPLACEHOLDER or OLE2FRAME, prefer the varies type (>500),
	over the fixed type.
	Fixes Error 34 (eWrongObjectType)

	indxf: better entity defaults
	entities bordering to SEQEND, ENDBLK have nolinks.
	set ltype defaults

	indxf: fixup BLOCK_CONTROL[0].entries[0]
	wrong num_entries

	indxf: flip logging type code

	indxf: fix duplicate handle for BLOCK_HEADER.*Model_Space
	it is allocated at objid 0 for minimal DXFs. Reuse the pre-allocated
	object then.

2019-09-23  Reini Urban  <rurban@cpan.org>

	dxf: fix wrong INSERT.block_header 2 (name)
	Thanks to @soundd1 detecting this bug.
	Closes GH #143

	dxf: fix wrong COLOR.byblock GH #143
	index 256 == bylayer
	index 0 == byblock
	skip bylayer for dxf, and index & 255 turned bylayer into byblock.
	Thanks to @soundd1 detecting this bug

	decode: try to repair the section_info_id WIP
	See GH #144

2019-09-23  Reini Urban  <rurban@cpan.org>

	WIP decode: more r2004 section map checks
	try to fix GH #144.
	allow negative Dwg_Section.size ??

	ignore overlarge Section id > last_section_id.
	added various consistency checks and a section_map_address repair.

2019-09-23  Reini Urban  <rurban@cpan.org>

	json: no 0x%x numeric formats
	they cannot be parsed

	api: change Dwg_Section address to uint64_t
	It is read as such. see GH #144 for a testcase

	dwgwrite: fix -y overwrite
	write the dwg then

	alive.test: timeout 10s
	fails on my mac air with asan and 2 larger dwgs, example_2013
	and example2018 with dxf2dwg

	indxf: set entities entmode
	2 for mspace (default)

	indxf: set entity codes 6, 390, 347
	BB ltype_flags, plotstyle_flags, material_flags

2019-09-22  Reini Urban  <rurban@cpan.org>

	indxf: fix init of points
	with extrusion setting pt.z to 1.0, i.e. LINE start.z

	indxf: fix EED for points and handle
	add proper logging

	indxf: but leave room for one active entry

	indxf: fixup entries vs num_entries
	no NULL entries[] allowed. esp. VIEW_CONTROL entries
	are mostly NULL.

	encode LTYPE.strings_area if empty
	All TF, TFF strings must be dumped, even if NULL.
	Fixes Reading handle 14 object type AcDbLinetypeTableRecord
	Error 67 (eDwgObjectImproperlyRead) Object discarded

	encode: no NULL handles, always with code
	Fixes Recover: error eWrongObjectType reading Header.

	spec: fixup LTYPE_CONTROL.bylayer and byblock
	mixed up.

2019-09-22  Reini Urban  <rurban@cpan.org>

	indxf: fixup HEADER.CMLSTYLE
	MLINESTYLE, not MLEADERSTYLE.

	Also don't change existing ref.code to 5, recreate if not 5 already

2019-09-22  Reini Urban  <rurban@cpan.org>

	indxf: fixup HEADER.HANDSEED->code = 0

	indxf: no NULL ownerhandle, 4.0.0 then
	encode all ownerhandles. do relative offsets only for valid absref
	targets.

	indxf: encode HEADER.FLAGS and CELWEIGHT
	add reverse dxf_revcvt_lweight(), add more HEADER defaults
	which dont appear in most DXFs

2019-09-21  Reini Urban  <rurban@cpan.org>

	silence FIELD_HANDLE names
	add 2 new API funcs: dwg_ref_object_silent,
	dwg_resolve_handle_silent (was static)

2019-09-20  Reini Urban  <rurban@cpan.org>

	dxf: fix xdata 3DPOINT DXF
	fixes XRECORD:
	10 group not followed by 20 group

	dxf: fix DICTIONARY bug
	with dupl. itemhandles

	dxf: skip dupl. 330 ownerhandle
	already via common_entity_handle_data now

2019-09-20  Reini Urban  <rurban@cpan.org>

	decode: log bwd handleref names
	to log fwd handles we would need to scan all object
	types in advance, and then a 2nd time for its fields

	This might catch at least some wrong H refs.

2019-09-20  Reini Urban  <rurban@cpan.org>

	decode: macro aesthetics
	shorten a few vars. add clang-format directives

	example_2000.dxf: add THUMBNAILIMAGE
	to have closer numbers in the generated DWG

	dxf: ATTDEF.prompt 3 is DXF mandatory
	not just SINCE (R_2010)

2019-09-19  Reini Urban  <rurban@cpan.org>

	abstract set_handle_size
	for longer handles

	indxf: reactors[] always absolute,
	but the others, esp. ownrhandle always relative

	XRECORD logging spec
	free aesthetics

2019-09-19  Reini Urban  <rurban@cpan.org>

	GH #85: COMMON_ENTITY_HANDLE_DATA earlier
	Since r2007 we have a seperate hdl stream, which we can call at the
	beginning already.
	This enables the removal of the extra handles loops in the spec.
	But just r2007+, before those handles are still after the normal
	fields. Needs a special free logic there, not to delete ctx.leaders
	before the 2nd loop.

	free: combine common_entity_data with common_entity_handle_data,
	just call them in series.

2019-09-19  Reini Urban  <rurban@cpan.org>

	fix MULTILEADER leak
	in 2nd REPEAT loop for the handles, when
	the leaders field was already removed by the 1st loop.
	This will be properly fixed later, when we seperate the
	hdl_dat stream earlier from the obj stream, to process both at once.
	The text stream str_dat also. See GH #85, branch work/gh85-common

2019-09-18  Reini Urban  <rurban@cpan.org>

	encode: set xdicobjhandle to (3.0.0) not NULL
	when empty on r13-r2000

	decode refs not as NULL handle
	To store the original handle.code on encode.

	more logging aesthetics

	dwg_bmp: better BMP offset logging

	decode: fix FIELD_RSx logging

	encode: fixup type with dwg_encode_variable_type
	need the proper class id.
	Fixes ACAD eNoClassId and eWrongObjectType

	decode preR13: strncpy overflow
	tbl->name has only 64 byte

	fix dwgrewrite leaks

	encode: Thumbnail even with empty HEADER.thumbnail_address
	The address may be computed.

	parse the thumbnail data
	mostly for logging

	dwgrewrite: overwrite existing -rewrite.dwg

	log more types
	each read and write should be logged ideally.
	not yet for eed, xdata, sentinels, class.

2019-09-17  Reini Urban  <rurban@cpan.org>

	indxf HEADER strings
	they disappeared in encode FIELD_TV
	with IF_ENCODE_FROM_EARLIER.

	indxf: log HEADER dxf codes also.

2019-09-17  Reini Urban  <rurban@cpan.org>

	add proper FORMAT_RLx ditto

	add RSx type

	encode header: set is_maint defaults

	decode: Clearer Handles logging

	encode: fix Handles CRC_LE
	The little-endian variant, not BE.

	indxf: reformat prev.

	indxf: dwg_find_tablehandle is already case-insensitive
	since 7222ec07edb48ab298a3d90f66f5bcb23c1ef245

	indxf: seperate LTYPE bylayer/byblock
	into its own fields in LTYPE_CONTROL. Like with BLOCK_CONTROL
	model/paper_space before

	encode: fix bitsize calculation

	indxf: set tablerecord->xrefref = 1 as default

	encode: fix object CRC
	fix bitsize_pos logging,
	fix object address for the size calculation (dxf only).

2019-09-16  Reini Urban  <rurban@cpan.org>

	log the CRC sizes also

	encode: fix bit_write_CRC logging
	off-by-2

	dxf: add dxf-check
	similar to dxf-roundtrip.sh via TeighaFileConverter, but
	the other way round, for dxf2dwg.

	indxf: seperate {model,paper}_space into its own fields
	set the proper BLOCK_CONTROL fields.

	encode: fixup encode_patch_RLsize
	the size doesn't contain itself.

	indx: set klass->number, fixup ACDBDATATABLE
	in DXF DATATABLE is ACDBDATATABLE, in DWG not.
	fixup dwg->num_classes, to fix writing the last class.

	indxf: fix HEADER points
	and add some more defaults

	dxf: add all the missing codepages
	and its names

2019-09-15  Reini Urban  <rurban@cpan.org>

	dwg_find_tablehandle: find in DICTIONARY
	when the ctrl object is a DICTIONARY. Finds HEADER.CMLSTYLE

	indxf: find more HEADER DICTIONARYs
	LAYOUT, PLOTSETTINGS, PLOTSTYLENAME, ... with an ACAD_ prefix
	in the NOD

	indxf: resolve more header handles
	resolve_postponed_header_refs also had a bug.
	search names case-insensitive.
	need DICTIONARY objects for CMLSTYLE.

	indxf: add IF_ENCODE_FROM_EARLIER_OR_DXF
	set dwg->opts 0x20 on indxf, and 0x30 on minimal DXF,
	to set defaults which are not defined in a DXF

	decode: fix FIELD_NUM_INSERTS
	when num_inserts RC > 1, let it count.
	fixes GH #44 to accept one inserts[vcount][0] entity.
	compared to gh44-error.dxf: there's only on num_inserts BLKREF there, so
	it looks correct now.

	encode: better minimal DXF support
	set dat->from_version lower to trigger IF_ENCODE_FROM_EARLIER defaults.
	set empty header.dwg_version, app_dwg_version, codepage, and
	empty HANDSEED.
	skip AuxHeader then.

2019-09-15  Reini Urban  <rurban@cpan.org>

	dynapi: BE is a 3DPOINT also
	It could be renamed to 3BE, but that would change the API too much.

	This fixes heap-overflows when importing r12 DXFs, on the first 210 line.

2019-09-14  Reini Urban  <rurban@cpan.org>

	api: change handle sizes to long

	support handle sizes > 4, up to 8 byte on 64bit.
	as demonstrated in GH #143 they can be as large as D485E5D6 or even
	FD485E65F.
	Fixes GH #143

	rename SECTION_OBJECTS_R13 => SECTION_HANDLES_R13
	and dont recover offsets for illegal handleoff values yet

2019-09-14  Reini Urban  <rurban@cpan.org>

	decode: recover from invalid HANDLES
	either wrong handleoff UMC or offset [MC], which come in pairs.
	default to the next objects then.
	See testcase in GH #143.

	set r2000 section names (for logging).

2019-09-14  Reini Urban  <rurban@cpan.org>

	bit_read_UMC: default illegal handleoff to 1
	not 0, and the offset from the previous size, to read the next
	object.
	But the root problem remains in bit_read_UMC. See testcase in GH #143

	free: fix double-free of late added refs
	They were added by dxf_block_write - get_last_owned_block.
	This added endblk_entity is not a new ref, it already exists.
	It get's freed by dwg_free.

	free: advoid wrong warnings
	and skip bounds check exits. we want to free all fields

	common.h: fix memBEGIN, unused
	because broken

	move rad2deg to common.h
	define only at one place, not 3

	memmem not used anymore
	was replaced by membits

	build-aux/clang-format-all

2019-09-13  Reini Urban  <rurban@cpan.org>

	indxf: ENDBLK,SEQEND NULL prev_entity,next_entity
	See GH #142

	indxf: default color.index = 256 ByLayer
	and log CMC

	spec: reformat XRECORD
	misleading identation

	encode: xdata forgot the type RS

	encode: log more fields

2019-09-13  Reini Urban  <rurban@cpan.org>

	encode/indxf: NULL HANDLE is NULL
	and not a ref to 0.

	harmonize logging of it.

2019-09-13  Reini Urban  <rurban@cpan.org>

	indxf: reverse XRECORD.xdata order
	push to end of list, not front

	encode: log XRECORD xdata

2019-09-12  Reini Urban  <rurban@cpan.org>

	dynapi: regen doc

	spec: many more VALUEOUTOFBOUNDS checks
	and esp. reset the wrong num_ fields.

	indxf: set prev_entity, next_entity
	now common_entity_handle_data is complete

2019-09-12  Reini Urban  <rurban@cpan.org>

	fix -Wnull-dereference, add SAFEDXFNAME
	e.g. when logging HEADER or SUMMARY there is no obj.
	also for r2007 strings, there is no obj->has_strings there

	Only detected by gcc -O2.

2019-09-12  Reini Urban  <rurban@cpan.org>

	indxf: reset entmode for each block
	otherwise all ents end up in Paperspace.

	unify object-map logging
	log the Handleoff properly

	encode: fix the Object-Map
	Handleoff is the offset from the previous handle, default: 1,
	the next handle. With deleted objects there are holes.
	Use the proper types: UMC (unsigned) and MC.

	encode: rename loop indices to i

2019-09-11  Reini Urban  <rurban@cpan.org>

	encode: fix omap sorting
	use a proper insertion sort, add an init pass

	indxf: init BLOCK_HEADER *Model_Space .1F

	log: print section addresses as decimal, not hex

	encode: add AuxHeader, minor improvements
	abstract encode_patch_RLsize(),
	add auxheader defaults
	fix header.section[0].size calculation (not in dwg_encode_header_variables)

	indxf: calc. XRECORD.num_databytes
	acad complained about missing XRECORD data:
	Error 151 (eOutOfRange) Object discarded

2019-09-10  Reini Urban  <rurban@cpan.org>

	dxf2dwg: overwrite existing files

	-Wincompatible-pointer-types-discards-qualifiers

	indxf: resolve_objectrefs
	the object_map handles.
	TODO There are still many holes and duplicates in there

	improve dwg_model_space_object
	and fail when it fails, mostly with dxf2dwg dwgs

	dxf: write to versioned dwgs

2019-09-10  Reini Urban  <rurban@cpan.org>

	indxf: pass dxfname through
	so we don't need to resolve klassnames later.
	This dxfname is from the 0 NAME section in the dxf.

	Also update dxfb_blocks_read from ascii

2019-09-10  Reini Urban  <rurban@cpan.org>

	encode: support dwg_encode_get_class aliases
	though it's still very stupid to do it twice.
	classes.inc should be enough for a linear search for dxfnames.
	set the proper obj->dxfname.

	Avoid writing to dat->chain[0] on empty obj->bitsize_pos

2019-09-10  Reini Urban  <rurban@cpan.org>

	encode: fixup padded obj->size
	Fixes off-by-one Wrong object size warnings

	encode: no 2x object CRC, add asserts
	TODO: someone is still writing to dat->chain[0]

2019-09-10  Reini Urban  <rurban@cpan.org>

	restrict OFFSETOBJHANDLE code to 4
	create relative offsets only for code 4.

	support code 10 and 12 with offsets < 256, size 1.

2019-09-10  Reini Urban  <rurban@cpan.org>

	encode: minor improvements
	avoid wrong Expected a CODE 3 handle, got a 6
	warnings. Allow relativ offsets (TODO: only 4)

2019-09-10  Reini Urban  <rurban@cpan.org>

	indxf: read BLOCKS
	The previous TABLES section already has the BLOCK_HEADER.entries.
	Link it to the block_entity, endblk_entity, first_entity,
	last_entity.
	Set entmode (mspace, pspace) for all the block entities.

	Fix dwg_ref_object for relative refs, when ref->absolute_ref is known.
	Fix dwg_ref_object to don't set ref->obj on dirty_refs (as in the importer).

	Closes GH #133

2019-09-10  Reini Urban  <rurban@cpan.org>

	indxf: fix Invalid entity type BLOCK_HEADER, wanted BLOCK_RECORD
	dxf calls the BLOCK_HEADER BLOCK_RECORD. use the proper obj->name
	in {BLKREFS

	dxf: minor POLYLINE/VERTEX field fixups
	add COMMON_ENTITY_POLYLINE.has_vertex 66,
	add VERTEX_PFACE_FACE.flag 70,
	print and accept more DXF POLYLINE_* elevation points.

	indxf: search SEQEND.owner with <r13
	but dont store the list of handles there

2019-09-09  Reini Urban  <rurban@cpan.org>

	indxf: fix postprocess SEQEND
	was pretty broken.
	Closes GH #138

	indxf: store owner handle in map
	which fixes postprocess_SEQEND, because we can now
	find the owner

	indxf: fix num_reactors
	improve add NULL handleref
	always set xdic_missing_flag

	indxf: set NULL xdicobjhandle for r2000

	indxf: set xdic_missing_flag needed to avoid accessing the NULL xdicobjhandle

	encode: add 2013+ has_ds_binary_data
	yet unused.
	set calc. bitsize

2019-09-09  Reini Urban  <rurban@cpan.org>

	indxf: postprocess SEQEND
	and its owner. set the owned[] handles.
	Fix setting ownerhandle, reactors and xdicobjhandle
	for entities.

	See GH #138
	WIP owner->ownerhandle

2019-09-09  Reini Urban  <rurban@cpan.org>

	preview is embedded in sentinels

	dwgbmp: support optional 2nd arg bmpfile
	as documented

	dwgbmp: fix for 64bit
	on 64bit long is wrong, need BITCODE_RL sizes.

	decode Preview section to dwg->thumbnail
	with some consistency checks (failing still).
	This enables dwgbmp for all 2004+ dwgs.

	2004+ resort sections: classes before handles,
	and summary after header.
	similar to 2000

	free DICTIONARY FIELD_VECTOR_T aesthetics only

2019-09-09  Reini Urban  <rurban@cpan.org>

	fix obj_handle_stream and VECTOR_CHKCOUNT
	the streams are already restricted from 0 to size, independent of
	obj->address.
	pass the right stream to AVAIL_BITS.

	Fixes many overflow checks, esp. GH #132 08.dwg

2019-09-09  Reini Urban  <rurban@cpan.org>

	read_2004_section_handles: fix oldpos
	wrong check. we advance hdl_dat.byte for the handles, not dat.

	also check GROUP.num_groups overflow (#132 08.dwg)

2019-09-09  Reini Urban  <rurban@cpan.org>

	decode: fix R2004_section_map int overflow
	causing bytes_remaining switch from +8 to -8 but unsigned.
	Fixes the crash from #132 with 00.dwg
	Closes #93

	needs int64_t, but we already required that earlier (RLL, BLL types, ...)

2019-09-08  Reini Urban  <rurban@cpan.org>

	probe for broken restrict
	new AX_RESTRICT probe.
	rust reports gcc broken from 5 - 10, but I can only confirm
	clang 6-8 failing. gcc should not be used since 9 for other reasons.
	Disabled since we don't have short restrict loops yet.

	Closes GH #141

2019-09-08  Reini Urban  <rurban@cpan.org>

	indxf: fix Invalid UNDERLAY field scale_flag error
	check of this field exists, without silencing the loglevel

	indxf: avoid Unknown DXF code 71 for DIMSTYLE_CONTROL
	warning. for the default DIMSTYLE_CONTROL.num_morehandles = 0 case

	indxf: more HATCH 97, 330 boundary_handles
	also for polyline_paths

	indxf: accept r13 SAVEIMAGES
	is present in some r13 DXFs

	indxf: fix MTEXT crash with empty num_column_heights
	with LCAD_libereco_R2000.dxf

2019-09-08  Reini Urban  <rurban@cpan.org>

	indxf: fix add_MULTILEADER_lines i++
	fixes heap-buffer-overflow on wrong line.color.
	bump for each new point.

	Also support rgb colors.

2019-09-08  Reini Urban  <rurban@cpan.org>

	indxf: skip yet unsupported minimal DXF

	indxf: fix dxf_expect_code heap-use-after-free

	indxf: skip ASSOC2DCONSTRAINTGROUP
	stack-buffer-overflow on unsupported fields

2019-09-07  Reini Urban  <rurban@cpan.org>

	indxf: simplify the summaryinfo texts

	indxf: set the summaryinfo texts

	abstract ASSOCACTION
	from subclass AcDbAssocAction for three ASSOC objects:
	ASSOC2DCONSTRAINTGROUP, ASSOCNETWORK, ASSOCACTION

	dynapi: more subclass structs and DXF values
	parse the stacked .spec REPEAT blocks and defines also.
	renamed some subclass structs to match the types.

2019-09-06  Reini Urban  <rurban@cpan.org>

	dynapi: all subclasses + summaryinfo

	more 2004 section stuff
	rename vba_proj_address to vbaproj_address.

	shorten dwg_find_tablehandle

	free: fix summaryinfo leaks

	dxf: move last 4 HEADER vars to summaryinfo

2019-09-05  Reini Urban  <rurban@cpan.org>

	decode_2007: support uncompressed sections
	add summaryinfo

	decode: support uncompressed sections
	summaryinfo.
	rename dwg->header.summary_info_address to summaryinfo_address
	rename dwg->header.thumbnail_addr to thumbnail_address.

	api: add TIMERLL type
	raw, unencoded 2xRL julian date, for summaryinfo

	decode: add AcDb:SummaryInfo
	for the 4 new HEADER variables

2019-09-04  Reini Urban  <rurban@cpan.org>

	debug: add 4 new HEADER texts, fix some DEBUGGING classes
	TITLE, SUBJECT, AUTHOR, KEYWORDS are at least set by DXF, but we have
	no location for them in the DWG yet

	doc: dxf2dwg default writes to r2000 now
	later when encode supports all versions, it will be the DXF version

	indxf: resolve_header_dicts
	and fix an utf8 bug in dwg_find_dictionary (r2007+)

	api: harmonize DICTIONARY_NAMED_OBJECT names
	LAYOUTS => LAYOUT, PLOTSTYLES => PLOTSTYLENAME, MATERIALS => MATERIAL,
	COLORS => COLOR.

2019-09-04  Reini Urban  <rurban@cpan.org>

	api: fix Empty header_vars table LAYER...
	Search and set HEADER.*_CONTROL_OBJECTs, via added
	dwg_find_table_control() and dwg_find_dictionary().
	These return only a ref, not the object, as the objects are
	still moving. (used only during encode/import)

	Export add_handle and add_handleref with dwg_ prefix.

	Trace the DICTIONARY texts

2019-09-03  Reini Urban  <rurban@cpan.org>

	api: add ANNOTSCALEOBJECTCONTEXTDATA object
	for the various ACDB_nameOBJECTCONTEXTDATA_CLASS DXF objects.
	They all seem to be based on the AcDbObjectContextData
	and AcDbAnnotScaleObjectContextData subclass, but some seem to
	have more. WIP

	indxf: simplify DXF_RETURN_ENDSEC and 0 loops
	DXF_RETURN_ENDSEC ends with an if block, we can do an else here
	break the inner 0 loop for unhandled objects.

	indxf: support more LWPOLYLINE fields
	and don't report common found handles (e.g ltype) as not found.

	indxf: search existing handlerefs
	with the same code and value. dont create fresh refs for everything
	only for new owners, not refs

	indxf: improve dxf_objects_read
	add object_alias (for all known object names)

2019-09-03  Reini Urban  <rurban@cpan.org>

	api: rename all linetype* fields to ltype
	make MLINESTYLE_line.ltindex a union of index|ltype handle
	and have type BSd (values SHRT_MAX still: 32767, 32766)

	indxf: resolve MLINESTYLE.lines[%d].lt.ltype name

2019-09-02  Reini Urban  <rurban@cpan.org>

	indxf: fix HEADER._3DDWFPREC
	need a special name rule here. invalid identifier

	api: HEADER.TIMEZONE BL => BLd (signed)
	change the type.
	e.g. -8000 is a typical value

	indxf: fix $XCLIPFRAME type error
	ERROR: skipping HEADER: 9 $XCLIPFRAME, wrong type code 290 <=> field RC.
	XCLIPFRAME is 280 RC or 290 B in dynapi. Set is as a byte (RC).

	indxf: more subfield checks and fixes

2019-09-02  Reini Urban  <rurban@cpan.org>

	indxf: resolve_postponed_eed_refs
	to fill in eed.handle refs to APPID entries,
	when APPID is not yet read.

	Also free all the postponed arrays of hdls.

2019-09-01  Reini Urban  <rurban@cpan.org>

	indxf: check UPPERCASE table names also
	for the few standard names, when setting the header vars:
	BYLAYER, BYBLOCK, CONTINUOUS

	indxf: fix UAF with ctrl TABLE
	dwg->object[] might move. use the ctrl objid index instead.

	indxf: fix Not yet implemented EED.code 1005

	indxf: add defaults
	before reading an object: scale, extrusion, scale_flag
	and after: _3DFACE.has_no_flags

	indxf: support scale 3DD points (with defaults)
	and 3DFACE.z_is_zero

2019-08-31  Reini Urban  <rurban@cpan.org>

	dxf: fix LEADER.dimstyle to DXF 3
	ODA bug, documented there as DXF 2.
	also handle LEADER.points[] [10 3BD*]

	indxf: support MTEXT.column_heights[] [50 BD*]

	indxf: fix UNDERLAY and clip_verts
	Accept PDFUNDERLAY from dxf, fix WIPEOUT rect mode,
	handle realloced clip_verts, there is no num_clip_verts there, but set it.

2019-08-31  Reini Urban  <rurban@cpan.org>

	api: remove boundary_pt{0,1} fields
	indxf: handle IMAGE|WIPEOUT|UNDERLAY.clip_verts 2RD*
	WIPEOUT todo

	for images use just clip_verts[0,1] instead.
	set num_clip_verts = 2 then.

2019-08-30  Reini Urban  <rurban@cpan.org>

	indxf: add flag 4 on width.start 40
	DXF does not set the flag 70 & 4 (const_width) correctly

	indxf: handle alt. color codes
	and dont print them twice

	indxf: MLEADERSTYLE.block_scale special case
	weird DXF codes

	indxf: handle DBCOLOR color and names
	DXF: fix a 430 memleak in out_dxf.

	indxf: rename add_dictionary_handle to add_dictionary_itemhandles

	docs

2019-08-30  Reini Urban  <rurban@cpan.org>

	add MESH entity, indxf transform matrix
	MEDSH with --enable-debug, but always with indxf.
	Unknown fields, untested.
	But we have a 2004/Surface.dxf and we do the indxf import for it.

	Support the fixed size transform matrix BD[16] and one BD[12] for
	indxf.
	Fix DXF 92 preview size for all class proxy vector data.

2019-08-29  Reini Urban  <rurban@cpan.org>

	indxf: add_3DSOLID_encr
	only ACIS version 1.
	version 2 with 290: 1 and 2: {000...} not yet.

	The DXF variant has a special quoting case for '^ ' => 'A',
	not in the DWG.

	also missing:
	wireframe_data_present, point_present, point, num_isolines,
	isoline_present, wires, silhouettes.

2019-08-29  Reini Urban  <rurban@cpan.org>

	api: new type BL linewt => BLd linewt (signed)
	to represent -1 [BLd] (ByLayer), and -2

	indxf: more MULTILEADER defenses
	some more asserts and checks

2019-08-29  Reini Urban  <rurban@cpan.org>

	api: rename 2 MULTILEADER has_content* fields
	MULTILEADER.ctx.has_content 290 => ctx.has_content_txt
	and .ctx.has_content_block 296 => ctx.has_content_blk

	They must be outside, because content is a union of either txt or blk.

2019-08-29  Reini Urban  <rurban@cpan.org>

	dxf: add dxf 296 for MLEADER.has_content_block

	indxf: simplify LOG_ERROR
	save space

	indxf: add_MULTILEADER
	only missing: ctx.296

2019-08-28  Reini Urban  <rurban@cpan.org>

	indxf: add color.rgb fields
	manually. SUB fields not yet (TABLE)

	add dxf tool (for indxf only yet)

	indxf: add_HATCH

	indxf: add_MLINE
	Abstract away the MLINE logic.
	Either break (2), next_pair (1) or search_field (0).

	indxf: add_SPLINE
	Abstract away the SPLINE logic.
	Either the field is handled or not.

2019-08-28  Reini Urban  <rurban@cpan.org>

	decode: fix Header Section[0] CRC mismatch error
	always failed on r13 and r14, because of missing slack
	(unknown header vars).

	Remove HEADER.crc field, it really belongs to the section logic.
	Set the proper crc position, and check the slack (padding).

	Add the 4 final HEADER.unknown_54 - 57 fields to r13 also.
	Always 65535. An ODA bug, which says r14+ (maybe its R13C3?).

2019-08-26  Reini Urban  <rurban@cpan.org>

	bit_check_CRC: fix wrong buffer overflow check

	bits: where did a buffer overflow occur
	Note: at bit_check_CRC with r13 objects

	add example_r13.{dwg,dxf}
	created via Teigha from example_2000.dwg

2019-08-26  Reini Urban  <rurban@cpan.org>

	decode r13-2000: simplify CRC
	Clarify calculation of the header CRC, which is wrongly described
	in the ODA. There is no need for an xor, dependent on the num_sections.

	Use the simpler bit_check_CRC over bit_calc_CRC, which ensures
	that we don't include the CRC into our calculation (striking it out).

2019-08-26  Reini Urban  <rurban@cpan.org>

	api: remove HEADER.SAVEIMAGES, rename vport_entity_header
	SAVEIMAGES is only dumped for R13.dxf, calculate it.

	HEADER.vport_entity_header refers to the VPORT_ENTITY_HEADER handle.
	Rename it.

2019-08-23  Reini Urban  <rurban@cpan.org>

	indxf: upgrade POLYLINE_2D and VERTEX_2D
	to the appropriate subclass/ENTITY.

	dynapi: fix DIMENSION_common dxf

2019-08-23  Reini Urban  <rurban@cpan.org>

	dynapi: add 100 subclass to dwg_list_subclasses
	but only 2 subclasses are actually code 100 in the dxf related to
	our subclasses. some are enclosed into 300 NAME{ groups instead.

	use symbolic DWG_TYPE_* for dwg_name_types, more readable.
	list some more aliases and subclasses, not yet used.

2019-08-23  Reini Urban  <rurban@cpan.org>

	dynapi: more DIMENSION_common dxf
	_ORDINATE went missing. needed to add manually

	indxf: special-case DIMENSION
	first handle it as DIMENSION_ANG2LN, the largest, then
	change type to the actual subclass.

	dynapi: add subclass API
	to get the fields of the named subclass.
	Note that DIMENSION_common is implemented as
	subclass, not parent class.

2019-08-21  Reini Urban  <rurban@cpan.org>

	indxf: accept dxfname aliases
	but we dont upgrade POLYLINE to POLYLINE_3D, ... or DIMENSION_*
	objects yet.
	add missing entity aliases to dynapi

	dynapi: forgot regen for visualstyle DXF 348

2019-08-20  Reini Urban  <rurban@cpan.org>

	spec: harmonize FIELD_BINARY fields
	esp. the 310 fields.
	FIELD_BINARY falls back to FIELD_TF elsewhere,
	and is needed for dxf *and* json. json cannot print \0.

	json: add common_entity_data, HANDLE now a list
	layers, ...
	make handle a list of [code, value].
	The code changes (owner, pointer, soft, hard),
	but the absolute value is the same. easier to parse.

	dwgwrite: fail earlier on missing input

2019-08-20  Reini Urban  <rurban@cpan.org>

	indxf: fix wrong MULTILEADER add_ent_preview
	when being the text_color 92. check the subclass.
	The 92 RGB value leads to Out of memory on 32bit.

	Also protect from various other strcpy stack overflows.

2019-08-19  Reini Urban  <rurban@cpan.org>

	indxf: BINARY comment
	why we convert to hex later, not already in read_pair

	dwgwrite: support -y --overwrite

	dwgwrite: support dxf from stdin

2019-08-19  Reini Urban  <rurban@cpan.org>

	dwgread/dwgwrite: -v logging
	we should support reading from stdin, therefore be silent on default,
	print only to stderr.

	also resolve error numbers to strings

2019-08-19  Reini Urban  <rurban@cpan.org>

	out_json: fix NULL handle output

	dwg_encode_eed: simplify

	add dwg_encode_eed_data, needed for indxf
	write encoded EED.data, not just the raw bits

2019-08-19  Reini Urban  <rurban@cpan.org>

	stabilize dwg_encode_eed
	with dxf data, where we might have no data, and certainly no raw.
	TODO encode from data only.

	This fixes writing DWGs from r12 DXFs

2019-08-19  Reini Urban  <rurban@cpan.org>

	simplify dwg_resolve_handle usage
	we silently return NULL now

	silently disallow hash_get 0

2019-08-19  Reini Urban  <rurban@cpan.org>

	dwg_find_tablehandle: always compute ref->obj (indxf)
	we are still constructing the objects, which move (realloc dwg->objects[]),
	so we cannot rely on any ref->obj. don't even set them.
	only compute them temporarily.

	This fixes now the many indxf use-after-free failures.

2019-08-19  Reini Urban  <rurban@cpan.org>

	indxf: support eed points and r2007 strings

2019-08-18  Reini Urban  <rurban@cpan.org>

	indxf: search APPID for eed.1001
	but this still fails if the TABLEs are not yet added

	indxf: implement binary EED 1004

	indxf: strdup the color.name
	it was never allocated.
	protect add_eed a bit more. memcpy is safer than strcpy.

	indxf: check obj/ent in add_eed
	theoretically they should have the same layout
	but some compiles do crash there.

	dwg: move dwg->measurement to HEADER.MEASUREMENT
	as header var. It is read from DXF as HEADER.
	This fixes indxf for it most elegantly.
	But we need to store it as BS, not RL, otherwise
	in_dxf will complain:
	ERROR: skipping HEADER: 9 $MEASUREMENT, wrong type code 70 <=> field RL

	api: rename dwg->preview to thumbnail
	for better seperation of the global THUMBNAIL dxf section,
	vs the entity preview fields.
	A thumbnail may contain multiple pictures, as BMP or WMF.
	An entity preview BMP or proxy graphics vector data.

	api: rename picture to preview
	A dwg preview may contain multiple pictures, BMP or WMF.
	An old entity may contain under 160 a bitmap.
	A new class-based variable-type entity may contain under 92
	PROXY GRAPHICS vector data, to be displayed under older apps.

	indxf: more add_ent_picture
	for more variable entities (class-based).
	They store their PROXY GRAPHIS vector data under DXF code 92,
	not 160, but at the same DWG field.

2019-08-17  Reini Urban  <rurban@cpan.org>

	dxf2dwg: skip lsan leak checks, and dwg_free failures
	for now. TODO

	indxf: fix invalid free_3dsolid
	for empty encr_sat_data

2019-08-17  Reini Urban  <rurban@cpan.org>

	indxf: fix write exhaustion, skip lsan leak
	with lsan call dwg_free, but dont check leaks yet.
	extend the chain on object writes.
	fixes a valgrind problem.

	there are still a couple of dxf_read_pair leaks:
	6363 bytes on example_2013.dxf

2019-08-17  Reini Urban  <rurban@cpan.org>

	dwg_write_file: set dat->opts
	even if loglevel is set by dwg->opts. it is used by bits at least

2019-08-17  Reini Urban  <rurban@cpan.org>

	dxf2dwg,dwg2dxf: check write permissions
	change error message on symlink.
	we refuse to overwrite a symlink, even with --overwrite
	for security reasons. ditto for -w files.

	we now also check for write perms, and refuse to write to non-files.

2019-08-17  Reini Urban  <rurban@cpan.org>

	indxf: fix eed double-free
	eed might be realloced, but was not set.

	indxf: fix find_tablehandle double-free
	always create a fresh new table ref, don't reuse one.
	we need to seperate owners from pointers.
	the table control is the owner, the referenced handle is a pointer.

2019-08-17  Reini Urban  <rurban@cpan.org>

	api: rename all table control handles to entries
	e.g.
	LAYER_CONTROL.layers => entries,
	APPID_CONTROL.apps => entries,
	BLOCK_CONTROL.block_headers => entries,
	DIMSTYLE_CONTROL.dimstyles => entries,
	...

	remove all ctrl_hdlv[] special-cases, depending on different names.
	esp. in indxf.

2019-08-17  Reini Urban  <rurban@cpan.org>

	bits: add bit_(read.write)_T api
	switching on the version automatically.
	simplifies the types, if TV, TU or T.

2019-08-17  Reini Urban  <rurban@cpan.org>

	api: strip _handle suffix, ...
	from all handle fields but null_handle.

	harmonize some names:
	GROUP.num_handles => num_groups
	GROUP.group_entries => groups
	BLOCK_HEADER.insert_handles => inserts,
	FIELDLIST.field_handles => fields,
	SORTENTSTABLE.sort_handles => sort_ents
	LAYER_INDEX.layer => layername
	LAYER_INDEX.entry_handles => layers

	visual_style => visualstyle,
	live_section_handle => livesection,
	cell_style => cellstyle,
	dict_handle => dictionary,
	dict => dictionary

2019-08-17  Reini Urban  <rurban@cpan.org>

	dynapi: adjust #line

	indxf: support bll, add dxf_read_long
	but not really used yet. most picture sizes are just
	4G, unsigned long. (dat->size)

	document dwg->measurement
	(0 English/1 Metric)

	encode: add 2NDHEADER defaults
	but yet unused. handles[] missing

	api: add BSd type
	for some DIMSTYLE/HEADER vars, which need to be signed

	json: protect from empty parent->layout_number

	indxf: silence Unknown DXF code for BLOCK warnings
	These are DXF artifacts, not in the DWG

	add test-data/example_r14.dxf
	needed for alive.test with dxf2dwg.
	This version does not support ACDBPERSSUBENTMANAGER nor
	ACDBASSOCDEPENDENCY so skip these dxf tests there.

	alive.test: disable TODO for dxf2dwg
	should not crash anymore.

	indxf: support common CMC [62,420,430]

	indxf: add_block_picture (analog)
	and log BLOCK_HEADER.insert_handles[]

	indxf: add_ent_picture
	the entity.picture, not the dwg thumbnail

2019-08-16  Reini Urban  <rurban@cpan.org>

	indxf: re-arm Warning: Ignore VECTOR
	Only 375 warnings now with examples_2013.dxf

	indxf: add GROUP.group_entries [340 H*]
	and set GROUP.num_handles

	indxf: new_LWPOLYLINE
	all vectors do have the same size

	dynapi: add 2BD_1 types
	needed in indxf for some objects, like LAYOUT.window_max.y, ...
	Improve VECTOR detection

	indxf: skip .z of 2D points
	like with SOLID

	dxf2dwg: adjust limitation warnings

	indxf: read MLINE entity
	with its various subentities. dynapi does not have its dxf values,
	which does not make sense here

	add DXF 46 to MTEXT.rect_height
	was missing. ODA specifies it

	indxf: read SPLINE entity
	at least the Bezier spline, scenario 2

	dynapi: fix setting r2007+ wchar strings
	T types are just TV, just check for TF or 2007.
	find_tablehandle: check against the utf8, not the wide name.

	dwg_find_tablehandle: use a better temp. type
	just to check the _obj->name earlier

	indxf: protect NULL hdlv[i] in dwg_find_tablehandle
	some handle vector entries might still be NULL

	indxf: fix some handleref double-free's
	need to make a copy of refs. But not all yet.

	programs: add -y --overwrite
	dont overwrite existing files per default with
	the dxf converters.
	regen the manual, adjust the docs

	encode: patchup obj size and bitsize
	for DXF, to fix overflows.
	Many dxf2dwg dwg's can now be read.

	encode: use SECTION enums
	and calc the section[0] address and size.

2019-08-16  Reini Urban  <rurban@cpan.org>

	indxf: dxf_fixup_header
	fixup some values, like table or block refs (with proper code),
	and values not in the DXF.

	make LOG_* a block to be more useful in if () else statements.

2019-08-15  Reini Urban  <rurban@cpan.org>

	api: rename ACDBNAVISWORKSMODELDEF to NAVISWORKSMODELDEF

2019-08-15  Reini Urban  <rurban@cpan.org>

	indxf: add dxf_preview_read
	read the hex THUMBNAILIMAGE.

	also abstract away new_MLINESTYLE_lines()

2019-08-15  Reini Urban  <rurban@cpan.org>

	dxf2dwg: set dwg.header.from_version

	dxf2dwg: disable free under asan for now
	should be enabled to test for leaks when encode is stable enough

	indxf: MLINESTYLE.lines[]

	indxf: add LAYER.linewt, flag logic

	indxf: resolve VT_HANDLE handles
	by ref, not by name (i.e. all code > 300)

	dwg_encode_add_object: lookup class by name
	same as in dwg_encode_variable_type().
	This fixes DEBUGGING objects, like CELLSTYLEMAP.

	indxf: add hex2bin for VT_BINARY hex string
	e.g. handle XRECORD 311 values

	dwg_encode_variable_type: lookup class by name
	indxf has a different class order, which breaks lookup by type/class[i].
	either fixup the obj->type then (now), or resort the classes, when
	being read from DXF.

	indxf: fix classes_read logging
	wrong num_instances copy&pasta

	indxf: resolve ENTITY.layer
	special-case.
	also excempt DICTIONARYVAR from DICTIONARY* cases.

	fix deg2rad
	wrong calculation!, prev. only used in unknown/bd

	indxf: deg2rad angles
	convert angles from degree to radian

	indxf: fix add_dictionary_handle
	and simplify without using the dynapi.
	But the problem was setting texts [3 TV*] before to TV

2019-08-14  Reini Urban  <rurban@cpan.org>

	api: sync struct DICTIONARY with DICTIONARYWDFLT
	use the same names and offsets, for easier in_dxf.
	rename DICTIONARY*.text => texts,
	DICTIONARY.unknown_r14 => cloning_r14
	DICTIONARYWDFLT.cloning_rl => cloning_r14

	indxf: add text to add_dictionary_handle

	perl: fix out-of-tree
	make distcheck
	No rule to make target 'perl/LibreDWG.xs', needed by 'all-am'

	dynapi: add HANDLE_VECTOR dxf values

	bits: -Wmaybe-uninitialized b in bit_write_hexbits
	Clearly an optimizer problem, but no big deal.

	indxf: sync in_dxf to in_dxfb

	indxf: fixup add_xdata
	may free the original pair, avoid double-free and leak

	indxf: add_dictionary_handle

2019-08-06  Reini Urban  <rurban@cpan.org>

	indxf: XRECORD add_xdata
	all unknown XRECORD fields are xdata

	suffix: also strip other known extensions
	e.g. dxf2dwg would create a .dwg, not a .dxf.dwg

	dxf2dwg: sync with dwg2dxf
	allow multiple input files,
	silently overwrite existing dwg files
	in the current dir.

	workaround old darwin makeinfo
	need the texi2any version for @indentedblock

	Merge branch 'indxf' [GH #129]
	Not yet fully finished but ready for master

	dxf2dwg: more stability
	dwg_find_tablehandle can find a NULL hdlname
	free can run into NULL _obj->eed
	resolve_postponed_header_refs can run into an empty string pair

	indxf: add BLOCK_CONTROL.insert_handles 331

	indxf: add resolve_postponed_header_refs
	array_push: need the code also
	to get to the right table

	indxf: fill dwg->object_ref[] via
	dwg_decode_add_object_ref()

	indxf: more object_map, HEADER handles, ...
	Can now write most of the entities.
	set the object_map from the handles,
	fix reading HEADER handles,
	rename dxf_find_tablehandle to dwg_find_tablehandle. It is not just
	DXF-only

	indxf: support 3DFACE and 3DSOLID names

	indxf: start testing dxf2dwg
	for now just the alive.text. not a functional test

	indxf: dxf_find_tablehandle
	resolve table names to handle

2019-08-05  Reini Urban  <rurban@cpan.org>

	index: finished reading all sections
	start writing the dwg

	index: WIP OBJECTS and ENTITIES

	indxf: check common_entity_fields
	for entities. fixes e.g. BLOCK.layer.
	skip old table-only specific fields for new_object()
	and let it search the dynapi fields instead.

	doc: fix some more indices
	Now the object appears in the new 2nd index,
	but for pdf not the entities in the first yet.

	doc: dwg_get_ => dwg_getall_

2019-08-05  Reini Urban  <rurban@cpan.org>

	generate dynapi.texi
	for all HEADER, OBJECTS, ENTITIES and internal subfields.
	Not CLASSES yet. Not sure about TABLES.

	TODO The makeinfo for pdf index and menu generation does not work
	for an included file. Maybe include it via gen-dynapi.pl

	Closes #127

2019-08-05  Reini Urban  <rurban@cpan.org>

	generate src/objects.inc
	This attempt is much better than a polluted dwg.spec
	Get rid of all the hacks from the previous commit

	WIP indxf refactor
	define IS_INDXF (not DXF nor ENCODER).
	delete all the FIELD, VALUE and HEADER macros,
	as we only parse dwg.spec to get the OBJECT and ENTITY definitions
	but we don't care about the fields and the additional logic.

	more minor BLOCK_RECORD fixups
	search fields with the right name (and log the error).
	fix color.index value

	add VT_INT64 type to dxf/eed
	e.g. BLL REQUIREDVERSIONS [160] since r2013+

	dynapi: fix utf8 conversion
	is_utf8 denotes an UTF-8 input string, not that
	the target may be unicode. is_utf8 is always on in ascii importers.
	dont convert every string pair to unicode, because some fields
	are just TV or TF. we need to wait for that, dynapi_set_helper does that

	add COMMON_TABLE_FIELDS, handle indxf BLOCK_RECORD tables
	ensure the same binary layout for all but the LAYER table.
	fix the wrong BLOCK_CONTROL.entries[] handle vector, and name confusion.
	fixup the seperation of BLOCK_RECORD tables to BLOCK_HEADER and
	BLOCK_CONTROL objects.

	indxf: fix table common handle vectors
	check and fix CONTROL.num_entries,
	check if in reactors or xdict or ownerhandle,
	implement reactors[], xdicobjhandle.

	dynapi: enable color.index, fix DXF
	indxf: read colors (always "CMC"), seperate from points

	api: rename VPORT.ucs_pre_viewport to UCSVP [65]
	which is bit 0 of VIEWMODE [71].

2019-08-05  Reini Urban  <rurban@cpan.org>

	indxf: more table fields
	don't translate certain header strings to unicode: 0, 2, 9

	Fixup test-data/2000/TS1.dxf to R2000, it was R2018.
	For now done manually in HEADER only.

2019-08-05  Reini Urban  <rurban@cpan.org>

	indxf: points

	indxf: search also in common fields
	add the common fields for obejcts and entities to the dynapi.
	search also point members (like dxf 20 for a 2DPOINT matching dxf 10  in the field)

	indxf: finish most tables, start with BLOCK_RECORD
	only a few fields are unknown, like 20, 30 for 3DPOINT 10,
	and the common object fields.

	indxf: add_eed
	Only for a very limited number of supported EED codes yet,
	and only for handle 1001 ACAD.

	indxf: add table.handle to table_control hdls vector
	allocate and special-case DIMSTYLE_CONTROL.morehandle[]
	allocate and set TABLE_CONTROL.hdls[]

	indxf: NEW_OBJECT and ADD_OBJECT macros

	examples: change handle types

2019-08-05  Reini Urban  <rurban@cpan.org>

	change handle types, add formatting macros
	handle.value is now BITCODE_BL (uint32_t)
	.code and .size are BITCODE_RC (uint8_t)

	Add FORMAT_H, ARGS_H(hdl) and FORMAT_REF, ARGS_REF(ref) macros
	for uniform handle output.

	Add indxf add_handle and add_handleref helpers

2019-08-05  Reini Urban  <rurban@cpan.org>

	dynapi: fix dwg_dynapi_entity_set_value for strings

	adjust dynapi line#

	indxf: more new_table

	indxf: more dxf_tables_read
	new_table and problems with certain *Active_CONTROL tables

	rename HEADER.LINETYPE_CONTROL_OBJECT to LTYPE_CONTROL_OBJECT
	and HEADER.DICTIONARY_NAMED_OBJECTS to DICTIONARY_NAMED_OBJECT
	for consistency, esp. needed by in_dxf

	indxf: start with dxf_tables_read

	indxf: fix dxf_classes_read

	indxf: fix empty strings
	dont scan past the \n

	indxf: handle unknown HEADER fields
	add 2 DXF-only TIME fields.
	most header fields can now be read.

	fix array_push
	need to return the changed hdls

	make Dxf_Pair, array_push, matches_type avail to in_dxfb

	dynapi: export all functions
	also the ones returning fields.
	optimize NULL type checks

	Replace AC_FUNC_STRTOD by AC_CHECK_FUNC
	AC_FUNC_STRTOD broken for cross-compiling

	add AC_FUNC_STRTOD probe

	indxf: postpone header_hdls, accept space in strings
	header_hdls is an array of fields and names, which needs to be
	filled after reading the tables with its handles.
	dxf_read_string failed to read strings with a space, like "Tavolo 3"

	indxf: improve logging

	indxf: fix the sscanf (%f) part
	advance dat (via strtod). Next: handles as string

	indxf: check types, handle points
	but the sscanf (%f) part is still wrong

	add dwg_dynapi_header_field, dwg_dynapi_common_*_field
	needed to do type-checking before setting a value.
	not in in the public API for now.

	indxf: dxf_header_read

2019-08-01  Reini Urban  <rurban@cpan.org>

	OLE2FRAME dynapi dxf values

	revive bd-unknown.inc
	destroyed before

	examples/bits: try all combinations
	avoid stack overflow, always try the next offset.

2019-08-01  Reini Urban  <rurban@cpan.org>

	add -x option to examples/bd|bits
	to easier decode hexdumps

	avoid stack overflow, don't restart with a smaller offset

2019-08-01  Reini Urban  <rurban@cpan.org>

	More OLE2FRAME
	found the MSD-CFB offset in the OLE2FRAME.data at 0x80
	The header before are most likely the missing fields.

2019-08-01  Reini Urban  <rurban@cpan.org>

	Change OLE2FRAME
	remove flag 70, it is a fixed oleversion 70: always 2
	mode is r2000+ DXF 72, tile_mode, 0: mspace, 1: pspace
	unknown is most likely the boolean lock_aspect, DXF 73
	data is DXF type BINARY, 310
	data_length is DXF 90

	data embeds more fields, we do not decode yet:
	oleversion: always 2 (was flag)
	oleclient (e.g. "OLE" or "Paintbrush Picture")
	pt1 DXF 10, upper left corner
	pt2 DXF 11, lower right corner

2019-08-01  Reini Urban  <rurban@cpan.org>

	Fix types in 2 unit-tests
	Not detected by gcc, only clang-7 via -Wformat

2019-07-31  Reini Urban  <rurban@cpan.org>

	fix log out-of-tree

	fix logs-all.sh out-of-tree

2019-07-30  Reini Urban  <rurban@cpan.org>

	fixup dynapi.c generation
	when out-of-tree
	A fix for a51de973e5dca582536d425b28c82cc98165bbc1

	r2007: rename internal unused sections_amount to num_sections

	r2007: more defenses

2019-07-29  Reini Urban  <rurban@cpan.org>

	fix out-of-tree make check-dwg
	and check-dxf, check-dwg-valgrind

	fix leak with Invalid System Section data_size

	fix gen-dynapi.pl out-of-tree
	when configured elsewhere

	WIP decompress_R2004_section: fix one more
	dst overflow. This time better

	Protect from illegal dwg->num _classes

	new error: dwg too small: n bytes

	decompress_R2004_section assert => error
	ERROR: decompress_R2004_section: src offset underflow
	many afl-fuzz cases

	Fix decompress_R2004_section overflow
	when writing to dst. Caught by afl-fuzz.

	Stabilize validate_POLYLINE
	when _obj->vertex[_obj->num_owned - 1]->obj is empty

	Add r2007 system section checks
	checking against a corrupt section map.
	Note that the size factor depends on the compression.
	we kill it when the compression would expand > 10x

	Fix unused page crash
	when we find a page.number < 0 (gap/unused page)
	initialize the next new page with NULL

	r2004 sections: clear on realloc
	otherwise we do have uninitialized chunk there

	renamed Dwg_Section_Info.pagecount to num_sections
	This was always very confusing. num-sections was not used and always 0,
	and pagecount was the number of pages/i.e. Dwg_Section **sections

	unit-testing: fix out-of-tree deps

	examples: fix out-of-tree deps

	afl: re-add more dwg_api functions
	so that the api examples can be built and fuzzed

2019-07-28  Reini Urban  <rurban@cpan.org>

	spec formatting

	Fix dwg_validate_POLYLINE without vertex[]
	Found via afl-fuzz

	Fix a R13 heap-buffer-overflow
	An off-by-one error, detected by afl-fuzz.

	Fix free dwg_class NULL deref
	Fixes part 14 of GH #126

	Fix dwg2svg2 NULL deref
	Fixes part 13 of GH #126

	Check Invalid Header section, skip
	when section[0] is invalid.
	Fixes part 9 and 11 of GH #126

	Check Invalid AuxHeader: buffer overflow
	when section[5] is invalid

	harmonize logging of header.num_sections

	header.spec: formatting

2019-07-28  Reini Urban  <rurban@cpan.org>

	afl: disable most of the old dwg_api
	when compiling via afl-gcc/clang.

	with asan:
	make -j4 -s clean
	export ASAN_OPTIONS="abort_on_error=1:detect_leaks=0:symbolize=0:allocator_may_return_null=1"
	export AFL_CC="gcc"
	PERL=cperl5.30.0-nt \
	CC="afl-gcc" \
	CFLAGS="-m32 -O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer -I/usr/local/include" \
	    ./configure --disable-static --disable-bindings --disable-dxf --disable-write $@
	AFL_USE_ASAN=1 make -j4 -s -C src
	AFL_USE_ASAN=1 make -j4 -s -C programs dwgread
	LD_LIBRARY_PATH=`pwd`/src/.libs afl-fuzz -m none -i .fuzz-in -o .fuzz-out programs/.libs/dwgread @@ /dev/null

	without:
	make -j4 -s clean
	unset ASAN_OPTIONS
	unset AFL_CC
	PERL=cperl5.30.0-nt \
	CC="afl-gcc" \
	CFLAGS="-O2 -g -I/usr/local/include" \
	    ./configure --disable-shared --disable-bindings --disable-dxf --disable-write $@
	make -j4 -s
	afl-fuzz -m none -i .fuzz-in -o .fuzz-out programs/dwgread @@ /dev/null

2019-07-28  Reini Urban  <rurban@cpan.org>

	Protect Invalid XRECORD.num_databytes
	Found via afl-fuzz

2019-07-28  Reini Urban  <rurban@cpan.org>

	Check obj->size overflow
	Throws ERROR: Invalid object size. Would overflow
	Fixes part 7 and 8 of GH #126, thanks to @strongcourage.
	A very hypothetical data corruption issue.

	Closes GH #126

2019-07-28  Reini Urban  <rurban@cpan.org>

	Fix heap-buffer-overflow in decompress_r2007
	check offset underflow, pass thru error.
	Fixes part 5 and 6 of GH #126.
	Thanks to @strongcourage

	Fix heap-buffer-overflow in decompress_R2004_section
	check for dst overflow. Fixes part 4 of GH #126.
	Also check for invalid R134 num_sections.
	Thanks to @strongcourage

	protect bit_check_CRC from buffer overflow
	Fixes part 2 and 3 of GH #126
	Thanks to @strongcourage

	Fix invalid free at decode.c:2289
	part 1 of GH #126. We forgot to reset dat to abs_dat in one branch
	Thanks to @strongcourage

	dxf: fix some MTEXT dxf codes
	a followup to c6c36153ef3ea6fec406dfd53cd6ac8201485b5d

2019-07-27  Reini Urban  <rurban@cpan.org>

	use strEQ helper macros

	add strEQ helper macros

	regen-unknown: add new AEC objects to unknown
	But since AEC doesn't file to DXF, we have no known
	DXF objects/fields. They are parametric blocks, exploding to
	LINE, HATCH, ARC, TEXT, ...

2019-07-26  Reini Urban  <rurban@cpan.org>

	fix json test with new 2018 dwg
	MLINESTYLE.ltype [] was missing the final ]

	fix MTEXT for r2018
	almost. The column_heights vector is still missing.

	new example_2018.dwg, TS1.dxf
	The old dwg was an old version

	add GEOMAPIMAGE as debugging class
	but no coverage

	fix out-of-tree gen-dynapi.pl
	gen-dynapi.pl is in srcdir

	fix unit-testing coverage
	2000/PolyLine2D.dwg was missing from DIST.
	fix out-of-tree builds for one and two levels down, ../configure
	or ../../configure

	Update NEWS, TODO
	Added a lot of coverage and really found some bugs.

	xrecord: skip xdata test
	xdata is still a linked list, not an array

	ole2frame: data != dat_length mismatch TODO

	add 2000/TS1.dwg
	by Guruprasad Rane, 2011 (GPL3)
	needed for more unit-testing coverage

	unit-testing: improve api_common_entity
	dont print the common values, only the handles. speeds it up

	unit-testing: add api_common_object
	check more common handles

	LWPOLYLINE needs to be checked by name
	because it might be a class (535), when being backported to R14.
	Fixes lwpoline unit-test for r14.

	unit-testing: allow NULL handles
	and switch the logic, fail first.
	many layers r2004+ are empty.

	fix unit-tests found with new coverage

	add dynapi coverage, fix dwg_dynapi_common_value
	detected by adding tests for it.

2019-07-25  Reini Urban  <rurban@cpan.org>

	Update NEWS TODO

	Merge branch 'gh124-dejagnu'
	See GH #124
	Now only the unit-testing coverage needs to be improved.

	rm test/testcases
	Closes GH #124

	fix dynapi_test for char** encr_sat_data
	There is no num_encr_sat_data

	unit-testing: allow NULL strings

	unit-testing: fix VERTEX_(MESH|PFACE), 3DSOLID
	VERTEX_(MESH|PFACE) missed the VERTEX_3D typedef.
	3dsolid may fail before, and thus have a NULL history_id.
	Also ensure that unknown_2007 and history_id are only for version 2

	unit-testing: finish the rest

	unit-testing: fix a few text errors
	and add more checks

	unit-testing: dimension

2019-07-24  Reini Urban  <rurban@cpan.org>

	unit-testing: polyline

	windows: fix warning: "alloca" redefined

	unit-testing: enhance coverage

	add pass,fail,ok to unit-testing
	check coverage,
	enhance coverage by checking more dwg's,
	remove INPUT from TESTS_ENVIRONMENT,
	don't exit immediately, collect errors, return error_code at the end.

	more double linkage on windows with dynapi
	and get rid of the -lm dependency

	avoid double linkage on windows with unit-testing
	2 bits functions are exported, which clashes on windows.
	disable the EXPORT attribute there when linked locally.

	change bits_test.cbmc target
	use macros

2019-07-23  Reini Urban  <rurban@cpan.org>

	disable lsan for unit-testing
	just too much work for now to clean up all the copies

	add ATTRIBUTE_MALLOC, probe for FUNC_ATTRIBUTE_FORMAT

	more scan-build warnings
	Potential leak of memory decomp
	Dead assignment
	uninitialized value

	add test/unit-testing/dynapi_test.c
	dont rely in Convert::Binary::C

	Improve dwg_dynapi_handle_name
	Dont convert obj to _obj to obj back & forth

	dwg_dynapi_handle_name return UTF-8 strings
	when the field is a wide-string.
	All the tables use FIELD_T names.
	But the dynapi sometimes misrepresents T types as TV, so only check
	against TF, which is always single-byte.

	add dwg_dynapi_handle_name
	similar to  dwg_obj_table_get_name, which only supports tables.
	This supports all objects and entities with a name field.

	fix xline dynapi
	caught with the new unit-tests

	export dwg.c functions
	in the body also. just to seperate it more clearly from static

2019-07-23  Reini Urban  <rurban@cpan.org>

	more unit-testing entities
	make -C test/unit-testing check \
	  TESTS_ENVIRONMENT='INPUT=../../td/example_2004.dwg' ...

	for most dwg's

2019-07-23  Reini Urban  <rurban@cpan.org>

	enhance unit-testing iterator
	catch also ATTRIB and ATTDEF entities.
	Check more NULL refs

	disable dejagnu
	See GH #124

2019-07-22  Reini Urban  <rurban@cpan.org>

	dynapi_test: simplify pass ()

	move some testcases to unit-testing
	fix some string tests with valid NULL strings.
	get rid of dejagnu there, i.e. roll our own (better one)

	WIP: unit-testing dynapi
	we need to get rid of the old dejagnu testcases,
	get rid of the unit-testing print-only check: compare
	to low-level values, test the new APIs: by object and by type.

	strdup: set the feature at first
	need __STDC_WANT_LIB_EXT2__ set before including any feature.h
	on older glibc's, which do need _USE_BSD instead.

2019-07-21  Reini Urban  <rurban@cpan.org>

	unknown: remove 1 DIMASSOC with invalid handle

	WIP GEOMAPIMAGE fields
	And some more docs

	Update NEWS
	for the new API functions

2019-07-20  Reini Urban  <rurban@cpan.org>

	more GCC30_DIAG fixups
	They are ignored for newer gccs. Use the new decl. also

	decode_r2007: pages_map memory leak on error

	dynapi: null pointer dereference [-Wnull-dereference]

	decode: null pointer dereference [-Wnull-dereference]

	encode: declare strdup
	warning: incompatible implicit declaration of built-in function ‘strdup’

2019-07-20  Reini Urban  <rurban@cpan.org>

	api: Allocator sizeof operand mismatch
	eg wrong string handling:
	dwg_ent_set_UTF8 Result of 'calloc' is converted to a pointer of
	type 'char', which is incompatible with sizeof operand type 'char *'

	make -s scan-build SCAN_BUILD=scan-build-7

2019-07-20  Reini Urban  <rurban@cpan.org>

	dwg_api: potential null pointer dereference [-Wnull-dereference]

2019-07-19  Reini Urban  <rurban@cpan.org>

	Fix warning: declaration of ‘index’ shadows a global declaration
	i.e. the index function. only with older compilers.

	Fix GCC30_DIAG_IGNORE (-Wformat-nonliteral) for older gcc <4.6
	only allowed outside functions until gcc 4.6 (or clang).
	Before gcc-4.6 the pragma needs to be before the function
	in question.

	.c.ii without cc extensions -MT -MD -MP -MF
	pgcc struggles with it

2019-07-19  Reini Urban  <rurban@cpan.org>

	revamp CC_DIAG_IGNORE
	remove unused defines, simplify.

	Note that clang -Wtautological-constant-out-of-range-compare in 3 places
	cannot be suppressed, but we'll get rid of these old overflow checks
	soon, as we do better now.

2019-07-19  Reini Urban  <rurban@cpan.org>

	gcc -Wformat-nonliteral is since 3.0.4 at least
	and in clang also

2019-07-18  Reini Urban  <rurban@cpan.org>

	Merge branch 'gh97-dynapi'
	Closes GH #97, but there are no test-cases for the new API yet.

	dwg2svg2: use the new partially typed API

	missing dynapi utf8text functions (2)
	the simplified dwg_{g,s}et_OBJECT_utf8text() API

	add the missing dynapi functions, add is_utf8 to setters

	update NEWS for 9.0

	add dwg_dynapi_entity_utf8text
	which returns a fresh copy of a TU string converted to
	UTF-8, as with the deprecated API.

2019-07-17  Reini Urban  <rurban@cpan.org>

	dynapi: replace deprecated API functions WIP
	See GH #97

	api: move Dwg_Version_Type to dwg.h
	make dwg->header.version a public enum, not some strange
	unrelated int.
	This also adds documentation to R_* release <> AC* DWG versions.

	minor dwg.spec simplification

	fix a suffix() edgecase, when basename() fails

	darwin fprintf dtoa leak
	and more darwin leaks. not detected via lsan, only via valgrind.
	convert dxf VALUE_RD to a function, too large for a macro.
	maybe add a 0-stripper here later.

	dxf: non-destructive FIELD_BD
	for angles, dont change the field value. convert only
	the printed value on-the-fly rad2deg

	fix logs_all.sh to use parallel version

2019-07-17  Reini Urban  <rurban@cpan.org>

	unknown: disallow TV in r2007+ versions
	cannot try TV fallback in TU dwgs.

	also stabilize PICAT and PARALLEL version probes a bit (space in pathname).
	The logs-all.sh target is still wrong though, fixed in next commit.

2019-07-16  Reini Urban  <rurban@cpan.org>

	unknown: add is_entity flag
	check ENC or CMC based on it (see GH #123)

	fix bd-unknown.pl to be run from examples
	via make. add some new

	unknown: skip some overlarge ACAD_TABLE objects
	leading to picat out-of-memory errors

	fix -Wnull-dereference warnings
	potential null dereferences, detected by -flto -O3

	regen-unknown with fixed hdlsize
	some objects Hdlsize: were missing

	unknown: add hdlsize
	which is needed to find the last handle, to seperate it from the final
	padding until the crc.

	unknown: rename bitsize => num_bits
	use bitsize only for the matching obj->bitsize
	and num_bits for the calculated unknown->num_bits

	unknown: comment sizes
	and add [RL] to the read bitsize (opposite to a calculated value)

	bit_read_ENC: we do have hdl_dat now

	fix unknown bit_ENC for 2+ streams

	run make regen-unknown: with more unknown pairs
	got a couple of more dwg/dxf pairs, with new objects

	fix regen-unknown
	with the changed log format for bitsize.
	also get a few new files

	add generated json.test to .gitignore

2019-07-15  Reini Urban  <rurban@cpan.org>

	bump copyright year to 2019
	to all in 2019 changed files

	stabilize autogen.sh
	See GH #101

	move -version-info upwards

	add -version-info for the shared lib
	was only 0:0:0, now 0:8:0

	fix -Wrestrict in dwg_decode_##token##_private
	warned only by gcc, not clang

	fix ax_python_devel.m4
	wrong -z check

2019-07-15  Reini Urban  <rurban@cpan.org>

	add .c.ic rule, probe for $(CLANG_FORMAT)
	make -C src decode.ic will create an expanded version
	of decode.c in-place, keep a proper backup!
	used to find problems in macros.

	clang-7 started omitting the .0

2019-07-15  Reini Urban  <rurban@cpan.org>

	silence -Wformat-nonliteral
	Closes GH #121

2019-07-15  Reini Urban  <rurban@cpan.org>

	expand [rcount1], [rcount2] to [%d] for LOG_TRACE
	better logging.

	It looks expensive, timings:
	                 without     with
	make check       0m12.034s   0m12.303s
	  (mostly -v2)
	./logs-all.sh    0m35.934s   0m37.324s
	  (only -v4)
	so it's neglectable.
	TODO -Wno-format-nonliteral

2019-07-15  Reini Urban  <rurban@cpan.org>

	Merge branch 'gh85-limitall' into smoke/master
	Closes #85

2019-07-14  Reini Urban  <rurban@cpan.org>

	unrestrict dat before the CRC calculation
	and fix it for the restricted range. The CRC exceeds it,
	do it absolutely.
	We unfortunately start our dat after the obj->size,
	not before, at obj->adress.

	unknown_bits: permit overflow of one byte
	temporary.
	the new restricted streams found this overflow

2019-07-14  Reini Urban  <rurban@cpan.org>

	seperate and restrict the 3 streams
	to catch overflows, put them on the stack.
	See #85
	This enables now interleaving of handles in the spec,
	need not to be at the very end.

	restrict dat at dwg_decode_add_object(),
	keep the 3 streams at the same initial offset, the
	obj->address - obj->size, and also its size,
	and tighten it later as of now (in decode private).
	Previously the hdl_dat 0 and str_dat 0 were at their resp.
	starts, but this way we can compare them easier.
	Calculating the relative stream positions is now trivial, e.g.
	for the padding check in DWG_ENTITY_END.

	add helper function obj_stream_position() which returns
	the furthest handle position (data, handle, string streams)
	set dat position to the max(dat, hdl_dat, str_dat) for the padding
	and crc check.

	harmonize pos and address name suffices
	pos for bit positions, address for absolute byte addresses (objects only)

	There's no need for the offset fields dat_address,
	hdlpos, strpos, only bitsize_pos is needed for encode, to patch-in
	the bitsize.
	Remove unneeded obj->handle_offset (== obj->bitsize)
	and obj->string_offset.

	XRECORD: fixup objid_handles[] hdl_dat loop

2019-07-14  Reini Urban  <rurban@cpan.org>

	fixup crc logging

	fixup logging indentation
	any read value needs to be logged at col 1, and calculated value indented.

	change FIELD_HANDLE @pos logging to INSANE (v5)

	protect NULL ptrs in get_next_owned_entity
	by dwg2dxf example_2007

	add bits dat->opts for loglevel
	this way we can silence known overflows,
	and honor the given loglevel

2019-07-13  Reini Urban  <rurban@cpan.org>

	bits: log overflow errors

	log hdl @pos for each handle

2019-07-12  Reini Urban  <rurban@cpan.org>

	Merge branch 'smoke/asan'
	Fixed all leaks

	travis: re-enable full lsan/asan checks

	fix dwg_ent_get_ltype_name doc

	fix unittest leaks

	fix dwg2svg2 leaks
	a bit more tricky, because dwg_api does not contain the R_2007 enum

	dwg2dxf: fix invalid free

	fix dwggrep leak with pcre2_16

	fix geojson leaks

	travis: re-check without lsan

	lsan fixes: detect asan and call dwg_free then
	Never skip dwg_free when compiled with asan, even if lsan is disabled.
	(i.e. by default under darwin)
	We don't check for getenv(ASAN_OPTIONS) =~ detect_leaks=1

	add dsymutil to log on darwin
	Note: this really should be added to COMPILE somewhen.

	fix 3dsolid leaks
	with version 1 also free the last empty block,
	with version 2 calloc 3 blocks, with size 0 for the last.

	travis: use xenial for pcre2/dwggrep tests

	travis: add asan

2019-07-11  Reini Urban  <rurban@cpan.org>

	protect invalid free

2019-07-09  Reini Urban  <rurban@cpan.org>

	dxf: protect empty last_attrib

	fixup wrong clang-formatting

2019-07-08  Reini Urban  <rurban@cpan.org>

	fixup --enable-debug json nan values
	for json.test. With debug many numeric values are nan.
	use the probed paths for sed and jq.

	See #108, but we don't want to intercept fprintf %f for nan.
	An error is an error.

2019-07-08  Reini Urban  <rurban@cpan.org>

	remove xrecord,proxy get_ownerhandle API

2019-07-07  Reini Urban  <rurban@cpan.org>

	remove unneeded ownerhandle
	and update the dynapi

	Move ownerhandle to parent Object_Object
	along reactors and xdicobjhandle. This field is common to all
	objects. See #118

	fix print FIELD_ENC for color.handle change
	For the change in 84bdc444fc5262c4

2019-07-07  Reini Urban  <rurban@cpan.org>

	START_OBJECT_HANDLE_STREAM #118
	Generalize object handles:
	Rename common field ownerhandle, exp. not NAME_control 330.
	Remove various null_handle fields.

	Rename LTYPE.null_handle to LTYPE.extref_handle
	Add SORTENTSTABLE.dict_handle (previous called ownerhandle,
	it IS the ownerhandle. ok, there we do have both, the parenthandle
	and the ownerhandle)

2019-07-07  Reini Urban  <rurban@cpan.org>

	Add more missing ownerhandle fields
	But that really should be in Dwg_Object_Object instead.
	See #118

2019-07-07  Reini Urban  <rurban@cpan.org>

	Fix FIELDLIST standard handles
	See #118, thanks to normwill-beast.

	This will be simplified to a generic handle stream reader, outside the
	dwg.spec, only carrying object-specific fields there.
	With the handles intermixed, not necessarily at the end.

2019-07-07  Reini Urban  <rurban@cpan.org>

	Fix FIELD.childs and objects
	And add ownerhandle and the other missing standard handles.
	Closes #117, thanks to normwill-beast

	Fix MLINESTYLE.ltype handles
	Read them from the handlestream, after all others.
	Closes #116, thanks to normwill-beast.

2019-07-07  Reini Urban  <rurban@cpan.org>

	Fix MULTILEADER content_block
	And fix invalid free of ctx.content.txt.style.

	Only set ctx.content.blk.block_table with ctx.has_content_block, and move it
	down to the handle stream (will be fixed up later, with a proper hdl_dat)
	Fixes e.g.  ERROR: Invalid 3BD ctx.content.blk.{scale,normal}, because we
	have no hdl_dat setup yet.

	Closes #113, thanks to normwill-beast

2019-07-07  Reini Urban  <rurban@cpan.org>

	Add many missing handles 2007+
	Due to the fixed handle_stream offset, we can now
	reliably read many more handles.

	DIMENSION_ORDINATE
	DIMENSION_LINEAR
	DIMENSION_ALIGNED
	DIMENSION_ANG3PT
	DIMENSION_ANG2LN
	DIMENSION_RADIUS
	DIMENSION_DIAMETER
	MTEXT
	BLOCK_CONTROL
	STYLE
	SORTENTSTABLE

	Closes GH #115, thanks to normwill-beast.

	Renamed STYLE.null_handle to STYLE.extref_handle.
	Kept SORTENTSTABLE.owner_dict name, documented as SORTENTSTABLE.parenthandle.
	owner_dict sounds more specific and less general, but we have no other parenthandle
	fields.

2019-07-07  Reini Urban  <rurban@cpan.org>

	Missing START_HANDLE_STREAM
	in APPID, DICTIONARYVAR, VPORT_ENTITY_HEADER.
	Fixes many missing APPID.app_control and DICTIONARYVAR.ownerhandle.
	and Invalid handleref: warnings.

	Closes GH #114, thanks to normwill-beast

2019-07-07  Reini Urban  <rurban@cpan.org>

	Incorrect object address #112
	handlestream_size is not part of obj->size.
	This fixes the hdlpos += 8 FIXME
	and many Invalid handleref and Invalid handle pointer code errors.
	Also many ownerhandle, and other handle offsets.

	Thanks to normwill-beast

2019-07-06  Reini Urban  <rurban@cpan.org>

	clang-format

2019-07-06  Reini Urban  <rurban@cpan.org>

	defer color.handle to handle_stream
	for >= R_2007 we dont know the handle stream yet, when reading the
	common_entity_data. Defer to the start of the common_entity_handle_data
	reading the common color.handle then.
	Fixes #111, Thanks to normwill-beast.

	And while we are there sanitize the common entity color.handle:
	No extra color_handle needed. Make the handle a real H (ie. ref* to
	the DBCOLOR object).
	Remove the obsolete dwg_ent_get_color_handle API.

	Extend bit_{read,write}_ENC to include
	all 3 streams, but it is still not used yet.

2019-07-06  Reini Urban  <rurban@cpan.org>

	fix EED code 5 as int64
	Incorrect reading of the spec, fixes many MTEXT entities.
	Fixes GH #110. Thanks to normwill-beast

2019-06-26  Reini Urban  <rurban@cpan.org>

	dwg_ref_get_object: error on !ref->obj
	the caller has to resolve it, we have no dwg here

	fix NULL in out_geojson
	Thanks to @UmlauteUeberall
	Closes #107

2019-06-25  Reini Urban  <rurban@cpan.org>

	Release 0.8
	See NEWS

2019-04-26  Reini Urban  <rurban@cpan.org>

	redo build-aux/clang-format-all.sh src test examples programs

	bump copyright years to 2019

	dwgbmp: skip free unless on valgrind
	and add some missing free calls.
	test: make check-valgrind -C programs/ bin_PROGRAMS=dwgbmp

	preR13: initialize more missing TABLE obj fields
	fixing various valgrind errors, esp. with dwg_obj_is_control()

	Partially clang-format include *.h
	Not the typedef's and struct's, as gen-dynapi.pl
	cannot yet parse the changes properly.
	See the work/clang-format-inc branch.

	preR13: fix wrong FIELD_TF check
	preR13 we have no obj->address and obj->size, leading all
	VECTOR_CHKCOUNT to fail. skip that for now.
	only detected with valgrind

2019-04-25  Reini Urban  <rurban@cpan.org>

	EED: fix invalid free on failing EED
	on final free with 2007/Leader.dwg.
	This fails early with No EED[9].handle

	Also fix a double-free when failing dwg_decode_eed_data.

2019-04-25  Reini Urban  <rurban@cpan.org>

	clang-format-all

	fix read_R2004_section_info heap overflow
	on a page gap (info->pagecount++), we need to realloc the sections,
	or info->sections[j] might overflow.

2019-04-24  Reini Urban  <rurban@cpan.org>

	smoke.sh: debian testing broke a few clangs
	clang 3.8, 3.9 and 4.0 are now broken

	get_last_owned_block: fix -Wnull-dereference

	EED: no free with handle errors
	fixes asan errors with #99 cases

2019-04-23  Reini Urban  <rurban@cpan.org>

	EED: add more eed_need_size checks
	Check also individual dwg_decode_eed_data decoded sizes,
	to abort not enough room for wrong codes.
	Fixes #104.

	EED: detect invalid objects earlier

	STYLE: protect from empty font_name
	May be a NULL ptr.
	Fixes case bit_convert_TU@bits.c:1323-3___null-pointer-dereference
	of #99.

	dxf: simplify dxf type 5 vs 105 for DIMSTYLE
	only one write, not two

	dxf: check object types
	which is a more general fix for wrong object, as in
	#99 case dwg_dxf_LTYPE@dwg.spec:2523-11___heap-buffer-overflow

	dxf: protect invalid LTYPE_BYBLOCK
	check LTYPE header reference for the correct type.
	Fixes case dwg_dxf_LTYPE@dwg.spec:2523-11___heap-buffer-overflow at #99

	dwg_block_control: add error handling
	fuzzing created an invalid DWG without initial BLOCK_CONTROL
	object. Check this and error. Fixes case dwg_dxf_BLOCK_CONTROL@dwg.spec:2154-1___out-of-bounds-read of #99

2019-04-22  Reini Urban  <rurban@cpan.org>

	continue with COMMON_ENTITY_HANDLE_DATA
	if possible, and the entity-specific decoding had an
	VECTOR_CHKCOUNT_LV error.
	This is only possible with r2007+ entities

	validate _hdr->endblk_entity in get_last_owned_block
	and add if missing.
	This fixes the problem of the previous commit much better, it is not
	only a DXF-specific hack anymore.
	Closes part 2 of #99, the bit_read_B@___out-of-bounds-read testcase.
	Unlike as with the previous fix, the generated/found ENDBLK entity has
	now the correct groups 5 and 330, and the missing object_ref handle is
	fixed up.

2019-04-21  Reini Urban  <rurban@cpan.org>

	dxf: WIP fix for empty ENDBLK entity
	This from the #99 bit_read_B@___out-of-bounds-read fuzzer case.

	TODO: The real fix should be put into dwg_validate_INSERT
	so that get_last_owned_block can never fail, and always return
	a valid ENDBLK even if it couldn't be found at decode.

2019-04-20  Reini Urban  <rurban@cpan.org>

	fix #99 first SEGV
	dwg_dxf_LEADER@dwg.spec:2034-3___null-pointer-dereference
	This is at FIELD_3DPOINT_VECTOR in LEADER.
	There are illegal size fields (num_points) in LEADER on decode, which are not yet set to 0.
	Add a _LV macro variant for size lvalue, which can be set to 0.

	Also found an entity with entmode 3 but empty ownerhandle.
	Write an empty ownerhandle then.
	Fixed also a typo in writing the mspace block_record with entmode 2: PSPACE => MSPACE

2019-04-20  Reini Urban  <rurban@cpan.org>

	dwg_decode_eed_data: whitespace only

2019-04-19  Reini Urban  <rurban@cpan.org>

	run bash clang-format-all.sh src programs examples test
	excluding include bindings, with clang-format-mp-devel.

	with an older clang-format than devel (i.e. 8.0)
	you can also just run it with the -style=GNU option, but I
	changed three options: SortIncludes:false, SortUsingDeclarations: false,
	IndentPPDirectives: AfterHash

2019-04-19  Reini Urban  <rurban@cpan.org>

	fixup includes and generators a bit
	avoid EXPORT redef after clang-format-all.
	also improve the generated C sources to match the formatting
	more.

	add .clang-format
	created with the undocumented GNU style:
	clang-format -style=GNU -dump-config > .clang-format

2019-04-07  Reini Urban  <rurban@cpan.org>

	cirrus: add branch filter

2019-03-30  Reini Urban  <rurban@cpan.org>

	--disable-python on cygwin
	it's just too broken to be repairable for now.
	python3.6m works on x64 though.

	--enable-python=yes vs check/default
	only die with yes, disable if not found instead

2019-03-29  Reini Urban  <rurban@cpan.org>

	appveyor: cygwin defaulted to python3 now
	/usr/bin/python3 is now the default, but there's still an old /usr/bin/python around.
	it couldn't be linked, because python36-devel was missing.

2019-03-29  Reini Urban  <rurban@cpan.org>

	config.h: silence __XSI_VISIBLE redefined warnings
	guard __XSI_VISIBLE redefinition, only needed for cygwin strdup.

	add config.h.in to git, autoheader does not overwrite it.

2019-03-29  Reini Urban  <rurban@cpan.org>

	patch ax_python_devel.m4 for cygwin
	keep using ac_python_library (esp. for the m suffix)

	patch ax_python_devel.m4 for --enable-framework
	and LOCALMODLIBS. Reapply our old patches

	revert ax_python_devel.m4 to upstream
	skip our python probe improvements, they caught up in between

	windows: fix type warnings
	-Wincompatible-pointer-type, -Wunused-function

	add AX_ADD_FORTIFY_SOURCE probe
	for faster glibc calls, and some compile-time safety

	fix 2 -Wmaybe-uninitialized vars

	api: add some missing deprecation decls
	dwg_api.h is not included into swig at all.

	fix gcc-4.4 -ansi errors
	duplicate typedefs
	shadowed index variable decl

	color.index: signed short
	may be negavtive. Only cygwin gcc emitted this -Wtype-limits warning

2019-03-22  luz.paz  <luzpaz@users.noreply.github.com>

	Misc. typos
	Found via `codespell`

2019-03-01  Reini Urban  <rurban@cpan.org>

	myalloca.h: fixup wrong #if HAVE_ALLOCA_H
	need #ifdef

2019-02-25  Reini Urban  <rurban@cpan.org>

	add section_infohdr struct
	its num_desc replaces num_info

	Fix gen-dynapi.pl for FreeBSD 12

2019-02-25  Reini Urban  <rurban@cpan.org>

	Fix clang support for gen-dynapi.pl (#98)
	Add all the -print-search-dirs, not just the first.
	For clang /usr/lib/gcc/x86_64-linux-gnu/8 is needed also.

	Stabilize clang detection by checking for the include dirs,
	not the executable name (which is cc on FreeBSD e.g.)

	Also remove BITCODE_BS defines clashing with the typedef, leading to
	typedef uint16_t uint16_t; This also fixes many wrong dynapi types
	to proper BITCODE_BS.

	Closes #98

2019-02-25  Reini Urban  <rurban@cpan.org>

	WIP clang support for gen-dynapi.pl (#98)
	Some more defines still needed

2019-02-24  Reini Urban  <rurban@cpan.org>

	section: add more tracing

	section: add one more invalid Section info check
	The addresses must raise.
	Reformat logging a bit

2019-02-22  Reini Urban  <rurban@cpan.org>

	fix some compiler warnings
	and wrong types, esp. encr_sat_data TV => char**

	section: cosmetics
	r2007 calls the SECTION.number id. We call it number because of R11

2019-02-21  Reini Urban  <rurban@cpan.org>

	geojson: encode color as rgb (r2004+) or index
	Closes #95

	json: field_cmc use Dwg_Color* by ref
	don't copy the struct. for consistency

	json: color names are only TV
	no unicode

	json: abstract field_cmc() function
	no macros needed. makes for much smaler code and easier debugging.
	the color struct is passed by copy for now.

	json: print only alpha color names
	many names are still garbled, like VIEWSTYLE.edge_obscured_color
	don't print them if they don't start with an alpha character.

	json: enhance color map
	skip defaults, index default is 0,
	add flag, name and bookname

	geojson: better Layer, use name or Text properties
	Skip empty Text, use name for INSERT

2019-02-20  Reini Urban  <rurban@cpan.org>

	geojson: skip default Linetype
	print color as number

	geojson: skip null properties

	geojson: add color property
	but not the color name, just the index.
	Google Maps expects a name, e.g. blue

	log: accept td/*.dwg symlinks

2019-02-20  Reini Urban  <rurban@cpan.org>

	fix LAYER.on flag (#96)
	set it for r13-r14,
	and fix the flag field also (no color_rs there).
	fix it for r2000+ (reverse).

	use it in dwglayers

2019-02-20  Reini Urban  <rurban@cpan.org>

	regen unknown: depend on bd-unknown.inc
	add bd-unknown.inc generation rule

	decode: advance chain ptr for picture (unused)
	just for consistency.
	the ptr is set absolutely in the next lines for the header.

	replace memcpy with bfr_read

	api: rename section.unknown2 to unknown

	harmonize 2007 section types with 2004
	sizes and addresses are unsigned.
	re-use bfr_read with 2004

	harmonize Dwg_Section_Info, memcpy struct
	similar to 2007 bfr_read()
	rename start_offset to offset,
	use RLd section.number (i.e. int32_t)

2019-02-20  Reini Urban  <rurban@cpan.org>

	Improve/harmonize logging 2004 section sizes (#93)
	read_R2004_section_info still has a problem with wrong page sizes,
	the 2007 variant read_data_section not.
	Continue on fc3fd1c14eb08f6e06f516753bfac1fa59029d3a
	The section_size is uint64, not int32. (ODA p28)

	$ programs/dwgread test/test-big/2004/HARTA_E_PRISHTINES.dwg
	ERROR: read_R2004_section_info out of range
	Warning: Failed to find section_info[13] with type 0x3
	ERROR: Failed to read compressed class section

2019-02-20  Reini Urban  <rurban@cpan.org>

	json: share cquote with geojson

	add myalloca.h and freea(ptr)
	for all the various alloca usages.
	freea() is a noop, only used on old systems without alloca (where
	malloc is used instead).

2019-02-19  Reini Urban  <rurban@cpan.org>

	use AC_FUNC_ALLOCA probe
	and use the recommended prologue, assuming it
	exists everywhere (C99)

2019-02-19  Reini Urban  <rurban@cpan.org>

	more GeoJSON support (#95)
	TEXT, MTEXT: Text feature and insertion point
	proper Layer and Linetype names

	add dwg_ent_get_ltype_name API

2019-02-19  Reini Urban  <rurban@cpan.org>

	geojson: fix undefined behaviour with loop counter
	dwg_geojson_LWPOLYLINE: don't use the counter after the loop.
	fails with ubsan

2019-02-14  Reini Urban  <rurban@cpan.org>

	more gen-dynapi.pl fixups: bsd
	define more new libc-specific macros, for darwin.
	BL is now fixed up again.

	fixup gen-dynapi.pl for cc-specific stddef.h
	and unify uint16_t to BS, uint32_t to BL, needed since
	fcfbe04fd338627e7713c48ddd51cbdc5384dd6c (typedefs)

	GeoJSON: fix json commas
	passes now jq

	add geojson jq tests to json.test

	GeoJSON: LWPOLYLINE also as direct type
	seperate it into its own function to handle it
	directly or as variable type

2019-02-07  Reini Urban  <rurban@cpan.org>

	skip attribute_deprecated_with_message with icc
	The msg arg is not supported with icc 12

	ax_compiler_flags_cflags: set ac_c_werror_flag=yes
	This ensures compilers like icc read the actual stderr
	conftest.err when -Werror=unknown-warning-option is invalid.

	more restrict

2019-02-06  Reini Urban  <rurban@cpan.org>

	dwg.h: fixup RLL confusion

2019-02-06  Reini Urban  <rurban@cpan.org>

	api: change BITCODE defines to typedefs
	This pins down the types, and helps in debugging and the dynapi.
	eg fieldhandles is now a H*

	BITCODE's were added with 19ccf73769024991c43e08c012db010790ffd9dc to
	d28470bcaa61d0ce811aeb8ba8aa77ff6a010f1d

2019-02-06  Reini Urban  <rurban@cpan.org>

	cygwin32: fix include/dwg.h types
	The cygwin probes fail to check HAVE_STDINT_H, and these
	config.h defines are not available in the public header anyway.
	Need to fallback on defines for a pure non-autotooled system.

	on 32bit without HAVE_STDINT_H the sizes are different.
	Should fix the dynapi HEADER tests.

2019-02-06  Reini Urban  <rurban@cpan.org>

	demand C99 stdint.h
	we already demand that via AC_PROG_CC_C99
	assume in dwg.h stdint.h and inttypes.h,
	without demanding autotools HAVE_STDINT_H defines

	e.g. freebsd
	insert.c:21:56: warning: format specifies type 'unsigned int' but the argument has type 'BITCODE_BL' (aka 'unsigned long') [-Wformat]
	printf ("object count for insert : " FORMAT_BL "\n", insert->num_owned);

2019-02-05  Reini Urban  <rurban@cpan.org>

	dwgread: no extra \n

	dxf: add object_entity dxfgroups to dynapi
	and fixup some wrong/missing groups

	dxf.test: honor --enable-debug setting
	works now with and without --enable-debug

	dxf: honor --enable-debug
	to test out_dxf and DXFIN with unstable objects

	configure: document --enable-debug as unstable
	it should have really been called --enable-unstable, but there we are.
	it also disables -O2 and sets -fno-omit-frame-pointer, which makes for
	easier debugging.

2019-02-04  Reini Urban  <rurban@cpan.org>

	dxf: fix ACTION => "dxf" expansion in classes.inc
	fixes detection of UNSTABLE_CLASS in dxf ACTION, and
	force setting of name, dxfname and fixedtype for all varying classes
	with decode and all importers

	override the dxf.test for UNSTABLE_CLASS to expect only the CLASS entry,
	no object entries.

2019-02-03  Reini Urban  <rurban@cpan.org>

	dxf: disable ACTION dxf with UNSTABLE_CLASS
	as acad import might crash with them.
	WIP ACTION needs to be passed 2x as arg to be expanded.
	The other ACTION check is also not working.

	dxf: VISUALSTYLE
	restrict 290, 291 to FIELD_B (not BS)
	They are most likely wrong, and fail to import if not 0/1

	skip dxf_validate_DICTIONARY
	NULL all invalid handles in out_dxf

	dxf_validate_DICTIONARY
	skip invalid ownerhandles

	dxf-roundtrip: fixup outname
	with e.g. example_2000 not being example_2000_2000.dxf

2019-02-02  Reini Urban  <rurban@cpan.org>

	add Dwg_Entity_ARC_DIMENSION with --enable-debug
	yet untested

	dynapi: add dxfgroups (#92) WIP
	also add new RENDERENVIRONMENT, RENDERGLOBAL objects
	(untested, but documented as DXF)

2019-02-01  Reini Urban  <rurban@cpan.org>

	mark endian specific code
	The lib only works on LE (little-endian) so far,
	for BE we would need to abstract some section code to bits_*LE

	read_R2004_section_info: remove unused Oops
	The rootcause is now fixed,
	Closes #93

2019-01-31  Reini Urban  <rurban@cpan.org>

	read_R2004_section_info (#93) num_sections => pagecount
	use uin64_t section_size, not int32.
	remove the wrong num_sections field, which is documented
	as PageCount.

	decode: signed read_R2004_section_info section_number (#93)
	a negative number denotes a gap/unused section

	decode: harmonize r2007 section logging
	mostly whitespace, one wrong 0x6 in the offset

2019-01-31  Reini Urban  <rurban@cpan.org>

	ATTDEF: fix r2007+ STRING_STREAM
	also for ATTRIB, now we get the right style handle
	and for ATTDEF the right prompt.

	{START,END}_STRING_STREAM now only used within header_variables.spec

2019-01-31  Reini Urban  <rurban@cpan.org>

	ATTDEF: add missing ATTRIB fields
	it is defined as ATTRIB plus some 2 more fields

	fix dxf-allcvt.sh
	skip not existing globbed files

	dxf: re-order ATTDEF
	3 prompt needs to be before 2 tag.
	But the prompt is not read properly, TODO

2019-01-30  Reini Urban  <rurban@cpan.org>

	Merge branch 'smoke/dynapi'

2019-01-29  Reini Urban  <rurban@cpan.org>

	dynapi_test: special-case strcmp
	which interestingly only failed on 32bit

	api: not deprecated dwg_obj_layer_get_name
	analog to the other tables

	dynapi_test: include config before public api
	even freebsd-amd64 started failing

	suppress -Wdeprecated-declarations
	on gcc and clang for the unit-tests and testcases

	dynapi_test: disable broken cygwin32 header test
	There the dynapi works fine, but the dwg->header_vars.VAR
	reference is broken somehow (some wrong offset?).

	api: add type getters and setters WIP

2019-01-28  Reini Urban  <rurban@cpan.org>

	api: add dwg_get_HEADER, dwg_set_HEADER by name

	doc: fixup refman
	doxygen: expand macros to generate decls for docs,
	add deprecations

	dynapi: fix EXPORT of internal syms
	need to generate imp_dwg_dynapi_* functions in .dll.a
	for windows

	dynapi: add dwg_get_OBJECT (#59)
	all entites and objects, also all missing typedefs.
	The api should be now complete, sans the common fields

	dynapi: add dwg_get_ENTITY (#59)
	objects not yet

	api: remove wrong nonnull attribs
	we need to allow API NULL args, which we cannot control

	dynapi: add dwg_dynapi_common_value
	and its structs, sorted by name.
	check more dynapi args for NULL

	api: revert dwg_ent_region_get_acis_empty
	we need to pass through the api.
	failed on FreeBSD

	bump copyright years, fixup #lines

	harmonize REPEAT Invalid rcount errors
	print the dxfname and fieldname similar to REPEAT_CHKCOUNT

	dynapi_test: skip count for objid_object_handles
	PROXY.objid_object_handles has a computed count (TODO)

	dynapi_test: skip count for VECTOR_N
	_transform or _transmatrix fields are malloced, but have no countfield.
	they have a fixed size of 12 or 16

	rename LEADER.numpts to num_points
	for consistency with the points* field, and a consistent
	num_ prefix

	api: rename TABLE.attribs to attrib_handles
	for consistency with all other attrib_handles

	dynapi_test: skip more fields without a count

2019-01-28  Reini Urban  <rurban@cpan.org>

	api: rename LTYPE.dash, XRECORD.num_eed
	LTYPE.dash => LTYPE.dashes
	XRECORD.num_eed => RECORD.num_xdata.

	Found those api errors only with dynapi_test

2019-01-28  Reini Urban  <rurban@cpan.org>

	dynapi_test: special-case num_reactors count

	dwg_api.h: finish deprecations and nonnull decls

	doc: improve refman target

	dynapi: fixup some H* fields
	Convert::Binary::C cannot seperate H* from H, both are just Dwg_Object_Ref*
	So we need to parse the defines.
	Fixes the COMMON_TABLE_CONTROL_FIELDS H* fields,
	and COMMON_ENTITY_POLYLINE vertex H*

	dynapi: check countfields
	of arrays.
	copy strings, do the malloc in the API.

	dynapi: extend need_malloc to indirect+malloc+string
	fixed-size structs like H, TIMEBLL, CMC
	don't need malloc, only dynamic arrays like TV, H*.
	add a seperate indirect field for structs ($is_ptr),
	and if it's a null-terminated string (ascii or wide).
	These are needed for the memcpy/strcpy in the getter/setter.

	dynapi_test: undo var++
	fixes invalid free when incr num_textfield

	dynapi: add obj->name field
	not the dxfname, but almost: DICTIONARYDFLT and PLACEHOLDER are e.g. different

	dynapi: more type cleanup
	resolve more  BITCODE types, esp ptrs.
	add need_malloc field, and reserve dxf field.

2019-01-28  Reini Urban  <rurban@cpan.org>

	dwg_api: more refactoring WIP
	add nonnull compile-time checks, add deprecation messages.

	because of the static loglevel we cannot inline the api functions
	with LOG_ERROR

2019-01-28  Reini Urban  <rurban@cpan.org>

	dynapi: refactor dwg_api WIP
	add error handling and logging to dynapi.
	rename dwg_get_OBJECT to dwg_getall_OBJECT
	check entity type for dwg_dynapi_entity_*value()

	dynapi: add setter API (and tests)

	silence dejagnu warnings on clang
	e.g. freebsd. dejagnu.h is long unmaintained

	dynapi: fixup name[4] to types
	is ptr then, and skip the suffix

	dynapi: workaround missing stddef.h
	on cygwin32 stddef.h is missing. provide an offsetof workaround.
	the other possibility would have been to provide static offsets for 64bit
	and 32bit machines, but there are other ABIs, such as x32 (ptrsize 4, intsize 8).

	dynapi: skip gen-dynapi for testcases

	dynapi: fixup sorting of dwg_name_types for _3D
	3DFACE and 3DSOLID are now proper names to be searched for

	dynapi: fixup more types

2019-01-28  Reini Urban  <rurban@cpan.org>

	dynapi_test: add HEADER tests
	sort the header_variables_fields by name, not offset

	still failing: 3DFACE, 3DSOLID

2019-01-28  Reini Urban  <rurban@cpan.org>

	dynapi: fix name* to type*
	fixes compilation of dynapi_test.
	Now just the HEADER dynapi is failing

2019-01-28  Reini Urban  <rurban@cpan.org>

	dynapi: more dynapi_test objects WIP
	add all the entities, objects and fields.

	change MULTILEADER from object to struct _dwg_entity_MULTILEADER
	for internal consistency with the dynapi.

2019-01-28  Reini Urban  <rurban@cpan.org>

	add testcases/dynapi_test WIP
	generated from all fields

	dynapi: move to public dwg_api.h
	allow NULL Dwg_DYNAPI_field *fp, rarely needed to
	get the type, size or offset

	dynapi: test it, refactor a bit

	dynapi: regen

	dynapi: rename TABLE.entry_name field to name

	dynapi: add generic getters, NULL terminate the fields
	and add size to Dwg_DYNAPI_field for easier memcpy
	without the need to lookup the BITCODE_ type.

	dynapi: add api functions
	make dwg_entity_names and dwg_object_names bsearchable (equal size)

	dynapi: add _fields access to dwg_name_types[]
	We need to bsearch the OBJECT to get to the _dwg_OBJECT_fields.

	dynapi: unexpand BITCODE_* macros
	TODO: DIMENSION_COMMON, _3DSOLID_FIELDS macros
	      union _dwg_MLEADER_Content_u

	dynapi: add dynapi.h with OFF macro
	use builtin offsetof(struct,field) and only the default value
	if stddef.h is not found

2019-01-28  Reini Urban  <rurban@cpan.org>

	Add gen-dynapi.pl, dynapi.c WIP
	Generate dwg.h struct names and field types, offsets.
	TODO: types not as string?
	      link _fields[] to some name array,
	        either dwg_name_types or dwg_entity_names

	See #59

2019-01-28  Reini Urban  <rurban@cpan.org>

	dxf: print BL LAYER_INDEX.timestamp1 as float
	out_dxf overflows BL/%u in snprintf

	dxf-allcvt: fix test-big

	fix r2007 XRECORD strings

2019-01-27  Reini Urban  <rurban@cpan.org>

	dxf-roundtrip.sh: support td/example_20*.dwg

	fix HATCH_gradientfill logic
	wrong cond

	dxf: use a better CMC index
	for a given rgb value. The index is still wrong,
	(e.g. 194 instead of 250 for rgb 0xcccccc)
	but helps importing the DXF. The index is mandatory, even for truecolor.

	dxf: mandatory LAYER.flag 70
	may not be left out, even if value 64

	doc: better links

	rename type EMC to ENC (entity color)
	and change some VISUALSTYLE colors from CMC to ENC

2019-01-25  Reini Urban  <rurban@cpan.org>

	configure: skip bindings/python without swig

	dxf: print subclass markers since r13 (#90)
	not just since r2000. Fixes dxf-roundtrip for the #90 example.
	Thanks to @Febfire for the example dwg to find the problem

	dxf: DIMSAV is not in r14

2019-01-17  Reini Urban  <rurban@cpan.org>

	configure: improve PERL_VERSION
	unused, just for printing

2019-01-16  Reini Urban  <rurban@cpan.org>

	dxf-allcvt: add test-big

	added to stable: UNDERLAY entities, UNDERLAYDEFINITION, CAMERA

	regen-unknown without test-big dwgs

	logs-all: add test/test-big
	seperate huge DWGs/logs from the normal test-data.
	there exists no logs-all.sh.in.only the parallel and serial variants
	(parallel ignored)

	improve HATCH_gradientfill: type CMC
	and the double is the shift_value: 0.0 or 1.0.
	also fixes the wrong ODA docs for Repeats # of Gradient Colors

	cirrus freebsd: disable distcheck
	for the failing bindings/python target

2019-01-15  Reini Urban  <rurban@cpan.org>

	free: fix -Wshadow for static dat
	use local dat's

	json: fix asan dynamic-stack-buffer-overflow
	too small alloca, also switch to heap on overlarge alloca (security)

	api: add get_{first,next}_owned_subentity iterator

	.gitignore: more

2019-01-14  Reini Urban  <rurban@cpan.org>

	configure: print PERL version
	not just logging to config.log

	api: add dwg_model_space_object(dwg)
	with all the checks, needed for dxf_blocks_write()

	json: fix \u00XX cquote
	and FIXME/skip surrogate pairs, U+10000+ chars.
	A lone low or high pair is forbidden, TODO.
	These mostly came from invalid binary chunk anyway.
	It fixes the json tests with --enable-debug

	cirrus: try python again
	m distdir: don't know how to make ./LibreDWG.py

	examples: speed-up make distdir
	alldwg.inc doesn't need to be generated there, make regen-unknown is enough.

2019-01-10  Reini Urban  <rurban@cpan.org>

	dxf: EMC color.rgb & 0x00ffffff only
	out_dxf needs to filter the type from the rgb value,
	in_dxf not.

	dxf: color.index & 255
	256 would be 1 then.
	AcDbHatch(1C48E9): Color index 65535
	AcDbVisualStyle(F4): Color index 3368
	...

	MATERIAL: add ownerhandle, REACTORS, XDICOBJHANDLE
	and add the mandatory DXF fields.

2019-01-09  Reini Urban  <rurban@cpan.org>

	alive.test: speed up
	only -v2. not -v4 needed.
	from 32.7s to 11.4s

	dxf: improve mspace dxf_blocks_write
	esp. for some r2010+ dwgs

	regen-unknown
	with the new DXFs

2019-01-09  Reini Urban  <rurban@cpan.org>

	test-data/2007: add missing DXF files
	XRECORD and DICTIONARY circle.dxf is wrong with ODA and our decoder.
	Check against acad versions

	dxf: skip XRECORD xdata 80-90
	These are most likely decode errors, and throw dxfin errors.
	But the circle_2007 XRECORD's all look wrong.

	dxf: _HATCH_gradientfill, fix dxf 91=>93 WIP
	num_polypaths is 93
	add missing str_dat to DWG_ENTITY decls.

2019-01-07  Reini Urban  <rurban@cpan.org>

	python: probe also without swig
	many checks need python.

	alive.test: dwggrep -c now returns 21
	The block_header iterator get_next_owned_entity finds now more.

	fixup get_next_owned_entity
	check the actual entity owner.
	it did fail with some r14-2000 attribs, belonging to 2 separate
	block headers

2019-01-07  Reini Urban  <rurban@cpan.org>

	dxf: skip *Model_Space BLOCK entities
	check ptr and index;
	improves 7cad11cc68887b, the ptr check is sometimes not good enough.

	Skip all block entities which are owned by *Model_Space.
	Some newer entities (UNDERLAY, MLEADER) are under some other blocks
	(e.g. pspace) but owned by mspace.

2019-01-07  Reini Urban  <rurban@cpan.org>

	decode: apply dwg_validate_POLYLINE/INSERT
	after having read the SEQEND, to fill in a missing
	owner->seqend handle.
	Fixes the r2010+ SEQEND errors.

2019-01-05  Reini Urban  <rurban@cpan.org>

	move dxf_is_sorted_POLYLINE to decode
	as dwg_validate_POLYLINE(), yet unused. Needs to be called after the last
	POLYLINE entity was read, which is not clear.

2019-01-05  Reini Urban  <rurban@cpan.org>

	dxf: skip *Model_Space UNDERLAY entities
	The *Model_Space BLOCK contains UNDERLAY's, but they
	only appear in the ENTITIES section, not as BLOCK entity.
	Ditto for all other *Model_Space entities.

	Error with INVALIDDWG when the BLOCK_HEADER contains no BLOCK entity.

2019-01-05  Reini Urban  <rurban@cpan.org>

	dxf: remove is_sorted, always process with subentities
	This logic was too fragile, esp. vs BLOCKS

	api: add dwg_obj_is_subentity

2019-01-05  Reini Urban  <rurban@cpan.org>

	api: rename get_*_owned_object to _entity
	get_next_owned_object only returned the next block entity,
	not any object associated and located in this block, and neither
	any VERTEX/ATTRIB.
	esp. since r2004+ with its BLOCK_HEADER.entities array.
	This skips objects and subentities (ATTRIB, VERTEX).

	Add API docs for these

2019-01-05  Reini Urban  <rurban@cpan.org>

	dxf: process VERTEX r2004+
	get_next_owned_object returns the next main entity, no VERTEX.
	set is_sorted=0 then, forcing dxf_process_* for subentities then.

	api: add get_last_owned_block()
	to return the ENDBLK for a BLOCK_HEADER.
	use it in dxf

	dxf: split BLOCKS and ENTITIES (#88) WIP
	ENTITIES only if owned by MSPACE, all other as BLOCK members.
	BLOCKS contains all pspace entities, and all blocks, but no objects.
	OBJECTS contains all objects but BLOCK_HEADER and *_CONTROL (TABLEs)

2019-01-04  Reini Urban  <rurban@cpan.org>

	--disable-bindings (#86)

	dxf.test: clear *dxf.log

	DICTIONARY: fix hard_owner DXF 350/360
	and emit it for DXF

	dxf: fix XRECORD xdata, no +1000
	XRECORD xdata has normal dxftypes

2019-01-03  Reini Urban  <rurban@cpan.org>

	dxf: BLOCK_NAME via cvt_blockname for pre-R13 names
	$MODEL_SPACE <=> *Model_Space

2019-01-02  Reini Urban  <rurban@cpan.org>

	dxf: fix EED/xdata dxfcode + 1000

2019-01-02  Reini Urban  <rurban@cpan.org>

	VALUE_HANDLE: harmonize to 4 args
	for the name logging.

	Caused by the effort to emit a 340 0 DXF pair
	for a BLOCK_RECORD layout_handle on NULL.

2018-12-31  Reini Urban  <rurban@cpan.org>

	dxf: skip more VERTEX_2D defaults

2018-12-30  Reini Urban  <rurban@cpan.org>

	VPORT: revert shade_plot_handle back to 361 sun_handle
	several DXFs have the sun there

2018-12-28  Reini Urban  <rurban@cpan.org>

	free: protect empty TABLE ent with --enable-debug
	and HANDLE_VECTOR overflow.
	Actually set an invalid size field to 0

	debug: more missing api DECLs
	with --enable-debug classes

	debug: more missing SUB_FIELDs
	with --enable-debug classes

	dwg_dim_blockname: treat DICTIONARY as LAYER
	some DWGs: 2013/gh55-ltype.dwg

	dxf: protect wrong HATCH.num_path
	and cast some NULL ptrs, and wrong formats

	dxf: more codepages
	add ANSI_1253, ANSI_1254, ANSI_936, ANSI_949

2018-12-27  Reini Urban  <rurban@cpan.org>

	multiple definition of alloca
	only complaint on freebsd

	dxf: cquote dxf_fixup_string
	for newlines and such (text 1)
	different quoting rules than json

	dxf: fix VERTEX sub classing
	tested ok

	dxf: fix 3DSOLID, BODY subclass names

	dxf: fix _3DSOLID,_3DFACE dxfname
	special case it in DXF and decoder

	api: add DIMENSION.flag from flag1 and flag2
	calculate the DXF value 70 (some bits from flag1 and 2)
	skip empty DXF user_text (at least ASCII for now)

	dxf: support DIMSTYLE 3

	dxf: add DIMSTYLE 3, skip 52
	move 3 to COMMON (before the subclass)
	skip DXF 52 ext_line_rotation: invalid

	improve dwg_dim_blockname
	sometimes a LAYER is mixed in

	dxf: add FIELD_BINARY for picture 310

	dxf: add HATCH.boundary_handles 330

	out_dxfb: sync with out_dxf

	dxf: HATCH.elevation as pt

2018-12-26  Reini Urban  <rurban@cpan.org>

	dxf: style name 7 before the subclass

	examples: add alldwg.inc to dist
	to avoid regen-unknown on make distcheck, and
	to ship it with the tar

	dxf: fixup empty POLYLINE.seqend with +1 obj
	don't try the other variant then, also to avoid a leak.

	dxf: write empty HANDLE_NAME
	otherwise DXFIN complains. e g $DIMBLK

2018-12-26  Reini Urban  <rurban@cpan.org>

	dxf: destructive i++ for the loop
	the unsorted process handlers need to advance the loop
	variable, otherwise we process some entities them twice.

	Closes #83

2018-12-26  Reini Urban  <rurban@cpan.org>

	dxf: sort INSERT-ATTRIB-SEQEND (#83)
	use one global/static is_sorted variable, for both
	POLYLINE and INSERT, both ended by SEQEND.

	add type and NULL checks in the dxf_process_##token() handler.

	reset is_sorted to the default 1.

2018-12-26  Reini Urban  <rurban@cpan.org>

	dxf.test: extend SEQEND check also to INSERT-ATTRIB (#83)
	which fails on example_20*

	cirrus: only allow master + smoke/*

	cirrus: --disable-python for the xmlsuite/check.py

	fixup empty SEQENDs in dxf is_sorted_POLYLINE
	in the decoder it is too early, so do it in one of the outputters.
	the empty SEQEND is an artefact of the previous decoder shiftup,
	the real fix would be a correct handlestream_offset (#85)

	decode: check_POLYLINE_handles
	check for if vertex[0] is the layer and shift the vertices then.
	since we cannot look forward and resolve unread objects
	its not yet good enough. we really need to check them after the seqend
	or last vertex. or later in out_dxf in the is_sorted_POLYLINE check.

	decode: log relative handle stream offset
	it is still wrong. see #85

	indent common_entity_handle_data.spec

	dxf: protect wrong FIELD_HANDLE_NAME table
	when a handle points to a wrong object

2018-12-25  Reini Urban  <rurban@cpan.org>

	POLYLINE_3D: rename flag2 to curvetype (75)

2018-12-25  Reini Urban  <rurban@cpan.org>

	dxf: WIP is_sorted_POLYLINE shortcut (#83)
	COMMON_ENTITY_POLYLINE: ensure that the common POLYLINE_*
	fields are shared with all 4 types.

	Some vertex[] handles are even worse than a wrong SEQEND,
	check when the first vertex[0] is corrupt and ignore it then.

	enable loglevel LOG in out_dxf, mainly to warn about this
	wrong POLYLINE.vertex[0] handle %lX < %lX

2018-12-25  Reini Urban  <rurban@cpan.org>

	dxf: POLYLINE - SEQEND - VERTEX (#83)
	Some dwg's (r2007, r2018) have the SEQEND following the POLYLINE.
	Iterate over the vertex handles, not over the object id's.

	shellcheck json.test
	and regen-unknowns

2018-12-25  Reini Urban  <rurban@cpan.org>

	bindings: add missing Object APIs
	parallel to the Entity getters and converters,
	recently added to dwg_api.

	remove some DEBUG_CLASS function from the public api (getall, converter)

2018-12-25  Reini Urban  <rurban@cpan.org>

	cirrus: re-enable python, install py36-libxml2 instead

	suffix.inc: _XOPEN_SOURCE 700
	for snprintf on FreeBSD.
	Sets __ISO_C_VISIBLE 1999

	bindings: honor --disable-python

	m4: fix swig and python probes for FreeBSD
	swig defaults to swig3.0 on FreeBSD pkg
	python needs proper LDFLAGS (-lpthread) and SYSLIBS (-lm)
	use $SWIG in Makefile

	dxf.test: bash => sh
	no bashisms, checked with shellcheck

	.cirrus: install bash, --disable-python
	bash needed for dxf.test
	py36-lxml (the libxml2 binding) needed for xmlsuite,
	but the xmlsuite/check.py is failing with python3.6
	with --disable-python only distcheck is failing on binding/python

2018-12-24  Reini Urban  <rurban@cpan.org>

	fix dxf.test for FreeBSD
	where bash is in /usr/local/bin

2018-12-23  Reini Urban  <rurban@cpan.org>

	dxf: emit 62 256
	or 420 rgb if index not 256. See MLINESTYLE

	dxf: reorder MLINESTYLE 3 <-> 70 fields
	it is apparently critical

	dxf: some classes are builtin since r2004+
	ACDBPLACEHOLDER and LAYOUT do not appear in CLASSES anymore,
	but it depends which version exports it.

	dxf.test: add check_acdb_dxfname

	decode: set proper dxfname
	from classes.inc STABLE_CLASS_DXF (also for the importers),
	and from dwg_add_##token (for the API).
	Fixes ACDBDICTIONARYWDFLT DXF object and simplifies out_dxf.

	dxf: use ACDBDICTIONARYWDFLT
	no dxfname set?

	add programs/dxf.test
	a few minor failures, but was important to catch missing layers.
	it doesn't check diff error codes yet.

	dxf: more missing common_entity_handle_data
	r2004+: read layer, ltype (was missing)
	skip dxf color 62 256
	put dxf 330 ownerhandle after reactors
	print empty layer (wrong handle stream e g POLYFACE_MESH) as 0
	handle other .spec fields if undefined (e.g. VALUE_HANDLE in
	  common_entity_handle_data)

	dxf: entity.ownerhandle 330 after ACAD_REACTORS

	test-dxf.sh: no gmake

	log: add [H ] type to handle logs

	api: rename _ent->entity_mode
	to entmode. (as in the ODA docs)
	add proper pspace owner handling in DXF
	fix common_entity_handle_data encoding of ownerhandle:
	  skip if implied by entmode.
	cur_owner tracking is not needed anymore. entmode is enough

	api: replace ENTITY.subentity by ownerhandle 330
	this handle really is the ownerhandle, not the subentity.
	it only appears in subentities (VERTEX, ATT*) pointing to its
	owner.
	Now we don't need the cur_owner/old_owner anymore.

	make regen-unknown
	now with ODA generated 2000_dxf.log counterpairs

	add PolyLine2D .dxg/.dxf pairs
	for VERTEX_2D and VERTEX_3D samples (which crash on DXFIN import)

	decode VALUE_HANDLE_N: [vcount]: NULL HANDLE
	itemhandles[vcount]: NULL HANDLE(2) [0]
	vs
	itemhandles[vcount][15]: 2 HANDLE(2.1.66) absolute:66 [0]

2018-12-22  Reini Urban  <rurban@cpan.org>

	dxf: add dwg_dim_blockname (#81)
	need to out_dxf more blocks: anon. *Dn for DIMENSION.
	Get the name from the BLOCK_HEADER - BLOCK.name, following
	the DIMENSION.

	Now simply dump all BLOCK and BLOCK_RECORD's.

2018-12-22  Reini Urban  <rurban@cpan.org>

	dxf: fixup AcDbBlockTableRecord name (#81)
	for ccd50fd121544c0c3a638b1d5c5512083bdf3df3

	dxf: Error in BLOCK_RECORD Table
	Did not receive AcDbBlockTableRecord name

	dxf: Did not receive AcDbViewportTableRecord flags
	dxfin error. the flag 70 is not optional with COMMON_TABLE_FLAGS

	api: rename parenthandle to ownerhandle (#80)

2018-12-22  Reini Urban  <rurban@cpan.org>

	change _ent->owner to ownerhandle
	entities gets realloced, and thus their pointers invalidated.
	we need to store the BITCODE_H ref instead.
	valgrind: Invalid read of size 8, dwg_dxf_ENDBLK, dxf_blocks_write.

	add reverse dwg_find_objectref lookup: linear search, only done for
	entities with subentities to find the ref for the current object

2018-12-22  Reini Urban  <rurban@cpan.org>

	dwg_dxf_STYLE: fix TU memleak
	free temp. bit_convert_TU result

	dxf: fix dxf_cvt_tablerecord memleak
	free temp. bit_convert_TU result

	decode: use after free
	when dwg_decode_UNKNOWN_ENT failed and freed dat.

	dwg2dxf: call free within valgrind
	fixes some articial memory leaks

	dwg_add_TOKEN: potential obj->tio.object mem leak

	dxf_tables_write: fix potential NULL deref
	very unlikely, but still

	dxf_free_pair: fix NULL deref

	decode: dead increment
	error from obj_string_stream was ignored

	decode: dead assignment

2018-12-21  Reini Urban  <rurban@cpan.org>

	decode HANDSEED: protect from empty handle
	Fixes most dxf roundtrips, where HANDSEED turns up empty.
	Only a few DXFs break now on dxf-roundtrip's

	dxf: use proper AcDbBlockTableRecord name (#81)
	Not the BLOCK_HEADER.name (which is only *Paper_Space)
	but the name of its BLOCK entity (which is *Paper_Space0).
	This fixed most #81 dxfin errors, but not all.

	dxf: all BLOCK_HEADER records
	analog to the pspace BLOCK objects, some are missing.
	Note that the basic dxfs survive now a teigha roundtrip.

	dxf: no r2004+ color 62 index 0
	TODO: lookup the index for rgb color (e.g. 7 for 0xc3000007)
	index is invalid

	dxf: add dxf-roundtrip.sh
	via TeighaFileConverter.
	dwg2dxf for a DWG, convert it back to a DWG via Teigha
	to see if the DXF is somewhat correct, and then read the
	converted DWG. Create Teigha error logs as .dwg.err

	dxf: rename dxf_example to dxf-allcvt
	we are mass-converting all DWGs to DXFs, and then
	use a LSP to DXFIN all those generated DXFs.

	dxf: more missing PSPACE blocks (#81)
	The first attempt 975c8f3deb was unsuccessful.
	There may be unconnected pspace blocks not referenced
	by the BLOCK_CONTROL, such as pspace blocks from a pspace
	LAYOUT, so for simplicity just scan all BLOCK_HEADER's for
	a pspace block.

2018-12-20  Reini Urban  <rurban@cpan.org>

	dxf: rename new ent->parent to ent->owner (#82)
	its confusing both ways. the corresponding object ptr is called
	parenthandle, but the obj->parent is something else: inheritance.

	officially we have hard and soft owners, owning the reference,
	for liveness on deletion.

	in the end it would be just too confusing mixing up the _obj->parent and
	obj->parent with _ent->parent. maybe rename _obj->parenthandle to ownerhandle
	also.

2018-12-20  Reini Urban  <rurban@cpan.org>

	dxf: Support 330 ent->parent->handle (#82)
	which is not always the MSPACE record.
	On subentities (VERTEX, ...) it is the parent.

2018-12-19  Reini Urban  <rurban@cpan.org>

	dxf: add missing PSPACE blocks (#81)
	also iterate over the block_headers array of the
	first BLOCK_CONTROL, which are usually PSPACE blocks.

	api: rename DIMENSION_ORDINATE.ucsorigin_pt to def.pt
	move def_pt to DIMENSION_COMMON, add blockname field

2018-12-19  Reini Urban  <rurban@cpan.org>

	fix bit_convert_TU for >U+800 (#80)
	wrong UCS-2 to UTF-8 converter:
	fix the first byte of a 2 and 3-byte sequences

	only found out with chinese drawings

2018-12-19  Reini Urban  <rurban@cpan.org>

	dxf: more POLYLINE_2D,VERTEX_2D defaults
	default values are left out in DXF

	dxf: more common_entity_data defaults
	default values are left out in DXF

	dxf: more POLYLINE_2D work WIP
	extrusion is a vector on DXF.
	BE can be skipped on DXF if default.
	But acad still crashes on DXFIN (2DVertex)

	make regen-swig-patch

2018-12-19  Reini Urban  <rurban@cpan.org>

	add dxf_cvt_lweight, rename linewidth to linewt (#79)
	The DXF output of CELWEIGHT/linewt needs to be decoded to
	some signed int, the 100th of a mm, and 3 special default values
	-1 .. -3 for dxf. (BYLAYER, BYBLOCK, BYLWDEFAULT)
	This fixes DXF import with lineweights.

	Rename the API to linewt for consistency.

2018-12-18  Reini Urban  <rurban@cpan.org>

	dwg_decode_handleref: obj NULL deref
	Empty obj argument for code >= 6

	suffix: Argument with 'nonnull' attribute passed null
	empty filename

	dwgread: Argument with 'nonnull' attribute passed null
	protect against empty outfile (only a theoretical getopt problem)

	read_R2004_section_info: NULL deref
	Array access (via field 'sections') results in a null pointer dereference

	in_dxf: Argument with 'nonnull' attribute passed null
	protect pair

	clang-analysis: Allocator sizeof operand mismatch
	Result of 'calloc' is converted to a pointer of type 'unsigned char', which
	is incompatible with sizeof operand type 'char'.

2018-12-17  Reini Urban  <rurban@cpan.org>

	json: fix wcquote format tmpl %s => %ls

	dwgwrite: fix wrong infile check (#77)
	Thanks to @shlyakpavel

	fix dwggrep NULL deref (#77)
	Thanks to @shlyakpavel

	fix NULL deref (#77)
	added recently. Thanks to @shlyakpavel

2018-12-17  Reini Urban  <rurban@cpan.org>

	json: add SUB_FIELD, REPEAT_BLOCK. fix LEADER
	Need to separate the parent[i] from the struct field.
	arrays esp. in json should not print field[rcount1]: value, just
	an array of values. With REPEAT an array of structs.

	Also set a few more missing parents,
	and fix LEADER subelements: allow multiple

2018-12-17  Reini Urban  <rurban@cpan.org>

	json: add HANDLES object map
	But not the relative offset, just the absolute offset.
	We don't yet store the DWG relative offset.

	json: add preview, handle, owner, dxfname
	Add some more missing fields

	json: skip duplicate BLOCK.name
	FIELD_T (name, 2) already prints the name
	skip the duplicate dxf group 3 with the name

	doc: enhance json docs

2018-12-16  Reini Urban  <rurban@cpan.org>

	silence gcc -Wlogical-op
	&& len => && len > 0
	warning: logical ‘and’ applied to non-boolean constant

	api: rename TABLE.entry_name field to name
	Closes #76

2018-12-16  Reini Urban  <rurban@cpan.org>

	json: 2007 text fixes
	disable wrong color.name and bookname fields. They are all wrong.
	r14 might have NULL reactors.

	make check passes now

2018-12-16  Reini Urban  <rurban@cpan.org>

	json: probe for jq, add tests

2018-12-15  Reini Urban  <rurban@cpan.org>

	json: more DWG like structure
	Rename ENTITIES to OBJECTS,
	moved preview before header (vars).
	TODO: FILEHEADER sections, object map.

	See #76

2018-12-14  Reini Urban  <rurban@cpan.org>

	fix 2 test/*/ole2frame types
	-Wsign-compare (detected only on cygwin)

2018-12-14  Reini Urban  <rurban@cpan.org>

	json: final fixes
	add more cquote rules, esp. \n
	escape more unicode stuff <0x1f as \u00xx
	skip the very last COMMA in ENTITIES ENDSEC.
	add {} around FIELDs, so that VERSION(R_14) FIELD_RC (hard_owner, 0)
	  will not only skip the PREFIX block.
	add proper PREFIX for FIELD_2DD_VECTOR.

	jq can now read the generated json, when being written to a file,
	not a pipe (NOCOMMA hack skipping the last comma of a list)

2018-12-14  Reini Urban  <rurban@cpan.org>

	Add alloca workaround: _alloca or malloc
	needed for out_json and examples/unknown.
	Windows MSVC defines _alloca in malloc.h

2018-12-13  Reini Urban  <rurban@cpan.org>

	json: cquote strings
	now only Invalid string: control characters from U+0000 through U+001F must be escaped
	are missing

	json: produce better output WIP
	but still not JSON conformant.
	make HEADER a hash.
	better ARRAY, POINTS, VECTORs.
	HACK: skip dquotes on classnames wiich are already in dquotes.
	      TODO escape it properly.

2018-12-13  Reini Urban  <rurban@cpan.org>

	json: use DXF_OR_PRINT blocks (#73)
	Most entities only have DXF, DECODER and ENCODER blocks defined (e.g. LINE)
	but no special PRINT block, which would be needed for all other
	formatter outputs.
	For easier spec go with the DXF_OR_PRINT block then, and
	define it for those formatters IS_PRINT settings.
	This fixes out_json with only IS_PRINT but no IS_DXF action.

	We don't want to duplicate DXF {} blocks for PRINT.
	And those formatters also go into both directions, in and out.

	Thanks to @nick-bull for asking about this.
	Closes #73

2018-12-13  Reini Urban  <rurban@cpan.org>

	encode: add WIP dwg_section_page_checksum
	for writing a r2004+ section map. untested.

	more crc work: crc64 and crc32
	rename 2004_file_header.CRC to crc32,
	format crc64 properly (leading 0),
	add crc32 code (generated crc32 table) for r2004+ (for file header),
	not the crc64 code yet for r2007+ (for compressed pages),
	rename some internal old libdwg vars from crk to crc.

	Add handles section CRC check
	This CRC is LE (not byte-swapped).

	fix testcases/bits_test.c on 32bit
	use better MC/UMC test values: 0x8777 7777 instead of 0x2111 1111
	causing the previous 4bit lossage.
	beware of uint32 wraparound causing an endless loop
	(cygwin32)

2018-12-12  DenisPryt  <denis.chausy@gmail.com>

	Restore dat position in dwg_decode_add_object
	for all return cases

2018-12-12  Reini Urban  <rurban@cpan.org>

	dxf: fix CELWEIGHT values
	from https://sourceforge.net/p/libdwg/tickets/7/
	CELWEIGHT is encoded into special values.
	Thanks to Guruprasad Rane for the value translations.

	Add logging for some calculated values

2018-12-12  Reini Urban  <rurban@cpan.org>

	print HANDSEED as hex handle
	as AUXHEADER RL, and as HEADER handle.
	See #71

2018-12-12  Reini Urban  <rurban@cpan.org>

	change MC back to long
	document and simplify MC bits
	Explain why 4 byte are not enough.
	on 64bit MC offsets just need to be natural.
	Add more MC and UMC tests.

	Closes #70

2018-12-12  DenisPryt  <denis.chausy@gmail.com>

	read/write bit_MC/UMC fix (max byte length change from 4 to 5)
	See #70

2018-12-12  Reini Urban  <rurban@cpan.org>

	fixup read_2004_compressed_section messages
	Fix wrong logging messages for the section types.
	Not Class, but OBJECTS and HANDLES mostly.

2018-12-11  Reini Urban  <rurban@cpan.org>

	swap CRC type to RSx
	not RS_LE.

	Now only the r14,r2000 Section[0] CRC fails, a known problem.
	relax the WRONGCRC error with those.

2018-12-11  Reini Urban  <rurban@cpan.org>

	bits: change BITCODE_MC/MS from long to int32
	we are not on 32bit anymore.
	also add read_200{4,7}_section_handles and breaks

	bits: use BITCODE_* types
	not the intsize dependent long unsigned int

	dxf: guard empty table ctrl objects

2018-12-11  DenisPryt  <denis.chausy@gmail.com>

	Add r2007+ obj_string_stream overflow guard

2018-12-11  Reini Urban  <rurban@cpan.org>

	SPLINE/HELIX: set parents
	We cannot use FIELD_VECTOR with 3BD here unfortunately

	perl: fix make check
	use LD_LIBRARY_PATH, not LD_RUN_PATH to be able to find libredwg.so.0

2018-12-11  Reini Urban  <rurban@cpan.org>

	CLANG_DIAG_IGNORE(-Wpragma-pack)
	-Wpragma-pack is clang-only
	silences test/testcases/decode_test warning:
	warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]

	The gcc variant would be -Wpragmas, which is not needed here:
	-Wno-pragmas -Wunknown-pragmas

2018-12-11  DenisPryt  <denis.chausy@gmail.com>
	    Reini Urban  <rurban@cpan.org>

	Object-map section_handles: handle is BITCODE_UMC
	unsigned, not signed.
	confirmed with libdxfrw

	encode: obj->handlestream_size needs to be encoded as UMC also.
	(forgotten in encode r2010+)

2018-12-11  Reini Urban  <rurban@cpan.org>

	extend bits_test
	print more bits and fail result

2018-12-11  DenisPryt  <denis.chausy@gmail.com>

	free -> FREE_IF migration

2018-12-10  DenisPryt  <denis.chausy@gmail.com>

	Error on zero section max_decomp_size (#66)

2018-12-10  DenisPryt  <denis.chausy@gmail.com>
	    Reini Urban  <rurban@cpan.org>

	read_R2004_section_info buffer overflow protection (#68)
	Fix decode R2004_header encryption section.

2018-12-10  DenisPryt  <denis.chausy@gmail.com>

	typo fix Pruchkovksy -> Pruchkovsky

2018-12-10  Reini Urban  <rurban@cpan.org>

	r11: add OSMODE
	even if stored in DXF as zeroed value

2018-12-10  Reini Urban  <rurban@cpan.org>

	Revert "Renamed HEADER.MENU to HEADER.MENUNAME"
	The DXF file has it as $MENU, so it was correct.
	The DXF docs are just wrong.

	This reverts commit 419f4eade8d9b32942a1d0a26097081f09a54c71.

2018-12-09  Reini Urban  <rurban@cpan.org>

	Renamed HEADER.MENU to HEADER.MENUNAME
	MENU is the command, but MENUNAME is the variable name

2018-12-07  DenisPryt  <denis.chausy@gmail.com>

	Fix unknown class free problem

2018-12-06  Reini Urban  <rurban@cpan.org>

	Harmonize Dwg_Leader_ subtype names
	Dwg_Leader_* => Dwg_LEADER_*
	Dwg_MLeaderAnnotContext => Dwg_MLEADER_AnnotContext

2018-12-05  Reini Urban  <rurban@cpan.org>

	Release 0.7

	add .cirrus.yml for FreeBSD CI

	fix python 3.6 TabError

	meta: fixup authorship headers
	load_dwg.c: decl strdup

2018-12-05  Reini Urban  <rurban@cpan.org>

	api: convert IMAGE.size.{width,height} to 2RD
	no inline structs in WIPEOUT and IMAGE.
	convert inline struct { width; height } to 2RD (x,y).
	The size is documented as size (u,v),
	not width/height in the AutoCAD DXF docs.

	This is mostly to simplify the dynapi #59

	xmlsuite: simplify newxml.py
	remove unused local var

	xmlsuite: simplify check.py
	remove unused imports

2018-12-04  Reini Urban  <rurban@cpan.org>

	examples/bits: initialize pos
	pos -Wmaybe-uninitialized in return decode(dat, pos, size)

	detab all sources
	some editors are obviously confused about tabs

	Protect from calloc(0,) returning non-NULL (#61)
	when info->num_sections == 0 (on some broken DWG), calloc(0,...)
	might return a non-NULL ptr on some broken libc's (glibc).
	This is a better fix than on PR #61, thanks @DenisPryt
	for finding the problem.

2018-12-03  Reini Urban  <rurban@cpan.org>

	alive.test: use libtool for 2nd dwggrep test

	pre-r13: set LAYER,STYLE flag bits
	set on,frozen,frozen_in_new,locked bits from LAYER flag,
	shape_file,vertical from STYLE flag.

	pre-r13: set BLOCK_HEADER flag bits
	anonymous,hasattrs,blkisxref,xrefoverlaid from flag.
	to unify the api

	smoke: CFLAGS typo

2018-12-02  Reini Urban  <rurban@cpan.org>

	NEWS: add latest changes for 0.7

	guard get_first_owned_object first_entity
	ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f782e1db8b5 bp 0x7fffb
	a38ff70 sp 0x7fffba38ff50 T0)
	The signal is caused by a READ memory access.
	Hint: address points to the zero page.
	 #0 0x7f782e1db8b4 in get_first_owned_object /home/rurban/Software/libredwg/src/dwg.c:748:34
	 #1 0x5048fb in output_BLOCK_HEADER /home/rurban/Software/libredwg/programs/dwg2SVG.c:211:9
	 #2 0x50453d in output_SVG /home/rurban/Software/libredwg/programs/dwg2SVG.c:252:3
	 #3 0x50453d in main /home/rurban/Software/libredwg/programs/dwg2SVG.c:361

	add missing _private decls

	fixup _VECTOR_CHKCOUNT for REACTORS macros
	A minimal HANDLE (i.e. a NULL handle) need much less bits than 8

2018-12-02  DenisPryt  <denis.chausy@gmail.com>

	Add _VECTOR_CHKCOUNT to REACTORS macros.

2018-12-02  DenisPryt  <denis.chausy@gmail.com>

	Add dwg_decode_add_object_ref
	function for adding Dwg_Object_Ref.

	Revert dwg->object_ref pointer to old state if realloc is failed.
	Fix Dwg_Object_Ref leaks.

2018-12-02  Reini Urban  <rurban@cpan.org>

	fixup TABLE DWG_ERR_INVALIDTYPE error
	Table_Value sets DWG_ERR_INVALIDTYPE, check it and return
	the sum of all errors.

2018-12-02  DenisPryt  <denis.chausy@gmail.com>

	call END_REPEAT before return inside a loops

	fix 3dsolid memory leak

	switch dwg_decode_##token##_private function from EXPORT to static

	returned dwg objects non-fixed types values to its original state

	Fix memory leak objects with invalid handleref code

	Guard function in dwg_free_ ##token for all frees
	in DWG_ENTITY_END and DWG_OBJECT_END

	Guard function for free(str_dat) in decode object and entity macros

	DWG_TYPE_FREED collision

	free: several fixes
	Fix eed free on eed decode error.
	Objects with unknown handleref.code don't remove from dwg->object_ref array.
	Fix read_system_page space allocate.
	Free Bit_Chain in read_2007_section_header and other.

2018-11-30  Reini Urban  <rurban@cpan.org>

	LEADER fields
	fixup more fields:
	switch path_type with annot_type
	rename hooklineonxdir to hookline_dir
	rename unknown_bit_4 to hookline_on
	fixup DXF values

	LEADER.endptproj <= r2007
	most likely. there are still discrepancies with the DXF.
	The ODA spec is wrong for sure.
	i.e. box_width,box_height is rather a 213/223/233 3DPOINT
	DXF 340 is also missing

	doc: add dwg_get_ API
	and some more fixups

	rename internal macro GET_DWG_* to DWG_GET_
	to better reflect the external API names
	dwg_get_<OBJECT> and dwg_get_<ENTITY>.

	add GET_DWG_OBJECT for all objects in a DWG
	analog to dwg_get_ENTITY,
	but including all objects, tables, block headers, even if unowned.

2018-11-29  Reini Urban  <rurban@cpan.org>

	fix GET_DWG_ENTITY (#60)
	Either the last member of the array needs to be NULL, or we need to return
	the count.  Since we don't want to change the API, we NULL-terminate it.

	We also need to guard from an empty BLOCK_HEADER argument.

2018-11-29  Reini Urban  <rurban@cpan.org>

	AUTHORS: add Denis Pruchkovsky (Pryt)

2018-11-28  Reini Urban  <rurban@cpan.org>

	fixup VECTOR_CHKCOUNT overflow (#56)
	all values need to stay signed, just promote them to long long
	for the checks.

2018-11-28  DenisPryt  <denis.chausy@gmail.com>

	fix VECTOR_CHKCOUNT overflow (#56)
	VECTOR_CHKCOUNT cast bit size to long.  As result big numbers is multiplied
	by 8 and becomes negative

2018-11-27  Reini Urban  <rurban@cpan.org>

	dwglayers: fix DICTIONARY loop (#51)
	skip a DICTIONARY, but don't skip the loop.
	Fixes #51

	dxf: fix empty paper_space (#52)
	Fixes dxf_blocks_write #52

2018-11-27  DenisPryt  <denis.chausy@gmail.com>
	    Reini Urban  <rurban@cpan.org>

	Fix multileader bug. vertexes should be array.
	Renamed vertexes to points analog to LEADER.

	Closes PR #49

2018-11-27  Reini Urban  <rurban@cpan.org>

	fixup BITCODE_RC* vs char*
	fix -Wpointer-sign and -Wincompatible-pointer-type warnings.
	strings are still char*

	bump to 0.7, prep NEWS ChangeLog
	We had to change the API in the previous commit,
	RC is now unsigned char

	Fix LTYPE.dash, change RC to unsigned char
	avoid such negative values. Fixes #44.
	This changed the API, thus we must bump to 0.7

	fix FIELD_NUM_INSERTS
	Only allow RC 1 bytes, backup when != 1.
	Fix encode for FIELD_NUM_INSERTS, write a vector of 1 bytes.
	Fixes the example from #44 for the first wrong num_inserts
	case.

	decode FIELD_NUM_INSERTS: log -v5 values
	The ODA spec seems to be wrong, see #44

	fixup format type for size
	from the previous PR #48

2018-11-27  DenisPryt  <denis.chausy@gmail.com>

	Fix image decode: rectangle or polygon flag mistake

2018-11-26  Reini Urban  <rurban@cpan.org>

	Fix LTYPE.dash, change RC to unsigned char
	avoid such negative values. Fixes #44.
	This changed the API, thus we must bump to 0.7

	fix FIELD_NUM_INSERTS
	Only allow RC 1 bytes, backup when != 1.
	Fix encode for FIELD_NUM_INSERTS, write a vector of 1 bytes.
	Fixes the example from #44 for the first wrong num_inserts
	case.

	decode FIELD_NUM_INSERTS: log -v5 values
	The ODA spec seems to be wrong, see #44

	fixup format type for size
	from the previous PR #48

2018-11-26  Denis  <DenisPryt@users.noreply.github.com>

	Fix error with eed size (#48)

2018-11-24  Reini Urban  <rurban@cpan.org>

	Enable LGTM support (#46)
	https://lgtm.com/projects/g/LibreDWG/libredwg/

2018-11-23  Reini Urban  <rurban@cpan.org>

	examples: improve load_dwg.py
	don't fail on non-critical errors
	don't import twice

2018-11-23  Reini Urban  <rurban@cpan.org>

	Fix VECTOR_CHKCOUNT segfault
	on unassigned obj->dxfname's (esp. for <=R12). Fixes #44.

	also rename the error message: vcount is only relevant for vectors, but it
	is also used for strings.

2018-11-23  Reini Urban  <rurban@cpan.org>

	free: refactor VALUE_HANDLE
	same logic as in decode. obj is NULL inside header_variables.spec.
	but still some wrong handles are leaking.

	less calloc(0) calls
	these appear in valgrind as 0 size leaks

2018-11-23  DenisPryt  <denis.chausy@gmail.com>
	    Reini Urban  <rurban@cpan.org>

	abstract dwg_decode_eed_data, fix eed segfault #45
	move the inner eed loop into its extra function.
	end ignored last size = bit_read_BS(dat), which must be zero.
	If eed section is present and corrupted, happens seek into end,
	and return inside a while loop.  As result, we missed the last
	size = bit_read_BS(dat) in while condition.

	This also fixes most of the last remaining memory leaks,
	just a few stale handles are left.

2018-11-23  DenisPryt  <denis.chausy@gmail.com>

	Avoid reactors calloc(0)

2018-11-23  Reini Urban  <rurban@cpan.org>

	CONTRIBUTING: add link to (c) assignment form

	in_dxfb: harmonize with in_dxf

2018-11-22  Reini Urban  <rurban@cpan.org>

	unknown: more work on LOFTEDSURFACE

2018-11-20  Reini Urban  <rurban@cpan.org>

	NEWS for latest changes

	free: fix double-free with subentity handle in UNKNOWN_ENT
	such handles are already freed with object_ref[]
	Fixes #43, detected by DenisPryt

	free: fix decompress_R2004_section leak
	in case of critical errors

	check RUNNING_ON_VALGRIND
	and probe for include <valgrind/valgrind.h>
	which is helpful when testing memory leaks with bigger DWGs.
	It formerly just skipped dwg_free.
	Now call dwg_free when running under valgrind

	free: fix R_2007 data_page leaks
	free the data_page's, which can be several KB, even MB on larger DWGs

	free: eed in UNKNOWN_OBJ
	which is still stored into the Dwg_Object_Object struct.
	fixes MATERIAL eed leaks, et al.

	hash: fix Uninitialised value
	valgrind:
	Conditional jump or move depends on uninitialised value(s)
	   at 0x1E006E: hash_set (hash.c:137)
	   by 0x19A9E9: dwg_decode_add_object (decode.c:3813)
	   by 0x1A59A4: read_2004_section_handles (decode.c:2094)
	   by 0x1A59A4: decode_R2004 (decode.c:2224)
	   by 0x1A798F: dwg_decode (decode.c:223)
	   by 0x10A81C: dwg_read_file (dwg.c:186)
	   by 0x10A470: main (dwgread.c:214)
	 Uninitialised value was created by a heap allocation
	   at 0x483577F: malloc (vg_replace_malloc.c:299)
	   by 0x1DFED1: hash_new (hash.c:28)
	   by 0x1A77C7: dwg_decode (decode.c:135)
	   by 0x10A81C: dwg_read_file (dwg.c:186)
	   by 0x10A470: main (dwgread.c:214)

	fix C99 compat, rename null malloc errors
	fix some -Wdeclaration-after-statement from PR #42
	Rename the api null malloc errors to Out of memory for consistency

	free: avoid double-free of obj->tio.unknown
	when it is not a class

	fix LAYOUT memory leak >=R_13
	SINCE R_13 LAYOUT is a class, free it.
	The previous EED double-free cannot happen, as we NULL it now.
	Todo: But there are still missing EED, esp. with UNKNOWN_OBJ

2018-11-20  DenisPryt  <denis.chausy@gmail.com>

	Bit_Chain initialization in programs

2018-11-20  DenisPryt  <denis.chausy@gmail.com>

	Some trivial warning and crash fixes
	bracers in defines (out_geojson.c),
	fix parameters to fwrite,
	add Bit_Chain initialization,
	read section name according to name_length,
	free section name,
	check num_pages for zero avoiding malloc(0),
	fix possible memory leaks in dwg_api.c and reedsolomon.c
	bfr_read_string: add 2nd size argument

	minor fixups

2018-11-07  Reini Urban  <rurban@cpan.org>

	Release 0.6.2
	make regen-man

	.appveyor.yml: post-release version bump

	HACKING: add make release paragraph

	Update NEWS and ChangeLog for 0.6.2 prep

2018-11-06  Reini Urban  <rurban@cpan.org>

	fix minor warnings
	vcount: -Wsign-compare
	case DWG_TYPE_VBA_PROJECT: -Wimplicit-fallthrough

	fix several dxf segv
	with empty ctrl blocks or tables.
	Fixes [GH #39]

	Fix one more 2035 section size limit
	With the example from [GH #39]

	Merge branch 'DenisPryt-master'

2018-11-06  DenisPryt  <denis.chausy@gmail.com>

	Fix section size limit

	Fix eed decoding when end - dat->byte == 1

2018-11-06  Reini Urban  <rurban@cpan.org>

	unknown: regen

2018-11-05  Reini Urban  <rurban@cpan.org>

	Release 0.6.1
	See NEWS

	spec: fix wrong FIELD_2DD_VECTOR in dwg decode
	The 2nd .y coord was wrong. Found by @soundd1 [GH #40].

2018-08-30  luzpaz  <luzpaz@users.noreply.github.com>

	Misc. typos and whitespace fixes
	Found via `codespell -q 3`.

2018-08-13  Reini Urban  <rurban@cpan.org>

	post-release 0.6 doc updates
	This should have been done for 0.6 already...

	Release 0.6
	See NEWS

2018-08-13  Reini Urban  <rurban@cpan.org>

        Release 0.6

2018-08-12  Reini Urban  <rurban@cpan.org>

	free: not the static strings
	but all the others

	free: DECODE_UNKNOWN_BITS
	free the unknown_bits

	free: DEBUG_HERE_OBJ

	decode: clean vectors
	calloc them, not just malloc.

	dxf: more empty vector protections
	in this case ASSOCNETWORK

	dxf: fix -Wpointer-to-int-cast warning

	encode: protect empty vectors
	with DEBUGGING or UNSTABLE classes vectors
	can easily be unallocated

	encode: BITCODE_BL sizes

	configure: keep CFLAGS on --enable-debug
	e.g. -I/usr/local/include is needed for dwgps
	just remove -O2

	dxf: cast SURFACE to 3DSOLID

	dwggrep: add new objects

2018-08-11  Reini Urban  <rurban@cpan.org>

	beautify valgrind version

	fix -Wstringop-truncation in strncpy
	strncpy specified bound 255 equals destination size

	fix -Wdouble-promotion, use our bit_isnan
	don't use the math.h long double promoting isnan check,
	at least on clang.

	add separate signed BLd type #36
	We just changed BL to signed. revert that and add a separate BLd to represent the two such dxf ranges.
	BL as signed is a problem for vcount/rcount overflow detection with negative values.
	Closes GH #36

	unknown: add DEBUGGING ACSH_SWEEP_CLASS ACDBNAVISWORKSMODELDEF
	ACSH_SWEEP_CLASS is probably the dbSweepOptions.h class
	no coverage for ACDBNAVISWORKSMODELDEF (BIM_DICT entries)

	add examples/bits: all possible values/types
	not just the most likely as with bd

	bd: print most possible types and values

	rm duplicate logs.sh and log.sh
	we already have log and logs-all.sh

2018-08-10  Reini Urban  <rurban@cpan.org>

	add examples/bd
	to print the BD value of bits

	move HELIX to UNSTABLE
	found all the missing fields. It's a spline.
	bd-unknown.inc helped a lot.

	unknown: add some bd-unknown doubles
	they do work

2018-08-10  Reini Urban  <rurban@cpan.org>

	add examples/bd-unknown.inc
	to fixup wrong binary repr. of doubles,
	if found by some manual heuristic

	this is the initial empty set of all wrong BDs (with removed
	duplicates)

2018-08-10  Reini Urban  <rurban@cpan.org>

	dwggrep: skip 3DSOLID encr_sat_data
	This makes not much sense, rather search the decrypted variant.
	It also read from uninitialized memory

	make regen-swig-patch

2018-08-09  Reini Urban  <rurban@cpan.org>

	unknown: integrate 3DSOLID into SURFACE
	search for "ACIS BinaryFile" revealed an ordinary ACIS v2 SAB format
	right at the beginning of each SURFACE.
	Ensure a common binary layout for both, as we cast the SURFACE into 3DSOLID
	for decoding.

	Update 0.6 NEWS

2018-08-08  Reini Urban  <rurban@cpan.org>

	unknown: LDADD and LTEXEC fixes for shared
	link to bits and common explicitly. most functions there are not exported.

	fix LTEXEC: use unexpanded \$top_builddir. This is needed for a Makefile and a script.

2018-08-08  Reini Urban  <rurban@cpan.org>

	unknown: LIGHT looks good now
	fix plot_glyph, color,
	no hole left.

	unknown: regen-unknown

	alive.test: skip libtool on --disable-shared

	skip Unstable|Unhandled Class warning
	on print or free action. Only relevant for
	decode or encode really

	support non-decode for common_entity_data.spec
	enable encode and DXF support.
	simplify CMC color fields: rgb and alpha masks

	unknown: re-sort per file
	keep the objects from one file together

	fix parallel picat
	skip libtool --mode=execute on --disable-shared
	fix the dirname of examples/unknown with libtool.
	fix parallel picat

2018-08-07  Reini Urban  <rurban@cpan.org>

	skip incompatible moreutils parallel
	this does not support the {} and ::: syntax,
	rather uses -- for arg separation, and I still have to find out
	the {} and {/.}_{//} macros.

	we want the GNU parallel (in perl)

2018-08-07  Reini Urban  <rurban@cpan.org>

	add log script
	usage: ./log -v5 2004/Leader example_2000

	use parallel and timeout as probed
	use logs-all-serial.sh or logs-all-parallel.sh

	probe for PROGS versions
	not just to the log, display it.
	picat, timeout, parallel, valgrind.
	add timeout, parallel probes.

	more EMC tryouts WIP

	unknown: fix cquote final 0
	cquote forgot to close dest, leaving garbage in some strings.
	e.g. \"%sn\">%..." in ACDBSECTIONVIEWSTYLE.pi

2018-08-07  Reini Urban  <rurban@cpan.org>

	add new EMC color type
	for new truecolor support in entities.

	Also, regen-unknown fixed several wrong xdicobjhandle handles in
	ACDBDETAILVIEWSTYLE objects.

2018-08-07  Reini Urban  <rurban@cpan.org>

	unknown: work on VISUALSTYLE colors WIP
	actually the color.index is always 0 >= r2004.
	the dxf value needs to be derived from the first rbg byte somehow.

2018-08-06  Reini Urban  <rurban@cpan.org>

	trace CMC.flag always
	>=2004 a CMC always contains the index, rgb and flag. print that to detect wrong
	CMC colors, i.e. flags != 0,1 or 2.

	mingw: test too many args

	picat: expect also Most probable result
	which is at the end of definite and probable results.
	we don't want it to be killed before printing any result

	unknown: fix membits overflow
	found when overflowing possible and found bits.
	off-by-one bitsize: when setting 2 bits at 215 with 216 bits avail,
	it needs to set 215 and 216. so we really need to check against 217 (215+2).

	unknown: fix pi_fn stack overflow
	with path + ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION
	it easily exceeds 80

	unknown: fix the possible/found logic
	set the bits from pos to the end of bitsize

	unknown: fix num_filled stats
	fixing the wrong summary count e.g. 292/281=103.9% for PDFDEFINITION

2018-08-05  Reini Urban  <rurban@cpan.org>

	unknown: re-add missing objects
	we forgot to add DECODE_UNKNOWN_BITS for TABLE* objects.
	just MULTILEADER is now done.

	unknown: harmonize object/entity format
	and bitsize

	unknown: fix HAVE_INSRCDIR check
	for make -C examples regen-unknown.
	builddir is empty, ac_builddir ditto. srcdir=. is enough

	unknown: check picat for Definite result
	otherwise keep the old log. prevents bad logs from overwriting
	old logs

	windows -Wformat: fix type
	REPEAT_CHKCOUNT_LVAL(name,_obj->times,type)
	warning: format '%ld' expects argument of type 'long int', but argument 5
	has type 'long long unsigned int' [-Wformat=]

	unknown: next refactor
	delete pre_bits, this was wrong. It starts uneven already.
	rather store the useful relative handle and string offsets/sizes.

	add ASSOCPLANESURFACEACTIONBODY to UNSTABLE
	similar to ASSOCDEPENDENCY

2018-08-04  Reini Urban  <rurban@cpan.org>

	add 2nd FIELD_CMC dxf2 arg for rgb value
	matching pairs 62-420, ...

	decode: improve color tracing

	work on VISUALSTYLE WIP
	add and set about 50% of the missing fields

	unknown: re-order in-work area in the spec
	separate UNSTABLE from DEBUGGING

2018-08-04  Reini Urban  <rurban@cpan.org>

	unknown: refactor 2/2 and regen-unknown
	now got rid of all the slack, and we can regen-unknown even with DEBUG_CLASSES.
	summary went from 142504/2939403=4.85% to 502764/2623166=19.17%

	regen added VISUALSTYLE and many other UNSTABLE classes

2018-08-04  Reini Urban  <rurban@cpan.org>

	move VISUALSTYLE back to UNSTABLE
	~480 bits missing

	refactor UNKNOWN_FIELDS/DECODE_UNKNOWN_BITS
	dwg_decode_unknown() helper, used not only for UNKNOWN_OBJ/UNKNOWN_ENT
	but for all unstable classes.
	change to one single bits array with pre bits (if it starts not at bit 0),
	and num_bits (the bitsize in bits).

	free: fix UNKNOWN with empty dxfname
	on free checking an empty dxfname leads to SEGV.
	eg:
	{size = 91, address = 416360, type = 515, index = 240, fixedtype = DWG_TYPE_UNUSED,
	  bitsize_address = 0, has_strings = 0 000, stringstream_size = 0, handlestream_size = 0,
	  supertype = DWG_SUPERTYPE_UNKNOWN, tio = {entity = 0x0, object = 0x0, unknown = 0x0},
	  dxfname = 0x0, bitsize = 0, hdlpos = 0, handle = {code = 0, size = 0, value = 0},
	  parent = 0x7fff5fbfe0c0, common_size = 0}
	bypass dwg_free_variable_type for UNKNOWNs.

2018-08-04  Reini Urban  <rurban@cpan.org>

	add signed BLs type (420,440), fix DBCOLOR
	add a special int32_t BLs type just write the codes 420,440,
	i.e. the DBCOLOR rgb value.
	rename FIELD_BLh to FIELD_BLx and add more hex types.

	promote DBCOLOR to UNSTABLE. The remaining unknown bits are bogus,
	there's no CMC color field, no duplicate catalog $ name fields.
	Just the BLx rgb field needs to mask off the first byte for DXF,
	and there's a unknown RC. The DXF color index 21 is missing, this
	might be computed.

2018-08-03  Reini Urban  <rurban@cpan.org>

	unknown: more DBCOLOR work

	unknown DBCOLOR: split 430 name and catalog
	in DXF combined, in the DWG split up

	move DYNAMICBLOCKPURGEPREVENTER to UNSTABLE
	the last remaining handles were bogus, they do not exist
	The fiest code 70 BS looks like a class_version, but this really
	would be code 90. Who knows.

	improve UNKNOWN_{ENT,OBJ} logging to -v3
	no -v5 needed anymore.
	regen-unknown with some changed handles.

	fix bit_write_RL/bit_write_BL
	if <0 > 255 makes not much sense.
	handle large negative values, detected by unknown BL node_edge1 -1 values.

	move LIGHT to UNSTABLE
	just a few unknown internal fields are remaining,
	but the known DXF fields are done.

	unknown: regen with new byte sizes
	and without LIGHT (see next commit).
	less overshoots into the next object

	Fix -v5 overshoot errors
	store the size of the common entity/object data, until the
	object specific fields start. for a proper UNKNOWN_*.num_bytes size.
	Note that bitsize does not include the size of the common handles, so we start
	counting at obj->address, but obj->common_size starts counting after the type,
	so we still overshoot by ~18

	unknown: more work on LIGHT WIP

	fix rad2deg computation
	only needed for dxf and unknown

	unknown: skip common_entity_data
	for alldwg_1.inc. no such layer/color fields, which are
	handled in common_entity_data.spec and are not dumped
	into UNKNOWN_OBJ bytes at all, hindering the search

2018-08-02  Reini Urban  <rurban@cpan.org>

	unknown: finish UNDERLAY
	found remaining fields via picat/unknown,
	some RC/BS confusion.
	simplify clip_boundary and harmonize to clip_verts.

	move to UNSTABLE, passes all PDF coverages.
	but no DGN nor DWF coverage yet.

2018-08-02  Reini Urban  <rurban@cpan.org>

	regen-unknown

	unknown: skip common_entity_data
	there was one case of layer "0" found as TF, which was illegal

	unknown: regen for new Underlay_2004

	rename normal/210 to extrusion
	for consistency

	unknown: work on PDFUNDERLAY
	WIP

	unknown: fix dupl. go1 target

2018-08-01  Reini Urban  <rurban@cpan.org>

	dwgread: declare setenv
	via stdlib.h

2018-08-01  Reini Urban  <rurban@cpan.org>

	Fix dejagnu.h linkage
	probe for -fgnu89-inline and use it.
	See https://gcc.gnu.org/bugzilla//show_bug.cgi?id=63613
	Fixes [GH #2]

	Add dejagnu to cygwin and ubuntu/travis. msys2 dejagnu is not picked up,
	macos not tested on travis.

2018-08-01  Reini Urban  <rurban@cpan.org>

	more bit_write_RL_tests fixes
	this time I got all the swapping right.
	enhance the RL testcase using 4 different bytes

	dxf: implement dxf_classes_read()

	VALGRIND_SUPPRESSIONS: fix make dist
	EXTRA_DIST needs a relative pathname,
	Cannot stat ".//Users/rurban/Software/libredwg/valgrind-darwin.supp",
	note the ./ prefix

	testcases: oops bits_test read_RL
	another off-by-one

	dxf: more null-ptr protections

	check programs: use libtool
	with --enable-shared

2018-08-01  Reini Urban  <rurban@cpan.org>

	add VALGRIND_SUPPRESSIONS, check-valgrind programs
	integrate check-valgrind into alive.test,
	add more valgrind flags to check-dwg-valgrind.

	suppressions:
	on linux-glibc bash leaks like hell:
	  GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-gnu)
	on darwin the libc locale subsystem and objc.

	on the bright side: Most LibreDWG leaks are fixed.

2018-07-31  Reini Urban  <rurban@cpan.org>

	move MULTILEADER to UNSTABLE

	finish MULITLEADER >= 2010
	though there are 92 bits missing before the handle stream

	regen-swig-patch

	change BITCODE_BL/RL to signed int32
	harmonize all vcount/i counters and sizes to BITCODE_BL.

	finished MULTILEADER <2010

	more MULTILEADER work WIP
	share ctx.content.txt and ctx.content.blk: either or.
	2000 works now until end CONTEXT_DATA

	more MULTILEADER work WIP
	multiple breaks.
	start with 2010+ AcDbObjectContextData at the beginning

	more MULTILEADER work WIP
	actually coming closer back to the ODA specs.
	add back num_vertex, num_break

	more MULTILEADER work WIP
	disable to fantasy ODA structs and code.
	favor the DXF docs, structure and reverse-engineered data.

	work on MULTILEADER WIP
	class_version 1 has at first the LEADER_LINE{ points.

	fix entity picture_size BLL type
	lshift one too many. size used as DXF code 160.
	This fixes now 2010+ MULTILEADER entities, which did have a small picture attached.

	regen unknown
	added MLeader*.dwg for MULTILEADER, BoxUnion.dwg for REGION ACIS v2.
	removed UNSTABLE DIMASSOC, ASSOCDEPENDENCY, PERSSUBENTMANAGER.

2018-07-30  Reini Urban  <rurban@cpan.org>

	Improve LOG_TF trace
	Align the 2nd ASCII line to the left of the upper %2x hex line

	Improve {VECTOR,REPEAT}_CHKCOUNT macros
	detect buffer overflows, if AVAIL_BITS() < 0.
	Change AVAIL_BITS to signed long.
	This happens if the previous read (e.g. TF) read past the buffer

	parse the ACIS version 2 format
	It is just the unencrypted binary SAB version.
	Maybe I will decode it to the ASCII variant later, but it is trivial,
	and the binary version has higher precision.

	add handle stream/padding OVERSHOOT warnings
	log OVERSHOOT instead of MISSING when we read too far

	add handle stream/padding overshoots MISSING
	padding between the streams should be max 8.
	display the offset, and add MISSING if >8

	separate WINEPREFIX for wine 32bit
	keep the default 64bit tree at ~/.wine, and create/use
	a new 32bit one.
	This test finds many useful errors.

	in_dxf: fix -Wnull-dereference warning

2018-07-29  Reini Urban  <rurban@cpan.org>

	fix --enable-debug
	overriding AM_CFLAGS is ignored, DEFS also.
	use CFLAGS.
	Just override -g -O2 on gcc --enable-debug, ignore -std=c99 also then.

	rename UNTESTED_CLASS to UNSTABLE_CLASS
	it really is tested, just unstable

	update NEWS - user-visible changes for 0.6
	working on 0.6

	decode: fix wrong has_strings offset
	fixes many skipped r2007+ strings, because of a wrong has_strings
	bit.
	Fixes [GH #34]

2018-07-29  Reini Urban  <rurban@cpan.org>

	decode: check obj_has_strings(type)
	and skip the obj_string_stream() has_strings bit check
	for certain fixed types which do have no strings.
	e.g. LINE and SEQEND entities had the has_strings bit wrongly set,
	they just need to be ignored.

	See [GH #34]. libdxfrw sets their string stream to NULL.

2018-07-28  Reini Urban  <rurban@cpan.org>

	remove unused duplicate reactors/xdicobjhandle
	They are already common object/entity fields.
	Remove them from the specific structs.

	Also remove the wrong dwg_obj_proxy_get_reactors() API,
	use dwg_obj_get_reactors() instead.

2018-07-28  Reini Urban  <rurban@cpan.org>

	MINSERT: harmonize with INSERT
	use SUBCLASS,
	better DXF layout, no attrib_handles without has_attribs

	unknown: more work on LIGHT
	got until attenuation_end_limit

2018-07-28  Reini Urban  <rurban@cpan.org>

	unknown: cquote C strings again
	log_unknown_dxf.pl already quotes " and \,
	but since unknown emits picat code, we need to do it again.

	failed only in ACDB*VIEWSTYLE template strings and MULTILEADER.

2018-07-28  Reini Urban  <rurban@cpan.org>

	smoke.sh: new features
	--enable-write is now default,
	cover the other new features: --disable-write, --disable-dxf, --enable-debug

	semver: separate patch from build number
	the appveyor build number goes into the generated github tag
	which serves as our git generated version number.

2018-07-28  Reini Urban  <rurban@cpan.org>

	fix DIMASSOC
	it has 1-4 reference points, dependent
	on the associativity bitmask. alloc all 4, and
	set only the ones which bit is set.

	Associativity flag [90]:
	1 = First point reference
	2 = Second point reference
	4 = Third point reference
	8 = Fourth point reference

2018-07-27  Reini Urban  <rurban@cpan.org>

	configure: add --enable-debug
	to set DEBUG_CLASSES.
	remove -O2 on gcc.

	api: sort dwg.h add api
	fixes perl bindings compilation errors.
	also add a convencience regen-swig-patch target for python.

	HACKING: improve examples/unknown
	See also https://savannah.gnu.org/forum/forum.php?forum_id=9203

	testcases: fix decode_test_LDADD
	need to link more src objects, similar to bits_test and hash_test

	testcases: fix hash_test_LDADD
	need to link to bits and hash explicitly.
	needed with higher optimizations, when some smaller functions are dropped
	and inlined, esp. with clang >= 5.

	SURFACE: rename num_*data fields
	the size of the encrypted data.

	api: add missing dwg_object_to_TYPE converters
	Dwg_Object -> Dwg_Object_TYPE
	previously only for entities, now also for all objects.

	testcases: fix bits_test
	because of the bit_write_TV changes, adding the \0 to the length.

	alive.test: fix for --disable-dxf

	testcases: fix minor warnings

	promote DIMASSOC to UNTESTED

2018-07-26  Reini Urban  <rurban@cpan.org>

	add DEBUGGING DIMASSOC
	pretty good, just the last intsect_gsmarker: [BS 92]
	and the handles do look wrong in some cases.

	unknown: fix out-of-bounds write
	detected by valgrind

	unknown: no const struct _unknown_field unknown_dxf
	we write to some fields. crashes on some ELF, with this in .rodata

	.gitgnore: add minor files

	unknown: find TV len+1
	A TV testvalue usually includes the final \0.
	Fix that in bit_write_T{VU} and unknown.
	We find now proper TV instead of TF values, e.g. MATERIAL.name

	protect ASSOCACTION VALUEOUTOFBOUNDS
	with DEBUG_CLASSES

	likewise update the docs
	UNTESTED, DEBUGGING, UNHANDLED, ...

	promote ASSOCDEPENDENCY to UNTESTED
	no errors in the covered examples

	unknown: on picat timeout try again with -g go1
	currently for ACAD_TABLE.pi

	add DEBUGGING ASSOCDEPENDENCY
	looks pretty stable to me, needs a bit more testing

	rename SURFACE to PLANESURFACE, regen.
	add to API,
	add coverage (2004/Surface.dwg, 2018/Surface.dwg),
	add UNHANDLED ASSOCPLANESURFACEACTIONBODY,
	regen unknown.

	unknown: skip duplicates
	the same class and unknown bytes.
	This removed 996 entries.

	unknown: add 2000/Helix.dxf

2018-07-25  Reini Urban  <rurban@cpan.org>

	autogen.sh: clean cached VERSION

	swig_python.patch: redo
	fixing Hunk #6 succeeded at 205945 (offset 13869 lines)
	add -b to patch call for easier redoing the difforig.

	r12: fix decode_entity_preR13
	call decode_entity_preR13 from dwg_add_TYPE, the promised preR13 init
	refactoring.

	r12: set more ent fields
	dwg_decode_TYPE calls dwg_add_TYPE, but decode_entity_preR13 needs
	it before and dwg_add_TYPE clears it. Need to refactor preR13 init

	eed: protect from empty appid->apps
	the handle can be empty now. repro: 2013/ground_plane_outline.dwg

2018-07-24  Reini Urban  <rurban@cpan.org>

	decode: don't set bitsize_address
	this is needed by encode DWG_ENTITY_END to write
	the bitsize.
	I hijacked it for decode DEBUGGING, but this broke
	dwgrewrite for example_r14.dwg

	dwglayers: ignore DICTIONARY
	as layer_control member. This has no entry_name

	free: fix NULL handles
	don't allocate illegal null handles at all,
	to be able to decide between global object_ref handles,
	and individual header var handles, and empty refs

2018-07-24  Reini Urban  <rurban@cpan.org>

	free: COMMON UNKNOWN_ENT
	also COMMON_ENTITY_DATA and COMMON_ENTITY_HANDLE_DATA,
	esp. pictures.

	e.g. frees now
	7,308 bytes in 4 blocks are definitely lost in loss record 144 of 144
	   at 0x10016B681: malloc (vg_replace_malloc.c:302)
	   by 0x1000056BD: bit_read_TF (bits.c:1190)
	   by 0x10002DFF4: dwg_decode_entity (common_entity_data.spec:24)
	   by 0x1000C45DC: dwg_decode_UNKNOWN_ENT (dwg.spec:5423)
	   by 0x1000CF3F4: dwg_decode_add_object (decode.c:3644)
	   by 0x100025E12: decode_R13_R2000 (decode.c:1062)
	   by 0x100006A4C: dwg_decode (decode.c:210)
	   by 0x100001A2F: dwg_read_file (dwg.c:186)
	   by 0x10000118E: main (dwgread.c:213)

2018-07-24  Reini Urban  <rurban@cpan.org>

	free: NULL handles
	They were still alloced, but not globally freed, esp. in XRECORD.

	Fixes 8,384 bytes in 262 blocks are definitely lost in loss record 266 of 266
	   at 0x100165D7F: calloc (vg_replace_malloc.c:714)
	   by 0x10002F1BC: dwg_decode_handleref_with_code (decode.c:2747)
	   by 0x1000BEDEC: dwg_decode_XRECORD (dwg.spec:4981)
	   by 0x1000CED60: dwg_decode_add_object (decode.c:3576)
	   by 0x100025ADE: decode_R13_R2000 (decode.c:1062)
	   by 0x100006718: dwg_decode (decode.c:210)
	   by 0x1000016FB: dwg_read_file (dwg.c:186)
	   by 0x100000E5A: main (dwgread.c:213)

2018-07-24  Reini Urban  <rurban@cpan.org>

	add UNDERLAYDEFINITION, DEBUGGING UNDERLAY
	UNDERLAYDEFINITION seems to be ok, UNDERLAY still a hole before flag 280
	and no Boundary coverage yet.

2018-07-23  Reini Urban  <rurban@cpan.org>

	add DEBUGGING *SURFACE entities

	HATCH: is now stable
	Closes [GH #27]

	free: improve eed double-free
	Fixes [GH #33], detected by jinyu00

2018-07-22  Reini Urban  <rurban@cpan.org>

	unknown: log_unknown_dxf
	use different comment style for easier unknown.sh
	helper script to detect all classes.

	unknown: write fieldnames into pi

	add DEBUGGING ASSOCALIGNEDDIMACTIONBODY
	some logic is still missing when to skip some fields

	add DEBUGGING DYNAMICBLOCKPURGEPREVENTER
	fields ok, just after the last handle is an unknown 47bit hole

2018-07-22  Reini Urban  <rurban@cpan.org>

	add --disable-dxf
	Disable DXF and other in/out modules,
	and most helper programs, only dwgread.

	Only useful for faster test/debug cycles.

2018-07-22  Reini Urban  <rurban@cpan.org>

	unknown: more DBCOLOR
	got now the name and color catalog (guide) after a hole of 24bits.
	but there are still 2 big holes.

	add PERSSUBENTMANAGER to UNTESTED
	very low coverage and no known fieldnames.
	but the dxf groups do look stable

2018-07-21  Reini Urban  <rurban@cpan.org>

	unknown: finished fieldnames

	unknown: ignore alldwg.skip
	this is stderr from unknown.
	all classes have now enough information

	disable regen-unknown with !HAVE_INSRCDIR
	Need a configure in srcdir.
	Fixes distcheck errors, and enables proper deps

	unknown: add fieldnames
	and fix some found dxfgroup errors and missing fields

2018-07-21  Reini Urban  <rurban@cpan.org>

	unknown: various improvements
	use the handle code, not just value.
	print the found/notfound fields better.
	print more picat statistics: Found, NotFound ratio, Missing bits.
	add Class,Dxf,Version to the picat data for better constraints checks.

	improve SUN spec

2018-07-20  Reini Urban  <rurban@cpan.org>

	protect dwg_obj_block_control_get_block_headers
	from empty ctrl->block_headers. Fixes [GH #32]

	add DEBUGGING ASSOC2DCONSTRAINTGROUP
	partially, up to AcConstrainedImplicitPoint.
	no names found yet

2018-07-20  Reini Urban  <rurban@cpan.org>

	add picat step to make unknown
	Only done when picat was found in the path by configure.
	Get picat binary or source packages from picat-lang.org

	To skip or override timeout use make unknown TIMEOUT_30=
	timeout is from coreutils.
	https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html

	add a basic description to HACKING

2018-07-20  Reini Urban  <rurban@cpan.org>

	regen-unknown
	catch all the new classes.
	unknown summary: 478284/2967120=16.12%

	add more unhandled classes
	to the header and classes.inc

2018-07-19  Reini Urban  <rurban@cpan.org>

	unknown: more EVALUATION_GRAPH fixes
	but still some unclear options

	gitignore: ignore generated picat files
	.qi is a compiled .pi

	add DEBUGGING ASSOCPERSSUBENTMANAGER
	picat laid out the fields wonderfully, just the names
	are now missing

	configure: probe for picat
	and add more PROG versions to config.log

	unknown: sort alldwg.inc
	new summary: 108570/1028945=10.55%
	much less skips

2018-07-19  Reini Urban  <rurban@cpan.org>

	unknown: better BIT bugfix
	finally we are finding the strings we should be finding all along.
	we still need to sort alldwg.inc by class.

	cannot tell the new summary yet, as it is crashing with overwriting some
	malloc's, but overall it looks significantly better, between 30-40% for many:

	unknown-ACAD_EVALUATION_GRAPH.log:summary: 216/1206=17.91%
	unknown-ACAD_TABLE.log:summary: 272708/1157653=23.56%
	unknown-ACDBASSOC2DCONSTRAINTGROUP.log:summary: 5084/46715=10.88%
	unknown-ACDBASSOCACTION-work.log:summary: 0/193=0.00%
	unknown-ACDBASSOCACTION.log:summary: 400/717=55.79%
	unknown-ACDBASSOCALIGNEDDIMACTIONBODY.log:summary: 282/571=49.39%
	unknown-ACDBASSOCDEPENDENCY.log:summary: 256/571=44.83%
	unknown-ACDBASSOCGEOMDEPENDENCY.log:summary: 4648/11862=39.18%
	unknown-ACDBASSOCNETWORK.log:summary: 1824/3274=55.71%
	unknown-ACDBASSOCOSNAPPOINTREFACTIONPARAM.log:summary: 508/1043=48.71%
	unknown-ACDBASSOCPERSSUBENTMANAGER.log:summary: 732/3457=21.17%
	unknown-ACDBASSOCVERTEXACTIONPARAM.log:summary: 612/1307=46.82%
	unknown-ACDBDETAILVIEWSTYLE.log:summary: 13994/138466=10.11%
	unknown-ACDBPERSSUBENTMANAGER.log:summary: 40/743=5.38%
	unknown-ACDBSECTIONVIEWSTYLE.log:summary: 28194/230930=12.21%
	unknown-ACDB_LEADEROBJECTCONTEXTDATA_CLASS.log:summary: 1624/3443=47.17%
	unknown-ACSH_HISTORY_CLASS.log:summary: 216/368=58.70%
	unknown-ACSH_SWEEP_CLASS.log:summary: 1160/10634=10.91%
	unknown-ARC_DIMENSION.log:summary: 31376/104047=30.16%
	unknown-CSACDOCUMENTOPTIONS.log:summary: 0/6160=0.00%
	unknown-DBCOLOR.log:summary: 400/39784=1.01%
	unknown-DIMASSOC.log:summary: 6036/42548=14.19%
	unknown-HELIX.log:summary: 33820/89830=37.65%
	unknown-LAYOUTPRINTCONFIG.log:summary: 0/1930=0.00%
	unknown-LIGHT.log:summary: 1642/9020=18.20%
	unknown-MATERIAL.log:summary: 21090/276592=7.62%
	unknown-MULTILEADER.log:summary: 20682/90631=22.82%
	unknown-SUN.log:summary: 630/2804=22.47%
	unknown-TABLECONTENT.log:summary: 11160/226312=4.93%
	unknown-TABLEGEOMETRY.log:summary: 0/0=nan%
	unknown-TABLESTYLE.log:summary: 14416/427123=3.38%

2018-07-19  Reini Urban  <rurban@cpan.org>

	unknown.pi: add hole detection
	for the next solver step, to add the leftover fields rests to the holes.
	and to fill in likely dwg-only fields, not in the dxf.

	unknown: shorted HANDLE to H structname

	unknown: whitespace only
	indent class - dxf loop

2018-07-19  Reini Urban  <rurban@cpan.org>

	unknown: create picat data files
	process unknowns per class, not per file anymore.
	change bit_errprint_bits to bit_fprint_bits, without \n.

	TODO: pre-sort alldwg.inc per class.

2018-07-19  Reini Urban  <rurban@cpan.org>

	unknown: picat module and EVALUATION_GRAPH data
	for the picat solver helper to layout unknown fields.
	there's no backtracking with constraints, there's not enough data yet.

2018-07-17  Reini Urban  <rurban@cpan.org>

	bits: add bit_errprint_bits
	print bits to stderr, not stdout

	fix EVALUATION_GRAPH Object bugs
	the fixed unknown revealed some type errors

2018-07-16  Reini Urban  <rurban@cpan.org>

	unknown: fix BIT bug
	10 is the proper representation of BL/BS 0, not 00.
	(gdb) p/t 0x80 => 10000000

	summary: 200166/2972461=6.73%

2018-07-15  Reini Urban  <rurban@cpan.org>

	add DEBUGGING ASSOCOSNAPPOINTREFACTIONPARAM Object
	half-way through

2018-07-15  Reini Urban  <rurban@cpan.org>

	unknown: fix overlap check
	skip the last bit+1.
	and mark as found if num_found == num_dxf, even for >5

	213008/2972461=7.17%

2018-07-15  Reini Urban  <rurban@cpan.org>

	unknown: reformat output
	put bits into col 0
	print each dxf fields at col 0
	put search into one line
	add num of same DXF fields to result
	add + or ? to found

	172488/2972461=5.80%

2018-07-15  Reini Urban  <rurban@cpan.org>

	unknown: skip duplicate handle codes
	and skip searching for EED dxf codes, they are not stored
	in the unknown bytes, and are not stored dupl. as DWG fields

2018-07-15  Reini Urban  <rurban@cpan.org>

	refactor DEBUG_HERE
	needed to print the object offset,
	add DEBUG_HERE_OBJ, DEBUG_POS_OBJ

	note that UNKNOWN_* excludes the EED and common_entity_data

	flip two SUN fields

2018-07-15  Reini Urban  <rurban@cpan.org>

	more DEBUGGING SUN work

	stability: protect print loops
	we bail out earlier now in REPEAT and VECTOR
	leaving the field unallocated. Protect against that in print at least.

	add DEBUGGING EVALUATION_GRAPH Object

	in_dxf: no inline dxf_free_pair
	-Winline warned: call is unlikely and code size would grow

2018-07-14  Reini Urban  <rurban@cpan.org>

	unknown: compile-time multiple matching fields
	pre-calculate the number of potential same DXF fields values,
	same basic type and same string value.
	No need to calc num_dxf() at run-time

	back to the previous 172968/2972461=5.82%

2018-07-14  Reini Urban  <rurban@cpan.org>

	unknown: handle multiple matching fields
	when the same DXF value could lead to the same binary representation.
	e.g. DBCOLOR has 2 equiv. DXF fields 330:handle, or mult. 90:"21" fields.
	mark them as found also.

	check raw numeric types also, if the bitencoded one failed.

	advanced to 172692/2440879=7.07%
	and found several unique hits in previously skipped classes

2018-07-14  Reini Urban  <rurban@cpan.org>

	unknown: fixup DBCOLOR status
	it is DEBUGGING

	add .c.ii rule
	for preprocessed files without line markers. useful for debugging macros.

	stability: more isnan checks

	logs: add GNU parallel usage
	This is of course massively parallel and faster.
	See https://savannah.gnu.org/forum/forum.php?forum_id=9197

2018-07-13  Reini Urban  <rurban@cpan.org>

	unknown: skip empty objects
	unknown prints all empty objects with 0.0% found to alldwg.skip
	which will be subsequently skipped

	unknown: skip some duplicates and 0%
	egrep '0.0%|test/test-data/' unknown-0.5.1027-12-g28982958.log | grep -B1 0.0%

	unknown: regen with DBCOLOR
	fix regen-unknown to include more unknowns, esp. DBCOLOR

	stability: improve REPEAT_CHKCOUNT
	but via sizeof, not minimal bits_size.
	abort HATCH with gradient fill on print

	WIP dbcolor handle
	See [GH #31]

	Untested OBJECT DBCOLOR
	referenced by color handle of some entities WIP
	See 2004/CascoUrbano GH #27

	fix SORTENTSTABLE

2018-07-13  Reini Urban  <rurban@cpan.org>

	stability: improve VECTOR_CHKCOUNT
	add global dwg_bits_size: minimal sizes of all types
	and check each VECTOR or REPEAT before the malloc against overflow.

	move dwg_bits_name from unknown to common.{c,h}

2018-07-13  Reini Urban  <rurban@cpan.org>

	free: protect empty FIELD_VECTOR_N

	check-syntax: add nice -O0
	unknown flycheck lasts too long

	ASSOCNETWORK: demote back to DEBUGGING
	inline the actions, WIP. But coming very close.

	unknown: log pos range
	from-last bits

	handle relative codes 6-c
	relative offset handles do have an ref, even with size 0.
	esp. code 6 (next) and 8 (prev).

	autogen.sh: generate .tarball-version
	this is done by dist-hook, but we are doing some extra work to be clearer

2018-07-12  Reini Urban  <rurban@cpan.org>

	examples: wrong EXTRA_DIST
	we don't need to distribute the unknown sources

	unknown: promote ASSOCNETWORK to UNTESTED
	the action handles are missing, but it looks rather good and stable

	unknown: fix relative c handle
	-3 offset is stored as c.1.3

	unknown: support relative reactors
	from 150616 to 150760

2018-07-12  Reini Urban  <rurban@cpan.org>

	unknown: fix relative handle offsets
	6.0.0 is +1, 8.0.0 is -1
	a.0.1 is +1, ...

	from 150560 to 150616/2490950=6.05%

2018-07-12  Reini Urban  <rurban@cpan.org>

	unknown: more ASSOCACTION work
	compilation fixes with -DDEBUG_CLASSES

	dwg2dxf: free only with mult. infiles

	unknown: fix imprecise RD search
	we added a RD step after BD, changing the type to RD.
	improved from 147660/2490950=5.93% to 150560/2490950=6.04%

	unknown: add --class filter, unknown.sh
	filter by classes.
	add the dxf to the header.
	fix the TU is16 flag for r2010+
	free the temp. chains (to reuse the buffers),
	  our data-structures got bigger over time.

2018-07-12  Reini Urban  <rurban@cpan.org>

	unknown: regen and fix some warnings
	generated a lot of matching DXF's to find more fields.

	new summary: 147594/2490950=5.93%
	prev. 4810/407639=1.18%, 8384/548025=1.53%

2018-07-12  Reini Urban  <rurban@cpan.org>

	unknown: fix restarts, esp. r2010+
	the offset calculation was wrong, leading to wrong
	unknown bytes being logged and analyzed for r2010+

2018-07-11  Reini Urban  <rurban@cpan.org>

	fix git-version-gen for tag releases
	on a tag commit `git describe HEAD` cannot find a description,
	use --tags to avoid an UNKNOWN version, and use the tag.

	dxf: add HEADER_TU LASTSAVEDBY
	and fix a couple of compiler warnings of unused functions

	configure: print generated git version

	perl: fix bash syntax error
	syntax error near unexpected token `;'

	dwg2dxf: fix -Wuninitialized
	though practically not happening

	configure: honor system CFLAGS
	and AC_SUBST(WARN_CFLAGS) is already done by AX_COMPILER_FLAGS

2018-07-11  Reini Urban  <rurban@cpan.org>

	re-enable WARN_CFLAGS
	was disabled when AM_CFLAGS was set in *.am and configure.ac

	fix various minor warnings: -Wshadow, -Wsign-compare, missing-decls
	undefine DEBUGGING_CLASS'es in the spec (-Wunused-function)

2018-07-11  Reini Urban  <rurban@cpan.org>

	win32 static: check ENABLE_SHARED
	some libtool cannot build shared, but __declspec(dllimport)
	is still set there, leading to linker errors.
	the same happens on windows with --disable-shared.

	python: stabilize
	help with empty PYTHON.
	don't make check without python in xmlsuite

	perl: skip make with windows Makefile
	with incompatible command.com/cmd.exe shell
	grep for NOOP = rem and skip then.
	This bug started with the msys update to perl-5.28
	Before the Makefile was properly created from bash for bash.

	perl: fix OBJEXT

	perl: prefer local dwg.h over old installed
	see GH #29.
	Also disable the unused cmdline overrides

	unknown: add CMC support for DXF 63
	only for indexed color values <r2004.
	since r2004 the color struct adds to it, but should be found nevertheless.

	unknown: add SUNSTUDY object fields
	yet unsorted and uncovered
	The SUN object is wrongly documented in the Acad DXF docs as entity.

2018-07-11  Reini Urban  <rurban@cpan.org>

	unknown: regen alldwg.inc
	add more dxf counter-parts, fixed dxf field in alldwg.inc.

	work on MULTILEADER 3BD ctx.content_base -> 3RD at offset 384-576 with example_2000.dwg
	rename leaderstyle 340 handle to mleaderstyle

	summary: 8216/544344=1.51%

2018-07-09  Reini Urban  <rurban@cpan.org>

	patch: add build-aux/swig_python.patch to EXTRA_DIST
	failed in distcheck

	add unknown make target

2018-07-08  Reini Urban  <rurban@cpan.org>

	unknown: try BS-BL, and BL-BS
	from 4720 to 4810

	unknown: try RD when BD failed
	from 2718 to 4720 (precise only, unprecise added no hits)

2018-07-08  Reini Urban  <rurban@cpan.org>

	unknown: restrict relative handles
	only some code 6 and 8 offsethandles are valid,
	only of the new handle has an +1 or -1 offset.
	ditto for a and c: the offset must be positive.

	down to 2718

2018-07-08  Reini Urban  <rurban@cpan.org>

	unknown: add OFFSETOBJHANDLE code>5 variants
	relative (shorter) handle values. yet unsuccessful.
	removed one wrong found handle c: down to 2734

	unknown: try RC for BS and vice versa
	from 2742 to 2782

2018-07-08  Reini Urban  <rurban@cpan.org>

	unknown: fix printing found BD
	print the BD bitmask at the found offset and compare it the
	DXF string (should be <0.001).

	down from 3270 to 3252 bits, and with a crosscheck for <0.001
	even down to 2742.

2018-07-08  Reini Urban  <rurban@cpan.org>

	unknown: more unprecise BD search
	still 3270 bits found

	unknown: add unprecise BD search
	cut the mantissa precision from 52 bit to 44 bit.
	finds now 23 more BD's, e.g. 10.0, 50.0, 2231.000092348011,
	-54.05474532926735, 490.6216519543077, 20.75891407303142

	unknown: try TV if TU fails (unsuccessful)
	add summary stats

	common: explain the MC0.0 magic
	http://www.fourmilab.ch/autofile/www/section2_11_4.html
	http://www.fourmilab.ch/autofile/www/chapter2_14.html

2018-07-07  Reini Urban  <rurban@cpan.org>

	unknown: add coverage stats
	store each found and possibly bit, to continue search
	if already reserved, and get some picture

2018-07-06  Reini Urban  <rurban@cpan.org>

	unknown: try more handle codes
	now found 62 unique handles,
	improved from 140 to 151 found 1.

	stats of found fields:
	    1 151
	    2 118
	    3 37
	    4 20
	    5 93
	    >5 11692

2018-07-06  Reini Urban  <rurban@cpan.org>

	unknown: improve handle codes
	now found 51 unique handles,
	improved from 94 to 140 found 1

2018-07-06  Reini Urban  <rurban@cpan.org>

	unknown: fix bits_BS strtol
	using sscanf is always a bad idea.
	The data looks pretty good and solvable now.

	stats of found fields:
	1 94
	2 109
	3 34
	4 17
	5 101
	>5 11678

2018-07-06  Reini Urban  <rurban@cpan.org>

	unknown: store max 5 found positions
	stats of found fields:
	1  94
	2  109
	3  34
	4  14
	5  101
	>5 11678

	unknown: fix alldxf_1.inc extended fields
	add the missing fields.
	use -1 for not-found pos, not 0. This enables the first field being at first.

2018-07-06  Reini Urban  <rurban@cpan.org>

	unknown: implement membits
	use our own search, which is much easier than handling all the
	memmem corner-cases at the beginning and end, and bit-shifting.

	use strtod instead of sscanf %lf. was buggy.

	print the bits to review the search (and check write API, looks wrong),
	added bit_print_bits to bits.c
	WIP: The doubles BB prefix looks wrong, the double values from strtod
	also. maybe hardcode some string->double conversions.

2018-07-06  Reini Urban  <rurban@cpan.org>

	unknown: add TV and angle_BD types
	non-unicode for 300-309, deg2rad angles for DXF 50 types

	unknown: fix DXF 310 hexstring
	and fix wrong dxf_size vs dxf_bitsize.
	add dwg_bits_name[]

	document libredwg.pc

2018-07-05  Reini Urban  <rurban@cpan.org>

	add libredwg.pc

	unknown: fix search_bits
	convert the bytes/bits to one byte stream.
	add carry logic and remaining dxf->bits

2018-07-05  Reini Urban  <rurban@cpan.org>

	unknown: search_bits
	search for the binary repr in the stream
	and store found position if found only once.
	try for all 8 possible shift positions.

	TODO: we don't handle multiple findings yet, and we didn't find any unique
	pos yet.  the carry logic and the remaining dxf->bits are also missing.

2018-07-05  Reini Urban  <rurban@cpan.org>

	unknown: store the binary repr - bits_format
	for each dxf value

2018-07-05  Reini Urban  <rurban@cpan.org>

	unknown: split up generation of static array of struct
	we need 3 parts to be able to initialize it statically.
	disable alldwg.inc for now. we don't need to find the fields order and pos,
	only for a consistency crosscheck against all DWG's without matching DXF afterwards.

	add 2 fields to the dxf fields: type and pos, resolved by the solver.

2018-07-05  Reini Urban  <rurban@cpan.org>

	unknown: never build alldwg.inc
	unless via regen-unknown.

	generated sources are in builddir, only from there ./logs.sh can be run.

2018-07-05  Reini Urban  <rurban@cpan.org>

	unknown: implemented log_unknown_dxf.pl
	created now alldxf.inc with all the real dxf values to find
	in the unknown bits.

	DEBUGGING_CLASSES ASSOCACTION, ASSOCNETWORK

	add build-aux/swig_python.patch
	for a warnings free swig source, for swig 3.0.12

	regen-man: with version 0.5.1-dev

	dwg2svg2: use getopt_long

	dwg2ps: use getopt_long

	dwgbmp: use getopt_long

	dwg2SVG: use getopt_long

	dwggrep: use getopt_long

	dwglayers: use getopt_long

	dxf2dwg: use getopt_long

	dwg2dxf: use getopt_long
	change -as-rNNNN to --as rNNNN resp. -a rNNNN.

	dwgrewrite: use getopt_long
	change -as-rNNNN to --as rNNNN resp. -a rNNNN.

	dwgwrite: use getopt_long
	change -as-rNNNN to --as rNNNN resp. -a rNNNN.

	dwgread: without HAVE_GETOPT_LONG

	dwgread: use getopt_long
	which is a bit broken for -v3 (optional args), but we hack around it.
	at least we can use all options in any order now.

	stability: no endless loop with small files
	dwgs are normally >1000byte. But with a wrong filename
	avoid an endless hash_new loop with size==0 (/1000)

	Doxyfile: only with doxygen

	fix distcheck uninstall for perl and doc
	the added to perllocal.pod and share/info/dir cannot be uninstalled.

2018-07-05  Reini Urban  <rurban@cpan.org>

	First release 0.5

2018-07-04  Reini Urban  <rurban@cpan.org>

        logging: remove decimal handle value
        handles are hex only

2018-07-03  Reini Urban  <rurban@cpan.org>

        dxf: protect empty vectors
        and fix wrong MATERIAL text types for *map_filename

        api: remove wrong comment
        MULTILEADER spec: more DXF
        and return earlier on errors

2018-06-30  Reini Urban  <rurban@cpan.org>

       Third test release 0.4.938

2018-06-29  Reini Urban  <rurban@cpan.org>

       more format string types

       enable glibc strcasestr
       probed as yes, but not declared. same as on darwin.

       ../../programs/dwggrep.c:213:7: warning: implicit declaration of function ‘strcasestr’ [-Wimplicit-function-declaration]
              if (strcasestr(text, pattern))

2018-06-29  Reini Urban  <rurban@cpan.org>

       alldwg.inc: create from builddir
       ./logs.sh can only be run from the builddir,
       only there are the binaries.
       call make from logs.sh, not gmake. we would really need a MAKE=$(MAKE)
       but this is only done on regen-unknown by the maintainer.
       make the alldwg.inc target a maintainer rule only. test -d ../.git || false

2018-06-28  Reini Urban  <rurban@cpan.org>

       eed: fix max limit from 1024 to obj->size
       And on overlong stringsize just skip it to the end.

       This fixes the error with hatch_color_ref.dwg from [GH #27]
       and several LAYER entities with attached large EED data.

2018-06-28  Reini Urban  <rurban@cpan.org>

	Second test release 0.4.924

2018-06-28  Reini Urban  <rurban@cpan.org>

	common_entity_data: fix has_ds_binary_data
	use instead of nolinks with r2013+

	improve FIELD_2DD_VECTOR logging, print index

2018-06-28  Reini Urban  <rurban@cpan.org>

	try ACIS 2 only with .git (ifndef IS_RELEASE)

	add some FIELD formatting overrides FIELD_RCu lineweight FIELD_BLh rgb_color
	pass thru preR13 decode errors

	add analog VECTOR_CHKCOUNT
	also for HATCH.
	Maybe we should use these checks only for known UNKNOWN_CLASS
	entities. The strcmp check for the classname
	is resolved at compile-time already., if the classname would
	appear in the macro.

	add REPEAT_CHKCOUNT and use it more
	not only since r2010+ also with r2004 for invalid HATCH entities.

	decode BD stability: check bit_isnan
	when decoding bitcode encoded doubles, check for our
	own unique return value of bit_nan (avoiding math.h and -lm).
	return DWG_ERR_VALUEOUTOFBOUNDS in objects and entities then

2018-06-28  Reini Urban  <rurban@cpan.org>

	fix common_entity color ENC encoding
	various serious errors in the color encoding
	for entities, called ENC.

	The bug only occurred with non-indexed colors
	with RGB or transparency values.
	Thanks to @arturredzko for an example DWG.

2018-06-28  Reini Urban  <rurban@cpan.org>

	api: finish docs, more renames
	Take the opportunity that the API should be somewhat sane and stable,
	to harmonize more names:
	align => alignment
	numrows => num_rows
	numcols => num_cols
	flags_  => flag

	remove the dwg_ent_insert scale_flag API. This is DWG internal only.

2018-06-27  Reini Urban  <rurban@cpan.org>

	ChangeLog: update for last month
	with gnulib's gitlog-to-changelog, clustered.

	cluster adjacent commit messages if their headers are the same and
	neither commit message contains multiple paragraphs.

2018-06-27  Reini Urban  <rurban@cpan.org>

	python DISTCLEANFILES

	portability: fix GNU make extensions
	hard-code all our test-data files
	test/Makefile.am:16: warning: :=-style assignments are not portable
	test/Makefile.am:16: warning: shell git ls-tree -r --name-only @ test-data: non-POSIX variable name
	test/Makefile.am:16: (probably a GNU make extension)

	stability: 2004 section map
	the extremely large HARTA_E_PRISHTINES_2004 dwg has an odd last
	AcDb:AcDbObjects section, which is misinterpreted as new section info, not
	the last section.
	It also misses now several section types.
	Only the 2007 variant decodes fine. All 2004 (r2010+) versions not.

	dwggrep: finish object fields
	add all known missing test fields.
	now only the TABLE name matcher is not yet implemented.

	FIELD: fix ODA bug
	value_string_length is of type BL, not T

	automake HAVE_PYTHON check
	skip test/xmlsuite with --disable-python

2018-06-26  Reini Urban  <rurban@cpan.org>

	alive.test: add example_r14.dwg
	This is also a supported version

	fix automake HAVE_LIBPS
	ac_cv_header_libps_pslib_h is set later, by AC_CHECK_HEADERS.
	programs/dwg2ps was never generated

2018-06-25  Reini Urban  <rurban@cpan.org>

	First test release 0.4.900

2018-06-25  Reini Urban  <rurban@cpan.org>

	api: add dwg_block_control, dwg_{model,paper}_space_ref
	dwg_block_control is easy, always the first object,
	and also dwg->block_control.
	but the canonical model and paper space headers are a bit tricky to get
	to iterate over it.
	fix the implementations and docs, and use the new API.

	the old api via dwg_obj_block_control_get_model_space from the block_control
	was awful and wrong.

2018-06-24  Reini Urban  <rurban@cpan.org>

	dwggrep: fix BLOCK_HEADER for r2010+r2013
	with r2010+r2013 the block_control.model_space is different from the original
	BLOCK_RECORD_MSPACE. We rather prefer 1F, the one from the header.
	Many entities went missing there.

	TODO: Fix the API iterators and docs, how to iterate over all entities.

2018-06-24  Reini Urban  <rurban@cpan.org>

	dwggrep: add pcre2 to appveyor

	dwggrep: fixup documentation

	dwggrep: extract print_match
	calling a func is faster than inlining it. less cache bloat.
	remove unneeded re_prepare, no .* embedding needed.
	const and restrict the args

2018-06-24  Reini Urban  <rurban@cpan.org>

	dwggrep: fix the jit, enable --type, --dxf
	PCRE2_PARTIAL_* needs a compiled index [1] or [2] re function, but we
	compiled only a simple (fast) matcher, so the jit always returned
	PCRE2_ERROR_JIT_BADOPTION.
	i.e. the compile options must match the match options.

	also enable the --type and --dxf option.
	for --type we need to set obj->dxfname globally for each object
	to a const string, no threat.

2018-06-24  Reini Urban  <rurban@cpan.org>

	dwggrep: add native pcre2-16 support
	no need to convert r2007+ strings to UTF-8, match them
	directly with the pcre2-16 matcher

	But the JIT matcher is still broken, never worked.
	substring search works fine though.

2018-06-23  Reini Urban  <rurban@cpan.org>

	dwggrep: more entities and features
	and fix strcasestr

	dwggrep: more robust probes and fallbacks
	no regex support when pcre2 is not available. (no gnu regexp, sorry)
	fix the configure probes,
	add my strcasestr fallback

	add dwggrep
	try pcre2 jit, and then simple substring matching.
	not handling prec2-16/r2007+ texts yet.

	doc: texi updates and fixes

	perl: remove generated swig files
	they can be easily generated. it was useful to see
	API changes though

2018-06-23  Reini Urban  <rurban@cpan.org>

	python: case-sensitive LibreDWG name
	renamed from libredwg.

	We've put the module name for consistency into the dwg.i
	I have no idea if the binary can stay lower-case, or needs
	to have the same name, but the comment seems to mandate the
	same case, just a prepended _

2018-06-23  Reini Urban  <rurban@cpan.org>

	distcheck: dwg2ps.1 oddity
	now install it, even if the binary might be not built

	distcheck: *.1 are generated in srcdir
	for a while already

	python: fix libredwg.py distcheck
	Both swig-generated files are put into srcdir, not builddir with swig-3.
	With swig-2 I think they are in builddir, as seen on travis.
	We need at least the .py in builddir.

	perl: add needed deps
	to compile perl XS packages.
	cygwin: libcrypt-devel

	perl: no install req, try LD_RUN_PATH=
	and fix the path to src/.libs from srcdir to builddir

2018-06-22  Reini Urban  <rurban@cpan.org>

	skip check perl
	when the shared libredwg is not installed.
	It is too problematic to link to the uninstalled so: linux, osx, windows

	doc: add Bindings chapter

	TODO: update

2018-06-22  Reini Urban  <rurban@cpan.org>

	configure: allow PERL, check --disable-python
	allow overriding PERL=cperl5.26.1 e.g. for using ccache.
	allow swig bindings for perl when python is disabled,
	because we ship the generated swig_perl.c

	I really need to cache cperl and it's used ccache compiler,
	to be able to use ccache in the perl binding.

	remove bindings/perl/Makefile.in generation. forgot that earlier.

2018-06-22  Reini Urban  <rurban@cpan.org>

	rename swig_wrap_* to swig_*.c
	harmonize the generated swig wrapper names.

	and improve the perl flags a bit.

2018-06-22  Reini Urban  <rurban@cpan.org>

	add perl bindings WIP

2018-06-22  Reini Urban  <rurban@cpan.org>

	swig: smaller API
	we don't need duplicate struct accessors generated by swig
	for all the struct fields and via functions.
	strip the functions.
	also avoid the duplicate API types, only use the dwg.h types.

	bindings/dwg.i            |   169 +-
	bindings/perl/LibreDWG.pm |  1031 +-
	bindings/perl/swig_perl.c | 40775 ++--------------------------------------------------------------
	src/dwg_api.c             |     2 +-
	4 files changed, 1185 insertions(+), 40792 deletions(-) bindings/dwg.i            |   169 +-

2018-06-22  Reini Urban  <rurban@cpan.org>

	fix swig bindings
	do not use -importall, rather include our 2 headers manually.
	once verbatim and once via %include.

2018-06-22  Reini Urban  <rurban@cpan.org>

	api: cleanup by checking the perl swig bindings
	fix _3DSOLID
	and a couple more undefined classes,
	only detected by the new perl binding.

	add many missing dwg_ent_ field functions
	and many other typos or renames.

	add missing variable entity getters
	we can now check fixedtype

	add missing dwg_obj_obj methods and
	more missing or wrong obj methods

2018-06-22  Reini Urban  <rurban@cpan.org>

	api: ref, object rename, harmonization
	rename several API funcs for proper prefixes.
	Dwg_Object* methods are using the dwg_object_ prefix,
	Dwg_Object_Ref* getters use dwg_ref_get_

	dwg_api:
	dwg_obj_polyline_*get_*points(Dwg_Object*) => dwg_object_polyline_*
	dwg_obj_get_*(Dwg_Object*) => dwg_object_get_*
	dwg_obj_object_get_index(Dwg_Object*) => dwg_object_get_index
	dwg_obj_ref_get_object(Dwg_Object_Ref*) => dwg_ref_get_object
	dwg_get_type => dwg_object_get_type
	dwg_get_dxfname => dwg_object_get_dxfname

	Add the dwg_object_get_fixedtype API.

	And then rename two uncommon signatures taking Dwg_Object_Ref*.
	dwg.h:
	dwg_ref_get_object(const Dwg_Data *restrict dwg,
	                   Dwg_Object_Ref *restrict ref)
	=> dwg_ref_object
	which clashed with dwg_ref_get_object taking a Dwg_Object_Ref*,
	which was before named dwg_obj_ref_get_object.

	dwg_ref_get_object_relative(const Dwg_Data *restrict dwg,
	                            Dwg_Object_Ref *restrict ref,
	                            const Dwg_Object *restrict obj)
	=> dwg_ref_object_relative (also unused)

2018-06-22  Reini Urban  <rurban@cpan.org>

	add a Windows paragraph to README

	unknown: add dxf, replace offset with handle
	this is also unique and can identify the object in the matching DXF.
	so we can actually match the proper values and types.

	more regen alldwg.inc fixes

	alive.test: print the failing log

	check-dxf: fix, and add r14
	the second loop was broken

	unknown: skip regen alldwg.inc
	add a special regen-unknown target to generate alldwg.inc
	add missing DIST declarations: logs.sh, alldwg.inc (which triggered
	the generation on distcheck, an out-of-dir configure)

	forgot to EXPORT dwg_absref_get_object
	the fixes SWIG bindings for perl found that out.

2018-06-21  Reini Urban  <rurban@cpan.org>

	add examples/unknown
	a sample program to find the most likely
	fields for all unknown dwg entities and objects.

	gather all binary raw data from all unknown dwg entities and objects
	into examples/alldwg.inc.
	with the available likely fields try permutations of most likely types.

2018-06-21  Reini Urban  <rurban@cpan.org>

	bump DWG_ERR_CRITICAL to CLASSESNOTFOUND
	i.e. VALUEOUTOFBOUNDS will not stop processing DWGs
	and will not report the process as failed.

	error: add 2004,2007 realloc -1 error propagation
	pass back proper error status bits, esp. on r2004 + r2007.
	ignore a return val of -1 for realloced obj's.
	Now most DWG return 0. Some exotic ones still crash though:
	Helix and r11.

	more diagnostics
	print more read values, and skip duplicates earlier read

	decode: no duplicate xdic_missing_flag logging

	r11: check empty object->hdl

2018-06-21  Reini Urban  <rurban@cpan.org>

	better HANDLE diagnostics
	try to accept new code 0xe (REGION.history_id r2007+),
	print codes in hex.
	print failing/invalid handles

	inline dwg_decode_handleref into dwg_decode_handleref_with_code
	to get the original wanted code pointer type.

2018-06-21  Reini Urban  <rurban@cpan.org>

	print: harmonize HANDLE printing

	We log TF and TFF values with -v5
	just add the field name and type

2018-06-21  Reini Urban  <rurban@cpan.org>

	start with ACIS/SAT version 2
	which is most likely a 5 byte link to a blob of their fork of ACIS 7.0
	called now ShapeManager, with all the versions.
	But all the different ACIS data has in version 2 the same content:
	5: BL + 0d254c8109 + 0: BL, so there must be something else.

	There is EED data attached to it, with 0-2 handles and several code 70 and one 71.
	The handles are to APPID instances: ACAD_OBJECT_CHANGE_GUID and ACAD_STEPID.

2018-06-20  Reini Urban  <rurban@cpan.org>

	stability
	fix a few dead stores,
	fix a dwg2SVG INSERT problem,
	propagate more errors back.

	free: a few more minor leaks
	dxfname leak: typically 2Kb
	eed: also about 2Kb

	free: fix the str_dat leak
	typically 20Kb

	free: remove dwg_free_handleref
	just free the ref, and handle the dwg->object_ref[] later.
	re-enable dwg->object_ref[] to catch all dwg_decode_handleref refs.

	free: fix dwg->object_ref
	this is one array. skip the linear seearch in dwg_free_handleref, just free
	the ref, the array is free'd later at once.
	free the classes later, they are need to dispatch var-types.

	free: call hash_free
	7KB typically

	free: enable free for num_objects < 1000
	to catch regressions. Performance is only a problem for big DWGs.
	dwglayers accidentally always used dwg_free.
	improve dwg_free_handleref

	free: improve dwg_free_eed
	handle data, raw and eed uniformly

	silence dwglayers handle errors

	check decompress_R2004_section errors

	change all object indices to BITCODE_BL (2/2)
	forgot some

	change all object indices to BITCODE_BL
	to match the actual serialized data type. long is way to large on 64bit.

	rename idc variables
	to index and i. in encode and decode

	encode: fix critical object_map index bug
	we mixed up index with handle, leading to an object overflow.

	encode: add and fix dwg_encode_eed
	wrong size, leading to subsequent overflows.
	add #ifndef IS_RELEASE VECTOR overflow checks in encode

2018-06-19  Reini Urban  <rurban@cpan.org>

	disable TABLE again
	fails even with r2000-r2007, but not much missing.

	free: fix TABLE subclassing
	check for wrong type

	encode: harmonize EED loop
	there's no dwg_encode_eed() (yet), but at least harmonize
	both code paths. Writing the entity EED is still broken WIP.

2018-06-19  Reini Urban  <rurban@cpan.org>

	encode: fix bit_chain_alloc
	There is one overlarge XRECORD, size 53014 > CHAIN_BLOCK (40960).
	When adding this object to dat, it overflowed the Bit_Chain heap.

	Also remove the superflouos DWG_SUPERTYPE_UNKNOWN logic from the encoder,
	rather do this in classes.inc

2018-06-19  Reini Urban  <rurban@cpan.org>

	harmonize test-data Constraints_*.dwg file names
	Strip the version suffix, which is already defined by the dir.
	This avoids x_2004_2004.log and dxf files also.

	add common_entity_data.spec

	leave with DWG_ERR_VALUEOUTOFBOUNDS early
	on wrong class_versions, which are usually 0-2

2018-06-19  Reini Urban  <rurban@cpan.org>

	add 3BLL type as documented, enable TABLE <= r2007
	BLL uses 3 bits for len, but it is documented to use 3B: 1-3 bits
	stopping at the first 0 bit. Which would leave us with
	0: 0, 10: 2, 110: 6, 111: 7. 100 for 4 or 101 for 5 would be invalid.
	But this documentation is wrong, this encoding is not used for
	REQUIREDVERSIONS, picture_size.

	Add the unused documented variant as 3BLL type.

	Use the old TABLE pre-2010 as STABLE, and as DEBUGGING since r2010+.
	dxf: Use the entity dxfname for variable types: ACAD_TABLE.
	Fixes some entities for the picture_size.
	Trace more common entity data.

2018-06-19  Reini Urban  <rurban@cpan.org>

	refactor: add ACTION, TABLE: call TABLECONTENT
	Now we separated the initializer from the field handler.
	Enable experimental TABLE r2010+ support, by
	allowing calling the sublassed TABLECONTENT decoder, from within
	TABLE.

	All modules define now its ACTION globally for dwg.spec and classes.inc

2018-06-18  Reini Urban  <rurban@cpan.org>

	api: fix the public dwg_add_* decls
	checked against classes.inc and its DEBUG_CLASSES setting

2018-06-18  Reini Urban  <rurban@cpan.org>

	api: separate dwg_decode_OBJECT and dwg_add_OBJECT
	dwg_decode_OBJECT calls now dwg_add_OBJECT, but dwg_add_OBJECT
	can be called separately, for the import modules.
	There's also a new realloced = dwg_add_object(dwg); API.

	Adjust the docs.

	See [GH #19]

2018-06-18  Reini Urban  <rurban@cpan.org>

	smoke.sh: remove arm workarounds
	arm cross can compile now src/out_dxf properly

	docs: update status

	add unhandled LAYOUTPRINTCONFIG class
	but only found the class, no object instance yet.

2018-06-18  Reini Urban  <rurban@cpan.org>

	dwg2svg2: simplify API usage
	searching for the block_header is pretty stupid.
	we need to get the main block_control globally (its always the first object),
	and from this we get its mspace and pspace headers.

	Some DWGs replaced their tables with dictionaries, and there the
	headers will not be found this way.

2018-06-18  Reini Urban  <rurban@cpan.org>

	dxf: protect from empty ENT_REACTORS
	REGION on example_2013 has num_reactors 1 but no attached reactor.
	This could happen on a missing handleref object

2018-06-18  Reini Urban  <rurban@cpan.org>

	disable TABLE entity
	With r2010+ a TABLE needs to jump to the TABLECONTENT object,
	but without the initialization, just the fields.

	we really need to split up DWG_OBJECT into init and fields methods,
	see also [GH #19] where we want to split it up into action_OBJECT
	for the fields and add_OBJECT.

2018-06-18  Reini Urban  <rurban@cpan.org>

	add better example DWG and DXF for test coverage
	Convert the better example_*.* coverage test file to all versions.
	Adjust the coverage TODO report.

2018-06-18  Reini Urban  <rurban@cpan.org>

	dxf: extend 2018/example_2018
	added a couple of missing objects/entities.
	extend classes.inc and DWG_TYPE_ for these.
	Check for invalid TABLE.num_rows (with this 2018 TABLE)
	and mark it UNSTABLE.

	DXFIN import of the converted dxf fails with "Xdata wasn't read"

2018-06-17  Reini Urban  <rurban@cpan.org>

	dxf: add dxf_3dsolid WIP
	print the encrypted 1/3 strings.

	dxf: fix GROUP
	parenthandle 330 as AcDbEntity not in the AcDbGroup subclass

	dxf: fix STYLE flags, IMAGE
	add two missing STYLE bits,
	fix IMAGE group 23, 340, 360
	fix WIPEOUT group 340, 360

	add dxf test scripts

	dxf: handle DIMENSION_ sub objects
	fix dxf groups of ins_scale 41-43
	fix subclass markers

	dwg2dxf: no dxf write on critical dwg read error
	but continue to next input file

	dxf: fix SOLID/AcDbTrace subclass marker
	and the pts groups: 10-13, not 11-14

	api: some more NULL ptr protections
	dwg_next_object, dwg_ref_get_object

	dxf: fix ATTRIB,INSERT subclasses

	dxf: fix ATTDEF subclass

	dxf: fix REGION subclass

2018-06-17  Reini Urban  <rurban@cpan.org>

	fix SPLINE r2013+
	with splineflags1 & 1 the scenario flips to 2
	fixes example_2018

	add -lm dependency to avoid writing nan values into DXF.
	rather skip wrong values then.

	add SPLINE flag DXF 70 support

2018-06-17  Reini Urban  <rurban@cpan.org>

	dxf: SUBCLASS (AcDbText) also for r2018+

	dxf: harmonize dxfb with dxf
	add all the recent dxf improvements,
	dxf: write 5 handle since r11, not r2000+.
	removed unused COMMON_TABLE_CONTROL_FLAGS macro args

	suffix.inc: more strdup decl
	some linux libc still complains about lack of a strdup
	decl.

	dxf: fix asan overflow
	global-buffer-overflow, harmless but asan treats it as fatal

	api: fix Undefined allocation of 0 bytes
	scan-build complains about CERT MEM04-C; CWE-131

	fix various scan-build warnings
	initialize *src at decompress_r2007,
	help hash struct _hashbucket vs 2*uint32_t confusion

	dxf: typo DIMFXLON is B not BD

2018-06-16  Reini Urban  <rurban@cpan.org>

	dxf: fix AcDb3dPolylineVertex
	add subclass markers,
	fix the 0 entity names
	put the flag behind the point.

	but acad crashes on import AcDb3dPolylineVertex

2018-06-16  Reini Urban  <rurban@cpan.org>

	dxf: fix LWPOLYLINE closed flag
	interestingly the flag 70 needs to be after the num_points 90
	to have an effect at the closed flag 70 & 1.
	with 90 after 70 closed is ignored, another acad bug

	dxf: more work on mspace hdr
	try several methods to get the right Model_Space header.
	if there's non, just skip the BLOCKS section then.

	dxf: skip MLINE with out_dxf
	looks good, but crashes on acad import

	api: simplify the iterator APIs
	we don't need the last argument, as we can use the object only.
	Just check its type.

	disable TABLECONTENT, TABLEGEOMETRY
	we do have coverage for those now.
	They fail on out_dxf, but only with wrong geom_data substructure values.
	Nevertheless

	dxf: refactor mspace BLOCKS

	dxf: fix BLOCKS for mspace
	Analog to prev. the ctrl->model_space object did not contain the
	default *Model_Space block records, esp. for AEC dwgs.

2018-06-16  Reini Urban  <rurban@cpan.org>

	dxf: add missing LAYER flags
	add plotflag 290
	and linewidth 370.

	fatal in AEC dwgs

2018-06-16  Reini Urban  <rurban@cpan.org>

	dxf: no DICTIONARY as AcDbLayerTableRecord
	This reveals btw an acad 2018 bug

	Typo in dxfin error message:

	Error in LAYER Table
	Expected 0 LAYER or 0 ENTAB, received 0 DICTIONARY on line 6244.
	Invalid or incomplete DXF input -- drawing discarded.

	0 ENTAB => 0 ENDTAB

2018-06-16  Reini Urban  <rurban@cpan.org>

	dxf: fix BLOCKS for pspace
	the ctrl->paper_space object is empty, we need to use the
	header from the header_vars to get all pspace blocks.

	fixes importing many r2004+ dxfs.

2018-06-16  Reini Urban  <rurban@cpan.org>

	dxf: special-case _B binary
	fix DIMASSOC to 280,
	fix some 290 booleans to 0/1,
	wrap 90-99 int32_t to signed ints. there are some -1, -2 values, i.e. MLEADERSTYLE.

	dxf: importing Entity MLINE crashes WIP
	r2004+

	dxf: special-case VALUE_RD
	and use it with points.
	do not rad2deg LWPOLYLINE bulges.

	dxf: enable DXF groups 80
	needed for some xdata. and warn on invalid or unknown
	xdata dxf groups. This fixes 2007/Spline with 80 and 83 BL xdata groups.

2018-06-15  Reini Urban  <rurban@cpan.org>

	dxf: fix r2018 $ACADMAINTVER, AcDbArc
	Arc is a mandatory subclass of Circle

	dxf: fix xdata handle, enable XRECORD

	dxf: fix r2007+ truetype styles
	needs mandatory 1001, 1000, 1071 fields.
	hard-code the 1071 flag to 34 for now.

2018-06-15  Reini Urban  <rurban@cpan.org>

	dxf: various fixes LWPOLYLINE, MLINESTYLE, ...
	move DXF parenthandles before the subclass markers,

	add r2010+ vertexids to LWPOLYLINE, fix closed flag bit.

	fix the broken REPEAT_CN macro (broke MLINESTYLE)

	simplify out_dxf: VALUE macro. separate fmt from buf and \r\n.

2018-06-15  Reini Urban  <rurban@cpan.org>

	2007: silence the handle stream logging
	on -v4 pre-r2007. This is only really needed for 2007+
	And there make it look better

	.gitignore: more gcov and sample output

2018-06-15  Reini Urban  <rurban@cpan.org>

	dxf: add check-dxf target
	It does not really check the dxf's, but creates a lot,
	for importing checks into acad.

	The real DXF check is in programs.

2018-06-14  Reini Urban  <rurban@cpan.org>

	dxf: fix more header vars
	add HEADER_H, CMATERIAL, INTERFEREOBJVS, ...
	XRECORD still crashes acad, though it does look good now.

	dwg: fix some header_vars mischmasch
	esp. TREEDEPTH was off by one, a whole section was off.

	dxf: improve TABLES stability
	A table layer entry can also be a DICTIONARY, skip that then.
	check all types

	decode: skip invalid hash_set 0
	empty handle values are invalid, only appear with unhandled classes.

	dxf: add 330 parenthandle
	it should be under AcDbObject, but is in some cases under the
	subclass.

	dxf: always write a handle
	even for a null handle value. this is needed for
	DICTIONARY pairs

	dxf: r2007+ header fixes
	add several missing header vars

	dxf: 2004+ header fixes
	various, tested with r2007.
	this imports now until "Updating header seed."
	r2010 goes even until DICTIONARY.

2018-06-14  Reini Urban  <rurban@cpan.org>

	fix make dist, skip unreleased test-data files
	The release is made on travis from a fresh checkout.
	But locally, with .git, there can be many unrelated big
	DWG's lying around under test-data.
	Take only the files which are under git.
	With huge DWGs > 40MB make distcheck became unusable.

	This uses some GNU make extension := and $(shell ).  BSD makes understands
	it also.  Comment this out when your special make does not take that.

2018-06-14  Reini Urban  <rurban@cpan.org>

	dxfb: fix header
	and remove logging

	rm more .bak test dwgs
	These were accidentally committed.

	dxfb: add _REACTORS, _XDICOBJHANDLE
	but it fails much earlier, in the header at address 90 with a r2000 DXFB already

	dxf: skip empty xdicobjhandle
	ACAD_XDICTIONARY fields

2018-06-14  Reini Urban  <rurban@cpan.org>

	dxf: special-case PLACEHOLDER
	this is actually the only fixedtype, not just variable,
	which has no dxfname. checke the type instead.

	DXFIN r2004 still fails, without proper error message.

2018-06-14  Reini Urban  <rurban@cpan.org>

	dxf: add block iterator
	write the dxf BLOCKS section with all BLOCK .. ENDBLK entities,
	for model space and paper space.

	With these changes we can finally DXFIN (i.e. acad import)
	a full r2000 DXF.

2018-06-14  Reini Urban  <rurban@cpan.org>

	add dwg to all object/entity spec handlers
	e.g. to access the header vars or to resolve handles

	dxf: fix BLOCK_CONTROL num_entries

	change resolve_handle warning
	from Object not found to Object handle not found.
	This warning is mostly harmless.

2018-06-14  Reini Urban  <rurban@cpan.org>

	dwg2dxf: allow multiple input files
	add -o to name the output for a single input file only.
	use dwg2dxf *.dwg is so much easier.
	for the single file filter case we already have dwgread.

	restrict regen-man to POSIX only. didn't work without ./ prefix,
	a help2man limitation.

2018-06-14  Reini Urban  <rurban@cpan.org>

	in_dxf: extend scanf double
	we still had compiler warnings

	dxf: improve var types RECORD names
	always use the dxfname, not our internal objectname.
	this keeps our names nice, and DXF correct.

	dxf: dxf_cvt_tablerecord with r13 already
	do the allcaps conversion of builtin table names with r13+

2018-06-13  Reini Urban  <rurban@cpan.org>

	trace: change Unhandled Class object
	to display the object index and handle value, not the position.
	With a handle we can see if it is referenced and compare to the
	subsequent object_map resolver errors

	dxf: remove most minimal
	See [GH #21]. There's not much need for minimal, just
	for writing header and entities. But not for the object fields,
	there are merely version specific.

	dxf: add XDICOBJHANDLE dxf 360

	dwg: move common fields reactors, xdicobjhandle up
	to the common Dwg_Object_Object and Dwg_Object_Entity structs.
	now together with the relevant num_ and binary fields.
	and they don't pollute the entity specific structs.

	dxf: disable XRECORD for now
	and return no error on DUMMY, not DWG_ERR_UNHANDLEDCLASS

	dxf: add reactors to all objects
	even if not used (e.g. not used in each CONTROL table)

	dxf objects: simplify REACTORS
	XDICOBJHANDLE(3) not yet implemented (and unnecessary for now)

	dxf: LWPOLYLINE bulge is also in radian
	I think the DXF group 42 is in degrees. Found no samples yet.

	dxf: convert angles
	add rad2deg to all angles. not yet in_dxf*.c

	dxf: start fixing objects: DICTIONARY*, ...
	fixed DICTIONARY, DICTIONARYWDFLT, PLACEHOLDER, MLINESTYLE (almost).
	set obj->fixedtype when reading.
	ACDBPLACEHOLDER has no SUBCLASS marker in the DXF.
	Some DXF names have a ACDB prefix, maybe rename them back (again).

	dxf: fix REACTORS group -5 => 330
	This fixed reading ENTITIES.
	Now we are struck at the OBJECTS section.

	dxf: move PROXY_OBJECT from variable to switch
	it does not survive the klass 500-num_classes check,
	and leads to an invalid dwg->dwg_class[] access.

	dxf: move 100 AcDbEntity after Reactors

	dxf: BLOCK_RECORD table only r13+
	and check against libdxfrw. oh my, so many mistakes and TODOs.
	we need to get rid of --low again, and fix most minimal checks to
	version checks

	resort the dwg_version_as check
	put the most likely upfront
	as we have a linear search.

	up object_map tracing to -v4 HANDLE

	dwgrewrite: return only critical errors
	as error level result

	fix realloced retval for dirty_refs
	dwg_decode_add_object() does not always realloc anymore.
	only return -1 when it did, otherwise return the uncritical error bits

	ignore CRC mismatch warnings on r2000 for the 1st section
	We really need to know the numbers of setions first, to
	know if its broken or not. These were all false negatives.

	unify CRC mismatch warnings
	print them all in %X hex, not %x or %d

	ignore warnings on invalid handles
	now we get about the same amount of Object not found
	errors as there are unknown/unhandled objects, and someone is
	pointing to it.

2018-06-13  Reini Urban  <rurban@cpan.org>

	dxf: add missing LINE,... pts. POLYLINE special-case
	before r2004 there was no LWPOLYLINE in a DXF,
	only a POLYLINE. need to convert to VERTEX_2D later.

	there was special DXF DECODER/ENCODER logic in the spec
	missing out on the DXF case.

	simplify minimal handling on some objects on the switch,
	not to run into MTEXT again

2018-06-13  Reini Urban  <rurban@cpan.org>

	dxf: fix VIEWPORT
	add missing fields 68 on_off and 69 id.
	both hardcoded to 1 for now, as it is not stored in a DWG r13+

	dwg2dxf: skip free (filename_out) also
	not needed, unless you are a valgrind enthusaist.

	dxf: fix major DICTIONARY --minimal bug
	with --minimal it just skipped over to MTEXT, and crashed there.

	document compile-time strcmp as valid
	The strcmp with a compile-time # pasted token and a constant is
	really being optimized away at compile-time https://godbolt.org/g/AqkhwL
	Impressive.

2018-06-11  Reini Urban  <rurban@cpan.org>

	rename branches, smoke policy
	don't smoke the open work/ branches anymore.
	just master, the tagged pre-releases and any smoke/ branches being worked on.

2018-06-11  Reini Urban  <rurban@cpan.org>

	Fix windows cr cr lf
	Ensure fopen wb mode everywhere for DXF.
	The windows msvcrt fwrite adds a \r before every \n, so we get it twice.

	Fixes [GH #17], thanks to Shing Liu @eryar for the report and screenshot.

2018-06-11  Reini Urban  <rurban@cpan.org>

	skip free with some programs
	time for 40MB DWG went from 3m to 7s, mostly console-out for the errors.
	This is with the new hash object_map. (without it was 2m)

	forget about valgrind reporting leaks. The kernel frees it better.
	The library is still leak-free of course.
	Closes [GH #18]

2018-06-11  Reini Urban  <rurban@cpan.org>

	errors: print even lower errors on success
	don't collapse < CRITICAL to 0 in dwgread, dwgwrite, ...

	stability: low error on obj_string_stream
	which is ignored.
	track dwg_decode_eed and handle errors properly, which could be disturbed by the
	previous obj_string_stream error.

2018-06-11  Reini Urban  <rurban@cpan.org>

	hash: fix the resize logic
	add elems for proper fillrate calculation,
	remove the resize size arg, not needed.
	don't realloc the array at resize, use a fresh zeroed space.
	this fixed getting back random wrong values after resize

	added hash tracing

2018-06-11  Reini Urban  <rurban@cpan.org>

	hash: allow 0 values
	use HASH_NOT_FOUND -1 as special not found return value,
	ie MAX_INT32.

	hash: use the new hash for the object_map WIP
	to speed up dwg_resolve_handle.
	looks a bit unstable though.

	hash: check against out of memory

	add int hash with linear probing
	written from scratch in 30 minutes.
	we disallow keys and values with 0, as they don't appear in the object_ref map.
	we also don't need to delete keys, so the implementation can do without
	tombstones (key -1), or a NOT_FOUND hash_get return value of -1.

	decode: fix free obj->eed[idx].raw
	because this could be a raw from a prev. idx.

	common.h: docs only

	dxf: strange AcDbText class separator expected
	move the AcDbEntity specific TEXT field upwards.
	skip non-public LWPOLYLINE flag values.

	dxf: move COMMON_ENTITY_HANDLE_DATA to the front
	dxf expects common data, like layer name, ltype, ... before the
	entity-specific subclass marker.
	it's a common AcDbEntity property after all.

	dxf: likewise rename section to table
	HANDLE_NAME does the name look in a table record,
	not a section

	dxf: rename dxf_write_handle to dxfb_cvt_tablerecord
	it's not a handle, it a table record entry.
	it's not a writer, it just converts/normalizes some builtin names.

	dxf: empty ctrl->paper_space with r2010+

2018-06-11  Reini Urban  <rurban@cpan.org>

	dxf: LTYPE handle 6 => name, not hex
	Now all tables and blocks can be read by acad.

	What other handles are resolved to their name in DXF?
	We eventually need to replace e.g.
	FIELD_HANDLE (DIMTXSTY, 5, 340)
	with
	FIELD_HANDLE_NAME (DIMTXSTY, 5, 340, STYLE)
	to resolve with DXF to the name in the section.

2018-06-11  Reini Urban  <rurban@cpan.org>

	dxf: adjust control 70, add BLOCK_RECORD
	the BLOCK_RECORD table records are apparently mandatory.
	acad complains when missing.

2018-06-10  Reini Urban  <rurban@cpan.org>

	dxf: always set the global *_control objects
	we need at least the handle for dxf

	dxf: fix TIMEBLL format
	add the double calculation (for the binary dxf).
	fix the trace and DXF output.

	doc: PythonCAD R38 also uses LibreDWG
	http://pythoncad.sourceforge.net/dokuwiki/doku.php?id=r38_roadmap

	dxf: tables are mandatory
	not optional.

	dxf: fix AcDbDimStyleTable
	handle code 105,
	no special-case for num_entries
	add missing group 71

	dxf: progress with tables
	add the missing the layer table subclasses,
	special-case the control handle, and the BLOCK_HEADER name.
	const some objects
	remove all the prev. added RECORD () for the object names.

	dxf: avoid empty numbers
	only strings may be empty. numbers will be changed to 0

	dxf: strip ending .00000000000
	for .0 and .5. It's just a heuristic but catches most cases.
	I don't want to invest much more into this mere beauty issue.

2018-06-10  Reini Urban  <rurban@cpan.org>

	dxf: fix wrong LTYPE type description
	which has DXF type 3, not 48.

	add a check to avoid empty numbers, only allowed for strings.
	rather print 0 then

2018-06-10  Reini Urban  <rurban@cpan.org>

	check-dwg-valgrind: less verbose, small files only
	we only care for segfaults, not the field tracing.
	the log file already gets huge.

	restrict check-dwg-valgrind to DWGs size < 10M,
	check-dwg-valgrind to size < 40M.

2018-06-10  Reini Urban  <rurban@cpan.org>

	alive.test: rm core file
	writers may create core files, which may fail the distuninstall test

2018-06-10  Reini Urban  <rurban@cpan.org>

	fix reading huge files
	Fixes reading DWG files >40MB with many elements exceeding
	the previous hardcoded limits. E.g. this example had
	789388 objects and 2453916 object refs.
	Note that the decompressed sizes are bigger than the filesize,
	roughly by factor 2.0.

	It is really slow though.
	The object_refs hash table really improves it from 2m to 5s.

	See https://savannah.gnu.org/bugs/index.php?28503

2018-06-10  Reini Urban  <rurban@cpan.org>

	section decode stability
	fix some uint32_t types (not unsigned long on amd64),
	fixing some overflows.
	check and abort on more 2004 and 2007 invalid section sizes.
	thanks to llvm scan-build

	CI: remove --enable-write

	2004 stability: skip empty or wrong sections
	I got one broken 2007 DWG, which when saved as r2004 is also broken.
	Don't segfault, at least error gracefully.
	See https://savannah.gnu.org/bugs/index.php?28503

	2007: more file_header logging
	add len2, which is always 0.

	in_dxf: sscanf %lf for double
	clang warning: format specifies type 'float *' but the argument has type 'double *'

2018-06-09  Reini Urban  <rurban@cpan.org>

	dist: add regen-man, fix distcheck
	Stabilize the creation of the man files.
	They are only generated by the maintainer, not generally.
	Copy them from srcdir, not builddir.

	Add temp. logs to CLEANFILES

	Add PACKAGE_URL for bugreports

2018-06-09  Reini Urban  <rurban@cpan.org>

	errors: pass through 2007 errors
	don't report success with Failed to read 2007 meta data

	stability: improve reading broken r2007 files
	got a sample DWG which asserted. Convert assertions to proper errors.

	docs: update
	we are near the first release.

	programs: fix --help features

	default to --enable-write
	switch to --disable-write

	xmlsuite: Helix => HELIX
	and fix another classes overflow.

2018-06-09  Reini Urban  <rurban@cpan.org>

	move classes dispatcher into common.inc
	no various copies around. Now the variable typed classes
	are maintained in one and only place. Just the static ones have
	copied switch tables, but this number is fixed. There will be no
	new ones, so I'm fine with that.

	sort classes.inc by stability, entity, and names.

2018-06-09  Reini Urban  <rurban@cpan.org>

	major varying classes refactor
	abstract away the several types of class stabilities in the switch dispatcher:
	stable, untested, debugging and unhandled.
	In the next commit we will extract the class dispatchers into one single
	classes.inc.
	free is now a bit slower because of the dynamic strcmp dispatcher
	checks, but we win in massive consistency improvements. This could also be
	improved later by switching to dynamic enum/int checks.

	fix typo: DICTIONARYWDLFT => DICTIONARYWDFLT,

	add HELIX

	set obj->fixedtype, to the fixed enum DWG_OBJECT_TYPE, which is
	independent on the class index. then you don't need to check the dxfname
	anymore, and we can possibly get away with all the strcmp dxfname.
	This must be enforced by all importers (in_dxf*, ...) also.

	collapse the various SURFACE types to one SURFACE entity,
	in DXF there's only one SURFACE entity.

	Fixed various dead-code issues in VBA_PROJECT, MULTILEADER. Some latest
	changes were hidden behind DEBUG_*. Now not anymore.

2018-06-09  Reini Urban  <rurban@cpan.org>

	appveyor: deploy as pre-release
	not as draft anymore. They are stable enough to warrant
	official nightlies. Such a pre-release creates a tag,
	which triggers a travis make dist deploy.

	Before I had to manually trigger each drafted release,
	which you didn't see. Now it goes directly to public pre-releases.

2018-06-08  Reini Urban  <rurban@cpan.org>

	dxf: cleanup from prev. errors refactor

2018-06-08  Reini Urban  <rurban@cpan.org>

	rename AcDbField to FIELD, tested ok
	found an example with it.
	Looks broken at childs[0] [H 360]
	and then at evaluation_error_msg [T 300].

	num_childs occurs twice. the first is unreliable. if >0 dec by one.
	but really num_childval 93 is better.

	FIELD and FIELDLIST are now tested ok.

2018-06-08  Reini Urban  <rurban@cpan.org>

	fix TABLE crashes
	with free. The TABLE fields look pretty wrong to me.
	Also add a DATATABLE skeleton

	errors: add to docs

	errors: add DWG_ERR_CRITICAL for programs
	Don't report errors if less severe than DWG_ERR_CRITICAL.
	i.e. DWG_ERR_VALUEOUTOFBOUNDS.
	Same for the high-level dwg API: dwg_read_file, dwg_write_file
	dxf_*_file.

2018-06-08  Reini Urban  <rurban@cpan.org>

	errors: pass through decode/encode/print/...
	The errors are now severity sorted bitmasks, and we pass it all through,
	just not the bits API, as this is functional without *error retval.
	We don't stop on any coding error, we just accumulate the error bits.

	Every dwg_TYPE_##token function returns now an error code.
	Flip the dwg_TYPE_variable_type() logic to return 0 on success
	and DWG_ERR_UNHANDLEDCLASS to switch to UNKNOWN_*

	Fix the annoying in_dxf char** warnings.

2018-06-08  Reini Urban  <rurban@cpan.org>

	errors: add error codes to decode_r2007.c

	errors: add DWG_ERR_CLASSESNOTFOUND

	errors: add error codes to bits.c/dwg.c

	errors: add error codes to encode

	errors: add error codes to decode
	but not yet through the dwg_decode_OBJECT path via dwg_decode_add_object.

	add .drone.yml for tea-ci.org

	Add .gitlab-ci.yml

	NanoSPDS marker classes
	This is a flexlm License Parser.
	Just classes, registered as entity, not found in entities though.
	Found in AEC and MAP dwg's

	dxf: special-case POSITIONMARKER dxf name
	and add some minor stuff

	add unsorted UNDERLAY, fix EXTRUDEDSURFACE
	change DUMMY, LONG_TRANSACTION to objects.
	DUMMY is never a proper object, it is just a generic dwg filer method. (proxies?)
	add some missing COMMON_ENTITY_HANDLE_DATA

2018-06-07  Reini Urban  <rurban@cpan.org>

	add GEOPOSITIONMARKER geojson
	at least rudimentary, with Text

	add unsorted EXTRUDEDSURFACE entity
	with known DXF fields. r2007+
	no coverage in any DWG yet. None of the SURFACE entities

	fix clang's dangling else warning

	.gitignore: ignore more

	TODO: check test coverage
	for missing entities/objects in our catch-all example_2000.dwg
	the best is actually 2018/example_2018.dwg with 21 entities out of 60.
	list all missing entities/objects to be added into a better all.dwg
	for better test coverage

	print: tighter logging
	print UNKNOWN bytes tighter without space.
	print points as (...) list

2018-06-06  Reini Urban  <rurban@cpan.org>

	dwg.h: fix some _RC to _BS
	only done in the spec previously with 323efd78ea,
	so we had a mismatch. only detected on windows.

	fix windows deploy: not the libtool wrappers
	Fixes #15
	The windows make install does not put the proper binaries into bin,
	so we went and copied it manually. But the wrong ones.

2018-06-06  Reini Urban  <rurban@cpan.org>

	extend xmlsuite
	add support for a couple of more elements, in fact
	all elements found in the prepared XMLs used for this test.

	Even some custom class Helix, which doesn't have a graphical
	representation in the DWG, only a class definition.

2018-06-06  Reini Urban  <rurban@cpan.org>

	docs: update Copyright headers
	for all recent significant changes

	windows: add declspec(dllimport)
	for external programs linking to the dll, ie
	where DLL_EXPORT is not set (libtool does this for us).

	doc update
	and rename the CRC field in header_variables
	to crc, to match the docs. Only uppercase matches DXF vars.

	free: FREE_IF objects

	dwgrewrite: default to r2000, stability
	write: don't error on empty fields or handles.

	more objects: GEOPOSITIONMARKER, CAMERA
	and some minor fixes: PLOTSETTINGS, MATERIAL.
	CAMERA should not be in any DWG, but maybe in a DXF or other format.
	rename some PLOTSETTINGS fields for consistency with LAYOUT.
	some crosschecks with the oarx docs.

	more plausible SUN fields
	light reorder. problem is that we don't have a SUN object in any
	DXF yet, just the class. will do that later.

2018-06-06  Reini Urban  <rurban@cpan.org>

	more SUN
	found documentation. it's not a table entry (no name),
	it's rather a singleton.
	now we have 46 bits unknown bits left (some doubles: direction,
	altitude, azimuth?), and the order is yet unknown.

	fix MATERIAL RC to BS types.
	add some more SUBCLASS markers from newer DXFs

2018-06-05  Reini Urban  <rurban@cpan.org>

	add SUN, OBJECT_PTR
	SUN misses 11 byte/3 bit. OBJECT_PTR not yet tested

	add unsorted fields for PLOTSETTINGS, LIGHT
	dxf: add all the missing dxf SUBCLASS markers (with help from the ARX docs),
	  also table control objects.
	add field docs for PROXY_ENTITY, LWPOLYLINE, MLINESTYLE,
	fix dxf output for LWPOLYLINE (with bulges and widths),
	rename WIPEOUTVARIABLE to WIPEOUTVARIABLES

	api: 3dsolid, spline, mline, dictionary
	several api fixes.
	do not use an Entity/_ent prefix for non-entity substructs.

	doc: fixup bits.h endcode

	dxf: fix some MTEXT groups
	and rename some fields, add some docs.

2018-06-04  Reini Urban  <rurban@cpan.org>

	api: more const, restrict, docs
	also replace all BITCODE_BD with double.

	2010: improve stability
	can now read even the prev. failing AEC DWGs.
	fix setting the ent->color.name (not alloced)
	skip invalid EEDs
	skip invalid and unknown objects

	fix some -Wformat warnings

2018-06-04  Reini Urban  <rurban@cpan.org>

	unify REPEAT macros
	move them to the common spec.h. Just decode has different variants,
	with calloc.

	add a couple of unchecked variants, when either the type
	or a constant int make the rcount overflow check useless. To
	avoid compiler warnings.

2018-06-04  Reini Urban  <rurban@cpan.org>

	2010: adjust TODO

2018-06-04  Reini Urban  <rurban@cpan.org>

	2007: fix section_string_stream for overlarge data_size
	The overflow logic with hi_size was wrong. Too small type.

	We can now read many AEC drawings with a data_size > 0x8000
	and >300 classes. E.g. Autodesk Architectural Desktop 2007.
	But some of them are still problematic.

	Allow reading r2010+ now with a tarball release, and enable
	the xmlsuite for it. But programs/alive.text does not work yet with
	Leader_2010+: dwg2dxf

2018-06-04  Reini Urban  <rurban@cpan.org>

	2010+: enhance stability, update docs
	make check and most DWGs pass now.

	stability:
	  skip tables/vectors with more than 0x1000 entries: REPEAT,
	  reactors.
	  fix entity picture size (IMAGE, WIPEOUT) from BLL to BL, but this is
	  still buggy for 2010+. skip it.
	  skip empty table names.
	  dxf: skip unknown objects and tables, i.e. some newer VIEWSTYLE tables.

	test: skip the DXF comparison check, as it is not ready yet.
	the diff became too large.

2018-06-03  Reini Urban  <rurban@cpan.org>

	2010: fix the remaining stream offsets
	harmonize entities with objects.
	Now most fields can be read, just a few are broken.
	The 2010 DWGs itself report success.

	2010: add UMC unsigned type for handlestream_size
	and revert the old object map offsets to signed MC.
	This fixes now most Objects, just one still broken.
	Now Entities are left.

	bits: fix MC type to unsigned
	it cannot be negative at all.
	Fixes the r2010+ objects with negative Hdlsizs,
	but broke many earlier dwgs.

	2010: fix object hdlpos
	+ 8.
	Now just the bit_read_MC is broken, sometimes returning negative values.

	2010: fix object bitsize calculation
	8*size - handlestream_size
	the object string stream is now correct, missing just the handle stream offset.

	2010: fix Header offsets
	The string and handle offsets are also correct now.

2018-06-03  Reini Urban  <rurban@cpan.org>

	2010: fix Classes section_string_stream endbit
	8*24 = 192: bitsize + 191

	Now we can read all the 2010-2018 Classes

2018-06-03  Reini Urban  <rurban@cpan.org>

	dxf: fix XRECORD objid_handles
	wrong order of arguments. Only relevant for out_dxf

	api: add missing restrict

	api: add several table/handle helpers
	rename dwg_obj_ref_get_abs_ref to dwg_ref_get_absref
	       dwg_obj_reference_get_object to dwg_obj_ref_get_object
	add dwg_ref_get_table_name (default: ByLayer), dwg_ent_get_layer_name (default: 0),
	remove dwg_ent_m?insert_get_ref_handle, dwg_ent_m?insert_get_abs_ref,
	  replaced by dwg_ent_m?insert_get_block_header.
	enhance dwg_obj_table_get_name: allow a DICTIONARY (e.g. a material or plotstyle handle)
	also.
	use it in the enhanced xmlsuite for common_entity_attrs().

	xmlsuite: various improvements
	simplify, add vertices, ...

2018-06-02  Reini Urban  <rurban@cpan.org>

	r11: more work on pre-R13 entities
	read all the remaining common entity fields.
	fix INSERT and the entity handle. WIP
	skip entities at an invalid size.

	performance: use the REFS_PER_REALLOC pool
	now also for dwg->object, not just for dwg->object_refs.

2018-06-02  Reini Urban  <rurban@cpan.org>

	after add resolve all objectrefs
	walk through the object_ref array and re-resolve all found objects.
	set dirt_refs when the object array was realloced, to skip using
	the cached handleref->obj, but re-assign it.

	add more restrict to the encode API

2018-06-02  Reini Urban  <rurban@cpan.org>

	testcases: silence -Wpragma-pack

2018-06-02  Reini Urban  <rurban@cpan.org>

	api: use -fvisibility=hidden to export only public funcs
	This mimics the default visibility on windows.
	Closes GH #13.

	Some internal unit-tests failed to work,
	they need to link to the object file also, not just the library.

2018-06-01  Reini Urban  <rurban@cpan.org>

	use $(WARN_CFLAGS)
	do not copy WARN_CFLAGS into AM_CFLAGS, rather
	allow changing it later and using it in CFLAGS.
	Before changing WARN_CFLAGS had no effect at all

2018-06-01  Reini Urban  <rurban@cpan.org>

	parent: change object uplink to objid
	Dwg_Object_{Object,Entity}:
	  change object to objid field. add dwg field.
	add 2 new API functions to return the Dwg_Object from the obj_obj,
	resp. obj_ent via the objid.

	Closes GH #11

2018-06-01  Reini Urban  <rurban@cpan.org>

	parent: SET_PARENT macros
	this doesn't yet fix the moving obj problem from #11, but it looks much
	better now. The next commit will fix the remaining link to the moving obj.

	refman: remove flymake temp.

	parent: move parent to the front for generic
	ensure structural integrity, ent_generic just casts the struct.
	also add a couple of testcases,
	remove the obsolete dummy fields from DUMMY, SEQEND and ENDBLK,
	add testcases for the parent API
	fix more parent setters in some structs, check if the child was even created.
	rename some childs to proper names.

	api: rearrange the c file a bit
	separate generic ent section.
	improve the docs for dwg_get_type.

2018-06-01  Reini Urban  <rurban@cpan.org>

	api: add functions to get the parents
	add dwg_ent_generic, dwg_obj_generic, dwg_tbl_generic types.
	add dwg_ent_generic_to_object, dwg_ent_generic_parent,
	    dwg_obj_generic_to_object, dwg_obj_generic_parent functions.

	Closes [GH #11]

2018-06-01  Reini Urban  <rurban@cpan.org>

	api: link most the complicated parent fields
	TABLE, TABLESTYLE, TABLEGEOMETRY, FIELD, LAYER_INDEX substructs.
	I might have missed some.

	See [GH #11]

2018-06-01  Reini Urban  <rurban@cpan.org>

	api: add parent field to each _dwg_{entity,object}_ENTITY
	See [GH #11].
	We have to jump through absurd hurdles in the API to get around that.
	The parent points to the _dwg_object_{entity, object}, which points
	via the object field to the _dwg_object.

	Also add parent fields to each subentity, such
	as e.g. MLINE_line - > MLINE_vertex -> MLINE,
	and HATCH.

2018-06-01  Reini Urban  <rurban@cpan.org>

	man: bump month to June 2018

	logging: display handles as hex
	to match with the DXF 5 and 330 groups. display the objid index also as hex.

	encode: disable write modules
	don't even compile encode and the DXF in_* modules,
	to save compile-time and object size.
	they are quite large.

2018-06-01  Reini Urban  <rurban@cpan.org>

	dwg: add unsorted MATERIAL fields
	needs CFLAGS="-DDEBUG_MATERIAL"

	so far the first two text fields: name, desc are known, the rest unknown.

2018-05-31  Reini Urban  <rurban@cpan.org>

	dxf: fix LTYPE table

2018-05-31  Reini Urban  <rurban@cpan.org>

	fix compiler warnings
	avoid unused functions warnings, add them to some if(0) {} dead block.
	add a LAYER_TABLE_FLAGS type specialization:
	  because of the LAYER flags RS type, not RC.

	now just the WIP in_dxf.c throws a lot of warnings.

2018-05-31  Reini Urban  <rurban@cpan.org>

	dxf: more loop stuff
	add DXF_BREAK_ENDSEC, SECTION(THUMBNAILIMAGE).

	but we will abandon that und use the alternate approach.

2018-05-31  Reini Urban  <rurban@cpan.org>

	api: add generic table getters
	the name of an entry,
	the entries as array of refs,
	and all the common fields of a table control object.

	rearrange internal layout, use COMMON_TABLE_CONTROL_FIELDS
	to guarantee a common control table layout, to access all entries
	from the obj, not the Dwg_Entity_OBJECT.

2018-05-31  Reini Urban  <rurban@cpan.org>

	api: add more table apis
	so far we only cover block, layer and appid tables.
	add generic dwg_obj_table_get_name, and
	dwg_obj_tablectrl_get_num_entries.

	TODO: dwg_obj_tablectrl_get_entry(index) and dwg_obj_tablectrl_entries - all
	and the API for the special control objects.
	not sure if the layout for all control objects is the same, to access
	the handles.

2018-05-31  Reini Urban  <rurban@cpan.org>

	doc: remove useless Macro call to cast prefix
	its not relevant, and clear to everybody.

2018-05-31  Reini Urban  <rurban@cpan.org>

	api: remove the entity init functions also
	this is the same as memset(0), affecting only the few geometric fields.
	it's distracting that all the common fields are unaffected.

	what would be useful would be to reset/init the common entity and object
	fields and handles, but there's no API for that yet.

2018-05-31  Reini Urban  <rurban@cpan.org>

	api: remove the wrong new/delete/free functions
	these were only entity specific, and didn't add them to the DWG
	an object consists of the generic Dwg_Object, a common-entity
	Dwg_Object_Entity and the specific Dwg_Entity_ENTITY.

	Use the dwg_add_ENTITY and dwg_free_object API instead.
	Closes GH #10

2018-05-31  Reini Urban  <rurban@cpan.org>

	api: add dwg_add_##ENTITY to the public API
	change the return value to the newly created object.
	also add the counterpart dwg_free_object() to the public API.
	src/free.h is now empty and could be removed. (later)

	The next commit will remove the wrong dwg_ent_ENTITY_new/delete/free
	functions from the API.  See [GH #10]

2018-05-31  Reini Urban  <rurban@cpan.org>

	api: warn about useless _new functions
	See [GH #10] and the note in the previous commit.

2018-05-31  Reini Urban  <rurban@cpan.org>

	api + doc: improve dwg_api for CIRCLE,LINE,ARC
	add const, restrict and API docs.
	dwg_ent_*_delete: remove error arg. free can handle NULL just fine.

	FIXME: Note that these new/delete/free functions are basically useless,
	as they don't add the entity to the DWG. We need to add a Dwg_Object
	and the associated Dwg_Object_Entity and then this Dwg_Entity_CIRCLE.
	See encode.c for dwg_add_##ENTITY for the proper API.

2018-05-30  Reini Urban  <rurban@cpan.org>

	api + doc: improve dwg_api for TABLE
	add error checks, and API docs.

	doc: more bit type descriptions

	fixup internal api: cleanup extern and headers
	version_codes may not be duplicated.
	duplicate symbol _version_codes in:
	    .libs/dwg.o
	    .libs/common.o

	*.inc: add emacs c-mode lines

	add -Wchar-subscripts, which is default on cygwin
	prevent signed char from being used as array index, e.g.
	isprintf(*string)

	fix -Wchar-subscripts warnings
	isprint might involve arrays, and a char index might be signed,
	which is UB. Only detected on cygwin.

2018-05-30  Reini Urban  <rurban@cpan.org>

	cygwin: strdup fixes, ...
	strdup is not ANSI, we need some POSIX spec to enable it, esp. on cygwin.

	the spec needs obj_string_stream, which is defined in decode.h (only
	detected by cygwin)

2018-05-30  Reini Urban  <rurban@cpan.org>

	configure: fixup skip valgrind on cross_compiling
	autoconf is a bit too fragile

	TODO: update

	add example_2000.dxfb, a binary DXF

	in_dxf: revise plan (comments only)

2018-05-30  Reini Urban  <rurban@cpan.org>

	windows: fix programs man rules, typo
	first dwgread.exe was built, but then for the .1 page
	dwgread was built, using the internal cross-compiler rules
	which missed AM_CFLAGS.

	since building the .1 pages would need wine for help2man
	I rather skip those rules under HAVE_MINGW_CROSS

2018-05-30  Reini Urban  <rurban@cpan.org>

	configure: skip valgrind on cross_compiling
	avoid setenv warning when --enable-trace was not enabled, as it is not needed
	without tracing.

	improve dejagnu warning. only one of 4 major testsuites are skipped then.

2018-05-30  Reini Urban  <rurban@cpan.org>

	internal api: cleanup extern and headers
	add all resused functions to all internal headers. this was a mess.
	again thanks to mingw-gcc, which is a bit stricter in this regard.

	get rid of wrong extern decl.  we don't use any extern functions, only library
	internal ones.

2018-05-30  Reini Urban  <rurban@cpan.org>

	dxf: use L"" on windows
	for VALUE_TU

2018-05-30  Reini Urban  <rurban@cpan.org>

	fix massive obj_string_stream bug
	I once wrote it to take the bitsize as 2nd arg, and then refactored it
	to take the object. (for the has_string flag).
	Not after carefully readng the mingw gcc warnings, I didn't use it in the header,
	but manually pasted the decl into the c files. but just the old decl!
	Tahts why the string stream offset calculation was so unstable.

	This should improve the r2007+ situation a lot.

	Add reused functions to its headers and use it.
	Add restrict to the dwg_decode_##token methods
	Fix redundant redeclaration of 'dwg_decode_add_object'

2018-05-30  Reini Urban  <rurban@cpan.org>

	appveyor: measure used space/free space
	we have a 80GB quota. see if logs and artefacts affect it.

2018-05-29  Reini Urban  <rurban@cpan.org>

	programs: fix error handling
	fix verbosity num_args
	avoid free of empty dwg,
	zero the struct before returning a file not found error

	decode: more PT tracing
	in shorter lisp fashion:
	DD, 2DD, 2BD_1, 3BD_1

	dxf: fix dwg_dxf_object -Wmissing-prototypes
	fix no previous prototype for function 'dwg_dxf_object'
	[-Wmissing-prototypes]. also for dwg_free_xdata_resbuf.
	This is not useful publicly, so make it static.

	more header_write returns
	they need an int now.
	control reaches end of non-void function [-Wreturn-type]

	api: remove redundant declarations
	of dwg_get_num_objects, dwg_get_num_entities.
	They are already in dwg.h/dwg.c

	travis: sha1sum => sha256sum
	already announced in the ChangeLog but missed it

	in_dxf: more checks and fields

	dxf_read_file: fail on DWG file

	out_dxfb: copy from dxf
	add a couple of restrict
	and remove the unneeded out_dxfb.h header
	in_dxf: more return type fixes.

	in_dxf: fixup return values
	which we need for checking EOF

	in_dxf: restructure loop
	add a few helpers

	in_dxf: add dxf_read_pair
	always read pairs

	in_dxf: sscanf is broken for me
	handroll our own.
	still need to read record pairs, and use a common loop
	to assign the values to the fields.

2018-05-28  Reini Urban  <rurban@cpan.org>

	in_dxf: start reading the dxf WIP
	not from the dat->fh but the chain.
	fails on the first sscanf call.

	abstract away macros with constant strings, because
	we cannot write to those strings:
	SUBCLASS for the readonly subclassmarker 100 group

2018-05-28  Reini Urban  <rurban@cpan.org>

	write: add internal dwg_add_TYPE api
	For dwgwrite/dxf2dwg we need to create/add arbitrary dwg objects. (e.g. from dxf)
	Add all the add functions to encode.c/.h (later eventually to dwg_api.h)

	rename DWG_TYPE_3DSOLID to DWG_TYPE__3DSOLID for consistency (to create it by type)
	ditto for PROXY rename to PROXY_OBJECT (even if the DXF name is only proxy)
	add fixed DWG_TYPE_object enums for all variable objects, they don't
	match the real obj->type field, which is the class id + 500. But the
	type is needed temp. for the add API.

	Create the objects from an empty/zeroed Bit_Chain stream.  Suppress all
	warnings/errors there.  field values and arrays need to be added later.
	This just allocates the room in dwg->objects and set's up the Dwg_Object and
	Dwg_Object_##type, and esp. applies all the encoding default values from dwg.spec.

2018-05-28  Reini Urban  <rurban@cpan.org>

	in_dxf: implement helper structures
	global Dxf_Objs holding all objs (header_vars, entities, objects)
	and its fields.
	add dxf_add_field for FIELD() and dxf_search_field for the 2nd round

	linear search is enough for those 30 objs, and max 20 fields.
	no binary search or hash needed here.
	these can be used for both ascii and binary dxf. (probably also for in_json)

	remove unneeded in_dxfb.h. we share all with in_dxf.h, only the field getters are different.

2018-05-28  Reini Urban  <rurban@cpan.org>

	in_dxf: TODO plan

2018-05-28  Reini Urban  <rurban@cpan.org>

	distcheck: add doc and programs DISTCLEANFILES
	and MAINTAINERCLEANFILES.
	Note that the man's are in git and the dist.

	add more DISTCLEANFILES without libps or enable-write.
	clean it then, because we didn't create it.

2018-05-28  Reini Urban  <rurban@cpan.org>

	doc: more doxygen, add refman, refman-pdf targets
	I tried to include the generated tex files into our texinfo,
	but this is not easily possible. The GNU stdlibc++ tried also
	but eventually uses two separate manuals, the texinfo and the
	doxygen generated.

	TODO: Integrated the doxygen refman html output into our generated
	manual. With html this should be easy.

2018-05-28  Reini Urban  <rurban@cpan.org>

	doxygen: probe and add as make target
	start some documentation effort, still looks horrible.
	the latex parts can then be included into our manual.

	htags is not much better, but at least properly clickable through.

2018-05-28  Reini Urban  <rurban@cpan.org>

	api: empty args check, null malloc
	simplify the boolean empty args checks.
	fix wrong error messages: null malloc when out of memory,
	empty arg when the arg was missing (NULL)

	api: rename api lwpolyline methods back to lwpline
	analog to AutoLISP method names. There it also abbrevated as lwpline

2018-05-27  Reini Urban  <rurban@cpan.org>

	api: rename LWPLINE to LWPOLYLINE
	this is the real entity name, in the AcDb and DXF

2018-05-27  Reini Urban  <rurban@cpan.org>

	dxf: more entities
	the 5 handle is mandatory, also add the common 330 and 100 values.

	temp. disable some broken tables.

2018-05-27  Reini Urban  <rurban@cpan.org>

	dxf: fix minimal HANDSEED crash
	it needs to be a valid value >0.
	disable BLOCK in TABLE
	disable BLOCK,ENDBLK in ENTITIES

	dxf: add 70 flag to all tables, harmonize layer flag
	all tables need a flag, set it in COMMON_TABLE_FLAGS.
	we don't need the extra flag_s short for layers, use one only.

2018-05-27  Reini Urban  <rurban@cpan.org>

	* src/out_dxf.c:
	dxf: add VALUE_BINARY for xdata and THUMBNAILIMAGE
	split into mult. lines of max size 127 (as %02X hex)

        * include/dwg.h, src/dec_macros.h:
	logging: shorten points
	log most 2d/3d points as %g (no ending zeros)
	and in parens as in AutoLISP.

        * src/dec_macros.h:
	decode: trace handle absolute as hex
	in DXF they are only used as hex.
	easier verification

        * src/out_dxf.c:
	dxf: 100 groups only with r2000+

2018-05-27  Reini Urban  <rurban@cpan.org>

	* src/out_dxf.c:
        dxf: more minimal cleanup, and several fixes
	avoid duplicate entity 0 RECORDS,
	fix FIELD_VECTOR: LWPLINE bulges,
	avoid 330 handles and 100 names with minimal.

	but we still get a eNullHandle assertion on ACAD import.

2018-05-27  Reini Urban  <rurban@cpan.org>

	* programs/dwg2dxf.c:
	dwg2dxf: fix -m --minimal arg processing
	on another note: acad will crash with our -m dxf file so far :(
	we need to minimize it a bit more.

        * src/out_dxf.c:
	dxf: skip empty TABLE_CONTROL null_handles

2018-05-27  Reini Urban  <rurban@cpan.org>

	* src/out_dxf.c: dxf: fix duplicate 5 handles
	we emit the owner 5 handle already with DWG_OBJECT for all objects,
	skip it for COMMON_TABLE_CONTROL_FLAGS and COMMON_TABLE_FLAGS.

	acad import still fails at table APPID

2018-05-27  Reini Urban  <rurban@cpan.org>

        * src/decode.c, src/dwg.spec, src/out_dxf.c:
	dxf: add dxf_write_xdata for XRECORD

2018-05-26  Reini Urban  <rurban@cpan.org>

        * src/dwg.spec, src/in_dxf.c, src/out_dxf.c,
        src/spec.h:
	dxf more DICTIONARY and XRECORD fields
	but the 102 names for XRECORD not yet.

2018-05-26  Reini Urban  <rurban@cpan.org>

        * src/out_dxf.c:
	dxf: add DbSaveVer if --as-rNNN
	when a VPORT table was saved in a newer version,
	dxf-out this version as DbSaveVer,1000.

	This is the only table with DbSaveVer. Some objects do have a
	AcDbSavedByObjectVersion tag, for the class version.

2018-05-26  Reini Urban  <rurban@cpan.org>

        * include/dwg.h, src/dec_macros.h, src/decode.c, src/dwg.spec
        src/encode.c, src/free.c, src/out_dxf.c, src/out_json.c,
        src/print.c:
	dxf: rename VIEWMODE, fix table num_entries
	VIEWMODE is a systemvariable, renamed from view_mode in VPORT and VIEW.
	combine UCSFOLLOW with it (for encode and dxf).
	via DXF the num_entries don't count the control entities.
	initialize and DXF the VPORT_CONTROL->flag

        * .appveyor.yml:
	appveyor: decrease disk usage
	delete the deployed zips. I hope this decreases the quota
	which is 80GB per user.

        * src/dwg.spec:
	spec: simplify encode_3dsolid decl
	make it static so we can avoid the decl.
	log the error that encode_3dsolid is nyi (not yet implemented)

2018-05-26  Reini Urban  <rurban@cpan.org>

        * include/dwg_api.h, src/dwg_api.c,
        test/testcases/3dsolid.c, test/testcases/body.c,
        test/testcases/region.c, test/unit-testing/3dsolid.c,
        test/unit-testing/body.c, test/unit-testing/region.c:
	api: rename dwg_ent_<ACIS>_get_{wire,silhouette}
	to get_wires, get_silhouettes.
	It returns the array of all, not just one.

2018-05-26  Reini Urban  <rurban@cpan.org>

        * include/dwg_api.h, src/dwg_api.c:
	api: remove array num setters
	there exist various api functions to change the number of some elements
	without changing the associated array itself, e.g.
	dwg_ent_polyline_mesh_set_num_n_verts without setting the n_verts array.
	all the set_num_ api functions need to go.
	this is unsafe.

	set_num_owned, set_numcols, set_numrows, set_num_lines, ...
	See [GH #9]

	not yet added add_array (i.e. push) and delete_array(at_index) apis yet.

2018-05-26  Reini Urban  <rurban@cpan.org>

        * include/dwg.h, include/dwg_api.h, src/dec_macros.h,
        src/decode.c, src/decode_r2007.c, src/dwg.c, src/dwg.spec, src/dwg_api.c,
        src/encode.c, src/free.c, src/in_dxf.c, src/in_dxfb.c, src/out_dxf.c,
        src/out_dxfb.c, src/out_json.c, src/print.c, test/testcases/insert.c,
        test/testcases/minsert.c, test/testcases/polyline_3d.c,
        test/testcases/polyline_mesh.c, test/testcases/polyline_pface.c,
        test/unit-testing/insert.c, test/unit-testing/minsert.c,
        test/unit-testing/polyline_3d.c, test/unit-testing/polyline_mesh.c:
	api: rename *_count fields to num*,
	owned_obj_count + owned_object_count => num_owned,
	insert_count => num_inserts,
	instance_count => num_instances,
	frozen_layer_count => num_frozen_layers,
	FIELD_INSERT_COUNT => FIELD_NUM_INSERTS,
	object_count => num_objects: dwg_get_num_objects already existed in dwg.h,
	                             remove duplicate from dwg_api.h,
	entity_count => num_entities: dwg_get_num_entities already existed in dwg.h,
		 		      remove duplicate from dwg_api.h,
	m_vert_count => num_m_verts,
	n_vert_count => num_n_verts,
	attr_def_count => num_attr_defs,

	Closes [GH #8]

2018-05-26  Reini Urban  <rurban@cpan.org>

	api: rename VPORT_ENT to VPORT_ENTITY
	for consistency. we don't use the ENT abbreviation in no
	other object, but we do use _ENTITY already

	dxf: oops
	delete a .bak test-data file

	dxf: fix VPORT aspect_ratio 41
	The real aspect_ratio needs to be divided by the viewsize,
	since r13 at least. <=r12 stores the real aspect_ratio already.

	dwg2dxf: fix printing as version
	to stdout not stderr

	dxf: use more dxf_write_handle conversions
	also for the name in COMMON_TABLE_FLAGS, as those names
	also need conversions.
	also add *Active

	dxf: $MEASUREMENT is r14 already
	simplify the logic also

	dxf: $UCSBASE is r2000+ only

	dxf: write even empty names/strings
	don't skip the 1 group of e.g. DIMBLK1
	convert unicode names to utf8
	convert reversed standard names if read from newer and write as older.

2018-05-26  Reini Urban  <rurban@cpan.org>

	dxf: abstract HANDLE_NAME to dxf_write_handle
	since r2000+ some Standard handle names are renamed:
	STANDARD to Standard, BYLAYER to ByLayer, BYBLOCK to ByBlock.

	also check that the table name is really an object, not an entity.

2018-05-26  Reini Urban  <rurban@cpan.org>

	dxf: add examples in more versions
	sample_2000.dwg in r14-2018 DXF formats
	example_2000.dwg in 2018 dwg and dxf formats

	alive.test: add filt_dxf.pl
	to normalize POSIX sprintf("%-16.14f") floating point numbers to
	the format used with MSVC with native AutoCAD, so that we can
	easily compare the output of oursvs them.

2018-05-25  Reini Urban  <rurban@cpan.org>

	restrict: add C99 restrict pointer decls
	just a few pointers might be the same: dat, hdl_dat and str_dat.

	2007: fix unaligned access on copy_n helpers
	1-3 is reverse, 4-8 is straight. 16 is reverse 8-wise.
	just use memcpy

2018-05-25  Reini Urban  <rurban@cpan.org>

	dxf: special-case VPORT field order
	for DXF output.

	fixed some wrong VPORT fields: sun_handle -> shade_plot_handle 333 (vport owns these)
	view_twist_angle -> view_twist for consistency
	aspect_ratio 41 is still wrong
	view_twist 50 -> 51
	back_clip 33 -> 44

	also fix the common table format a bit
	allow DXF groups in the spec

2018-05-25  Reini Urban  <rurban@cpan.org>

	dxf: support Standard in HANDLE_NAME
	the DWG Standard table entry_name is called STANDARD,
	but in the DXF it is translated to Standard.

	Also simplify HANDLE_NAME to avoid the tmp buf,
	names are always strings.

2018-05-25  Reini Urban  <rurban@cpan.org>

	man: fix dependency problem and POSIX/Windows compat
	The .1 files depend on the c and the binary.
	remove the $(*F) gnu make-ism.
	enable windows compat to generate the man pages.
	improve the man target: no submake's, enable proper deps.

	Fixes spurious help2man: can't get `--help' info from ./dwgwrite errors
	when the binary was not generated yet in parallel builds.
	Closes GH #4

2018-05-25  Reini Urban  <rurban@cpan.org>

	appveyor.yml: skip_tags: true
	we tag only already tested and deployed commits.
	avoid double smoking on our slowest smoker.

	on the other hand travis needs the tag to deploy the generated
	dist's to this tag.

2018-05-24  Reini Urban  <rurban@cpan.org>

	fix bit_utf8_to_TU, 3 byte case. detected by gcc-8
	praise the good compiler.
	warning: bitwise comparison always evaluates to false [-Wtautological-compare]

	encode: return early for 2004
	to avoid useless hangs

2018-05-24  Reini Urban  <rurban@cpan.org>

	stability: return 0 on bit overflows
	when a number is wrong we prev. returned -1,
	leading to abnormal high numbers, sizes.
	rather zero it to be able to continue on some unknown data.

	avoid bit_calc_CRC overflows

2018-05-24  Reini Urban  <rurban@cpan.org>

	dwg_decode_handleref_with_code: fix null pointer dereference

	api: fix null pointer dereference

	add build-aux/dejagnu.h.patch
	this header throws too many warnings with newer clang's.
	for now only suppress clang warnings, gcc not yet.
	(only tested until gcc-6 on macports. no idea about gcc-8)

	rename VP_ENT_{HDR,CONTROL}
	to more natural names. AutoCAD used ViewportEntity (r11-r2000).
	Analog to block use VPORT_ENT_CONTROL and VPORT_ENT_HEADER.

	rename {ucs,block,view}_control_handle to *_control
	to harmonize all the control handles, which have no suffix.

2018-05-24  Reini Urban  <rurban@cpan.org>

	rename SHAPEFILE to STYLE
	see [GH #7]
	nobody else names it SHAPEFILE, only the ODA.

	dxf names it STYLE and $TEXTSTYLE,
	AutoCAD names it AcDbTextStyleTable,
	libdxfrw names it STYLE and TEXTSTYLE

2018-05-24  Reini Urban  <rurban@cpan.org>

	geojson: use the new APIs
	for polyline_2d, polyline_3d and add point.

	api: add polyline_3d points api
	and remove the badly named owned_obj_count field api

	api: const most getters

2018-05-24  Reini Urban  <rurban@cpan.org>

	dxf: more table control fields
	each table has at first the control object,
	and then the COMMON_TABLE_FLAGS(owner, acdbname) before
	the other fields, not after.
	special-case this.

	add a new objid to each control object, as link back to the Dwg_Object
	(e.g. for the owner handle).

2018-05-24  Reini Urban  <rurban@cpan.org>

	dxf: add PUCSORTHOREF, fix HANDSEED

	dwg2ps: use the new pline points API

	cbmc: experimental CBMC rule for bits_test.c
	To create coverage testcases.  Does not work so far, and needs an insane
	amount of time.  Should be limited to single functions only.

2018-05-24  Reini Urban  <rurban@cpan.org>

	api: rename pline numpoints, add get_points API
	numpoints is different across versions.

	add a get_points API for various pline types,
	this is also different across versions.

2018-05-24  Reini Urban  <rurban@cpan.org>

	json: new geojson output formatter
	only LINE,LWPLINE,POLYLINE_2D,INSERT (unexploded) entities so far.

	TODO: facetting of curves, ocs/ucs transforms, use the new pline points api.

	TODO: NOCOMMA and \n not with stdout. stdout is line-buffered
	so NOCOMMA cannot backup past the previous \n to delete the comma.
	We really have to add the comma before, not after, and special case the first
	field, not the last to omit the comma.

2018-05-23  Reini Urban  <rurban@cpan.org>

	dwg2ps: fix POLYLINE_2D
	wrong loop index

2018-05-22  Reini Urban  <rurban@cpan.org>

	dxf: remove wrong test dxfs
	we compare now our own created dxfs against {ex,s}ample_2000.dxf
	unfortunately they don't match the versions. create proper ones later,
	the one remaining should be enough for now.

	travis: simplify distcheck
	distcheck already creates the tardists.
	add sha256sum (in ubuntu coreutils), we upload them to github releases.

	travis: deploy releases on tags

2018-05-22  Reini Urban  <rurban@cpan.org>

	appveyor: re-try mingw install
	install-binPROGRAMS is not triggered, do it manually.
	also install examples/*.{c,exe}

	move the dll to the root, together with all the programs. on windows
	they should stay together. the rest is devel stuff.

2018-05-22  Reini Urban  <rurban@cpan.org>

	dwgwrite: improve encoding
	of empty data. alloc empty sections and section_info.
	allow empty handles (null_handle).
	set the default version for dwgwrite to R_2000, support --as-rNNNN
	add the dwgwrite.1 dxf2dwg.1 man pages

	README: write is good enough for r2000
	for most DWG's, some not yet.

2018-05-22  Reini Urban  <rurban@cpan.org>

	add API unicode support (for r2007 strings, optional)
	convert UCS-2 to utf-8 (char*)

	add bit_convert_TU() and bit_utf8_to_TU() converters, bit_convert_TU()
	was prev. only latin-1, now full utf-8. converters written from scratch,
	they are trivial. Ken Thompson designed it that way.
	not rejecting any wrong utf-8 encodings yet.

	add dwg_api_init_version(&dwg) for the version. only needed since r2007,
	utf-8 is backwards compatible. ucs-2 not.

	call inlined dwg_api_init_version on every API function with an
	Dwg_Object or Dwg_Data.

2018-05-21  Reini Urban  <rurban@cpan.org>

	add dwglayers
	Prints all layers in a DWG.

	improve help2man rule, avoid --version warnings.

2018-05-21  Reini Urban  <rurban@cpan.org>

	cmp_dxf.pl: add some basics

	dxf: change float printf format to %-16.14f
	on windows it is different. %g swallows the ending zeros

	dxf: use DOS EOL \r\n

	HACKING: add fuzzing with afl-fuzz
	fast enough on linux without our own loop so far.

2018-05-21  Reini Urban  <rurban@cpan.org>

	dwg_read_file: support - for stdin
	dwgread - now reads from stdin.
	I needed it for afl-fuzz, but should come handy elsewhere.
	dwgwrite already supports reading from stdin.

	* dwg.c (dat_read_stream,dat_read_file): helpers added.
	  (dwg_read_file): use it.

2018-05-21  Reini Urban  <rurban@cpan.org>

	TODO: update practical TODOs
	smoke.sh: delete duplicate python3.6m.

2018-05-20  Reini Urban  <rurban@cpan.org>

	dxf_format: add new DXF codes up to r2014

	bits_test: improve flapping CRC tests
	realloc creates uninitialized memory

	smoke: whitespace only

	bits_test: stabilize
	avoid uninitialized memory, leading
	to problems with -O2

2018-05-20  Reini Urban  <rurban@cpan.org>

	dxf: encode linetype_flags BYLAYER/BYBLOCK/CONTINUOUS
	enable MLINESTYLE which has a similar lines[rcount].ltindex
	flag.

	add a BS 32767 bits test. This was not the problem.

2018-05-20  Reini Urban  <rurban@cpan.org>

	bits_test: add r2004 CMC test
	and fix a stack-overflow, detected by asan

	smoke: add python paths on darwin. no system libxml2, only via macports

2018-05-20  Reini Urban  <rurban@cpan.org>

	man: fix --version output for dwgrewrite
	to help help2man
	help2man: can't get `--version' info from ./dwgrewrite
	Try `--no-discard-stderr' if option outputs to stderr

2018-05-19  Reini Urban  <rurban@cpan.org>

	encode: write empty null_handle
	and simplify common_entity_handle_data.spec: use spec.h
	common_entity_handle_data.spec: set isbylayerlt
	dwg_encode_handleref: resolve handle codes

	dwgrewrite: set --verbose dwg.opts
	and print the objref object fields again only with -v4 (HANDLE) or higher.

	decode: skip TRACE with FIELD_TF, FIELD_TFF
	only log the (overlong) value at the INSANE level

	encode: fix object size calculation
	no Wrong object size: warning anymore

	encode: fix object handle
	wrote the wrong handle for each object

	free: free class->dxfname_u also

	fix bits, enable more testcases/bits_test's
	fix bit_write_DD case BB=3.
	fix bit_read_L, bit_write_L (unused).
	add _H testcases, and many more.

2018-05-18  Reini Urban  <rurban@cpan.org>

	encode: fixed for r2000
	write the object CRC (same seed).
	dwgrewrite works now for sample_2000.dwg

2018-05-18  Reini Urban  <rurban@cpan.org>

	encode: fix bitsize
	no duplicate bitsize fields on Dwg_Object_Object and Dwg_Object, only one.

	patch encode bitsize after the object/entity was written.
	we cannot assume that the encode user knows the bitsize, hence write the
	actual bitsize. use a temp. obj->size*8 value. size change would be at 0x7fff.
	so far we ignore that.

2018-05-17  Reini Urban  <rurban@cpan.org>

	xmlsuite: make it python3 compatible
	tested ok with python 2.7 and 3.6.

	smoke with --enable-python=python3.6m

	fix m4/ax_python_devel.m4 for macports
	which uses the --enable-framework=/opt/local/Library/Frameworks
	prefix, which is not honored in the -L prefixes.
	add a couple of echos

2018-05-16  Reini Urban  <rurban@cpan.org>

	man: make help2man optional
	we ship the .1 files, and help2man is not on all systems.
	only needed to regen the man files.
	e.g. cygwin does not have it. add it there.

	dxf: add BLOCKS
	now only a few minor DXF issues are remaining

	dxf: add ENTITIES and OBJECTS

2018-05-15  Reini Urban  <rurban@cpan.org>

	DEBUG_HERE: silence wrong uninit warning

	free: add dwg_obj_is_control function
	the tables have copies in dwg

2018-05-15  Reini Urban  <rurban@cpan.org>

	dwg, out_dxf: fix TABLES
	as expected we have to copy the CONTROL object fields
	to avoid corruption by realloc.

	also rename SHAPEFILE handles field to styles.

2018-05-15  Reini Urban  <rurban@cpan.org>

	dwg, out_dxf: add TABLES
	and add the table control links to the dwg struct.
	note that these links might be corrupted if objects are realloced.
	if so then we need to copy struct fields.

	remove dwg->num_layers and harmonize with the other tables.

2018-05-15  Reini Urban  <rurban@cpan.org>

	dwg2dxf --help: add r2007, r2010, r2013
	the dxf writer can do that already, i.e. will do that

	add dist_man1_MANS
	we distribute the man1 pages. but no man3, just the info.

	dsymutil: add noinst_PROGRAMS also

	README: Update
	dwg2ps is not so good to be advertised in the README

	dwg2ps: fix compiler warning
	-Wdeclaration-after-statement

	configure: allow CFLAGS overrides
	e.g. for pslib CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib

2018-05-15  Reini Urban  <rurban@cpan.org>

	scan-build: don't wait
	scan-build -V calls scan-view which waits until we are finished
	looking at it in the browser.
	put this into the background, we need to kill scan-view
	later (a python process).

	without make just waits here, but we don't want to test this via smoke.sh

2018-05-15  Reini Urban  <rurban@cpan.org>

	dwgwrite: improve reader format detection
	which reader: either manual -I --format argument, or by the extension of the
	input file.

	fix build-aux/smoke.sh
	syntax error with CC, darwin only

2018-05-14  Reini Urban  <rurban@cpan.org>

	dwg_resolve_handle* not public yet
	move out of dwg.h, it doesn't look stable enough.
	but add a new dwg_ref_get_object_relative
	to find a relative object from an handle and base object

	dwg2ps: add arc and circle

2018-05-14  Reini Urban  <rurban@cpan.org>

	extend dwg_ref_get_object
	to actually search for the object via absolute_ref,
	not just the cached obj.
	use it for polyline vertices in dwg2ps.

	move the handle resolvers from private decode to the public dwg.

2018-05-14  Reini Urban  <rurban@cpan.org>

	dwgwrite: use dxf_read_file
	which decides upon ascii or binary,
	or dwg_read_dxfb directly with the .dxfb extension

2018-05-14  Reini Urban  <rurban@cpan.org>

	move dxf reading from dxf2dwg to in_dxf
	from the sample into the library. dwgwrite will need that also,
	and users also.
	note that the reading implementation is not yet written.
	it's mere copy of the writers (ascii and binary).
	the reader needs to account for unsorted order of items.

	and add a few const's

2018-05-13  Reini Urban  <rurban@cpan.org>

	improve gcov from 1% to 35%
	the true library coverage is about 75%, but we are getting closer.

	alive.test: dash fixes, empty $problems
	115: [: =: unexpected operator
	and more.

	windows: skip dwgrewrite tests
	on mingw. killall does not work there

	configure: add --disable-python
	and work on --enable-python=python3.6

	smoke: more compilers

2018-05-12  Reini Urban  <rurban@cpan.org>

	HACKING: update deps, tips, dates

	dwg_api.h: no double decl of dwg_object_ref
	only clang-4 -std=c99 complained

	POSIX 2008 for strdup, and add M_PI
	several stricter compilers don't have strdup nor M_PI.
	define _POSIX_C_SOURCE to 200809L
	This fixes e.g. clang-4 -std=c99

	add smoke.sh for darwin/linux
	and probe for basename, which fails on my arm cross.
	use POSIX libgen.h before string.h with the GNU extension of basename.
	without basename fall back to fullpath for the outfile.

2018-05-11  Reini Urban  <rurban@cpan.org>

	various -Wall fixes
	detected by the arm cross-compiler, which is a bit stricter

	dwg2svg2: fix a few warnings
	from clang -Weverything

	json: add NOCOMMA, object fields
	looks pretty good now, almost correct.
	NOCOMMA erases the last ,\n of an array/hash

2018-05-11  Reini Urban  <rurban@cpan.org>

	configure: change setenv warning
	tracing works now even without setenv(). Just --enable-trace
	will not work as expected. -v1 does though.

	Also note that we currently need a gmake on BSD's

2018-05-11  Reini Urban  <rurban@cpan.org>

	appveyor: re-enable --enable-write
	we now kill hanging dwgrewrite processes

	dxf: fix windows cast warning

	dxf: unify into header_variables_dxf.spec
	now just some more sections are missing.
	also add some rudimentary dxf content testing.
	add AutoCAD native and libdxfrw dxf's to compare against.
	(no theiga yet)

	dxf: harmonize ascii/binary types more
	and simplify spec.h. add a special DXF (out) block

	travis: add suggested texlive
	suggested by verbose distcheck.
	distcheck passes now on travis, so en-arm it.

	travis: verbose DISTCHECK
	now it fails with make dvi

	travis: add swig

	work over all authors and copyright years

2018-05-10  Reini Urban  <rurban@cpan.org>

	encode: harmonize handle logging

	appveyor: clean tag release names
	don't double add the prefix and suffix.
	stay with the simple tags, ie. the build number.
	the zip has the proper name.

	appveyor: disable write
	it started segfaulting, since we improved it. enable it, when
	it starts becoming more stable.

2018-05-10  Reini Urban  <rurban@cpan.org>

	encode: add RESET_VER
	cur_ver should be reset after after SINCE/... version check block,
	otherwise e.g. handles are not printed.

	We are stuck with this syntax without the block in the macro, so try
	to add these RESET_VER wherever it is missing.

2018-05-10  Reini Urban  <rurban@cpan.org>

	encode: fix HANDLE
	reset wrong cur_ver to allow printing handles

	encode: harmonize HANDLE tracing
	and fix 2 minor issues: reactors have dxf code -5.
	print the type as decode

	dxf: more dxf codes, add dxf_codepage()
	add dxf codes for FIELD and GEODATA.
	support codepage 29: ANSI_1251

	dxfb: more types and harmonize
	the goal should be a header_vars_dxfout.spec, with typed fields, like HEADER_RC.
	but maybe it can even serve for dxfin also, looping over all available names.

2018-05-09  Reini Urban  <rurban@cpan.org>

	encode: fix objects
	advance to the next object, don't reset to start start address.
	previously objects were overwriting each other.
	calculate size, and adjust if wrong. users cannot be expected to
	write both sizes, byte and bits correctly.

	Now only bit_write_handle is broken, and several object sizes are off.

2018-05-09  Reini Urban  <rurban@cpan.org>

	encode: simplify bit_write_MS
	this is just a very simple RLE encoded int, with the highest bit
	announcing a further short. in this case 1 or 2 shorts.

2018-05-08  Reini Urban  <rurban@cpan.org>

	encode: ensure chain size
	when writing objects

	dxf: more header vars
	fix colors,
	fix MLINESTYLE handle name to entry_name for consistency,
	rename the HEADER_VAR and HANDLE_VALUE macros.

	Fix decode WE_CAN only error message
	we can only decode version R13-R2007 (code: AC1012-AC1021) DWG files.
	was -R2004

	decode: improve version file-magic check
	error with Invalid DWG, magic: %s
	or Invalid or unimplemented DWG version code %s

	dxf: add common_entity_handle_data
	and few more minor improvements. only output
	dxf codes != 0. still a lot todo.

	json: indent arrays and hashes
	add abstractions, also useful later for YAML.

	dxf: add and fix more 2007+ vars
	and fix some 2004+ dxf codes.
	add SHADOWPLANELOCATION and REALWORLDSCALE unknowns.

2018-05-08  Reini Urban  <rurban@cpan.org>

	dxf: add REQUIREDVERSIONS as 160
	this is a DXF header value.

	also convert ucs-2 CLASS strings down to ascii for DXF.
	TODO: decode header variable LASTSAVEDBY 2010+

2018-05-08  Reini Urban  <rurban@cpan.org>

	alive.test: simplify dwgrewrite handling
	This does not need an extra argument anymore.

	rename fmt_ to out_
	corresponding to the needed in_ readers:
	json, dxf, dxfb

2018-05-07  Reini Urban  <rurban@cpan.org>

	add dwgwrite skeleton
	corresponding to dwgread. need format readers, not writers.
	dwg_read_json(), dwg_read_dxf(), dwg_read_dxfb()

	doc: fix Decoding API example

	add manual, gendocs.sh
	from gnulib (GPLv3).
	just remove a wrong htmlarg setting.

	dxf: DWGCODEPAGE is since r10

	probe for strcasecmp header
	use AX_INCLUDE_STRCASECMP from autoconf-archive.

	dwg2dxf: use fmt_dxf{,b}

2018-05-07  Reini Urban  <rurban@cpan.org>

	dwgread: add the 3 output formats
	and add -o outfile support and regen the man pages.

	If this turns out nice, add the other output formats also:
	YAML, XML, PS, SVG, ...

2018-05-07  Reini Urban  <rurban@cpan.org>

	add fmt_dxf and fmt_dxfb also

2018-05-07  Reini Urban  <rurban@cpan.org>

	json: start with -O fmt JSON WIP
	various formatter output modules: -O json,yaml,xml,dxf for dwgread.
	maybe even ps and svg. so we will need only a dwgread and dwgwrite,
	not any other helpers.

	add fmt_json.
	for now they all print to stdout as stream,
	but dwg2dxf might want to print to a fh, because this construct outfile from infile.
	The --format arg can also serve for dwggrep as output format for each found entity.

2018-05-04  Reini Urban  <rurban@cpan.org>

	trace: init 2007 loglevel for 2010+
	otherwise some 2007 helper functions, like section_string_stream
	and obj_string_stream do no logging.
	loglevel is module specific, and those helpers don't have dwg as arg.

	TODO: update TODO

	testcases: fix more wrong format types

	ubsan: fix signed integer overflow
	for the hash calc use an unsigned rseed.

	eed: fix asan write error
	when adding the ucs-2 string delimiter it will write 2 byte, past
	the allocated bufsize. hence alloc size+2 to ensure delimited unicode strings.
	and then we can skip writing the last 0, as we already used calloc with size+2.

	trace: enable loglevel via -v
	in encode, decode and free entry points

	examples: add -v[0-9] support

	work over copyright headers, add one AUTHOR
	fix the years, add missing authors.

	trace: independent loglevel per dwg.opts
	pass through the loglevel/--verbosity without --enable-trace, resp.
	without setenv()

2018-05-02  Reini Urban  <rurban@cpan.org>

	read_2004_section_classes: wrong max_num type

	add build-aux/appveyor-deploy.bat
	deploy either a tagged commit or nightly branch, not both

	appveyor: add nightly deployments
	for master branch changes.
	see https://github.com/rurban/libredwg/releases

	windows: add .appveyor.yml deploy
	as zip

	windows: harmonize wchar_t logging
	improve native wchar_t as UCS-2 support (windows),
	printing it natively

	Makefile.am: remove check-wine
	make check can handle wine already, check-wine was broken for a while

	programs: fix wine typo
	the additional ) caused run 'dwgrewrite.exe)' example_2000

	less logging: adjust levels a bit
	log less important info with higher levels.
	add LOG_TF for fixed text for arbitrary levels, use if for binary
	fixed blobs with INSANE, not TRACE.
	log @ positions with level 4 HANDLE.

2018-05-02  Reini Urban  <rurban@cpan.org>

	check-dwg*: use -v3, not -v4
	avoid logging large binary blobs, esp. with unsupported versions.
	some example logs are >2GB

	no double .PHONY targets

2018-05-02  Reini Urban  <rurban@cpan.org>

	check-dwg*: use -v3, not -v4
	avoid logging large binary blobs, esp. with unsupported versions.
	some example logs are >2GB

2018-05-01  Reini Urban  <rurban@cpan.org>

	2007: enable 2007 decoding, now supported.
	enable tests, disarm the decode_R2007 IS_RELEASE check,
	remove the warning, fix the docs.

2018-05-01  Reini Urban  <rurban@cpan.org>

	2010: prepare 2010 classes, fix 2007
	on top of the 2004 section format. copy over the logic from 2017.
	harmonizes classes, and fixes reading the last class (max_num) for 2007+.

	This fixed reading most 2007 DWGs

2018-05-01  Reini Urban  <rurban@cpan.org>

	2010: prepare decode_header_variables
	add bitsize_hi, calc. bitsize.
	separate the 3 streams for 2010.
	can parse now until the individual object bitsizes. (still 0)

	2007: change decode warning message
	handle and string streams are now solved. start working on the
	remaining bugs

2018-04-30  Reini Urban  <rurban@cpan.org>

	2007: fix xrefindex_plus1 ODA doc bug
	xrefdep is before xrefindex_plus1 since r2007+, not r2010+

	rename table flag bit 7 _64_flag to xrefref
	referenced external reference, block code 70, bit 7 (64)

2018-04-29  Reini Urban  <rurban@cpan.org>

	2007: better hdlpos calculation
	no -42 offset. start before reading the type after the size.
	then the handle position naturally aligns.
	add a Dwg_Object address field.
	The r2010 bitsize derives from the obj->size.

2018-04-28  Reini Urban  <rurban@cpan.org>

	2007: adjust hdlpos by -42
	found out error experimentally.
	Most r2007 objects can now be read, just a few remaining errors.

	unify START_HANDLE_STREAM
	esp. it is r2007+ only

	dwg.spec: cosmetics LOG_ERROR
	for invalid DICTIONARY.numitems

	2007: add FIELD_VECTOR_T vcount index
	as <r2007. see DICTIONARY

	2007: trust hdlpos
	and distrust obj->has_strings. hdlpos should be always right.
	some objects seem to ignore has_strings, like ENDBLK

2018-04-28  Reini Urban  <rurban@cpan.org>

	2007: fix obj string stream calc
	fix for negative advance.
	use one more byte offset to the back. data_size is now correct.
	check bit_advance_position also for underflow < 0

	TODO: with no strings don't try to read strings, set them to NULL.
	(MLINESTYLE)

2018-04-28  Reini Urban  <rurban@cpan.org>

	2007: LAYER set flag bits
	2007+ reads only a RS, set the bits for older releases.
	also add some string stream debugging code

	2010: use LAYER handles r2010+

	2007: use COMMON_TABLE_FLAGS entry_name
	FIELD_T, not FIELD_TV

2018-04-27  Reini Urban  <rurban@cpan.org>

	2007: undo START_HANDLE_STREAM has_strings offset

2018-04-27  Reini Urban  <rurban@cpan.org>

	2007: fix the hdlpos offset
	and ignore the still wrong has_string bit.
	Now the handle_stream and string_stream offsets are correct, just the string stream
	length and bit are wrong.
	Thus ignore the has_string bit for now in START_HANDLE_STREAM

	Fixes many 2007 objects.

2018-04-27  Reini Urban  <rurban@cpan.org>

	2007: add FIELD_VECTOR_T
	for 2007 array of TU texts. Fixes DICTIONARY with r2007.

	read/write: allow hard- and symlinks
	not just regular files. just on windows with mingw S_ISLNK is undefined.
	and some minor improvements on write: binary, rename vars.

	programs: crash on notexisting file
	when returning early from dwg_read_file (e.g. not found, not readable) we
	still call dwg_free, which needs the pointers to be NULLed.

	2007: rename some VIEWPORT fields
	def_lighting_type -> default_lighting_type
	use_def_lights -> use_default_lights
	ambient_light_color -> ambient_color

	2007: complete VIEW and VPORT spec fields
	rename Dwg_Color byte to flag

	HACKING: link to CONTRIBUTING and USING_FOREIGN_CODE

	USING_FOREIGN_CODE: add incompatible
	licenses also. From https://www.gnu.org/licenses/license-list.en.html

	add USING_FOREIGN_CODE
	answering the question which code can be used in
	LibreDWG, e.g. a reed-solomon library

	update docs

2018-04-27  Reini Urban  <rurban@cpan.org>

	add manpages and option handling
	option handling is minimal, position sensitive.
	not using getopt_long() yet.

	used help2man to create the initial manpages. (in sync)

	rename dwg_ps program to dwg2ps for consistency

2018-04-27  Reini Urban  <rurban@cpan.org>

	noinst_PROGRAMS: dwg2dxf dxf2dwg
	these are not yet ready.
	we are targettting an early alpha release, and these will
	not be ready for that

	TODO: more TODO

	leak: free the sections chain
	sections is the root, section just the current element in the linked list.
	only in the unlikely case of out of memory.

	leak: free the xdata chain
	and not just the last element, in case of out of memory (very unlikely).

2018-04-26  Reini Urban  <rurban@cpan.org>

	programs: default to LIBREDWG_TRACE 1
	probe for setenv and use it. this is only failing on mingw.
	print the error message when failing.
	Fixes Bugs #31867, #35110, #46175

	leak: set DWG_SUPERTYPE_UNKNOWN
	to avoid double-free of eed data. this is one big chunk only.
	free eed.raw only on size, otherwise it's a continuation with data only.

	leak: fix double-free of LAYOUT eed

	leak: free the eed data
	and COMMON_ENTITY_HANDLE_DATA: all the common handles, reactors.

	analyzer: initialize dwg->header.version
	Logic error	Result of operation is garbage or undefined
	programs/dxf2dwg.c	dwg_read_dxf

	analyzer: fix memory leaks

	analyzer: remove dead initialization
	dwg_encode_common_entity_handle_data does not need dwg (yet).

2018-04-26  Reini Urban  <rurban@cpan.org>

	analyzer: fix clang-analyzer warnings
	using the recent scan-build target.

	Allocator sizeof operand mismatch (wrong malloc casts)
	Branch condition evaluates to a garbage value (uninitialized obj_dat)
	Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131) (for counts=0)

2018-04-26  Reini Urban  <rurban@cpan.org>

	pre-R13: start decoding entities WIP
	move the common pre-R13 entity fields to Dwg_Object_Entity
	and add a spec-local _ent for this.
	add a common decode_entity_preR13() decoder before the
	entity-specific handlers. 70% done.
	decode_preR13_entities: add the entity loop.
	  missing: check DIMENSION opts field for the type.
	dwg.spec: TODO ATTRIB/ATTDEF,
	  add VERTEX_2D, POLYLINE_2D
	  add R11OPTS(n) macro

	silence r11 compilation warnings
	use proper field casts for r11

2018-04-26  Reini Urban  <rurban@cpan.org>

	policy: add #ifndef IS_RELEASE checks
	abort on unsupported DWG versions to avoid segv on
	released packages.
	logic: if a .git directory is present it is not a release.

	also add a new scan-build target, using clang's static analyzer
	clang-analyzer.

2018-04-26  Reini Urban  <rurban@cpan.org>

	add CONTRIBUTING, adjust TODO
	copy CONTRIBUTING from the GCC project and adjust it.  Esp.  important for
	Legal Prerequisites.  This is an official and important GNU package, with
	ownership assigned to the FSF, to able to protect us from legal threats.

	adjust TODO, README and README-alpha.
	Mention that unreleased downloads of the library will crash
	as it will try to decode unsupported DWG versions. Released
	downloads will rather abort then.

2018-04-25  Pero Brbora  <pbrbora@stud.unidu.hr>

	unit-testing: Prevent segfault on error
	Closes Savannah #8628

2018-04-25  Reini Urban  <rurban@cpan.org>

	README: updates

2018-04-24  Reini Urban  <rurban@cpan.org>

	pre-R13: fix STYLE
	add bigfont_name field

	pre-R13 DIMSTYLE vars
	just the DIMBLK_T texts are unsure, and one unknown
	RC var not in DXF: DIMUPT probably

	pre-R13 header vars
	complete the header vars with DXF counterparts.
	missing are the handles (i.e. table indices), and texts.

2018-04-23  Reini Urban  <rurban@cpan.org>

	Improve object tracing
	Print the type even with loglevel 2, but not much more

2018-04-23  Reini Urban  <rurban@cpan.org>

	r11: reset tbl->number on failure
	when we read a non-object table, reset the index
	so we don't increment it in the next line

	   dwg->num_objects += tbl->number;

2018-04-23  Reini Urban  <rurban@cpan.org>

	xmlsuite: only process existing DwgTxtFileName
	protect from skipped dwgs, such as <r13 and >2004

	2007: add klass dxfname_u field
	and use dxfname as the ASCII variant for comparisons.
	This fixes reading all the class objects (>500).

	2007: fix obj_string_stream
	The bitsize calculation starts before reading the bitsize.
	Thus initialize the string stream before reading the bitsize.
	The bit is then always 0, as objects start at bit offset 0

	2007: fix EED code 0
	2007 already uses unicode strings in EED

	2007: add absolute last_offset tracing
	and outcomment last_handle for each object (was used
	for object idx plausibility)

2018-04-23  Reini Urban  <rurban@cpan.org>

	2007: limit string data size, read entity bitsize
	reset the string stream to start at the object offset and limited
	by the object size.

	fix reading the entity bitsize in dwg_decode_entity:
	R_2000 - R_2004 -> R_2000 - R_2010.

2018-04-20  Reini Urban  <rurban@cpan.org>

	harmonize Num Objects tracing
	also for r2007

	auxheader.spec: convert 20x unknown_rc RC to FIELD_TFF
	for more pleasant logging

	LOG_TRACE_TU: harmonize
	with logging of TV

	don't typos

	start separating encode version support
	add a separate encode_preR13(), but not for the other versions.
	they are all basically the same, just the sections maps are different.

	dwg_decode(), dwg_encode()
	harmonize the two main entry points.
	rename dwg_decode_data() to dwg_decode(),
	rename dwg_encode_chains() to dwg_encode()

	comment for dwg_encode_chains refactor
	version specific and rename to dwg_encode_data()

	2010: add BOT type
	use the 2004 format.
	bitcoded object type: single or double byte

	rename APPID_CONTROL->num_apps to num_entries
	for consistency with the other table control objects.

	abstract bit_set_position
	and a new bit_position getter

2018-04-18  Reini Urban  <rurban@cpan.org>

	xmlsuite: skip 2007+ so far

	2007: more handle stream work
	now almost works. we need to set the
	handle stream to the end of the object: pos+bitsize = hdlpos
	after the has_strings bit.

2018-04-16  Reini Urban  <rurban@cpan.org>

	name unknown DIMSTYLE_CONTROL vars
	morehandles

	undo <=2007 parenthandle
	object parenthandles appear also in r2010.
	The pointer to the control object.

	pack _encrypted_section_header also
	is wrong with some compiler settings, e.g. asan.

	replace FIELD_VECTOR RC with FIELD_TF
	esp. for tighter logging.
	array of bytes => fixed length text.

	WIP more 2007 handle stream
	not for entities yet. there we don't have a bitsize.
	initialize hdlpos after reading the object bitsize.
	before 2007 hdl_dat is just the same as dat, ditto str_dat.
	str_dat is a copy then because strings are interleaved.
	hdl_dat just needs one advance, because the handles are only
	at the end.

2018-04-15  Reini Urban  <rurban@cpan.org>

	sprintf %ls for cygwin
	warning: passing argument 2 of fprintf from incompatible pointer type [-Wincompatible-pointer-types]
	   LOG_TEXT_UNICODE(TRACE, (BITCODE_TU)wstr)

	2007: and WIP the handle stream

2018-04-14  Reini Urban  <rurban@cpan.org>

	WIP 2007: start working on 2007 object strings
	don't error on invalid handles (still invalid obj handle stream),
	start with a few 2007 strings

	2004: fix Data Section
	access the right r2004_header.section_info_id.
	e.g. 19 => index 16. 19 would be out of bounds

	fix r11 free empty class
	r11 has no classes at all, but tried
	to deref them

	2007: improve error handling
	when get_page or read_pages_map fails

	fix decompress_r2007: allow length 0
	This is basically a LZ77 decompressor, where the case length=0
	is allowed.

	whitespace cleanup decode.c
	M-x whitespace-mode

	whitespace cleanup decode_r2007.c
	M-x whitespace-mode

	add FIELD_TFF type, pre-allocated fixed string
	which merely makes for better logging.

	use bit_read_fixed helper
	for reading into already allocated fixed length string

	more section_handles harmonizations

	simplify 2004/2007 section_handles
	and harmonize.

	2007: WIP start reading objects and handles

	2007: update TODO plan
	merge decode_r2007 with the 2004 decoder, it is the same.

	more 2007 harmonization
	rename num_descriptions to num_infos, it is the section_info count.
	move read_2007_section_objects into read_2007_section_handles, same as with 2004.

	minor 2004+ section simplifications
	no logical changes

	2007: more sections handles and objects

2018-04-14  Reini Urban  <rurban@cpan.org>

	r2007 header_variables
	HANDSEED is not read from the handle stream, but the data stream.
	PUCSORTHOREF is wrong.
	separate obj_string_stream and section_string_stream:
	SECTION_STRING_STREAM got a prepared str_hdl already,
	START_STRING_STREAM calcs the stream pos from the obj->bitsize.
	encoding >= r2007 not yet started (need to calc. handle and string stream offsets)

	* bits.c,h (bit_set_position): added, set absolute

2018-04-14  Reini Urban  <rurban@cpan.org>

	add separate handle stream for r2007+
	before R2007 those two streams, dat and hdl_dat are the same.

	but no extra string stream yet.
	we handle that in the dwg.spec extra, locally.

2018-04-14  Reini Urban  <rurban@cpan.org>

	decode 2007 string streams
	for now switch dat back and forth, but we really should provide two
	streams: dat and str_dat for easier dwg.spec integration.
	And we'll also need a third handle stream, hdl_dat. See the next commit.

2018-04-11  Reini Urban  <rurban@cpan.org>

	WIP read_2007_section_classes
	missing: string stream.

	change the section lookup by type, not hashcode.
	it should be the same is with 2004 really. TODO merge the code base.

2018-04-11  Reini Urban  <rurban@cpan.org>

	add r2004+ dwg_section_type
	resolve the section wname to the enum DWG_SECTION_TYPE, which we need
	later. to lookup the header, classes, objects sections by index, not by name.

	do the same for preR13 and R13 section types (also as enum).

2018-04-10  Reini Urban  <rurban@cpan.org>

	start encode the r2004 Section Page Map
	Add the 5 r2004 section fields to the dwg->r2004_header and Dwg_Section.
	simplify section maps massively, no system_section union needed.

	Add native LE read/write bits for RL (yet unneeded).

2018-04-09  Reini Urban  <rurban@cpan.org>

	2018 fix for MLINESTYLE

	add 2018 test-data DWGs and matching DXFs
	The 2013 variants saved as 2018.

	Fix programs CC warnings
	with WARN_CFLAGS

	classes >= 2007
	add the missing 2007 class-map fields.

	xmlsuite: write into builddir
	not into srcdir, which could be read-only. e.g. make distcheck

	HACKING: add macports python

	move public headers into include/

2018-04-08  Reini Urban  <rurban@cpan.org>

	add HAVE_NATIVE_WCHAR2
	We can only use wchar.h when on Windows with a sizeof 2.
	On unix wchar_t is a 4-byte UTF-32.
	How to handle these? Use native wchar_t internally
	and convert when reading/writing?

	add ctype.h probe

	fix eed packed struct
	some gccs add intermediate bytes into the Eed_Data struct,
	esp. mingw.

2018-04-07  Reini Urban  <rurban@cpan.org>

	fix wrong encode class checks

	fix -Wsign-compare

	use bits _TF functions
	for larger strings/raw data. esp. for later conversion to FIELD_TF
	and LOG_TRACE_TF.

	eed rewrite
	EED are really a stream of size+app-handle + sequence of app-specific code+value pairs,
	not just one code+value per handle.
	So add a new eed struct per code+value pair, and leave the size empty of subsequent
	eeds, and re-use the handle.

2018-04-02  Reini Urban  <rurban@cpan.org>

	fixed some r14 second header parsing
	adjust for num_sections, which now actually matches the documentation

	more TODO

	Merge branch 'dxf' into work
	separate examples and programs.
	many improvements and fixes, esp. some objects, memory leaks and eed.

	Update TODO for the finished dxf branch

	fix get_first_owned_object
	with no BLOCK_HEADER entities, e.g. empty paperspace.

	fix MLEADERSTYLE eed
	wrong usage of index i, used twice, nested.
	rename the inner appid loop to j,
	the outer eed loop to idx.

	more auxheader: still debugging
	add some helpers: DEBUG_HERE() and LOG_TRACE_TF (fixed string)

	Makefile.am: fix check-dwg targets

	free: add dwg_free_handleref
	where we lookup the handle in the global list of refs
	and delete it there also.
	also free the reactors, defer freeing BLOCK_CONTROL,
	and set a freed obj->type to DWG_TYPE_FREED, to skip
	double-frees

	Fix reamining warnings
	proper casts for preR13 types,
	warp TODO objects into ifdef DEBUG_<OBJECT>
	change IMAGE.clip_mode from BS to B ??

	de-arm CRC check
	allow failing CRCs, just log the error

2018-04-02  Reini Urban  <rurban@cpan.org>

	add dwg_encode_xdata and dwg_free_xdata
	and enhance the xdata linked-list variant to
	r2007 unicode strings.
	simplify the mess a bit.

	XRECORD: write and free the objid_handles
	free the object_ref array.

2018-04-02  Reini Urban  <rurban@cpan.org>

	add check-dwg-valgrind

	free: dup klass->dxfname
	because freeing an object could free the dxfname also.
	and some cases are unhandled.

	VISUALSTYLE tested ok

	test VISUALSTYLE

	harmonize defined but disabled classes
	CELLSTYLEMAP also.

	fix more gcc-7 warnings
	-Wint-in-bool-context: compute the TABLE field num_cells. we use it twice.
	-Wsign-compare in some eed DEBUG sanity checks

	build: document missing check-valgrind
	for the alive.test hack. switch to a normal
	runtest env, which does have valgrind support

	change LAYER.color_rs from RS to signed short
	to check for negative colors <r13

2018-04-02  Reini Urban  <rurban@cpan.org>

	DEBUG_MULTILEADER
	all 4 actions decode/encode/print/free must be consistent
	if to run the handler or not.

	fixed 2004_Leader with empty BLOCK_HEADER->entities[0]
	with dwg2SVG

2018-04-02  Reini Urban  <rurban@cpan.org>

	.gitignore: a few more private files

2018-04-02  Reini Urban  <rurban@cpan.org>

	fix MLEADERSTYLE is_new_format
	add global dwg->appid_control, a list of all registered apps.
	when an MLEADERSTYLE eed handle points to a ACAD_MLEADERVER APPID, then
	use the new MLEADERSTYLE format (because it was imported from a newer version).
	Fixes the text_always_left bit offset.

	add dwg_resolve_handleref helper, a part of the handle decoder.

	rename MLEADER to MULTILEADER, the dxf really has the MULTILEADER name,
	libdwg uses it also.

2018-04-02  Reini Urban  <rurban@cpan.org>

	rename dxfname MLEADER to MULTILEADER
	but keep our object definition the same name as in the docs.
	unlike libdwg.

	also: SCALE has now enough coverage.

2018-04-02  Reini Urban  <rurban@cpan.org>

	remov -lm dependency
	use our own bit_nan()

	bit_read_BD: fix 64bit stackoverflow
	use int32_t, not long int to create nan.
	we still avoid to link against libm,
	even the dwg_api should not do anymore.

	second_header: fix sections overflow
	Leader_2000 has 6 sections there, not just 4

	alive.test: dwgbmp Leader_2004 will always fail
	because it has no embedded picture and it then returns -1

	decode: fix ubsan problems
	avoid *((uint64_t*)ptr) alignment problems (eg. sse).
	crc code: use unsigned properly typed rseed to handle overflows

	free: use default loglevel ERROR

	eed: do away with pesky valgrind overflows
	no idea why it still overflowed

	refactor eed
	make a raw copy, and also read into the eed union.

	separate programs dir
	for bin_PROGRAMS.
	enhance alive.test to test more DWGs

2018-04-02  Reini Urban  <rurban@cpan.org>

	free: add some more
	HANDLE_VECTOR, FIELD_VECTOR (esp. for TV),
	second_header.handlers, FIELD_HANDLE (the dwg_object_ref).

	zero the dwg struct on dwg_read_file() (in case of early free).
	dwg_encode_chains: initialize section_address (detected with -O2)

2018-04-02  Reini Urban  <rurban@cpan.org>

	dwg_bmp: protect from empty picture size
	fixes dwgbmp Leader_2004.dwg

2018-03-31  Reini Urban  <rurban@cpan.org>

	fix make distcheck: add dim_common.exp
	and src/free.h.
	avoid duplicate loglevel symbol.

	Fix r2000 second header
	r2000 has 5 chars before the sections, not 4 as before.

	Merge commit 'afa21732aa095f6a109821e561092748ae851d2e' into work

	finish the API revamp: unit-tests

	fix up the dimension unit tests
	for the new DIMENSION API.
	replace elevation_ecs11 by elevation.

	add new DIMENSION_common subentity
	for the API only, to save a lot of functions

	adjust dim testcases

	disable CELLSTYLEMAP, fix MTEXT style handle
	FIELD_G_TRACE: print the dxf code numerically.

	WIP cleanup the API
	and more

2018-03-31  Reini Urban  <rurban@cpan.org>

	WIP more dxf codes: REPEAT_4, macrofy
	remove _Entity/_Object from structs, which are not entities, objects,
	just parts thereof.

	macrofy common field accessors:
	Table_Value(value)  20.4.99 for FIELD and TABLE
	Cell_Style_Fields(sty)  20.4.101.4 for TABLE, TABLECONTENT and CELLSTYLEMAP
	Content_Format(fmt) 20.4.101.3 for TABLECONTENT and Cell_Style_Field

2018-03-31  Reini Urban  <rurban@cpan.org>

	WIP more dxf codes: almost done
	add END_REPEAT for free.
	fixup some types and errors.

	WIP more dxf codes
	mostly HATCH, MLEADER, TABLE, ...
	add VECTOR_FREE at the end of REPEAT

2018-03-30  Reini Urban  <rurban@cpan.org>

	WIP more dxf codes, and finish more objects
	dwg_decode_handleref_with_code: handle offset pointer codes.

	WIP more dxf codes
	and some typos and more documented objects. esp. the new tables objects.

	WIP add dxf codes to all fields
	and integrate more r11 tables into dwg.spec

	merge UCSICON_0+1 B to UCSICON BB

2018-03-29  Reini Urban  <rurban@cpan.org>

	typo: default_lightining_type
	=> default_lightning_type

	r11: fix free empty objects
	dwg_free_LAYOUT:
	obj->type == obj->parent->layout_number is not true there.

2018-03-29  Reini Urban  <rurban@cpan.org>

	dwg.spec: start adding r11 tables to the spec
	make each FIELD a statement, to allow bracket less
	single fields if statements. 3 lines => 1 line.
	but not for SINCE/UNTIL, since this needs to set cur_ver before.

	add IF_ENCODE_FROM_PRE_R13 r11 defaults, flags <=> bits,
	also needed for dxf.

2018-03-29  Reini Urban  <rurban@cpan.org>

	dwg.spec: reformat
	no functional changes, whitespace and rearrange FIELD macros only.

	r11: implement the tables
	add a BITCODE_TF fixed width text type.
	fixed a few typos:
	VIEW.lens_legth => lens_length
	MLEADER: ctx.text_heigth => ctx.text_height

2018-03-28  Reini Urban  <rurban@cpan.org>

	more r11: outline all tables/sections
	read now until the end

	add TIMEBLL type, more r11 work
	add a special TDCREATE type to simplify dxf handling.
	add Dwg_Section_Type_r11 enum, rename table processing to section,
	because they have similar structure.

	2007: add LOG_TEXT_UNICODE, LIBREDWG_TRACE
	honor LIBREDWG_TRACE on decode_2007.
	beautify the log output a bit.
	we can now print UCS-2 on unix platforms via LOG_TEXT_UNICODE
	update TODO

	R2004 decoding done, start with R2007

	spec: add more unknown templates
	and embed more parenthandle < 2007

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix 2004 Common Entity Data layer
	layer is only for 2000, not 2004.
	add shadow handle: 2007+
	fixes reading all 2004 dwgs

	fix HATCH num_boundary_handles
	only count num_boundary_handles on decoder,
	esp. not when printing it.
	calloc all REPEAT objects to zero-init all counters.

	HATCH: rename z_coord to elevation

	harmonize to parenthandle
	from XRECORD->parent and lots of parent_handle.

	more objects and specs
	complete the r2010+ optional xrefindex_plus1 for all tables,
	add WIPEOUTVARIABLE, add entity_HATCH_DefLine,
	optional null_handle 2010+,
	SHAPEFILE_CONTROL: num_entries BS => BL.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more 2007 specs: go over all objects
	type all FIELDS: FIELD(name,type) => FIELD_type(name)
	some entities have no post common entity data handles 2007+

	DICTIONARY: no itemhandles <r2000
	MTEXT: flip rect_width with rect_height
	SPLINE: fixed 2013+, num_fit_pts BS => BL, read handles later,
	LEADER: associated_annotation since r13, not 14.
	BLOCK_CONTROL: num_entries BS => BL, paper_space <= 2007
	BLOCK_HEADER: 2010+ xrefindex_plus1, rename preview_data fields
	LAYER_CONTROL: num_entries BS => BL, null_handle <= 2007
	LAYER: 2010+ xrefindex_plus1

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix 2004 header_vars
	current_viewport_entity_header is only r13-r2000.

	read_2004_compressed_section: better logging
	and error handling. free the temp. decompression buffer.

	fix ENT_REACTORS encode
	and fix tracelevel for decode_object/entity: honor LOG_TRACE level.

	silence free DIMSTYLE
	some FIELD_CAST values were printed on free

	examples: don't leak suffix filename_out
	and add one missing dwg_free()

	dwgrewrite: warn when num_objects differ
	the previous re-read just checks for a valid structure,
	not if really all objects were written.

	suffix: fix . handling in ext
	when the ext already contains a dot
	don't add another one

	encode: write empty strings
	NULL chains.
	Not yet NULL handles

	2004: second_header since r2004
	is read partially. the sections map and handlers is handled
	elsewhere.

	decode_R2004: logging cosmetics

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix decompress_R2004_section assert
	src may be equal to decomp.
	fixes reading 2004/Leader_2004.dwg and 2004/Drawing_2004.dwg

	all my r11-r2004 dwgs can now be decoded.

2018-03-27  Reini Urban  <rurban@cpan.org>

	Add some of my test DWGs and DXFs
	Produced with my evaluation copy of AutoCAD 2013 for MAC
	and some free library blocks from the internet.

	Add a LEADER, associate MLEADER, a HATCH filled with an image,
	and parametric constraints objects.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add MLEADER and OBJECTCONTEXTDATA
	untested. just taken from the spec.

	add BITCODE_TU UCS-2 DWGCHAR
	not suore yet if the BITCODE_TU is zero-delimited nor not.

2018-03-27  Reini Urban  <rurban@cpan.org>

	Second header: improve, esp. r14
	sanitize second_header, via proper fields.
	esp. the encoder was wrong.

	parsers all of my r2000 and r14 samples.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more common 2010,2013 fields
	handlestream_size, has_ds_binary_data

	tune free calls
	check also the size, not just the pointer.
	free only once, not some classes twice, such as CELLSTYLEMAP,
	VBA_PROJECT
	honor the LIBREDWG_TRACE trace var, to display the free'd object
	pointers.

	fix EED padding and realloc
	use (i+1) *
	padding is normal, not something to warn about.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add free dwg.spec callbacks
	use the spec to free each field, similar to print.

	result: from 23k down to 20k definitely lost.
	Missing: XRECORD xdata ResBuf, DICTIONARY handles,
	common entity data handles.

2018-03-27  Reini Urban  <rurban@cpan.org>

	bits: protect from overflow
	and fix bit overflow, properly wrap around

	disable MLEADERSTYLE
	wrong EED offset

	add FIELDLIST, MLEADERSTYLE
	this is still WIP.
	the first MLEADERSTYLE line_type handle is wrong.

	add SCALE, VBA_PROJECT objects
	VBA_PROJECT still untested. SCALE looks ok

	restart unhandled/untested class objects
	When a variable-type object is unknown/untested,
	restart it to the prev. known address and read in the raw
	bytes from there again.
	Fixes offset problems with testing some new objects: VBA_PROJECT,
	CELLSTYLEMAP which interestingly also is in some R2000 (AC1015) files from
	the internet.
	decode-only so far.

	work on r14 stability
	skip CRC check error with num_sections!=5,
	fix DICTIONARYWDLFT.unknown_r14 to RL (probably some combination of RS,RC,RC)
	r14 DICTIONARY.unknown_r14 is the hard_owner flag.

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwg_encode_variable_type
	sync with dwg_decode_variable_type

	and let untested classes be also encoded as UNKNOWN_OBJ

2018-03-27  Reini Urban  <rurban@cpan.org>

	add check-dwg target
	test all test-data DWG files with dwgread

	fix gcov targets
	we are now at 23.9%

2018-03-27  Reini Urban  <rurban@cpan.org>

	finish UNKNOWN_OBJ
	add the encode and print parts.
	we did for encode after all.

	TODO: we could store the address before trying untested objects
	and reset if for the UNKNOWN_OBJ. that way we can look at
	the union values and still be safe.

2018-03-27  Reini Urban  <rurban@cpan.org>

	WIP UNKNOWN_OBJ
	use dwg_decode_object/entity for eed, reactors, xdic, even for
	unknown objects/entities. So far all of them are class objects.
	store the raw bytes as raw field vector, TODO /8 slack if
	bitsize % 8.

	This fixes the version dependent handling of bitsize, eed, reactors, xdic,
	and should now handle all of the MATERIAL, SCALE, ... objects.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fortify dwg_free, document clearing all of Dwg_Data
	initialize all critical Dwg_Data pointers and counters,
	so that dwg_free will not touch uninitialized data.

	document that all incoming dwg data will be cleared in
	dwg_decode_data and dwg_read_file.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more DXF adjustments
	rename VPORT fields to its DXF names.
	rename Class fields: proxyflag.
	item_class_id really is named Is-an-entity flag: 1f2 for entity, 1f3 for object.
	See http://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf

	more DXF adjustments
	WIREFRAME is not a headervar, DISPSILH is probably meant.
	rename OBSCUREDCOLOR back to DXF OBSCOLOR, likewise
	OBSCUREDLTYPE => OBSLTYPE, IDEXCTL => INDEXCTL.

	dxf2dwg: fix r11-r2000
	and add some more missing header_variables_r11

	decode_preR13 WIP
	added some prelim. header_variables_r11.spec,
	not bit-encoded, just raw.
	add the raw decoding layout, as found out 1995.

	Update TODO

	doc: add Examples and more

	add dxf2dwg.c WIP
	TODO: read DXF, code/name pairs, and look them up in one
	of the specs.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add dwg_version_as
	similar to the acad saveas options,
	to map the the --as-rVER option to our internal Dwg_Version_Type, e.g. R_2000.

	* src/common.c, src/common.h (dwg_version_as): added.
	* src/common.h (Dwg_Version_Type): added R_INVALID (similar to R_BEFORE).
	* examples/dwg2dxf.c, examples/dwgrewrite.c: use dwg_version_as.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add R_12, the same as R_11 but more prominent
	AC1009 is mostly referenced as Saveas R 12 format, not R 11.
	So we do support R_12, with the same AC1009 DWG.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more dwg2dxf work
	add some old defaults, and pre-r13 vars:
	HANDLING, paperspace, ...

	fix option handling a bit

2018-03-27  Reini Urban  <rurban@cpan.org>

	add ole2frame to unit-testing
	was skipped

	add xrecord API and testcase
	set num_eed in the XRECORD object.
	TODO: change the linked list into an array, to unify with the
	generic eed array

	dwgread: simplify

	dwg2svg2: 32bit now fixed

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix 32bit dwg_api
	dwg_api.o didn't load stdint.h, so had a different size than
	dwg*.o

	* src/dwg_api.c: include stdint.h, inttypes.h, fixing 32bit.

2018-03-27  Reini Urban  <rurban@cpan.org>

	testcases: use DEJATOOL
	see https://www.gnu.org/software/automake/manual/html_node/DejaGnu-Tests.html
	and https://www.embecosm.com/appnotes/ean8/ean8-howto-dejagnu-1.0.html

	* test/Makefile.am: : use DEJATOOL, not RUNTESTDEFAULTFLAGS
	* test/testcases/Makefile.am: remove unused RUNTESTDEFAULTFLAGS
	* test/testcases/common.c: remove unused code

2018-03-27  Reini Urban  <rurban@cpan.org>

	configure: fix AC_MSG_WARN quoting

	dwg2svg2: more work on 32bit crashes

	decode_R13_R15: optional section[4]
	only read the measurement section when appropriate.
	though in praxis it always is.

	fixup examples/dwg2SVG.c
	var initialization, dwg global not on stack.

	doc: remove dwg_print_object from API
	it is using the Bit_Chain.
	But add examples how to iterate over all entities,
	in model space and paper space.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add Bit_Chain arg to dwg_print_object
	and remove it from the global _dwg_struct.
	move dwg_print_object from public dwg.h to private print.h,
	because Bit_Chain is not public.

	The bit_chain field was added with commit b24e5329b3e0ae178bb7162a6a492c0f6313899d
	Author: Rodrigo Rodrigues da Silva <pitanga@members.fsf.org>
	Date:   Fri Jan 29 04:43:47 2010 -0200

	Added macro created print functions, made some functions private, increased
	logging trying to fix objectrefs.

2018-03-27  Reini Urban  <rurban@cpan.org>

	unit-testing: move dwg struct from stack to global
	on some 32bit systems the stack might be too small for 2500 byte.

	extend the dwg_api
	dwg: num_classes, num_objects, num_entities, object[], class[],
	eed, bitsize.

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwgbmp: fix use-after-free
	cannot write the picture from the freed dwg.
	free the dwg afterwards.

	darwin: add a dymutil helper target hack, for better symbolization.

2018-03-27  Reini Urban  <rurban@cpan.org>

	load_dwg: silence unused-params warnings

2018-03-27  Reini Urban  <rurban@cpan.org>

	more work on dwg_free
	add dwg_object_free().

	protect from double-free the bit_chain by setting
	bit_chain.size = 0.

2018-03-27  Reini Urban  <rurban@cpan.org>

	.gitignore: add renamed examples

2018-03-27  Reini Urban  <rurban@cpan.org>

	rearrange dwg.h
	rename dwg_ot_layout to layout_number,
	rename second_header.handlerik to second_header.handler.

	free the dwg a bit more.
	the objects and entities are still leaking massively.

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwg2svg2: use global dwg
	not stack allocated.
	printf header after getting the objects.
	zero-fill the dwg struct data.

2018-03-27  Reini Urban  <rurban@cpan.org>

	working on 32bit crashes
	add two helper handles for mspace_block and pspace_block
	BLOCK_HEADER.
	zero-fill new objects.

	TODO:
	someone, maybe CRC, is overwriting the Dwg_Struct after num_classes,
	32bit only. with dwg2svg2 only.

	  CRC = 36953}, num_classes = 4,
	  dwg_class = 0x8153100, num_objects = 61, object = 0x8158398, num_layers = 0,
	  num_entities = 12, num_object_refs = 154, object_ref = 0x8155b78, layer_control = 0x81532a0,
	  mspace_block = 0x8154ff0, pspace_block = 0x8156560,
	=>
	  CRC = 65028}, num_classes = 3086986712,
	  dwg_class = 0xad9f3224, num_objects = 1336173547, object = 0x9059, num_layers = 4,
	  num_entities = 135606528, num_object_refs = 61, object_ref = 0x8158398,
	  layer_control = 0x0, mspace_block = 0xc, pspace_block = 0x9a,

	CRC ... num_entities is wrong.

2018-03-27  Reini Urban  <rurban@cpan.org>

	configure: make python optional
	check for swig, and only then for python.
	and only then build the python bindings.

	allow older 1.11.6 automake, e.g. debian wheezy.
	don't use PKG_CHECK_MODULES, just call if pkg-config.
	CFLAGS: add -fno-omit-frame-pointer to gcc for better 32bit debugging.

2018-03-27  Reini Urban  <rurban@cpan.org>

	improve win32 support
	tested with i686-w64-mingw32 under wine 32bit.
	still failing test case: dwg2svg2 with both dwgs.

	DIMTXSTY: fix typo
	fixes dwg2dxf

	decode: zero-fill fresh memory
	use calloc, not malloc, to be on the safe side.

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwg2dxf headers, rename some header_vars to dxf
	rename *_{M,P}SPACE vars to the canonical dxf names.
	e.g. INSBASE_MSPACE => INSBASE,
	INSBASE_PSPACE => PINSBASE.

	finished header section.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add dwg2dxf WIP
	just the first few header vars yet

	minor cleanup
	remove unused Dwg_Data_Type from src/common.h

	add proper error handling, ...

	AUTHORS: add myself

	README: add needed packages

	calloc entity/object
	zero-fill fresh entities/objects.
	initialize Dwg_Object->bitsize, mostly just the object/entity part is initialized

	dwgrewrite: fix filename_out

	restore C++ compat
	use extern "C"

	extend Dwg_Handle types
	from char to int. codes can go up to 1000, some even higher.

	abstract dwg_decode_eed function
	similar to dwg_decode_xdata for XRECORD.
	add objid_handles code to XRECORD, decode only
	dwg.h: add datbyte offset to dwg_object to know the end from start (=datbyte)
	and bitsize.

	ChangeLog: formatting

	unit-testing: more type fixes
	fix most of the remaining trash code and formatting.

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwg_ps: fix asan crash
	obj->tio.entity->entity_mode is not always defined, only for entities.

	* examples/dwg_ps.c (create_postscript): remove wrong
	  obj->tio.entity->entity_mode check

2018-03-27  Reini Urban  <rurban@cpan.org>

	add FIELD_CAST
	several r13-r14 DIM vars have only type RC.
	store it as BS, and cast it up to BS.
	detected with clang -Wformat, not with gcc.

2018-03-27  Reini Urban  <rurban@cpan.org>

	More fields, start with adding dxfgroup
	FIELDS_G*.
	Also avoid eed[i] overflows.

	Avoid ntoh() dependency, add bit_read_RS_LE().

2018-03-27  Reini Urban  <rurban@cpan.org>

	cross-compiler support
	disable python+swig when cross-compiling.
	disable rpl_malloc replacement, because of
	AC_CHECK_HEADERS malloc.h.
	we don't need it, we just want to know if it's needed.

	add gcov probe and target
	usage with suffix'ed gcc:
	  CC=gcc-mp-6 ./configure --enable-gcov=gcov-mp-6
	  make gcov

	add ole2frame to testcases
	and export its ENTITY

2018-03-27  Reini Urban  <rurban@cpan.org>

	xmlsuite: fix compiler warnings and libxml2 insanity
	they insist on using unsigned char* in their public API, oh my.
	declare all missing funcs, and a lot more.

	properly return the exit code.

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwgbmp: proper error handling
	add perror calls when fwrite failed.
	write to stderr.
	return failing exit code.

	LOG_{ERROR,WARN}: no duplicate ending \n
	LOG_{ERROR,WARN} already adds a \n

	decode: adjust unhandled classes/objects
	fixup the TODO list, add GROUP and WIPEOUT to the handled classes

2018-03-27  Reini Urban  <rurban@cpan.org>

	dwg.h: check HAVE_WCHAR_H, fix DIMTAD, DIMZIN type
	wchar_t is needed for examples, ... rely in HAVE_WCHAR_H.

	change DIMTAD, DIMZIN decl from RC to BS, as used since r2000.
	we need the larger type for the common storage.

2018-03-27  Reini Urban  <rurban@cpan.org>

	testcases/tolerance.c: fix and add extrusion test
	there was a mixup

	dwg_api: add missing common entity/object APIs
	declarations only

2018-03-27  Reini Urban  <rurban@cpan.org>

	decode: LOG_INFO handles when read
	not later when the whole EED and more was read.

	TODO: we already decrypt the raw SAT data. we only might want to
	parse it into some SAT structures.

2018-03-27  Reini Urban  <rurban@cpan.org>

	EED done
	inline the EED char buffers.

	* configure.ac: probe for wchar.h needed for r2007+ text.
	* src/dwg.h (Dwg_Eed_Data): inline the buffers, and comment that the
	  integers need to be endian swapped for the API, if they need to be
	  interpreted. They are still in network order. But mostly just dump the
	  raw. Swap the codepage.
	  (Dwg_Eed): Dwg_Eed_Data *data is now a calloc'd pointer, not inlined.
	* src/bits.h: add <wchar.h>, needed for a unit-test.
	* src/decode.c, src/encode.c: use the changed Dwg_Eed_Data.
	  add length sanity checks and offset deviations. special-case eed_0 strings.

2018-03-27  Reini Urban  <rurban@cpan.org>

	EED: add dwg_encode_{object,entity} to encode WIP
	also write common_entity_handle_data,
	comment out unused objects and the proxy subtype. src compiles now warning free.

2018-03-27  Reini Urban  <rurban@cpan.org>

	rewrite EED (untested), more common entity support
	Fix multiple instances of EED.
	It it either stored as array, but more likely as linked list.
	Anyway, we need to store it as array of structs, not as linked list.
	But for sure not as the next EED overwriting the previous.

	* src/common_entity_handle_data.spec: Add support for more entity
	  fields R_2010+: simplify nolinks, add color_handle, add
	  has_*_visualstyle R_2010+.
	* src/dwg.h: add Dwg_Eed_Data, Dwg_Eed structs, num_eed + Dwg_Eed *eed in
	  entity and object, add color_handle, *_visualstyle.
	* src/decode.c (dwg_decode_entity, dwg_decode_object): add num_eed,
	  minor rewrite of eed.
	  add RLL support for picture_size R_2007+, add has_*_visualstyle R_2010+.
	* src/encode.c (dwg_encode_entity, dwg_encode_object): likewise.

2018-03-27  Reini Urban  <rurban@cpan.org>

	maint: add error messages, copyright header
	* src/reedsolomon.c: add copyright header, if DEBUG unused coe
	* src/decode_r2007.c: add LOG_ERROR messages to the error branches

	fix test/testcases default
	worked ok via make check, but not from the cmdline

	maint of examples/load_dwg.py
	fix the name in usage,
	fix style

	cleanup testcases
	fix the remaining warnings, cleanup the remaining junk
	boilerplate, add decls.

2018-03-27  Reini Urban  <rurban@cpan.org>

	win32: unknown conversion type character h in format
	for RC on mingw64

	* src/dwg.h: special-case FORMAT_RC on windows.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix examples/dwg2svg2: get the center
	* examples/dwg2svg2.c: circle.center was never initialized.
	  fix the paperspace limits calculation: LIM not EXT.
	  use double, not float.
	* examples/dwg_ps.c: use double, not float.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more work on R2010 objects
	And assert on invalid section/page sizes and counts.
	all r2007_file_header values for r2010 are still invalid.
	for 2007 only some.

	* src/decode.c (dwg_decode_data): enhance version mapper to all.
	  simplify the warn and error messages for unknown versions.
	  (resolve_objectref_vector): return success code.
	  (decode_R2004): delete unused File Header Data fields, now parsed via spec (also encodable).
	* src/decode_r2007.c: add DBG_MAX_COUNT, DBG_MAX_SIZE asserts.
	* src/dwg.h, src/dwg.spec: more R2010+ fields for ATTRIB, ATTDEF, DIMENSION*.

2018-03-27  Reini Urban  <rurban@cpan.org>

	decode: demote some LOG_ERROR to LOG_WARN
	they are harmless mostly. libdxfrw just ignores them and much more.
	And LOG_ERROR should really panic, not continue.

	rename examples, dwg prefix
	all this to be able to use bin_PROGRAMS for faster
	debugging cycles, without tests or long cmdlines.
	anyway: rewrite => dwgrewrite, test => dwgread,
	testSVG => dwg2SVG, testsvg2 => dwg2svg2, get_bmp => dwgbmp

	Makefile.am: build examples before the tests
	often we need to test via an example before running the full
	testsuite

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix the dxfname, no final *
	the last char is always \0, don't replace it with *.
	the len BS includes the final \0, but we keep that.
	we only store the ASCIIZ anyway.

	also don't replace unprintable chars with ~.
	we do support encode and codepages conversion later.
	with codepages isprint() is relative.
	thus unprintable chars can only be replaced in temp. print helpers.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix auxheader, trace types
	* src/auxheader.spec: RS unknown[10] => RS unknown_rs[6] + RL zero_l[5],
	  print unknown_rs as hex.
	* src/dwg.h: print RC as 0x%hhx and BB as %uc.
	* src/logging.h: add final \n to LOG_ERROR and LOG_WARN.
	* src/dec_macros.h: trace the types also. needed for analysis.

	fixup make distcheck for test-data
	TODO: txttoxml.py: if built from a non-writable srcdir writing
	to the srcdir/test-data/*.xml will fail. eg make distcheck
	The XML must be written into the builddir.

	travis: add python-libxml2

	decode_r2007: use inttypes
	use proper %PRIu64 for %lld format types.
	on 64bit %lld is for long long, but we have only simple uint64_t

2018-03-27  Reini Urban  <rurban@cpan.org>

	add WIPEOUT entity
	not an object, rather a IMAGE.
	also: fix obj->bitsize to BITCODE_RL,

	disable reading some unknown objects/entities, we have better code to deal
	with that.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more unit-testing cleanup
	coding-style, less useless comments,
	fix some types, esp. TEXT vert_align, horiz_align,
	remove some more output_object() funcs.

	rename example.dwg to example_2000.dwg
	use versioned dwg names

	xmlsuite: move txttoxml.py
	move txttoxml.py from test-data to xmlsuite, where it belongs to.
	add skeletons for test-data/{r13,r14,2018}

	dwg.h: rename 4 internal _dwg_bitecode_* to _dwg_bitcode_3bd
	unused internally and in the API

	README, TODO: update
	* README: update outdated info
	* TODO: update outdated info
	* src/dwg.spec: add my name

2018-03-27  Reini Urban  <rurban@cpan.org>

	api: add missing entities
	OLEFRAME, OLE2FRAME, DUMMY, LONG_TRANSACTION, PROXY_ENTITY, IMAGE
	were missing the block extractor and object extractors.

	rename internal 3D_FACE type to 3DFACE for consistency:
	_dwg_entity_3D_FACE => _dwg_entity_3DFACE

2018-03-27  Reini Urban  <rurban@cpan.org>

	encode: limit the scope of obj, _obj
	to the enclosing block only. these are temp. values
	used in the helper macros. Fixes -Wshadow warnings

	src: fix format types
	in LOG calls, detected by the new type strictness

	Fix {vert,horiz}_align type from double to short
	and properly document it

	cleanup testcases
	use proper types, only one error,
	and much less trash.
	it really should have be written with type macros,
	but now this might be too much work for no gain.

	Move test-data DWGs into one global place

	refactor test dirs
	under one single base dir test. dejagnu only used for testcases.
	TODO: test-data

	cleanup unit-tests
	use proper types, only one error,
	and much less trash.
	it really should have be written with type macros,
	but now this might be too much work for no gain.

	dwg.h: better description of the raw types

2018-03-27  Reini Urban  <rurban@cpan.org>

	strict uint32_t/BITCODE_RL types
	not really long on 64bit systems.
	add RLL type support.
	be strict about BITCODE_BS, BITCODE_BL types.

	Note that the raw RS RL ... types are not native raw. They are network-encoded,
	i.e. big-endian. so they need to swap words.

2018-03-27  Reini Urban  <rurban@cpan.org>

	new Dwg_R2004_Header, use r2004_file_header.spec
	* src/decode.c: use new dec_macros.h,
	  avoid -Wshadow, put spec readers into its separate blocks,
	  indentation, unuse _2004_header_data, rather put into the global
	  Dwg_Struct, use the new "r2004_file_header.spec".
	* src/decode_r2007.c (decrypt_block): added
	* src/dwg.h: use stdint types also for BITCODE_BL (not long, uint32_t),
	  add BITCODE_RLL (uint64_t) for decode_r2007,
	  identify some more header fields,
	  add r2004_header, with padding.
	* src/dwg.c: use FORMAT_* types.

	add dec_macros.h, r2004_file_header.spec, spec.h
	decode macros are to be used for src/decode_r2007.c also.
	extract the common spec macros.
	add r2004_file_header.spec for the 2004 File Header,
	and fix two addresses there.

	automake: harmonize LDADD

	decode_r2007.c: import rs_decode_block
	* src/decode_r2007.c: import rs_decode_block
	* src/reedsolomon.c: whitespace, GNU formatted

2018-03-27  Alex Papazoglou  <papazoga@gmail.com>

	Reed-Solomon (255,239) codec.
	Two routines, rs_encode_block() and rs_decode_block() are provided.
	The first will encode a block, depositing the 16 parity bytes in a
	caller-preallocated buffer. The second decodes a block; if there
	are errors it optionally fixes them in place using the Euclidean
	algorithm. Two example programs are provided to demonstrate.

	rurban: guarded malloc.h

	* examples/rsdecode.c: decode a stream
	* examples/rsencode.c: encode a stream
	* Makefile.am: added reedsolomon.c
	* decode_r2007.c: incorporated rs_decode_block()
	* reedsolomon.c: Reed-Solomon codec.

2018-03-27  Reini Urban  <rurban@cpan.org>

	cosmetics

	fix parenthandle code in 2 classes
	with r2000 MLINESTYLE and DICTIONARY parenthandle codes are 8, not 4.

2018-03-27  Reini Urban  <rurban@cpan.org>

	more C99: add stdint.h, inttypes.h
	needed only for the bits_test.c testcase, which
	needs uint16_t.
	But it is used in bits, even publicly, so put it into
	common.h

	* src/common.h: include config.h, <stdint.h>, <inttypes.h>.
	* src/bits.c: include <stdint.h>, <inttypes.h>.

2018-03-27  Reini Urban  <rurban@cpan.org>

	examples: add config.h
	for better inttypes

	* examples/dwg_ps.c: add config.h
	* examples/get_bmp.c: add config.h
	* examples/load_dwg.c: add config.h
	* examples/rewrite.c: add config.h
	* examples/test.c: add config.h
	* examples/testSVG.c: add config.h
	* examples/testsvg2.c: add config.h

2018-03-27  Reini Urban  <rurban@cpan.org>

	add WIPEOUT
	undocumented class, but seen in the wild

	cleanup public headers
	no c++ comments,
	check STDC optionally for better inttypes
	use inttypes for uint16_t vs %hu
	remove logging.h dependency

2018-03-27  Reini Urban  <rurban@cpan.org>

	more automake improvements
	add AM_SILENT_RULES.
	add missing DIST files, fixes distcheck.
	testsuite/testcases: add -lm, failed on linux/gcc, passed on the smokers and
	everywhere else.

	* Makefile.am: add LIBTOOL_DISTCLEAN_FILES.
	* configure.ac: add AM_SILENT_RULES.
	* src/Makefile.am: add EXTRA_HEADERS, esp. the new specs.
	* testsuite/testcases/Makefile.am: add -lm to LDADD
	* testsuite/xmlsuite/Makefile.am: remove CFLAGS exception,
	  it is now globally

2018-03-27  Reini Urban  <rurban@cpan.org>

	.appveyor.yml: skip dejagnu on cygwin for now
	fails to link for some unknwn reason. passes all configure probes tests.
	See https://github.com/rurban/libredwg/issues/1

	rename CELLSTYLEMAP_Cell.class to .type
	a reserved keyword

	more header_vars: FLAGS, ...
	split FLAGS into some known flags,
	set defaults for some new vars,
	BLIPMODE, DIMSAV are used earlier than R13,
	the 4 unknown texts are used only before R_2007

	Fix the DIMJUST bug
	DIMTDEC was missing, a few lines above.

	change RS, BS to uint16_t
	a true short.

	add auxheader.spec
	previously known as unknown section 5

2018-03-27  Reini Urban  <rurban@cpan.org>

	More objects and versions
	Prepare for all the old versions.
	Add most missing new objects/classes.

	Rename IMAGEDEFREACTOR to IMAGEDEF_REACTOR, same as the dxf class name.
	Add CELLSTYLEMAP, FIELD/AcDbField, VISUALSTYLE (undocumented fields, probably
	just a hard pointer to its dictionary).
	Add typed obejcts: OLEFRAME, DUMMY, LONG_TRANSACTION, PROXY_ENTITY, PROXY_OBJECT.
	Class/Object VBA_PROJECT is probably just handled in its own special section.

	Fix the text_area_is_present global variable, only set in decode, and make
	it a private field.

	Use 4BITS for the view_mode.

	Better named warn messages on unknown objects: print the unhandled/unknown name.
	Remove duplicate DIMJUST header_variable !?!

	Find name for TSTACKALIGN, TSTACKSIZE header_variables.
	Add LOG_WARN macro.

2018-03-27  Reini Urban  <rurban@cpan.org>

	Add to ChangeLog
	the missing entries since 2010-07-21

	* ChangeLog: add missing entries

2018-03-27  Reini Urban  <rurban@cpan.org>

	cygwin libtools -no-undefined
	to be able to make a shared lib, without only static.

	* src/Makefile.am (libredwg_la_LDFLAGS): add -no-undefined for cygwin.

2018-03-27  Reini Urban  <rurban@cpan.org>

	abstract common file header into header.spec
	The header is basically the same for all versions.
	we read until num_sections, resp. the first encrypted block

	* src/header.spec: added.
	* src/decode.c (decode_R13_R15,decode_R2004,decode_R2007): use header.spec.
	* src/encode.c: use header.spec.
	* src/dwg.c: fix indentation, rename stk to dwg
	* src/dwg.h: named struct Dwg_Header, add header.spec variables

2018-03-27  Reini Urban  <rurban@cpan.org>

	add read+write r2004 header
	until the encryption at 0x80

	rework file header <=r15
	fill in the missing file header bits, for encode
	to be byte equal.
	rename unknown 1 section to 5 (which it is).

	configure.ac: set CFLAGS=-g
	no optimization yet needed. turn it on later

2018-03-27  Reini Urban  <rurban@cpan.org>

	.travis.yml: debug make distcheck
	only failing remotely. ok locally

	* .travis.yml: fixup make distcheck

2018-03-27  Reini Urban  <rurban@cpan.org>

	Cleanup the CRC error messages

2018-03-27  Reini Urban  <rurban@cpan.org>

	Fix the section 0 crc comparison, add HANDLE logging
	CRC was already read by header_vars.spec into the CRC field.
	Don't read it again. The initial crc check passes now.

	Separate HANDLE from INSANE logging levels. INSANE for the individual
	VECTOR values, i.e. string and binary content.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix crc, rename bit_ckr8 to bit_calc_CRC
	export bit_calc_CRC: it is used by decode.c
	use uint16_t to guarantee proper overflow.

	rewrite does now write examples/example.dwg successfully.

	translate more bit_datenaro

	* src/bits.c, src/bits.h: use uint16_t for the seed and crc,
	  rename bit_ckr8 to bit_calc_CRC.
	* configure.ac: add AC_TYPE_UINT16_T
	* src/decode.c, testsuite/testcases/bits_test.c: use renamed
	  bit_calc_CRC function

2018-03-27  Reini Urban  <rurban@cpan.org>

	doc: add basic types

	rewrite.exe alive.test fix

	testcases: fix more wrong types

2018-03-27  Reini Urban  <rurban@cpan.org>

	refactor both unit tests
	extract the common function output_object
	into common.c via the arg DWG_TYPE.

	fix some wrong leftover float and int types.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix more dwg_api int types
	to the BITCODE types.
	There were still several errors, found out in the
	unit tests.

	unit-testing: fix wrong float variables
	to double

	decode_r2007: add missing function declarations
	* src/decode_r2007.c: add missing function declarations.

2018-03-27  Reini Urban  <rurban@cpan.org>

	examples/Makefile.am: add CLEANFILES
	and check-syntax.
	Fixes make distcheck.

	* examples/Makefile.am: add CLEANFILES, check-syntax

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix examples/dwg_ps
	* examples/Makefile.am: fix dwg_ps_LDADD.
	* examples/dwg_ps.c: various fixes.

	print.c: declare assert.h
	used in dwg.spec: assert(FIELD_VALUE(scale_flag) == 0)

	dwg_encode_chains: initialize ckr_missing
	at the beginning, not just in the loop.

	MINSERT spec
	* src/dwg.spec (MINSERT):
	  fix check logic: no multiple x == y == z expr,
	  avoid sequence point problems when initializing:
	  x=y=z=1.0

	dwg_encode_chains: fix handle swap code
	* src/encode (dwg_encode_chains): fixed the handle swap code

	fix detected warnings
	duplicate decarations, unused variables,
	declaration after statement, ...

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix SWIG_LIB windows newline
	mingw64 swig -swiglib prints a newline after each lib,
	there are two:
	SWIG_LIB = C:\msys64\MINGW64\bin\Lib
	C:/msys64/MINGW64/share/swig/3.0.12

	* m4/ax_pkg_swig.m4: strip \r\n in SWIG_LIB

2018-03-27  Reini Urban  <rurban@cpan.org>

	probe for warn, mingw and valgrind
	Add probes for mingw cross-compilation (testing via wine),
	c99, compile-time SIZEOF(size_t) (for BLL, ULL),
	useful warning flags and valgrind.
	This caught a lot of errors.

	* configure.ac: add many probes
	* src/Makefile.am: add @WARN_CFLAGS@
	* testsuite/testcases/Makefile.am: add @WARN_CFLAGS@, @VALGRIND_CHECK_RULES@
	* testsuite/xmlsuite/Makefile.am: add @VALGRIND_CHECK_RULES@
	* unit-testing/Makefile.am: add @WARN_CFLAGS@, @VALGRIND_CHECK_RULES@
	* .gitignore: adjust for m4 changes
	* m4/.placeholder: not longer needed.
	* m4/ax_append_compile_flags.m4: added.
	* m4/ax_append_flag.m4: added.
	* m4/ax_append_link_flags.m4: added.
	* m4/ax_check_compile_flag.m4: added.
	* m4/ax_check_link_flag.m4: added.
	* m4/ax_compile_check_sizeof.m4: added.
	* m4/ax_compiler_flags.m4: added.
	* m4/ax_compiler_flags_cflags.m4: added.
	* m4/ax_compiler_flags_gir.m4: added.
	* m4/ax_compiler_flags_ldflags.m4: added.
	* m4/ax_is_release.m4: added.
	* m4/ax_require_defined.m4: added.
	* m4/ax_valgrind_check.m4: added.

2018-03-27  Reini Urban  <rurban@cpan.org>

	add .appveyor.yml
	Tested at https://ci.appveyor.com/project/rurban/libredwg.
	This is optional, but can be used to create binary releases
	for windows/cygwin

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix make distcheck
	add missing EXTRA_DIST files

	* unit-testing/Makefile.am: add common.c to EXTRA_DIST,
	  fix AM_CFLAGS for make distcheck.

2018-03-27  Reini Urban  <rurban@cpan.org>

	doc: fill in some basics

2018-03-27  Reini Urban  <rurban@cpan.org>

	libredwg.la: direct -lm dependency
	we use now nan() in the API code.

	* src/Makefile.am: add -lm to libredwg_la_LDFLAGS.
	* examples/Makefile.am: remove -lm from LDADD,
	  use LDADD not AM_LDFLAGS,
	  add -Wall to AM_CFLAGS.
	* testsuite/testcases/Makefile.am: remove -lm from LDADD.
	* testsuite/xmlsuite/Makefile.am: remove -lm from LDADD.
	* unit-testing/Makefile.am: remove -lm from LDADD.

2018-03-27  Reini Urban  <rurban@cpan.org>

	unit-testing/Makefile.am: add -lm
	for nan(). clang does not have it, only gcc

	configure.ac: whitespace

	use python_PYTHON
	fixed make distcheck. See https://www.gnu.org/software/automake/manual/html_node/Python.html

	add a .travis.yml
	configured at https://travis-ci.org/rurban/libredwg/
	but you can clone and configure your own. it's optional.

	support rewrite as other version
	when encoding into another version than the original
	dwg version, check and ignore empty handles, and
	use empty strings, and numbers as default.

2018-03-27  Reini Urban  <rurban@cpan.org>

	build: make swig and dejagnu optional
	make python bindings only with swig and python.
	run dejagnu tests only with dejagnu.

	* Makefile.am: optional bindings and testsuite SUBDIRS.
	* testsuite/Makefile.am: optional testcases SUBDIRS.
	* configure.ac: export HAVE_DEJAGNU and HAVE_SWIG_PYTHON to automake.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix swig with stdint.h
	skip importing from stdint.h, but we need
	dwg.i importing from dwg.h and dwg_api.h.

	* src/dwg.h: no SWIGIMPORTED for stdint.h.
	* bindings/python/Makefile.am (swig_wrap_python.c): remove
	  -I/usr/include.

2018-03-27  Reini Urban  <rurban@cpan.org>

	src/Makefile.am: cleanup
	no functional changes.

	* src/Makefile.am: minor cleanup, no changes.

2018-03-27  Reini Urban  <rurban@cpan.org>

	Fix bit_write_4BITS
	and its testcase bit_write_4BITS_tests.
	simply write 4 bits. used in VIEW view_mode.
	All testcases pass now.

	* src/bits.c (bit_write_4BITS): fix implementation.
	* testsuite/testcases/bits_test.c: enhance tests a bit, print the
	  failing result, no functional changes.

2018-03-27  Reini Urban  <rurban@cpan.org>

	fix testcases/lwpline
	wrong flags type, fix to BITCODE_BS.

	* testsuite/testcases/lwpline.c: fix flags type

2018-03-27  Reini Urban  <rurban@cpan.org>

	testcases: fix wrong float
	testcases used float with too low numeric precision to pass the tests.
	fix to BITCODE_BD ie double.
	Remaining test errors: bit_write_4BITS, lwpline reading flag

	* testsuite/testcases/arc.c,
	  testsuite/testcases/attdef.c,
	  testsuite/testcases/attrib.c,
	  testsuite/testcases/circle.c,
	  testsuite/testcases/ellipse.c,
	  testsuite/testcases/line.c,
	  testsuite/testcases/minsert.c,
	  testsuite/testcases/mline.c,
	  testsuite/testcases/mtext.c,
	  testsuite/testcases/point.c,
	  testsuite/testcases/polyline_2d.c,
	  testsuite/testcases/shape.c,
	  testsuite/testcases/solid.c,
	  testsuite/testcases/text.c,
	  testsuite/testcases/tolerance.c,
	  testsuite/testcases/trace.c: change float to  BITCODE_BD

2018-03-27  Reini Urban  <rurban@cpan.org>

	work on testsuites
	on macports with make check PYTHON=/opt/local/bin/python2.7

	examples/alive.test: TODO the rewrite tests
	until we can fix them

2018-03-27  Reini Urban  <rurban@cpan.org>

	python: depend on src/dwg.h
	and add -I/usr/include for stdint.h (for uint64_t).

	Note that on macports with gcc-mp-x you need to use the
	gcc-specific -I/opt/local/lib/gcc6/gcc/x86_64-apple-darwin15/6.4.0/include
	instead.
	And build with the system python, but run the
	tests with macports python make check PYTHON=/opt/local/bin/python2.7

	* bindings/python/Makefile.am: depend on src/dwg.h, add
	  -I/usr/include for stdint.h

2018-03-27  Reini Urban  <rurban@cpan.org>

	WIP Start R_2013, R_2018 support, stricter types, ...
	add missing types, header variables, ...
	read and write  3B and BLL types, BLL: 64bit only.
	(this drops support for 32bit only, without uin64_t.
	maybe probe for that)

2018-03-15  Reini Urban  <rurban@cpan.org>

	cygwin libtools -no-undefined
	* src/Makefile.am (libredwg_la_LDFLAGS): add -no-undefined for cygwin.

2018-03-15  Reini Urban  <rurban@cpan.org>

	abstract common file header into header.spec
	* src/header.spec: added.
	* src/decode.c (decode_R13_R15,decode_R2004,decode_R2007): use header.spec.
	* src/encode.c: use header.spec.
	* src/dwg.c: fix indentation, rename stk to dwg
	* src/dwg.h: named struct Dwg_Header, add header.spec variables

2018-03-15  Reini Urban  <rurban@cpan.org>

	add read+write r2004 header
	until the encryption at 0x80

2018-03-15  Reini Urban  <rurban@cpan.org>

        * src/dwg.h: rework file header <=r15,
        fill in the missing file header bits, for encode
	to be byte equal.
        * src/decode.c (decode_R13_R15): rename unknown 1 section to 5
        (which it is).
	* src/bits.c: style

2018-03-15  Reini Urban  <rurban@cpan.org>

	configure.ac: set CFLAGS=-g
	no optimization yet needed. turn it on later

2018-03-15  Reini Urban  <rurban@cpan.org>

	.travis.yml: debug make distcheck
	* .travis.yml: fixup make distcheck

2018-03-15  Reini Urban  <rurban@cpan.org>

	Cleanup the CRC error messages

2018-03-15  Reini Urban  <rurban@cpan.org>

	Fix the section 0 crc comparison, add HANDLE logging
	CRC was already read by header_vars.spec into the CRC field.
	Don't read it again. The initial crc check passes now.

	Separate HANDLE from INSANE logging levels. INSANE for the individual
	VECTOR values, i.e. string and binary content.

2018-03-15  Reini Urban  <rurban@cpan.org>

	fix crc, rename bit_ckr8 to bit_calc_CRC
	* src/bits.c, src/bits.h: use uint16_t for the seed and crc,
	  rename bit_ckr8 to bit_calc_CRC.
	* configure.ac: add AC_TYPE_UINT16_T
	* src/decode.c, testsuite/testcases/bits_test.c: use renamed
	  bit_calc_CRC function

2018-03-15  Reini Urban  <rurban@cpan.org>

	doc: add basic types

2018-03-15  Reini Urban  <rurban@cpan.org>

	rewrite.exe alive.test fix

2018-03-15  Reini Urban  <rurban@cpan.org>

	testcases: fix more wrong types

2018-03-15  Reini Urban  <rurban@cpan.org>

	refactor both unit tests
	extract the common function output_object
	into common.c via the arg DWG_TYPE.

	fix some wrong leftover float and int types.

2018-03-15  Reini Urban  <rurban@cpan.org>

	fix more dwg_api int types
	to the BITCODE types.
	There were still several errors, found out in the
	unit tests.

2018-03-15  Reini Urban  <rurban@cpan.org>

	unit-testing: fix wrong float variables
	to double

2018-03-15  Reini Urban  <rurban@cpan.org>

	decode_r2007: add missing function declarations
	* src/decode_r2007.c: add missing function declarations.

2018-03-15  Reini Urban  <rurban@cpan.org>

	examples/Makefile.am: add CLEANFILES
	* examples/Makefile.am: add CLEANFILES, check-syntax

2018-03-15  Reini Urban  <rurban@cpan.org>

	fix examples/dwg_ps
	* examples/Makefile.am: fix dwg_ps_LDADD.
	* examples/dwg_ps.c: various fixes.

2018-03-15  Reini Urban  <rurban@cpan.org>

	print.c: declare assert.h
	used in dwg.spec: assert(FIELD_VALUE(scale_flag) == 0)

2018-03-15  Reini Urban  <rurban@cpan.org>

	dwg_encode_chains: initialize ckr_missing
	at the beginning, not just in the loop.

2018-03-15  Reini Urban  <rurban@cpan.org>

	MINSERT spec
	* src/dwg.spec (MINSERT):
	  fix check logic: no multiple x == y == z expr,
	  avoid sequence point problems when initializing:
	  x=y=z=1.0

2018-03-15  Reini Urban  <rurban@cpan.org>

	dwg_encode_chains: fix handle swap code
	* src/encode (dwg_encode_chains): fixed the handle swap code

2018-03-15  Reini Urban  <rurban@cpan.org>

	fix detected warnings
	duplicate decarations, unused variables,
	declaration after statement, ...

2018-03-15  Reini Urban  <rurban@cpan.org>

	fix SWIG_LIB windows newline
	* m4/ax_pkg_swig.m4: strip \r\n in SWIG_LIB

2018-03-15  Reini Urban  <rurban@cpan.org>

	probe for warn, mingw and valgrind
	* configure.ac: add many probes
	* src/Makefile.am: add @WARN_CFLAGS@
	* testsuite/testcases/Makefile.am: add @WARN_CFLAGS@, @VALGRIND_CHECK_RULES@
	* testsuite/xmlsuite/Makefile.am: add @VALGRIND_CHECK_RULES@
	* unit-testing/Makefile.am: add @WARN_CFLAGS@, @VALGRIND_CHECK_RULES@
	* .gitignore: adjust for m4 changes
	* m4/.placeholder: not longer needed.
	* m4/ax_append_compile_flags.m4: added.
	* m4/ax_append_flag.m4: added.
	* m4/ax_append_link_flags.m4: added.
	* m4/ax_check_compile_flag.m4: added.
	* m4/ax_check_link_flag.m4: added.
	* m4/ax_compile_check_sizeof.m4: added.
	* m4/ax_compiler_flags.m4: added.
	* m4/ax_compiler_flags_cflags.m4: added.
	* m4/ax_compiler_flags_gir.m4: added.
	* m4/ax_compiler_flags_ldflags.m4: added.
	* m4/ax_is_release.m4: added.
	* m4/ax_require_defined.m4: added.
	* m4/ax_valgrind_check.m4: added.

2018-03-15  Reini Urban  <rurban@cpan.org>

	add .appveyor.yml
	Tested at https://ci.appveyor.com/project/rurban/libredwg.
	This is optional, but can be used to create binary releases
	for windows/cygwin

2018-03-14  Reini Urban  <rurban@cpan.org>

	fix make distcheck
	* unit-testing/Makefile.am: add common.c to EXTRA_DIST,
	  fix AM_CFLAGS for make distcheck.

2018-03-14  Reini Urban  <rurban@cpan.org>

	doc: fill in some basics

2018-03-14  Reini Urban  <rurban@cpan.org>

	libredwg.la: direct -lm dependency
	* src/Makefile.am: add -lm to libredwg_la_LDFLAGS.
	* examples/Makefile.am: remove -lm from LDADD,
	  use LDADD not AM_LDFLAGS,
	  add -Wall to AM_CFLAGS.
	* testsuite/testcases/Makefile.am: remove -lm from LDADD.
	* testsuite/xmlsuite/Makefile.am: remove -lm from LDADD.
	* unit-testing/Makefile.am: remove -lm from LDADD.

2018-03-14  Reini Urban  <rurban@cpan.org>

	unit-testing/Makefile.am: add -lm
	for nan(). clang does not have it, only gcc

2018-03-14  Reini Urban  <rurban@cpan.org>

	configure.ac: whitespace

2018-03-14  Reini Urban  <rurban@cpan.org>

	use python_PYTHON.
        fixed make distcheck. See
        https://www.gnu.org/software/automake/manual/html_node/Python.html

2018-03-14  Reini Urban  <rurban@cpan.org>

	add a .travis.yml
	configured at https://travis-ci.org/rurban/libredwg/
	but you can clone and configure your own. it's optional.

2018-03-13  Reini Urban  <rurban@cpan.org>

	support rewrite as other version
	when encoding into another version than the original
	dwg version, check and ignore empty handles, and
	use empty strings, and numbers as default.

2018-03-13  Reini Urban  <rurban@cpan.org>

	build: make swig and dejagnu optional
	* Makefile.am: optional bindings and testsuite SUBDIRS.
	* testsuite/Makefile.am: optional testcases SUBDIRS.
	* configure.ac: export HAVE_DEJAGNU and HAVE_SWIG_PYTHON to automake.

2018-03-13  Reini Urban  <rurban@cpan.org>

	fix swig with stdint.h
	* src/dwg.h: no SWIGIMPORTED for stdint.h.
	* bindings/python/Makefile.am (swig_wrap_python.c): remove
	  -I/usr/include.

2018-03-13  Reini Urban  <rurban@cpan.org>

	src/Makefile.am: cleanup
	* src/Makefile.am: minor cleanup, no changes.

2018-03-13  Reini Urban  <rurban@cpan.org>

	Fix bit_write_4BITS
	* src/bits.c (bit_write_4BITS): fix implementation.
	* testsuite/testcases/bits_test.c: enhance tests a bit, print the
	  failing result, no functional changes.

2018-03-13  Reini Urban  <rurban@cpan.org>

	fix testcases/lwpline
	* testsuite/testcases/lwpline.c: fix flags type

2018-03-13  Reini Urban  <rurban@cpan.org>

	testcases: fix wrong float
	* testsuite/testcases/arc.c,
	  testsuite/testcases/attdef.c,
	  testsuite/testcases/attrib.c,
	  testsuite/testcases/circle.c,
	  testsuite/testcases/ellipse.c,
	  testsuite/testcases/line.c,
	  testsuite/testcases/minsert.c,
	  testsuite/testcases/mline.c,
	  testsuite/testcases/mtext.c,
	  testsuite/testcases/point.c,
	  testsuite/testcases/polyline_2d.c,
	  testsuite/testcases/shape.c,
	  testsuite/testcases/solid.c,
	  testsuite/testcases/text.c,
	  testsuite/testcases/tolerance.c,
	  testsuite/testcases/trace.c: change float to  BITCODE_BD

2018-03-13  Reini Urban  <rurban@cpan.org>

	work on testsuites
	on macports with make check PYTHON=/opt/local/bin/python2.7

2018-03-13  Reini Urban  <rurban@cpan.org>

	examples/alive.test: TODO the rewrite tests
	until we can fix them

2018-03-13  Reini Urban  <rurban@cpan.org>

	python: depend on src/dwg.h
	* bindings/python/Makefile.am: depend on src/dwg.h, add
	  -I/usr/include for stdint.h

2018-03-13  Reini Urban  <rurban@cpan.org>

	WIP Start R_2013, R_2018 support, stricter types, ...
	add missing types, header variables, ...
	read and write  3B and BLL types, BLL: 64bit only.
	(this drops support for 32bit only, without uin64_t.
	maybe probe for that)

2018-03-12  Pero Brbora  <pbrbora@stud.unidu.hr>

	testsuite/testcases/endblk.c (api_process): Compare test values.

2018-03-12  Reini Urban  <rurban@cpan.org>

	dwg.spec: ANYCODE for parent, next, prev
	* src/common_entity_handle_data.spec: prev_entity may be 4 or 8,
	  prev_entity may be 4 or 6, change to ANYCODE.
	* src/dwg.spec: XRECORD whitespace

2018-03-12  Reini Urban  <rurban@cpan.org>

	dwg.spec: handle insert_count
	* src/decode.c, src/encode.c, src/print.c, src/dwg.spec:
	  add FIELD_INSERT_COUNT fixing print and encode of insert_count.
	  add FIELD_TRACE as separate helper.
	  add FIELD_HANDLE_N helper to print the actual vcount index.
	* src/encode.c (FIELD_HANDLE): add assertions and LOG_ERROR
	  when handle_code deviates
	  (HANDLE_VECTOR_N): add assertions.
	  (dwg_encode_add_object): change long unsigned int to unsigned long

2018-03-12  Reini Urban  <rurban@cpan.org>

	dwg.spec: layout_handle in BLOCK_HEADER is code 5

2018-03-12  Reini Urban  <rurban@cpan.org>

	xmlsuite: unsigned char* conversion
	* testsuite/xmlsuite/common.c: replace char with xmlChar as used in libxml2
	* testsuite/xmlsuite/testsuite.c: ditto

2018-03-12  Reini Urban  <rurban@cpan.org>

	fixup examples
	* examples/alive.test: rewrite needs two args
	* examples/rewrite.c: need USE_WRITE, fixup error message
	* examples/testsvg2.c: add log_if_error checks, add argv[1] check,
	    fix c99 block decl, fix handle returning a handle, not struct.
	* get_bmp.c: unsigned char* dwg_bmp

2018-03-12  Reini Urban  <rurban@cpan.org>

	fix dwg_api
	* src/dwg_api.{c,h}:
	  add missing checks for an empty 2nd arg
	  add missing return values in the error case.
	  LOG_ERROR

	  declare all accessors, fixing x86_64
	  E.g. fixing http://lists.gnu.org/archive/html/libredwg/2017-07/msg00000.html
	  caused by the wrong default type being added for the undeclared functions,
          capping pointers at 32bit.

	  change TV from unsigned char* to char*, only the internal
	  methods need to use unsigned char*. harmonized with the external field types.

	  changed *get_block_size accessors to return the natural unsigned
          long * type, not long *.

	  change API to return pointers, not structs for:
          dwg_obj_appid_get_appid_control, dwg_obj_get_handle,
          dwg_ent_insert_get_ref_handle

	* src/api.h, src/api.c: deleted
	* Makefile.am: add .c.i: and check-syntax emacs flymake targets

2018-03-11  Reini Urban  <rurban@cpan.org>

	[maint] Fix compilation errors and warnings
	* configure.ac: probe for malloc.h.
	* src/decode.c: global loglevel, static variable 'loglevel' is used in
	    an inline function with external linkage [-Wstatic-in-inline].
	  dwg_decode_handleref_with_code make global: [-Wstatic-in-inline].
	* src/encode.c: declare dwg_encode_handleref,
	  dwg_encode_handleref_with_code, dwg_encode_common_entity_handle_data,
	  dwg_encode_common_entity_handle_data: declare it as static.
	* src/dwg.c: fix various integer fmt types.
	  get_first_owned_object: error with Unsupported version.
	  get_next_owned_object: error with Unsupported version.
	  declare dwg_encode_chains.
	* src/dwg_api.c: check HAVE_MALLOC_H.
	* .gitignore: add TAGS.

2015-12-11  gaganjyot  <thegaganx@gmail.com>

	[Fix] Memory Errors

2015-03-29  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Remove "make-check"-generated .xml files from repo.
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Arc.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/ConstructionLine.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Donut.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Ellipse.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Helix.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Line.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Multiline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Point.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/PolyLine3D.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polygon.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polyline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/RAY.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Spline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Text.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2000/circle.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Arc.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/ConstructionLine.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Donut.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Ellipse.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Helix.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Line.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Multiline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Point.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/PolyLine3D.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polygon.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polyline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/RAY.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Spline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Text.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2004/circle.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Arc.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/ConstructionLine.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Donut.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Ellipse.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Helix.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Line.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Multiline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Point.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/PolyLine3D.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polygon.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polyline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/RAY.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Spline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Text.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2007/circle.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Arc.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/ConstructionLine.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Donut.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Ellipse.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Helix.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Line.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Multiline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Point.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/PolyLine3D.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polygon.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polyline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/RAY.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Spline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Text.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2010/circle.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Arc.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/ConstructionLine.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Donut.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Ellipse.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Helix.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Line.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Multiline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Point.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/PolyLine3D.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polygon.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polyline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/RAY.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Spline.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Text.xml
	* testsuite/xmlsuite/DWG/DWG-Files/2013/circle.xml: Delete file.

2015-03-29  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Remove another xmlsuite "make check"-generated file.
	* testsuite/xmlsuite/result.htm: Delete file.

2015-03-29  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Remove xmlsuite "make check"-generated files from repo.
	* testsuite/xmlsuite/test_output/2000/ConstructionLine.xml
	* testsuite/xmlsuite/test_output/2000/Donut.xml
	* testsuite/xmlsuite/test_output/2000/Ellipse.xml
	* testsuite/xmlsuite/test_output/2000/Helix.xml
	* testsuite/xmlsuite/test_output/2000/Line.xml
	* testsuite/xmlsuite/test_output/2000/Multiline.xml
	* testsuite/xmlsuite/test_output/2000/Point.xml
	* testsuite/xmlsuite/test_output/2000/PolyLine3D.xml
	* testsuite/xmlsuite/test_output/2000/Polygon.xml
	* testsuite/xmlsuite/test_output/2000/Polyline.xml
	* testsuite/xmlsuite/test_output/2000/RAY.xml
	* testsuite/xmlsuite/test_output/2000/Spline.xml
	* testsuite/xmlsuite/test_output/2000/Text.xml
	* testsuite/xmlsuite/test_output/2000/circle.xml
	* testsuite/xmlsuite/test_output/2004/Arc.xml
	* testsuite/xmlsuite/test_output/2004/ConstructionLine.xml
	* testsuite/xmlsuite/test_output/2004/Donut.xml
	* testsuite/xmlsuite/test_output/2004/Ellipse.xml
	* testsuite/xmlsuite/test_output/2004/Helix.xml
	* testsuite/xmlsuite/test_output/2004/Line.xml
	* testsuite/xmlsuite/test_output/2004/Multiline.xml
	* testsuite/xmlsuite/test_output/2004/Point.xml
	* testsuite/xmlsuite/test_output/2004/PolyLine3D.xml
	* testsuite/xmlsuite/test_output/2004/Polygon.xml
	* testsuite/xmlsuite/test_output/2004/Polyline.xml
	* testsuite/xmlsuite/test_output/2004/RAY.xml
	* testsuite/xmlsuite/test_output/2004/Spline.xml
	* testsuite/xmlsuite/test_output/2004/Text.xml
	* testsuite/xmlsuite/test_output/2004/circle.xml: Delete files.

2015-03-27  Thien-Thi Nguyen  <ttn@gnu.org>

	[v unit] Fix bug: Handle program invocation w/o args.
	* unit-testing/Makefile.am (TESTS_ENVIRONMENT): New var.
	* unit-testing/common.c (main): Don't blindly operate
	on ‘argv[1]’; instead, use the value of env var ‘INPUT’, if
	available, else print error message and exit failurefully.

2015-03-27  Thien-Thi Nguyen  <ttn@gnu.org>

	[dist] Fix bug: Also distribute example.dwg.
	* unit-testing/Makefile.am (EXTRA_DIST): New target.

2015-03-26  Pero Brbora  <pbrbora@stud.unidu.hr>

	[v xml] Fix bug: Avoid segfault: free only in non-error path.
	* testsuite/testcases/common.c (test_code):
	Don't call ‘dwg_free’ unconditionally; instead, call
	it only in the case where there are no errors.

2015-02-21  Thien-Thi Nguyen  <ttn@gnu.org>

	[boot] Bump minimal version of Automake to 1.12.2.
	* configure.ac (AM_INIT_AUTOMAKE): ...here.

2015-02-20  Thien-Thi Nguyen  <ttn@gnu.org>

	[boot] Don't specify $(srcdir) explicitly.
	* bindings/python/Makefile.am (BUILT_SOURCES): Remove ‘$(srcdir)/’.
	(swig_wrap_python.c): Rename target from ‘$(srcdir)/swig_wrap_python.c’.

2015-02-20  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Add unit-testing/ to "make check" flow.
	* Makefile.am (SUBDIRS): Add unit-testing, immediately after src.
	* configure.ac (AC_CONFIG_FILES): Add unit-testing/Makefile.
	* unit-testing/Makefile: Delete file.
	* unit-testing/Makefile.am: New file.
	* unit-testing/.gitignore: New file.

2015-02-20  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Do testing serially.
	* configure.ac (AM_INIT_AUTOMAKE): Add option ‘serial-tests’.

2014-12-10  Thien-Thi Nguyen  <ttn@gnu.org>

	[maint] Remove site.exp files from repo.
	* testsuite/site.exp: Delete file.
	* testsuite/testcases/site.exp: Delete file.

2014-12-05  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Fix bug: Collapse individual tuple-item assignments.
	* testsuite/xmlsuite/check.py <top-level>:
	  Don't assign to ‘result[0]’ and ‘result[1]’ separately;
	  instead, assign a literal 2-tuple to ‘result’, once.

2014-12-04  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Make testsuite/testcases progs link against in-tree libredwg.la.
	* testsuite/testcases/Makefile.am
	  (LDADD): New var.
	  (AM_CFLAGS): Delete var.

2014-12-03  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Explicitly name testsuite/testcases support files.
	* testsuite/testcases/Makefile.am
	  (paired, unpaired): New vars.
	  (check_PROGRAMS): Use $(paired) and $(unpaired).
	  (EXTRA_DIST): Add example.dwg, vertex.mesh, common.c,
	  ole2frame.c; replace ‘check_PROGRAMS’ ref w/ ‘paired’.

2014-11-29  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Distribute testsuite/testcases support files.
	* testsuite/testcases/Makefile.am (EXTRA_DIST): New var.

2014-11-27  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Declare helper.py encoding.
	* testsuite/xmlsuite/helper.py:
	  Add Emacs-style ‘coding:’ comment as first line.

2014-11-26  Thien-Thi Nguyen  <ttn@gnu.org>

	[maint] Remove *.pyc files from repo.
	* testsuite/xmlsuite/check.pyc: Delete file.
	* testsuite/xmlsuite/helper.pyc: Delete file.

2014-11-26  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Streamline invocation of sub-program txttoxml.py.
	* testsuite/xmlsuite/Makefile.am (TESTS_ENVIRONMENT):
	  Also set env var ‘PYTHON’.
	* testsuite/xmlsuite/helper.py: Import ‘glob’.
	  (generatexml): Don't invoke txtgenerate.sh; instead, iterate the
	  invocation of program txttoxml.py over the list of */*.txt files.
	* testsuite/xmlsuite/DWG/DWG-Files/txttoxml.py: Do ‘chmod -x’.
	* testsuite/xmlsuite/DWG/DWG-Files/txtgenerate.sh: Delete file.

2014-11-23  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Use Python interpreter discovered by configure script.
	* testsuite/xmlsuite/Makefile.am (TESTS_ENVIRONMENT): New var.
	* testsuite/xmlsuite/check.py: Remove shebang; chmod -x.

2014-11-21  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Make xmlsuite data files non-executable.
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Arc.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Arc.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Arc.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Arc.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/ConstructionLine.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/ConstructionLine.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/ConstructionLine.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/ConstructionLine.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Donut.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Donut.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Donut.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Ellipse.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Ellipse.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Ellipse.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Helix.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Helix.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Helix.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Line.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Line.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Line.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Multiline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Multiline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Multiline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Point.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Point.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Point.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/PolyLine3D.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/PolyLine3D.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/PolyLine3D.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polygon.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polygon.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polygon.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polyline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polyline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Polyline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/RAY.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/RAY.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/RAY.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Spline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Spline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Spline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Text.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Text.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/Text.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/circle.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/circle.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2000/circle.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Arc.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Arc.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Arc.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/ConstructionLine.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/ConstructionLine.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/ConstructionLine.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Donut.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Donut.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Donut.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Ellipse.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Ellipse.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Ellipse.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Helix.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Helix.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Helix.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Line.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Line.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Line.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Multiline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Multiline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Multiline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Point.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Point.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Point.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/PolyLine3D.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/PolyLine3D.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/PolyLine3D.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polygon.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polygon.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polygon.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polyline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polyline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Polyline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/RAY.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/RAY.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/RAY.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Spline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Spline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Spline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Text.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Text.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/Text.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/circle.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/circle.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2004/circle.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Arc.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Arc.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Arc.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/ConstructionLine.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/ConstructionLine.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/ConstructionLine.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Donut.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Donut.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Donut.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Ellipse.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Ellipse.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Ellipse.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Helix.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Helix.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Helix.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Line.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Line.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Line.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Multiline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Multiline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Multiline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Point.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Point.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Point.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/PolyLine3D.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/PolyLine3D.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/PolyLine3D.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polygon.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polygon.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polygon.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polyline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polyline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Polyline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/RAY.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/RAY.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/RAY.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Spline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Spline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Spline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Text.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Text.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/Text.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/circle.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/circle.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2007/circle.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Arc.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Arc.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Arc.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/ConstructionLine.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/ConstructionLine.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/ConstructionLine.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Donut.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Donut.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Donut.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Ellipse.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Ellipse.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Ellipse.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Helix.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Helix.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Helix.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Line.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Line.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Line.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Multiline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Multiline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Multiline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Point.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Point.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Point.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/PolyLine3D.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/PolyLine3D.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/PolyLine3D.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polygon.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polygon.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polygon.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polyline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polyline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Polyline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/RAY.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/RAY.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/RAY.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Spline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Spline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Spline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Text.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Text.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/Text.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/circle.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/circle.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2010/circle.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Arc.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Arc.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Arc.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Arc.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/ConstructionLine.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/ConstructionLine.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/ConstructionLine.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/ConstructionLine.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Donut.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Donut.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Donut.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Donut.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Ellipse.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Ellipse.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Ellipse.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Ellipse.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Helix.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Helix.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Helix.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Helix.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Line.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Line.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Line.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Line.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Multiline.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Multiline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Multiline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Multiline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Point.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Point.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Point.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Point.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/PolyLine3D.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/PolyLine3D.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/PolyLine3D.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polygon.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polygon.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polygon.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polygon.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polyline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polyline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Polyline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/RAY.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/RAY.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/RAY.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/RAY.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Spline.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Spline.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Spline.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Spline.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Text.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Text.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/Text.txt:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/circle.bak:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/circle.dwg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/circle.jpg:
	* testsuite/xmlsuite/DWG/DWG-Files/2013/circle.txt: Do ‘chmod -x’.

2014-11-21  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Distribute xmlsuite support files.
	* testsuite/xmlsuite/Makefile.am (EXTRA_DIST):
	Add DWG, header.htm, helper.py, $(TESTS).

2014-11-19  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Use ‘LDADD’ and full libredwg.la filename.
	* testsuite/xmlsuite/Makefile.am (LDADD): Rename from
	  ‘AM_LDFLAGS’; specify explicit location of libredwg.la.

2014-11-16  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Don't forget to distribute common.c.
	* testsuite/xmlsuite/Makefile.am (EXTRA_DIST): Add common.c.

2014-11-16  Thien-Thi Nguyen  <ttn@gnu.org>

	[v] Don't forget to distribute suffix.c.
	* testsuite/xmlsuite/Makefile.am (EXTRA_DIST): New var.

2014-10-22  Thien-Thi Nguyen  <ttn@gnu.org>

	[build] Determine libxml2 flags at configure time.
	* configure.ac <checks for libraries>:
	  Don't use ‘AC_CHECK_LIB’; instead, call ‘PKG_CHECK_MODULES’
	  for ‘libxml-2.0’ and update error message to mention that directly.
	  (XML2_CFLAGS, XML2_LIBS): New AC_SUBST.
	* testsuite/xmlsuite/Makefile.am (LIBXML): Delete var.
	  (AM_CPPFLAGS): New var.
	  (AM_CFLAGS): Move everything except ‘-g’ to...
	  (AM_LDFLAGS): ...this new var, and use $(XML2_LIBS).

2014-10-22  Thien-Thi Nguyen  <ttn@gnu.org>

	[build] Make configure script check for pkg-config(1).
	* configure.ac <checks for programs>: Call ‘PKG_PROG_PKG_CONFIG’.

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	Tweaking

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	Removing binaries

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	Final Commit

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	Tweaking

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	Tweaking

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	Updating Doxygen File

2014-08-18  Piyush  <achyutapiyush@gmail.com>

	DOcumentation Updated

2014-08-16  Piyush  <achyutapiyush@gmail.com>

	Improved code formatting

2014-08-16  Piyush  <achyutapiyush@gmail.com>

	DOcumentation Updated

2014-08-16  Piyush  <achyutapiyush@gmail.com>

	Added dependencies. Integrated everything

2014-08-15  Piyush  <achyutapiyush@gmail.com>

	CLeaning

2014-08-14  Piyush  <achyutapiyush@gmail.com>

	Updated Tests

2014-08-13  Piyush  <achyutapiyush@gmail.com>

	Moved to testsuite folder

2014-08-11  Piyush  <achyutapiyush@gmail.com>

	Intregating xmlsuite

2014-08-10  Piyush  <achyutapiyush@gmail.com>

	Updating testsuite

2014-08-09  Piyush  <achyutapiyush@gmail.com>

	Removing unit tests folder

2014-08-07  Piyush  <achyutapiyush@gmail.com>

	Updating files

2014-08-02  Piyush  <achyutapiyush@gmail.com>

	Updated tests

2014-07-31  Piyush  <achyutapiyush@gmail.com>

	Tests for bits.c

2014-07-17  Piyush  <achyutapiyush@gmail.com>

	Moved it to xmlsuite folder for now

2014-07-17  Piyush  <achyutapiyush@gmail.com>

	Test suite with first unit test

2014-07-17  Piyush  <achyutapiyush@gmail.com>

	Moving the XML suite to different folder for now

2014-06-27  Piyush  <achyutapiyush@gmail.com>

	Commit the sample DWG files needed for test suite

2014-06-27  Piyush  <achyutapiyush@gmail.com>

	Removed the Previous DWG Files
	The files were not completely committed and there was error in it. So removed and will add the same files in the next commit

2014-06-27  Piyush  <achyutapiyush@gmail.com>

	Adding the dependent files

2014-06-27  Piyush  <achyutapiyush@gmail.com>

	Adding python script which will generate %age

2014-06-13  Piyush  <achyutapiyush@gmail.com>

	Adding Initial Files

2014-04-13  gaganjyot  <thegaganx@gmail.com>

	API Merge with clean doc folder

2014-04-12  Rodrigo Rodrigues da Silva  <rsilva@metamaquina.com.br>

	[r] ignore Object_Ref resolving when handle is null

2013-09-24  gaganjyot  <thegaganx@gmail.com>

	Documentation updated, Comments added

2013-09-24  gaganjyot  <thegaganx@gmail.com>

	Documentation updated, Comments added

2013-09-23  gaganjyot  <thegaganx@gmail.com>

	Documentation added

2013-09-20  gaganjyot  <thegaganx@gmail.com>

	Comments added, Make clean target for unit testing

2013-09-19  gaganjyot  <thegaganx@gmail.com>

	Comments added

2013-09-18  gaganjyot  <thegaganx@gmail.com>

	check target for unit tests

2013-09-18  gaganjyot  <thegaganx@gmail.com>

	api -> dwg_api

2013-09-18  gaganjyot  <thegaganx@gmail.com>

	removed api.c error from testsvg2.c

2013-09-18  gaganjyot  <thegaganx@gmail.com>

	library with unit-testing

2013-09-17  gaganjyot  <thegaganx@gmail.com>

	complete unit testing with makefile

2013-09-16  gaganjyot  <thegaganx@gmail.com>

	entity functions uncommented

2013-09-15  gaganjyot  <thegaganx@gmail.com>

	unit tests added with comments

2013-09-14  gaganjyot  <thegaganx@gmail.com>

	updated comments for unit tests

2013-09-13  gaganjyot  <thegaganx@gmail.com>

	unit tests added

2013-09-11  gaganjyot  <thegaganx@gmail.com>

	More unit tests added

2013-09-01  gaganjyot  <thegaganx@gmail.com>

	added more unit tests

2013-08-31  gaganjyot  <thegaganx@gmail.com>

	added unit testing, improved testsvg

2013-08-24  gaganjyot  <thegaganx@gmail.com>

	Bugs fixed

2013-08-24  gaganjyot  <thegaganx@gmail.com>

	Bugs removed

2013-08-13  gaganjyot  <thegaganx@gmail.com>

	error in appid fixed

2013-08-01  gaganjyot  <thegaganx@gmail.com>

	Updated code and some comments,Removed un-necassary code

2013-07-31  gaganjyot  <thegaganx@gmail.com>

	code formatted, Minor bug fixes

2013-07-29  gaganjyot  <thegaganx@gmail.com>

	New SVG Converter, Without low level access

2013-07-29  gaganjyot  <thegaganx@gmail.com>

	New SVG converter using the API, Added extra functions for objects and reference object

2013-07-29  gaganjyot  <thegaganx@gmail.com>

	Added extra functions for object, reference and block_header, New SVG converter

2013-07-28  gaganjyot  <thegaganx@gmail.com>

	Table entity support added

2013-07-27  gaganjyot  <thegaganx@gmail.com>

	added support for body, region, 3dsolid and vertex_pface_face with error reporting

2013-07-27  gaganjyot  <thegaganx@gmail.com>

	added support for mline, 3dface

2013-07-27  gaganjyot  <thegaganx@gmail.com>

	Added support for polyline2d, polyline3d, polyline_mesh and polyline_pface

2013-07-27  gaganjyot  <thegaganx@gmail.com>

	Added support for spline, lwpline, ole2frame and viewport

2013-07-26  gaganjyot  <thegaganx@gmail.com>

	added functions for leader, mtext, leader, shape, endblk

2013-07-26  gaganjyot  <thegaganx@gmail.com>

	Total Support For Dimensions with error reporting

2013-07-25  gaganjyot  <thegaganx@gmail.com>

	Updated error handling, added few functions for dimension ordinate

2013-07-24  gaganjyot  <thegaganx@gmail.com>

	Error reporting for all functions added

2013-07-24  gaganjyot  <thegaganx@gmail.com>

	support for error reporting in line,circle,arc

2013-07-23  gaganjyot  <thegaganx@gmail.com>

	More functions for entiies and objects, Comments updated

2013-07-22  gaganjyot  <thegaganx@gmail.com>

	Initial commit

2011-01-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[bind] Wrap Object_Data *object as array. Fixes #32186
	* bindings/dwg.i: use carrays.i to generate helper functions
	* examples/load_dwg.py: updated python example with correct usage of array

2011-01-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Added missing #ifdef switch to dwg_write_file()'s prototype

2011-01-19  Rob Vermaas  <rob.vermaas@gmail.com>

	use AX_SWIG_PYTHON_CPPFLAGS variable in stead of hardcoded /usr/include/python2.6

2011-01-05  Till Heuschmann  <theuschmann@gmail.com>

	[build] applied patch from Rob Vermaas <rob.vermaas@gmail.com>
	Thanks also to Timo VJ Lähde <timovj.lahde@gmail.com> for reporting this error.

	decode_r2007.c: Do not use sys/malloc.h include

2010-12-28  Till Heuschmann  <theuschmann@gmail.com>

	[r] Decode R2007 Metadata
	Decode Metadata including file header, page map, section map

	dwg.h: Add type for wide character strings
	decode_r2007.c: Decode Metadata

2010-12-27  Till Heuschmann  <theuschmann@gmail.com>

	[build] Add R2007 decoder

2010-12-27  Till Heuschmann  <theuschmann@gmail.com>

	[build] Add R2007 decoder
	decode_r2007.c: Source file for all functions that are only needed to decode R2007 files.

2010-10-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[r,w] Fixed typo in sentinel
	* common.c: second byte of DWG_SENTINEL_CLASS_END was typed "5L" instead of "5E"

2010-10-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[w] fixed header variables overflow
	* src/encode.c: fixed two-byte overflow after Header Variables section's CRC.

2010-10-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[w] Writing objects to bitstream correctly - or at least almost.
	* encode.c: fixed dwg_encode_chains() to call dwg_encode_add_objects() at the correct point, plus various fixes.

	It seems that some files are now written correctly to the bitstream. Although, unknown object types and objects with variable type (>500) are still skipped.
	I have also detected various situations in which the Header Variables and Classes sections of the new file are 2 bytes longer than the original file. Comparing both original and re-written files, I suspect that bit_write_CRC() is writing these two extra bogus bytes.

2010-10-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[api] fixed missing prototype in header
	* dwg.h: added missing dwg_write_file() function prototype

2010-10-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[w] Adding debug info to rewrite.c
	* rewrite.c: added debug messages

2010-10-05  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] Improve m4 quoting
	* configure.ac: according to Thien-Thi's suggestion at the mailing list, macro
	arguments are sorrounded by brackets to avoid confusion in case they become
	macros themselves.

2010-10-05  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[doc] Explain use of underscore
	* bindings/python/Makefile.am: explain _libredwg_la

2010-10-05  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[bind] Enhanced python example
	* examples/load_dwg.py: read file version and print object list.

2010-09-28  Ivan Radic  <ivnrdc@gmail.com>

	crc check on

2010-09-28  Ivan Radic  <ivnrdc@gmail.com>

	add return keyword

2010-09-28  Ivan Radic  <ivnrdc@gmail.com>

	correct function name

2010-09-28  Ivan Radic  <ivnrdc@gmail.com>

	correct field macros

2010-09-23  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	added missing .m4 file
	*m4/ax_python_devel.m4: required by AX_SWIG_PYTHON

2010-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] updated TODO list

2010-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] initial autotoolization of python bindings
	*configure.ac: add SWIG and Python macros
	*bindings/Makefile.am: new file, only points to bindings/python, don't know if
	 it is really necessary, but one day we'll have other bindings and it might be useful
	*bindings/python/Makefile.am: new file, generate wrapper and build python module
	*autogen.sh: add -I m4 flag
	*m4/ax*.m4: swig macros from Autotools archive

2010-09-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	added python example
	*examples/load_dwg.py: load a DWG file and print some data

2010-09-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[w] added dwg_add_object function
	*src/encode.c: added function that will call delegate object/entity encoding
	 function based on object type. Not sure if works yet since dwg_encode_chains
	 needs to be reviewed to call it at the correct point. Don't merge to trunk,
	 it barely builds.

2010-09-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	fixed wrong function prototypes
	*dwg.h: wrong function prototypes - detected by SWIG

2010-09-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[b] added python language bindings
	*bindings/dwg.i: SWIG interface to libredwg
	*bindings/python/Makefile: Makefile updated with target to generate wrapper
	 and build Python module (to be removed soon when I will integrate SWIG with
	 Autotools.
	*bindings/python/libredwgmodule.c: removed unnecessary wrapper. Wrapper is
	 automatically generated by SWIG.

2010-08-30  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	applied the patch from Rob Vermaas <rob.vermaas@gmail.com>
	* src/Makefile.am

2010-08-19  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	[w] encode_object now encode non-null stuff
	* src/encode.c

2010-08-18  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	[w] worked more on the dwg_encode_entity function
	* src/encode.c

2010-08-17  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	[w]quick fix in encode_entitys
	* src/encode.c

2010-08-16  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	encoding null objects (OxOO), for validate the file structure
	* src/encode.c

2010-08-13  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	[w]added common_entity_handle in encode.c
	* src/decode.c
	* src/encode.c
	* src/common_entity_handle_data.spec; new

2010-08-13  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[w] fixing handle encoding macros
	*src/encode.c: rewrote FIELD_HANDLE macro, removed dwg_encode_handleref*()

2010-08-10  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	[w] added some entry checking and usage warning for the rewrite.c test
	* examples/rewrite.c

2010-08-10  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[w] cleaning up handle encoding
	*src/encode.c: cleaned up dwg_encode_handleref, write supposedly existing ref->handleref

2010-08-10  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	cleaned the warnings during compiling
	* src/enode.c
	* src/decode.c
	* src/dwg.c

2010-08-09  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	cleaned a duplicated macro (XDICOBJHANDLE)
	* src/encode.c : 125

2010-08-09  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	added some macros and the encode_commom_entity_handle function
	* src/encode.c

2010-08-09  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	cleaned duplicated header
	* src/bits.c

2010-08-09  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] Fixed missing file header
	*src/header_variables.spec: added missing copyright header

2010-08-07  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	started to add some handle functions in encode (not fully working yet)
	* src/encode.c; func: macro FIELD_HANDLE,  dwg_encode_handleref_with_code,  dwg_encode_handleref

2010-08-02  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	minor changes in encode.c and rewrite.c
	* src/encode.c
	* examples/rewrite.c

2010-07-23  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	copy and pasted the header_variables spec on a header file and included it on the encode.c and decode.c
	*  src/encode.c;  changed
	*  src/decode.c;  changed
	*  src/header_variables.spec; added

2010-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[r] Fix typo in version codes array shape.
	* common.h (version_codes): Say "[8][7]", not "[7][8]".
	* common.c (version_codes): Likewise.

2010-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Rename configure.in to configure.ac.
	* configure.ac: Rename from configure.in.

2010-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Bump create-changelog version to "1.2".
	* build-aux/create-changelog (version): Bump to "1.2"; augment history.

2010-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Add create-changelog option ‘--copyright WHO’.
	* build-aux/create-changelog (copyright-notice): New defvar.
	<option parsing>: Set ‘copyright-notice’ if given ‘-c’ or ‘--copyright’.
	<output>: If set, append ‘copyright-notice’.

2010-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Direct create-changelog "Generating..." message to stderr.
	* build-aux/create-changelog (fso): Add docstring.
	Use ‘message’ to output "Generating...".

2010-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Filter ChangeLog entries with titles ending in "; nfc" (no dot).
	* build-aux/create-changelog: Filter entries with titles
	ending in "; nfc" (no dot) in addition to "; nfc." (with dot).

2010-07-21  Anderson Pierre Cardoso  <apierre.cardoso@gmail.com>

	added a test program for the write support. It loads a dwg file and try to rewrite it
	*  examples/rewrite.c

2010-07-21  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[r] Initial R2010 support
	*common.h: added R_2010 do version enum
	*common.c: added R2010 version string

2010-07-21  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[r] Fixing error in file structure decoding
	* src/decode.c: checking if links are present (now code complies to spec)

2010-07-07  acardoso  <apierre.cardoso@gmail.com>

	added compiling flag for enable write support (--enable-write), uncommented write functions and added a dwg_encoder_header_variables function

2010-06-07  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Fix Git portability bug: Use ‘--pretty=format:STR’.
	* build-aux/create-changelog: Use ‘--pretty-format:STR’
	instead of ‘--format=STR’, which is not yet widely supported.

2010-06-05  Till Heuschmann  <theuschmann@gmail.com>

	[admin] updating copyright notices

2010-04-28  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] updating file headers and copyright notices

2010-04-28  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] adding *~ pattern to .gitignore

2010-04-28  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] Update AUTHORS file

2010-03-15  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Mention Texinfo in HACKING.
	* HACKING (other tools): New section.

2010-03-14  Till Heuschmann  <theuschmann@gmail.com>

	[r] decode DICTIONARYWDLFT and PLACEHOLDER
        * src/decode.c: call decoding functions according to dxf class name
        * src/dwg.h: complete structs (Dwg_Object_DICTIONARYWDLFT,
        Dwg_Object_PLACEHOLDER)
        * src/dwg.spec: add decoding functions

2010-03-14  Till Heuschmann  <theuschmann@gmail.com>

	[r] decode Xrecord
        * src/decode.c: add function dwg_decode_xdata to decode arbitrary data streams
        * src/dwg.h: add the struct Dwg_Resbuf which represents a result buffer

2010-03-03  Till Heuschmann  <theuschmann@gmail.com>

	[r] read objects with fixed types
	* src/decode.c: decode LWPLINE, HATCH, XRECORD, LAYOUT when stored with fixed type
	* src/dwg.h: added values to Dwg_Object_Type
	* src/dwg.spec: fixed LAYOUT decoding (2004 only), fixed LWPLINE decoding
	* src/encode.c: added FIELD_2DD_VECTOR macro
	* src/print.c: added FIELD_2DD_VECTOR macro

2010-02-23  Till Heuschmann  <theuschmann@gmail.com>

	[r] fix Tolerance, View and Ucs decoding
	* src/dwg.h: new field origin (Dwg_Object_UCS)
	  change type of text_string to BITCODE_TV (Dwg_Entity_TOLERANCE)
	* src/dwg.spec: fixed decoding

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[dist] Arrange to also distribute file README-alpha.
	* README-alpha: New file.
	* Makefile.am (EXTRA_DIST): Add README-alpha.
	* README: Remove version, which is btw incorrect, from first line.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Arrange for automake to *not* AC_DEFINE `VERSION'.
	* configure.in (AM_INIT_AUTOMAKE): Specify `no-define'.
	* src/common.h (VERSION): No longer #undef this.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] In configure.in, use one-arg AM_INIT_AUTOMAKE form.
	* configure.in (AM_INIT_AUTOMAKE): Use one-arg form.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[dist] Update Makefile.am EXTRA_DIST vars.
	* examples/Makefile.am (EXTRA_DIST): Add example.dwg, suffix.c, $(TESTS).
	* src/Makefile.am (EXTRA_DIST): Add dwg.spec, logging.h; remove example.dwg.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[test] Avoid segfault in testSVG.
	* examples/testSVG.c (output_BLOCK_HEADER):
	If `ref->obj->tio.object' is NULL, say so
	to stderr and skip the "<g>..</g>" output.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build doc] Add texinfo for LibreWDG manual plus infrastructure.
	* doc/LibreDWG.texi: New file.
	* doc/fdl.texi: New file.
	* doc/Makefile.am: New file.
	* configure.in (AC_CONFIG_FILES): Add doc/Makefile.
	* Makefile.am (SUBDIRS): Add doc.

2010-02-23  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[admin] updating TODO file; nfc
	*TODO: remove tasks already done, added new tasks and updated others

2010-02-23  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	[r] fix 3dsolid decoding
	* src/dwg.h: new field for 3dsolid (ACIS_empty_bit)
	* src/dwg.spec: fixed decoding of fields

2010-02-22  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	[r] deobfuscate SAT data from 3dsolid objects
	* src/dwg.spec: de-obfuscation routine
	* src/dwg.h: a new unsigned char* field for storing the raw SAT data

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[test] Add "make check" support plus aliveness test.
	* examples/Makefile.am (TESTS_ENVIRONMENT, TESTS): New vars.
	* examples/alive.test: New file.
	* README (Building and installing the library): Mention "make check".
	* .gitignore: Update ignorance; nfc.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[test] Don't hardcode input/output file names; require `argv[1]'.
	* examples/suffix.c: New file.
	* examples/dwg_ps.c: #include "suffix.c".
	(INPUT_FILE, OUTPUT_FILE): Delete #define:s.
	(main): Use `REQUIRE_INPUT_FILE_ARG', `suffix'.
	* examples/get_bmp.c: #include "suffix.c".
	(INPUT_FILE, OUTPUT_FILE): Delete #define:s.
	(get_bmp): Use `suffix'.
	(main): Use `REQUIRE_INPUT_FILE_ARG'.
	* examples/load_dwg.c: #include "suffix.c".
	(INPUT_FILE): Delete #define.
	(main): Use `REQUIRE_INPUT_FILE_ARG'.
	* examples/test.c: #include "suffix.c".
	(main): Use `REQUIRE_INPUT_FILE_ARG'.
	(FILENAME): Delete #define.
	(test_dwg_c): Don't bother with NULL `filename'.
	* examples/testSVG.c: #include "suffix.c".
	(main): Use `REQUIRE_INPUT_FILE_ARG'.
	(FILENAME): Delete #define.
	(test_SVG): Don't bother with NULL `filename'.

2010-02-23  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[C test] Make sure `main' returns 0 or 1.
	* examples/dwg_ps.c (main): Specify type of return value.
	On failure to read dwg file, return 1.
	* examples/test.c (test_dwg_c): Clamp return value to 0 or 1.
	* examples/testSVG.c (test_SVG): Likewise.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[test build] Check for pslib; build examples/dwg_ps only if present.
	* configure.in: Add checks for function `PS_open_file'
	in libps, and header file "libps/pslib.h".
	(HAVE_LIBPS): New AM_CONDITIONAL.
	* examples/Makefile.am (check_PROGRAMS): Remove `dwg_ps'.
	[HAVE_LIBPS] Add `dwg_ps' to `check_PROGRAMS'.
	[HAVE_LIBPS] (dwg_ps_SOURCES, dwg_ps_LDADD):
	Move these variables inside this conditional block.
	* README: Mention pslib non-critical requirement.

2010-02-22  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	[r] fix 3dsolid parsing segfault
	* src/dwg.h: block_size is now a vector
	* src/dwg.spec: store the values of block_size for each sat_data block

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[test build] Factor common LDFLAGS for examples/.
	* examples/Makefile.am (AM_LDFLAGS): New var.
	(test_LDADD, load_dwg_LDADD, get_bmp_LDADD): Delete vars.
	(testSVG_LDADD, dwg_ps_LDADD): From these vars, remove `-lredwg'.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[test build] Enable builddir!=srcdir operation in examples/.
	* examples/Makefile.am (AM_CFLAGS): Use $(top_srcdir), not "..".

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build w] Add runtime tracing support for write (encode) path.
	* src/encode.c: #include <stdbool.h>.
	(loglevel): Change type to `unsigned int'.
	[USE_TRACING] (DWG_LOGLEVEL): New #define.
	[USE_TRACING] (env_var_checked_p): New static var.
	(dwg_encode_chains) [USE_TRACING]: Before starting,
	set the logging level, but only do so once.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build r] Add runtime tracing support for read (decode) path.
	* src/decode.c: #include <stdbool.h>.
	(loglevel): Change type to `unsigned int'.
	[USE_TRACING] (DWG_LOGLEVEL): Move this into conditional
	block; change definition to be the variable `loglevel'.
	[USE_TRACING] (env_var_checked_p): New static var.
	(dwg_decode_data) [USE_TRACING]: Before starting,
	set the logging level, but only do so once.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Add preliminary "configure --enable-trace" support.
	* configure.in (trace): New AC_ARG_ENABLE.  If specified
	on the configure command-line, do AC_DEFINE([USE_TRACING]).

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Make every .c file #include "config.h".
	* src/common.h (VERSION): #undef it prior to re-#define.
	* src/bits.c: #include "config.h".
	* src/common.c: Likewise.
	* src/decode.c: Likewise.
	* src/dwg.c: Likewise.
	* src/encode.c: Likewise.
	* src/print.c: Likewise.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Move config.h into src/.
	* configure.in (AM_CONFIG_HEADER): Move to src/config.h; m4-quote.
	* .gitignore: Update ignorance.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Rename directory build/ to build-aux/.
	* configure.in (AC_CONFIG_AUX_DIR): Change to `build-aux'; m4-quote.
	* HACKING: Update; nfc.
	* .gitignore: Update; nfc.

2010-02-22  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Make create-changelog handle command-line args GNUishly.
	* build/create-changelog (version): Bump to "1.1";
	use `defconst'; keep brief history in docstring.
	<options parsing>: Mention package affiliation in --version output;
	accept -s to mean --since;
	throw error on missing arg for --since;
	no longer accept unadorned arg as output FILENAME;
	instead recognize --output (-o) FILENAME.
	Suggested by Rodrigo Rodrigues da Silva.

2010-02-21  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Rename create-changelog.el to create-changelog.
	* build/create-changelog: Rename from build/create-changelog.el.
	  Update help text to be implementation-agnostic.
	* HACKING: Update.

2010-02-20  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Add script to create ChangeLog from "git log" output.
	* build/create-changelog.el: New file.
	* HACKING (change log maintenance): Update.

2010-02-19  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[admin] Add a program to create/publish pre-regenerated tarballs.
	* build/snap.GNUmakefile: New file.
	* build/.placeholder: Delete file -- no longer necessary.
	* .gitignore: Update ignorance.

2010-02-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Add ACLOCAL_AMFLAGS to top-level Makefile.
	* Makefile.am (ACLOCAL_AMFLAGS): New var.

2010-02-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Remove spurious AC_SUBST.
	* configure.in (VERSION): Delete AC_SUBST.

2010-02-18  Thien-Thi Nguyen  <ttn@gnuvola.org>

	[build] Add autogen.sh; delete generated files.
	* autogen.sh: New file.
	* build/.placeholder: Likewise.
	* m4/.placeholder: Likewise.
	* INSTALL: Delete file.
	* Makefile.in: Likewise.
	* acinclude.m4: Likewise.
	* aclocal.m4: Likewise.
	* build/config.guess: Likewise.
	* build/config.sub: Likewise.
	* build/depcomp: Likewise.
	* build/install-sh: Likewise.
	* build/ltmain.sh: Likewise.
	* build/missing: Likewise.
	* config.h.in: Likewise.
	* configure: Likewise.
	* examples/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.

2010-02-15  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	fixing version detection for iterator methods

2010-02-11  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	changing my email address on file headers

2010-02-11  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	implement version dependent iterator for owned obects of a BLOCK_HEADER

2010-02-11  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	resolve object references after parsing r2004 and r2007 files

2010-02-11  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	check if some pointers are not null

2010-02-10  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	fix bugs in description of two objects of the spec: SORTENTSTABLE and LEADER were wrongly described

2010-02-06  Till Heuschmann  <theuschmann@gmail.com>

	Fixed confusions in DIMSTYLE decoding

2010-02-01  unknown  <tiu@.(none)>

	Improved R2004 header parsing. Read variables, handles, objects

2010-01-29  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Partially fixed bug #28681, common entity handle data parsed correctly

2010-01-29  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Added macro created print functions, made some functions private, increased logging trying to fix objectrefs

2010-01-27  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Logging test

2010-01-27  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring log messages: encode.c

2010-01-27  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring log messages: dwg.c

2010-01-27  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring log messages: bits.c and decode.c

2010-01-20  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	New logging infrastructure. printf's still need to be refactored
	Signed-off-by: Rodrigo Rodrigues da Silva <pitanga@members.fsf.org>

2010-01-19  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Integrating slightly modified patch #7057, file #19482, by James Michael DuPont <JamesMikeDuPont@googlemail.com>: reviewed typecasting to conform with C++ compiler's strict typechecking

2010-01-12  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Updating TODO

2009-12-25  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Created a TODO file, updated README

2009-12-25  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Created a TODO file

2009-12-24  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	renaming_variables_to_meet_GNU_coding_standards (NoCamelCaps\!)

2009-12-24  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Improved R2004 header parsing by Till Heuschmann <theuschmann@googlemail.com> (patch #7046) + Juca's fixes

2009-12-24  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	More API work. Fixed obvious bug in dwg_get_entities, but it still won't work.

2009-12-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Keep track of number of entities processed. More API work: dwg_get_entities, dwg_get_entity_count, dwg_get_entity_layer

2009-12-21  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Fixing dwg_get_layers bug found by Juca

2009-12-21  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	New API function, returns LAYER list

2009-12-21  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	adding NEWS file - required for GNU packages. We must always update this file prior to releases.

2009-12-21  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Fixing unchecked (loglevel) fprintf's (a few fprintf's left though) Keeping track of layers - initial support (new API function)

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	yes, I know it is a bit wrong, but it is just a test. I am still trying to figure out how to return a class instance from load_file

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	beginning to write a (still very simple) python binding for LibreDWG

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	Implement Encoder routine for VERTEX (2D) (10) description.

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	Partial implementation of SPATIAL_INDEX description.

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	changing name of macro from GET_FIELD to FIELD_VALUE (which makes more sense!)

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	Encoder and Decoder routines can be the same in IMAGE description.

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	REPEAT macro refactoring in IMAGE description -- by Rafael Moretti

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	REPEAT macro refactoring in LTYPE(57)

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	third and last iteration of REPEAT macro refactoring on MLINE(47) description. Thanks for support received from Rafael Moretti!

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	second iteration of REPEAT macro refactoring in MLINE(47) description

2009-12-19  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	first iteration of REPEAT macro refactoring in MLINE (47) description

2009-12-15  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	INSERT encoder

2009-12-15  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	dataflags handling are a responsibility of the user (client application)

2009-11-28  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	fix bug in SPLINE description

2009-11-28  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	using macros in SPLINE description

2009-11-28  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	using BITCODEs in header file

2009-11-27  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	_3dface encoder

2009-11-27  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	boilerplate with TODOs for unimplemented encoders

2009-11-27  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	LINE encoder

2009-11-26  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	now it compiles

2009-11-26  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	broken revision. unfinished refactoring towards write support

2009-11-25  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	starting to move dwg structures description to a dwg.spec file that can be used by both decode.c and encode.c (to avoid code replication)

2009-11-04  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Becoming a GNU package.

2009-11-04  Felipe Correa da Silva Sanches  <juca@members.fsf.org>

	updating my email to juca@members.fsf.org

2009-11-04  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding (C) notices to remaining files

2009-11-04  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Trying do debug XRECORD

2009-10-07  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[fixed] bug in bit_read_BS which lead to misinterpretation of raw unsigned chars

2009-09-26  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	updating README. Now in English.

2009-09-26  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Updating my e-mail in AUTHORS

2009-09-26  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	updating ChangeLog and removing useless files

2009-09-24  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	completed TABLE decoder. Needs testing.

2009-09-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	another chunk of TABLE decoder

2009-09-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	one more chunk of TABLE entity decoder

2009-09-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	another chunk of TABLE decoder

2009-09-22  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	another chunk of TABLE entity decoder

2009-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[new] Decoding of XRECORD object

2009-09-22  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	initial parsing of TABLE entity. Incomplete.

2009-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding missing handles

2009-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	* [new] adding log call to debug EED parsing * [fixed] adding 3D entities to object type switch

2009-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Reverting mistaken change from last revision.

2009-09-22  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring some entities

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix a bug in the DICTIONARYVAR decoder that was due to a typo in the spec, I think.
	field str should be TV instead of BS

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	now dwg_decode_object and dwg_decode_entity functions return an error code so that we can avoid decoders when these functions fail but we can try to load the rest of the file.

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a list of websites that contain dwg files we are using to test our dwg parser

2009-09-21  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Removing deprecated print.{c,h}

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	implementing a bit more of HATCH decoder. not everything yet.

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a couple fixes for R14 based on parsing of this test file: ftp://geodetic.ncdenr.org/maps/yancey14.zip

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode SPATIAL_FILTER

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode SORTENTSTABLE

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode RASTERVARIABLES

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	partial implementation of PROXY decoder

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode IDBUFFER

2009-09-21  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a bit more of HATCH decoding. We need to implement a better REPEAT macro so that complex nested REPEAT structures are easier to decode

2009-09-20  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	partial implementation of decoder for HATCH

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode GROUP(72)

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode VIEWPORT_ENTITY_HEADER_CONTROL

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode DIMSTYLE(69)

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode DIMSTYLE_CONTROL(68) and DIMSTYLE(69)

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode APPID(67) and APPID_CONTROL(66)

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* decoding of VPORT(65) * implemented an extra (auxiliary) bitcode: BITCODE_4BITS

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* decode VPORT_CONTROL * added case entries for some objects (where their respective decoders are invoked)

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decoding of REGION/3DSOLID/BODY

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* update DWG_OBJECT and DWG_ENTITY macros so that they now include the function prototype declaration * I have sorted object/entity declarations inthe same order they appear in the spec and I also added comments stating object number or page number (where it is described in the spec) * Added boilerplate for the ones we did not implement yet.

2009-09-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	some adjustments in handling of model/page coordinates I am still not sure how does that work.

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode LAYER_INDEX

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode IMAGEDEFREACTOR

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode IMAGEDEF

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	remove a redundant printf

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	removing dwg_var_map(...) function which is not used anymore

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* removed old header variables parser * replaced it by a call to the new one

2009-09-18  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring entities ELLIPSE, SHAPE, TRACE, SOLID

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	bring back FIELD_T

2009-09-18  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring entities POINT, 3D_FACE, POLYLINE({PFACE,MESH})

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	implementation of a better header variables parser

2009-09-18  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	* Refactoring DIMENSION entities. * [fixed] issue #8

2009-09-18  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Changed bit_write_CMC to take a Dwg_Color* argument

2009-09-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	refactoring MTEXT(44)

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	suppress warning on FIELD_3DPOINT_VECTOR macro

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	"absolute_ref" instead of "handle"

2009-09-17  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	* Entities MLINETYPE and VP_ENT_HDR * Correct handleref.value parsing, now considering offset codes

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix BLOCK_HEADER parsing bug due to lack of curly braces around HANDLE_VECTOR macro

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing bug in FIELD_VECTOR_N macro

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* bringging back some more lines of code that were mistakenly removed some revisions ago * use fprintf instead of sprintf

2009-09-17  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Translating: skt -> dwg and CKR -> CRC Fixing some mistakes made in header on previous commit due to translation (bitdouble and bitshort)

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* decoding UCS and UCS_CONTROL * bringing back code that pitanga mistakenly removed in his prior commit

2009-09-17  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Major translation effort. Seems to have been the last one.

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode VIEW and VIEW_CONTROL

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode LTYPE and LTYPE_CONTROL

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode SHAPEFILE and SHAPEFILE_CONTROL

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode LAYER_CONTROL

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode LAYER

2009-09-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	huge refactoring in SVG generator. Now symbols are stored in <defs> (we are using the BLOCK_HEADER handles)
	But I am still not sure about the correct procedure to select the entities that must be put inside a <g>.
	I tried to get all objects from first_entity until last_entity as they appear in the file, but that does not seem to be
	correct. What is the correct way to iterate over entities?

	R_2004+ provides a vector of handles pointing to everything that must go inside a <g>, but prior versions only tell us the
	1st and last entities.

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing the issue described on previous commit.

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	refactoring our code that handles handles. I have noticed that we are probably having leak issues here. But I still didn't detect exactly what is wrong. Handles are correctly parsed, but their values are corrupted before they are used by client code. Something is messing with our object_ref vector.

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	correct decoding of BLOCK_CONTROL.
	Now it will be possible to create <defs> section in SVG because BLOCK_CONTROL keeps handles of all BLOCK_HEADERS in the
	file and so we can loop these and read their BLOCKS and output one <g> for each simbol

	This commit totally ROCKS!!!

	hmmm! And we are in svn revision 256!!!! HAPPY HACKING! :-D

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* fix issue in R_2004 where xdicobjhandle might not be present in DICTIONARY * created a new macro XDICOBJHANDLE(code) * moved version macros to common.h

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	DICTIONARYVAR decoder

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LINE

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	CIRCLE

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	ARC

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	POLYLINE 3D

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	2D_POLYLINE

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	VERTEX_PFACE_PFACE

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	macros in VERTEX_*

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* disabling print module at all. Our macros are providing a much more consistent way of printing debbuging info. * refactoring VERTEX_2D

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix bugs in INSERT and MINSERT due to typos in the spec

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more refactoring on INSERT and MINSERT

2009-09-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* refactoring attdef * boilerplate for dwg_encode_common_entity_handle_data and dwg_encode_handleref

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	refactored TEXT and ATTRIB

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LAYOUT decoding done

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	using DWG_OBJECT/DWG_ENTITY in the rest of the objects in decode.c

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	REFACTOR... REFACTOR... REFACTOR... !!!

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* fix FIELD_HANDLE macro. * a bit more refactoring

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more macro-based refactoring

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decoding macros now allow printing of values in verboso mode (loglevel>=2)

2009-09-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	using suffix TV instead of T to denote "text value bitcode"

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	INSERT/MINSERT refactoring using macros

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	using version macros

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more macro usage on decoder

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	using MACROS on dwg_decode_MLINE. This suggests the need of a LOOP macro...

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix wrong escape code \N due to a typo

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* refactoring... * update on AUTHORS list

2009-09-14  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Refactoring to meet GNU code style (thanks to Eclipse's SHIFT+CTRL+F)

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	using DWG_OBJECT/DWG_ENTITY macros on more objects/entities

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	HANDLE_VECTOR macro REACTORS macro

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing segfault from my recent commits

2009-09-14  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding binaries and Makefiles to svn:ignore

2009-09-14  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding binaries and Makefiles to svn:ignore

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	HANDLE macro

2009-09-14  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding binaries and Makefiles to svn:ignore

2009-09-14  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Some translation

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	testing some experimental MACROS on decode_DICTIONARY

2009-09-14  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Handle parsing for missing entities (from 0 to 33)

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	using macro for entity UNUSED

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	now using the macro I introduced in previous commit

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	macro for entity decoder init

2009-09-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	adding macro to ease handle (Dwg_Object_Ref*) parsing

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	adding an auxiliary function to check valid handle codes. Now we should use dwg_decode_handleref_with_code whenever possible instead of dwg_decode_handleref.

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix parsing of INSERT

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	cones placement is broken. I am not sure what is the correct order of applying translate, scale and rotate transforms

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	clones are partially working, but are misplaced and apparently not transformed yet

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix common entity data parsing

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* more work towards clones * better organized debugging info output

2009-09-13  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more work towards clone feature (BLOCK/BLOCK_HEADER/INSERT)

2009-09-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	all log and error messages must be written to stderr

2009-09-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	The object handle should be stored in a single place: the Dwg_Object structure.
	Instead of 3 different places: DWG_Object, DWG_Object_Object and
	DWG_Object_Entity structures.

2009-09-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing sprintf(stderr, ... into fprintf
	initial implementation of compression codes

2009-09-11  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	partial implementation of the new handleref infrastructure with Dwg_Object_Ref pointers instead of a meaningless array of handles. The core work is done, although some segfaults are still annoying me. I haven't committed to trunk, but I wouldn't recommend working there since it may cause major conflicts. Any help to get this working right will be appreciated.

2009-08-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more verbose output for R2004 header parsing

2009-08-18  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	system section - R2004 header parsing

2009-08-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	implementing a bit more of the R_2004 header parsing

2009-08-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	sending verbose output to stderr

2009-08-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	avoiding a crash

2009-08-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	increasing size of vector so that it will be able to store all header variables for R_2007.

2009-08-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	number of header variables depends on DWG version...

2009-08-10  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	improving R2007 header parsing

2009-08-10  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	initial R2004 header parsing

2009-08-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	starting to implement R2007 header parsing

2009-08-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	bolerplate for future implementation of DWG R2004 and R2007 headers

2009-07-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	refactor unsupported version message allow it to try parsing versions prior to R_2000 but gives a warning message bout experimental support.

2009-07-03  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	print functions for DIMENSION entities + bug fix in DIMENSION structs

2009-06-26  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Dwg_Encode_DICTIONARY. It's an object, should check common object data encoding

2009-06-26  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	moving testSVG and test to examples. Thanks to Marcos.

2009-06-25  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	removing unnecessary (weird and wrong) checks

2009-06-25  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[fixed] warnings

2009-06-25  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	translation patch which has been held up for a while due to recently fixed bugs

2009-06-25  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	trying to fix the read_CMC issue that gcc was not able to warn us about... Pitanga will check whether it works for him with gcc 4.3.3. It didn't even break for me in gcc 4.2.4...

2009-06-25  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[fixed] missing decode_handleref() in dwg_decode_VIEWPORT

2009-06-24  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decoding of entity common data for all DWG versions

2009-06-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	Implemented initial support for blocks ("symbols") and "clones".
	SVG converter already correctly group drawing elements of a symbol (those between BLOCK_HEADER and ENDBLK) but cloning
	them is still not working because our current implementation of dwg_decode_handlerefs is wrong. The
	block_header_handle in an INSERT object is placed ***after*** "Common Entity Handle Data" section. So, cloning will
	only work after we fix the parsing of this section.

2009-06-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	trying to adjust paper size on exported SVG

2009-06-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing a bug in the encoding and decoding of DD (BitDouble with Default) Now we have perfect handling of lines. Yuppiiiiieeee!

2009-06-19  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	make switch consistent with new print (boilerplate) functions

2009-06-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	handling arcs in dwg2svg

2009-06-19  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	make switch consistent with new print (boilerplate) functions

2009-06-19  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	boilerplate code for print.c - TODO: complete switch with boilerplate functions

2009-06-19  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	print for VERTEX_{MESH,PFACE} and autoreconf to link math lib to testSVG

2009-06-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	adding TEXT support to our DWG2SVG converter

2009-06-15  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	dwg2svg: deal with circles, lines and arcs

2009-06-14  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	variable type-code handling + huge boilerplate code

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating stuff

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	decode OLE2FRAME + boilerplate code + spreadsheet update

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	CMC color read/write. Completed VIEWPORT encoding/decoding. (spreadsheet update)

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	reviewed SPLINE encoding/decoding (and spreadsheet update)

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	IMAGE encoding (and spreadsheet update)

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	IMAGE encoding (and spreadsheet update)

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LWPLINE encoding (and spreadsheet update)

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LWPLINE decoding (and spreadsheet update)

2009-06-12  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	OLE2FRAME struct (and spreadsheet update)

2009-06-11  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LWPLINE struct (and spreadsheet update)

2009-06-11  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	struct for IMAGE Entity

2009-06-08  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	updating copyright/licensing headers

2009-06-08  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	MLINE(47) encode/decode

2009-06-08  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Updating copyright notice

2009-06-08  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Some decode and encode fixing/cleaning + updated spreadsheet + updated copyright

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	TOLERANCE(46) decoding and encoding

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LEADER (45) encoding

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LEADER (45) decoding

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LEADER/TOLERANCE/MLINE boilerplate code

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	LEADER/TOLERANCE/MLINE boilerplate code

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	BLOCK_CONTROL r/w

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fix SPLINE decode segfault

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	ELLIPSE encode parser

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	VIEWPORT encode parser

2009-06-07  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	VIEWPORT decode parser

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	updating spreadsheet and adding some more boilerplate code

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	MTEXT decoding, encoding and printing

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	3DFACE encode --- must review this code

2009-06-06  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Structs for LEADER, TOLERANCE and MLINE

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	encoders for DIMENSION_* and POINT entities

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	DIMENSION LINEAR encode

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	do it the smart way. Duh\!

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	save the correct version code in DWG header

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing indentation

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	DIMENSION_ORDINATE encoding

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	boilerplate code: adding prototypes for every encoding functions,
        even the ones not implemented yet.

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	SHAPE(33) encode

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	SHAPE (32) encode

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	SOLID (31) encode

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	POLYLINE (MESH)(30) encode

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	POLYLINE_PFACE encode

2009-06-06  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	minor translations

2009-06-06  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding print labels to new supported entities

2009-06-06  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Read support for SOLID, SHAPE, TRACE and POLYLINE_PFACE/MESH
        entities. Minor code reviews.

2009-06-06  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Completing read support for DIMENSION entities. Minor code reviews.

2009-06-05  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding (draft) read support for 3D_FACE entity

2009-06-05  Diego Rabatone Oliveira  <diraol@polignu.org>

	Dimension Ordinate (pg.70/71) feita

2009-06-05  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating and starting to generalize object parsing to more
        versions of DWG. It needs a code review. It is an initial
        incomplete implementation.

2009-06-05  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Commenting out SPLINE parser due to segfault

2009-06-05  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding (draft) write support for many entities. Still needs some
        testing. Check "flag conditions" in some entities.

2009-06-05  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	implementation of multiversion LINE parser

2009-06-05  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	partial implementation of multiversion POLYLINE_2D and POLYLINE_3D parsers

2009-06-05  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	Legitaj valuej -> Read values

2009-06-04  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	partial implementation of multiversion MINSERT parser

2009-06-04  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	partial implementation of multiversion INSERT parser

2009-06-04  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	Ooooops! :-P

2009-06-04  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	multi-version parsing for ATTDEF (3)

2009-06-04  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	translate: largxeco -> width (couldn't resist the daily commit)

2009-06-04  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	implemented DWG version dependent parsing for ATTRIB (2)

2009-06-04  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	incorporating print functions for DICTIONARY and BLOCK_CONTROL
        (ported from libdwg svn revision 26)

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	adding decoding of Entity_BLOCK_CONTROL and Entity_DICTIONARY
        based on (ported from) recent libdwg svn commit

2009-06-03  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	added initial SPLINE decode support + indentation fix on dwg_decode_TEXT

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	implemented TEXT entity parsing for DWG R13 and R14

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	est -> ent

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	Traktilo -> Handle

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	*implementing version dependent behaviour for bit-thickness (read
        and write functions) *also (obviously) translating a bit more from
        Esperanto

2009-06-03  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	added structs for new entities: DIMENSION_* and SPLINE (no
        underlying code though)

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	adding R2000 dependent behaviour to the BitExtrusion write function

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more translation

2009-06-03  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	translate and add review fields (R2000 only) of structs - until
        LINE (19) (addition to last review accidentally not committed)

2009-06-03  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	translate and add review fields (R2000 only) of structs - until
        LINE (19)

2009-06-03  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Completing enum DWG_OBJECT_TYPE according to spec

2009-06-03  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more translation

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	cetero -> remainder

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	masko -> mask

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more translations

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	skalo -> scale

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	some translations

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	duaheader -> second_header

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	kiom -> size

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	bito -> bit

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* Moving print functions to a separate file
        * Making all print functions public in the API

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* add version field to the Bit_Chain data structure so that bit
        decoding routines can be aware of the current DWG version.
        * Used this information to implement the version dependent
        behaviour of BitExtrusion.

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a bunch of translations

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	NBEGINNATA => UNKNOWN fino => end

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	DUOHEAD => SECOND_HEADER

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating: ESTAJXO -> ENTITY ORDINARAJXO -> OBJECT

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	adding dwg_free(Dwg_Structure*); to free the dynamically allocated
        Dwg_Section vector

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate bajto -> byte

2009-06-02  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating some comments. removing the limit of only 6 sections
        in the file header. Added dynamic allocation of the vector of
        Dwg_Section structs.

2009-06-01  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	cleaning warnings due to ignored ret-value for fwrite calls

2009-06-01  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing linking of examples => -lredwg instead of -ldwg

2009-06-01  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[fix] for revision 59 (accidentally deleted aclocal)

2009-06-01  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Changing binary names from libdwg.{a,la,so} to libredwg.{a,la,so}
        to avoid conflicts between libdwg and libredwg; upgrading libtool
        macros

2009-06-01  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[translate] Estajxo -> Entity e Ordinarajxo -> Object

2009-06-01  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	incorporating libdwg recent commits:
        * an initial postscript generator
        * a DWG embedded thumbnail fetcher
        * some new public functions in the API to read document and
        drawing dimensions

2009-06-01  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	[NEW] Struct for Viewport Entity (34)

2009-06-01  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* generalized dwg_var_map so that it works for any DWG version.
        * implemented regression test to assure that it works at least for
        DWG version R2000

2009-05-31  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* preparing for broader compatibility of further DWG versions
        * throwing error messages to stderr instead of stdout

2009-05-31  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	usage of fprintf( stderr, "error message");

2009-05-31  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	add loglevel options for lib output

2009-05-31  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	incorporating patch from issue #1: simple test that outputs SVG
        content.

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate mesuro -> measurement

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate tipo -> type

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a bunch of translations

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a bunch of translations

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate grandeco -> size

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate varmapo -> var_map; mapo -> map

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate sentinel related terms

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate klaso -> class

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate numero -> number

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a bunch of translations

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate sekcio -> section

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate cxenigi -> chains

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate Objekto -> Object

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	a bunch of translations

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	End of a 'coding' session at pitanga's home. (translating: nomo ->
        name)

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating: kodo -> code

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	Comment regarding possible translations of 'gxisrandigo': 'snap'
        or 'trim'

2009-05-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Structs for SOLID, TRACE  and SHAPE \n end of coding night for me

2009-05-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Structs for POLYLINE PFACE and POLYLINE MESH

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate: teksto -> text

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate: adreso -> address

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate: regximo -> regime

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate: koloro -> colour

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate: alteco -> height

2009-05-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Struct for 3DFACE (28)

2009-05-30  Rodrigo Rodrigues da Silva  <pitanga@members.fsf.org>

	Adding dummy structs

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate: objekto -> object

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate:  radiuso -> radius  dikeco -> thickness

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translate forpusxigo -> extrusion

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating comments

2009-05-30  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	removing from repository

2009-05-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	... :-)

2009-05-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	Cxeno -> Chain

2009-05-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	cleaning the last warning!

2009-05-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	cleaning warnings

2009-05-23  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	warnings

2009-05-19  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	more translations

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating some comments and messages

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	OT_ => TYPE_ OST_ => SUPERTYPE_

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating some comments and NEUZATA => UNUSED

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	* adding encode.c to compile rules (Makefile*) and fixing compile
        of it.
        * translating: DVG => DWG

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating: dvg => dwg Dvg => Dwg

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	fixing 'make check'

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating:  malsukceso => error

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating:  dvg_dek_ => dwg_decode_

2009-05-17  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating... :-)

2009-05-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	translating:  dwg_read_file  dwg_write_file  Dwg_Structure

2009-05-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	removing not needed local files

2009-05-16  Felipe Corrêa da Silva Sanches  <juca@members.fsf.org>

	initial code based on libdwg (http://libdwg.sourceforge.net/en/index.html)

2009-05-16  Felipe Corrêa da Silva Sanches <juca@members.fsf.org>

	Initial directory structure.

----------
