indent(1): Don't unnecessarily add a blank before a comment ends.

pr_comment() did avoid adding surplus space character when a comment
contained it at the end. Now it's also paying attention to tabs.

Taken from:	 Piotr Stefaniak
This commit is contained in:
Pedro F. Giffuni 2016-12-01 01:56:34 +00:00
parent 67b7daecf7
commit 909f007fb8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309343

View File

@ -293,7 +293,7 @@ pr_comment(void)
s_com = e_com;
*e_com++ = ' ';
}
if (e_com[-1] != ' ' && !ps.box_com)
if (e_com[-1] != ' ' && e_com[-1] != '\t' && !ps.box_com)
*e_com++ = ' '; /* ensure blank before end */
*e_com++ = '*', *e_com++ = '/', *e_com = '\0';
ps.just_saw_decl = l_just_saw_decl;