File: i_len_trim.c

package info (click to toggle)
libf2c2 20240504-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,360 kB
  • sloc: ansic: 10,667; makefile: 29
file content (22 lines) | stat: -rw-r--r-- 288 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif

#ifdef KR_headers
integer i_len_trim(s, n) char *s; ftnlen n;
#else
integer i_len_trim(char *s, ftnlen n)
#endif
{
  int i;

  for(i=n-1;i>=0;i--)
    if(s[i] != ' ')
      return i + 1;

  return(0);
}
#ifdef __cplusplus
}
#endif