A few changes falling out from the effort to make sed handle embedded NUL bytes.

Checking in to reduce the diff between my tree and svn...
This commit is contained in:
Rob Landley
2006-02-24 02:30:39 +00:00
parent 5c22c11de2
commit 2b26fd5570
3 changed files with 50 additions and 78 deletions

View File

@@ -4,19 +4,9 @@
*
* Copyright (C) 2004 by Rob Landley <rob@landley.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* MAINTAINER: Rob Landley <rob@landley.net>
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*
* See SuS3 sort standard at:
* http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
@@ -142,7 +132,7 @@ static struct sort_key *add_key(void)
return *pkey=xcalloc(1,sizeof(struct sort_key));
}
#define GET_LINE(fp) (global_flags&FLAG_z) ? bb_get_chunk_from_file(fp) \
#define GET_LINE(fp) (global_flags&FLAG_z) ? bb_get_chunk_from_file(fp,NULL) \
: bb_get_chomped_line_from_file(fp)
#else
#define GET_LINE(fp) bb_get_chomped_line_from_file(fp)