source: trunk/src/gcc/libf2c/libI77/util.c@ 410

Last change on this file since 410 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 936 bytes
RevLine 
[2]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"
10
11 VOID
12#ifdef KR_headers
13g_char(a,alen,b) char *a,*b; ftnlen alen;
14#else
15g_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;