source: buchla-68k/libsm/strltrm.c@ d21fc6f

Last change on this file since d21fc6f was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Zero redundant declarations.

  • Property mode set to 100644
File size: 541 bytes
Line 
1/*
2 =============================================================================
3 strltrm() -- trim leading blanks from a string, in-place
4 Version 1 -- 1988-08-19 -- D.N. Lynx Crowe
5
6 Returns a pointer to the string.
7 =============================================================================
8*/
9
10#include "ram.h"
11
12int8_t *strltrm(int8_t *s)
13{
14 register int8_t c;
15 register int8_t *lp, *rp;
16
17 if (*s NE ' ')
18 return(s);
19
20 lp = s;
21 rp = s;
22
23 while (*rp EQ ' ')
24 ++rp;
25
26 while (c = *rp++)
27 *lp++ = c;
28
29 *lp = '\0';
30
31 return(s);
32}
33
Note: See TracBrowser for help on using the repository browser.