/src/igraph/vendor/lapack/len_trim.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* -- translated by f2c (version 20191129). |
2 | | You must link the resulting object file with libf2c: |
3 | | on Microsoft Windows system, link with libf2c.lib; |
4 | | on Linux or Unix systems, link with .../path/to/libf2c.a -lm |
5 | | or, if you install libf2c.a in a standard place, with -lf2c -lm |
6 | | -- in that order, at the end of the command line, as in |
7 | | cc *.o -lf2c -lm |
8 | | Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., |
9 | | |
10 | | http://www.netlib.org/f2c/libf2c.zip |
11 | | */ |
12 | | |
13 | | #include "f2c.h" |
14 | | |
15 | | |
16 | | /* -- LEN_TRIM is Fortran 95, so we use a replacement here */ |
17 | | |
18 | | integer igraphlen_trim__(char *s, ftnlen s_len) |
19 | 0 | { |
20 | | /* System generated locals */ |
21 | 0 | integer ret_val; |
22 | | |
23 | | /* Builtin functions */ |
24 | 0 | integer i_len(char *, ftnlen); |
25 | | |
26 | | |
27 | | |
28 | |
|
29 | 0 | for (ret_val = i_len(s, s_len); ret_val >= 1; --ret_val) { |
30 | 0 | if (*(unsigned char *)&s[ret_val - 1] != ' ') { |
31 | 0 | return ret_val; |
32 | 0 | } |
33 | 0 | } |
34 | 0 | return ret_val; |
35 | 0 | } /* igraphlen_trim__ */ |
36 | | |