fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / libf2c / libI77 / util.c
blob6e7c52b14ce798f15a705f5c37ae3a96678ea4c4
1 #include "config.h"
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"
11 void
12 g_char (char *a, ftnlen alen, char *b)
14 char *x = a + alen, *y = b + alen;
16 for (;; y--)
18 if (x <= a)
20 *b = 0;
21 return;
23 if (*--x != ' ')
24 break;
26 *y-- = 0;
28 *y-- = *x;
29 while (x-- > a);
32 void
33 b_char (char *a, char *b, ftnlen blen)
35 int i;
36 for (i = 0; i < blen && *a != 0; i++)
37 *b++ = *a++;
38 for (; i < blen; i++)
39 *b++ = ' ';
42 #ifndef NON_UNIX_STDIO
43 long
44 f__inode (char *a, int *dev)
46 struct stat x;
47 if (stat (a, &x) < 0)
48 return (-1);
49 *dev = x.st_dev;
50 return (x.st_ino);
52 #endif