Remove all trailing white space on the lines.

Suggested by: Phil Taylor <phil@zipmail.co.uk>
This commit is contained in:
Poul-Henning Kamp 1995-12-25 19:35:23 +00:00
parent d7b1079903
commit 4d50bdbc0c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13015

View File

@ -12,7 +12,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@ -272,6 +273,13 @@ read_piece(char *input_file)
{
line_no++;
/*
* Remove all trailing white space.
*/
i = strlen(line) - 1;
while (i > 0 && isspace(line[i]))
line[--i] = '\0';
/*
* Look for the beginning of an encoded piece.
*/