aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libf2c/i_len_trim.c
blob: c7b7680304610063639bdc49191e5310335f335a (plain) (blame)
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