Bug 41719

Summary: databases/dbview field positions of output are one character off
Product: Ports & Packages Reporter: Michael Pearce <mpearce>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-ab none

Description Michael Pearce 2002-08-16 16:18:57 UTC
Doh.  This is in the databases/dbview port, a utility for dumping the
contents of dBase files.

-- 
Michael Pearce <mpearce@coreth.com>                            (314) 534-0124
Coreth Consulting, Inc.                              St. Louis, Missouri, USA
Comment 1 Michael Pearce 2002-08-16 21:00:06 UTC
	The first character of every field appears to be missing, and actually
	appears at the end of the previous field.  Trimming of trailing
	spaces also fails.

Fix: In db_dump.c, two reads are done for the character which terminates
	the database header.  I assume that this was necessary under some
	DOS or Windows environment to compensate for the \r\n to \n
	converstion normally performed by the standard library provided with
	DOS C compilers.  Take one of these reads out and it works.  Attached
	is a .diff, in the format needed for the ports collection.

	While I was at it, I fixed a problem with the feature that trims
	trailing spaces from fields.  It miscalculated the end of the string
	and didn't trim anything.  This is in the same source file and fixed
	in the same .diff file.
How-To-Repeat: 	Use dbview to output a dBase file:

		dbview myfile.dbf
Comment 2 Pete Fritchman freebsd_committer freebsd_triage 2003-05-11 17:56:13 UTC
State Changed
From-To: open->closed

Committed, thanks.  I also bumped PORTREVISION.