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
RevLine 
[f40a309]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
[b28a12e]10#include "ram.h"
[f40a309]11
[7258c6a]12int8_t *strltrm(int8_t *s)
[f40a309]13{
[7258c6a]14 register int8_t c;
15 register int8_t *lp, *rp;
[f40a309]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}
[6262b5c]33
Note: See TracBrowser for help on using the repository browser.