Coverage Report

Created: 2023-09-25 06:05

/src/igraph/vendor/f2c/util.c
Line
Count
Source (jump to first uncovered line)
1
#include "sysdep1.h"  /* here to get stat64 on some badly designed Linux systems */
2
#include "f2c.h"
3
#include "fio.h"
4
#ifdef __cplusplus
5
extern "C" {
6
#endif
7
8
 VOID
9
#ifdef KR_headers
10
#define Const /*nothing*/
11
g_char(a,alen,b) char *a,*b; ftnlen alen;
12
#else
13
0
#define Const const
14
g_char(const char *a, ftnlen alen, char *b)
15
#endif
16
0
{
17
0
  Const char *x = a + alen;
18
0
  char *y = b + alen;
19
20
0
  for(;; y--) {
21
0
    if (x <= a) {
22
0
      *b = 0;
23
0
      return;
24
0
      }
25
0
    if (*--x != ' ')
26
0
      break;
27
0
    }
28
0
  *y-- = 0;
29
0
  do *y-- = *x;
30
0
    while(x-- > a);
31
0
  }
32
33
 VOID
34
#ifdef KR_headers
35
b_char(a,b,blen) char *a,*b; ftnlen blen;
36
#else
37
b_char(const char *a, char *b, ftnlen blen)
38
#endif
39
0
{ int i;
40
0
  for(i=0;i<blen && *a!=0;i++) *b++= *a++;
41
0
  for(;i<blen;i++) *b++=' ';
42
0
}
43
#ifndef NON_UNIX_STDIO
44
#ifdef KR_headers
45
long f__inode(a, dev) char *a; int *dev;
46
#else
47
long f__inode(char *a, int *dev)
48
#endif
49
0
{ struct STAT_ST x;
50
0
  if(STAT(a,&x)<0) return(-1);
51
0
  *dev = x.st_dev;
52
0
  return(x.st_ino);
53
0
}
54
#endif
55
#ifdef __cplusplus
56
}
57
#endif