| 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 |
g_char(a,alen,b) char *a,*b; ftnlen alen; |
| 11 |
#else |
| 12 |
g_char(char *a, ftnlen alen, char *b) |
| 13 |
#endif |
| 14 |
{ |
| 15 |
char *x = a + alen, *y = b + alen; |
| 16 |
|
| 17 |
for(;; y--) { |
| 18 |
if (x <= a) { |
| 19 |
*b = 0; |
| 20 |
return; |
| 21 |
} |
| 22 |
if (*--x != ' ') |
| 23 |
break; |
| 24 |
} |
| 25 |
*y-- = 0; |
| 26 |
do *y-- = *x; |
| 27 |
while(x-- > a); |
| 28 |
} |
| 29 |
|
| 30 |
VOID |
| 31 |
#ifdef KR_headers |
| 32 |
b_char(a,b,blen) char *a,*b; ftnlen blen; |
| 33 |
#else |
| 34 |
b_char(char *a, char *b, ftnlen blen) |
| 35 |
#endif |
| 36 |
{ int i; |
| 37 |
for(i=0;i<blen && *a!=0;i++) *b++= *a++; |
| 38 |
for(;i<blen;i++) *b++=' '; |
| 39 |
} |
| 40 |
#ifndef NON_UNIX_STDIO |
| 41 |
#ifdef KR_headers |
| 42 |
long f__inode(a, dev) char *a; int *dev; |
| 43 |
#else |
| 44 |
long f__inode(char *a, int *dev) |
| 45 |
#endif |
| 46 |
{ struct STAT_ST x; |
| 47 |
if(STAT(a,&x)<0) return(-1); |
| 48 |
*dev = x.st_dev; |
| 49 |
return(x.st_ino); |
| 50 |
} |
| 51 |
#endif |
| 52 |
#ifdef __cplusplus |
| 53 |
} |
| 54 |
#endif |