freebsd-ports/databases/dbview/files/patch-ab
Pete Fritchman 6fcbe10248 - Don't do two read()s, we're not on windows and don't have a \r to strip
out.  Also fix an off-by-one error when trying to trim trailing spaces.
- bump PORTREVISION

PR:		41719
Submitted by:	Michael Pearce <mpearce@coreth.com>
2003-05-11 16:56:13 +00:00

21 lines
546 B
Text

--- db_dump.c.orig Tue Oct 8 02:25:54 1996
+++ db_dump.c Fri Aug 16 14:24:09 2002
@@ -116,7 +116,7 @@
{
char *c=var;
- for (c+=strlen(var); isspace (*c); c--);
+ for (c+=strlen(var)-1; isspace (*c); c--);
*(++c) = '\0';
return var;
@@ -210,7 +210,9 @@
stack_field(fld);
}
read(dbfile,Buffer,1); /* read the silly little \r 0x0d character */
+#ifdef I_USE_A_LAME_OS_LIKE_DOS
read(dbfile,Buffer,1); /* strange, it only works if we read another byte */
+#endif
return;
}