Revision 16960,
936 bytes
checked in by ghudson, 22 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r16959,
which included commits to RCS files with non-trunk default branches.
|
Rev | Line | |
---|
[16959] | 1 | #include "config.h" |
---|
[14547] | 2 | #ifndef NON_UNIX_STDIO |
---|
| 3 | #define _INCLUDE_POSIX_SOURCE /* for HP-UX */ |
---|
| 4 | #define _INCLUDE_XOPEN_SOURCE /* for HP-UX */ |
---|
| 5 | #include <sys/types.h> |
---|
| 6 | #include <sys/stat.h> |
---|
| 7 | #endif |
---|
| 8 | #include "f2c.h" |
---|
| 9 | #include "fio.h" |
---|
| 10 | |
---|
| 11 | VOID |
---|
| 12 | #ifdef KR_headers |
---|
| 13 | g_char(a,alen,b) char *a,*b; ftnlen alen; |
---|
| 14 | #else |
---|
| 15 | g_char(char *a, ftnlen alen, char *b) |
---|
| 16 | #endif |
---|
| 17 | { |
---|
| 18 | char *x = a + alen, *y = b + alen; |
---|
| 19 | |
---|
| 20 | for(;; y--) { |
---|
| 21 | if (x <= a) { |
---|
| 22 | *b = 0; |
---|
| 23 | return; |
---|
| 24 | } |
---|
| 25 | if (*--x != ' ') |
---|
| 26 | break; |
---|
| 27 | } |
---|
| 28 | *y-- = 0; |
---|
| 29 | do *y-- = *x; |
---|
| 30 | while(x-- > a); |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | VOID |
---|
| 34 | #ifdef KR_headers |
---|
| 35 | b_char(a,b,blen) char *a,*b; ftnlen blen; |
---|
| 36 | #else |
---|
| 37 | b_char(char *a, char *b, ftnlen blen) |
---|
| 38 | #endif |
---|
| 39 | { int i; |
---|
| 40 | for(i=0;i<blen && *a!=0;i++) *b++= *a++; |
---|
| 41 | for(;i<blen;i++) *b++=' '; |
---|
| 42 | } |
---|
| 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 | { struct stat x; |
---|
| 50 | if(stat(a,&x)<0) return(-1); |
---|
| 51 | *dev = x.st_dev; |
---|
| 52 | return(x.st_ino); |
---|
| 53 | } |
---|
| 54 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.