diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-18 00:35:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-18 00:35:36 +0000 |
commit | ff3def13189580da6fe5254355c8f3b8091bb0fb (patch) | |
tree | 13092e119e26dd5354f66cf3746dd0a0cbdd8cb2 /Build/source/utils/pmx/pmx-2.6.18/libf2c/util.c | |
parent | 2721345a8954f1846ff48ba10e634bc65e7b954d (diff) |
pmx 2.6.18 (16may12)
git-svn-id: svn://tug.org/texlive/trunk@26478 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/pmx/pmx-2.6.18/libf2c/util.c')
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18/libf2c/util.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Build/source/utils/pmx/pmx-2.6.18/libf2c/util.c b/Build/source/utils/pmx/pmx-2.6.18/libf2c/util.c new file mode 100644 index 00000000000..f4b3aef2ce7 --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.18/libf2c/util.c @@ -0,0 +1,54 @@ +#include "sysdep1.h" /* here to get stat64 on some badly designed Linux systems */ +#include "f2c.h" +#include "fio.h" +#ifdef __cplusplus +extern "C" { +#endif + + VOID +#ifdef KR_headers +g_char(a,alen,b) char *a,*b; ftnlen alen; +#else +g_char(char *a, ftnlen alen, char *b) +#endif +{ + char *x = a + alen, *y = b + alen; + + for(;; y--) { + if (x <= a) { + *b = 0; + return; + } + if (*--x != ' ') + break; + } + *y-- = 0; + do *y-- = *x; + while(x-- > a); + } + + VOID +#ifdef KR_headers +b_char(a,b,blen) char *a,*b; ftnlen blen; +#else +b_char(char *a, char *b, ftnlen blen) +#endif +{ int i; + for(i=0;i<blen && *a!=0;i++) *b++= *a++; + for(;i<blen;i++) *b++=' '; +} +#ifndef NON_UNIX_STDIO +#ifdef KR_headers +long f__inode(a, dev) char *a; int *dev; +#else +long f__inode(char *a, int *dev) +#endif +{ struct STAT_ST x; + if(STAT(a,&x)<0) return(-1); + *dev = x.st_dev; + return(x.st_ino); +} +#endif +#ifdef __cplusplus +} +#endif |