Bug 41719 - databases/dbview field positions of output are one character off
Summary: databases/dbview field positions of output are one character off
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-16 21:00 UTC by Michael Pearce
Modified: 2003-05-11 17:56 UTC (History)
0 users

See Also:


Attachments
patch-ab (545 bytes, text/plain)
2002-08-16 21:00 UTC, Michael Pearce
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 2003-05-11 17:56:13 UTC
State Changed
From-To: open->closed

Committed, thanks.  I also bumped PORTREVISION.