File: srmtrblk.c

package info (click to toggle)
robotour 3.1.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,596 kB
  • ctags: 2,972
  • sloc: cpp: 17,705; sh: 3,060; ansic: 2,778; makefile: 144
file content (15 lines) | stat: -rwxr-xr-x 344 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <ctype.h>

/* srmtrblk: remove trailing blanks from string s */
#ifdef __PROTOTYPE__
void srmtrblk(char *s)
#else	/* __PROTOTYPE__ */
void srmtrblk(s)
char *s;
#endif	/* __PROTOTYPE__ */
{
char *ss;
for(ss= s; *ss; ++ss);	/* find end of string */
for(--ss; ss >= s && isspace(*ss) && *ss != '\f'; --ss) *ss= '\0';
}