i_len_trim.c 288 B

12345678910111213141516171819202122
  1. #include "f2c.h"
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. #ifdef KR_headers
  6. integer i_len_trim(s, n) char *s; ftnlen n;
  7. #else
  8. integer i_len_trim(char *s, ftnlen n)
  9. #endif
  10. {
  11. int i;
  12. for(i=n-1;i>=0;i--)
  13. if(s[i] != ' ')
  14. return i + 1;
  15. return(0);
  16. }
  17. #ifdef __cplusplus
  18. }
  19. #endif