14#define cfclos_ __stdcall CFCLOS
15#define cfget_ __stdcall CFGET
16#define cfseek_ __stdcall CFSEEK
17#define ishftr_ __stdcall ISHFTR
18#define lshift_ __stdcall LSHIFT
19#define vxinvb_ __stdcall VXINVB
20#define vxinvc_ __stdcall VXINVC
21#define cfopei_ __stdcall CFOPEI
22#define cfstati_ __stdcall CFSTATI
23#define lnblnk_ __stdcall LNBLNK
45 if (ptalc ==
NULL)
goto exit;
50 for (jcol = 0; jcol < ntx; jcol++) *ptuse++ = *utext++;
58unsigned int ishftr_(
unsigned int *arg,
int *len)
65unsigned int lshift_(
unsigned int *arg,
int *len)
76 unsigned char *n1, *n2;
77 n2 = (
unsigned char *) &out;
79 for (jloop = 0; jloop <
limit; jloop++) {
80 n1 = (
unsigned char *) &ixv[jloop];
96 unsigned char *n1, *n2;
97 n2 = (
unsigned char *) &out;
99 for (jloop = 0; jloop <
limit; jloop++) {
100 n1 = (
unsigned char *) &iv[jloop];
112void cfget_(
int *lundes,
int *medium,
int *nwrec,
int *nwtak,
char *mbuf,
121 if (*nwtak <= 0)
return;
125 nbdn =
read (fildes, mbuf, nbdo);
126 if (nbdn == 0)
goto heof;
127 if (nbdn < 0)
goto herror;
128 *nwtak = (nbdn - 1) / 4 + 1;
135 printf (
"error in CFGET\n");
141void cfseek_(
int *lundes,
int *medium,
int *nwrec,
int *jcrec,
int *astat)
150 nbdo = *jcrec * *nwrec * 4;
151 isw = lseek (fildes, nbdo, 0);
152 if (isw < 0)
goto trouble;
158 printf(
"error in CFSEEK\n");
174int cfstati_(
char *fname,
int lfname,
int *
info,
int *lgname)
183 if (
ptname == ((
void *)0))
return -1;
184 istat = stat(
ptname, &buf);
193#if defined(__APPLE__) || defined(__FreeBSD__)
194 info[7] = (
int) buf.st_atimespec.tv_sec;
195 info[8] = (
int) buf.st_mtimespec.tv_sec;
196 info[9] = (
int) buf.st_ctimespec.tv_sec;
197 info[10] = (
int) buf.st_blksize;
198 info[11] = (
int) buf.st_blocks;
203 info[10] = (
int) buf.st_blksize;
204 info[11] = (
int) buf.st_blocks;
212 info[7] = (
int) buf.st_atim.tv_sec;
213 info[8] = (
int) buf.st_mtim.tv_sec;
214 info[9] = (
int) buf.st_ctim.tv_sec;
215 info[10] = (
int) buf.st_blksize;
216 info[11] = (
int) buf.st_blocks;
227void cfopei_(
int *lundes,
int *medium,
int *nwrec,
int *mode,
int *nbuf,
228 char *ftext,
int lftext,
int *astat,
int *lgtx)
230void cfopei_(
int *lundes,
int *medium,
int *nwrec,
int *mode,
int *nbuf,
231 char *ftext,
int *astat,
int *lgtx)
238 if (nwrec || nbuf) { }
243 if (*medium == 1)
goto fltp;
244 if (*medium == 3)
goto fltp;
250 else if (mode[0] == 1)
252 flags = 01 | 0100 | 01000;
254 flags = 02 | 0100 | 01000;}
255 else if (mode[0] == 2)
257 flags = 01 | 0100 | 02000;
259 flags = 02 | 0100 | 02000;}
267 else if (mode[0] == 1)
272 else if (mode[0] == 2)
return;
274 pttext =
fchtak(ftext,*lgtx);
275 if (pttext == 0)
return;
276 if (perm == 0) perm = 0644;
277 fildes = open (pttext, flags, perm);
278 if (fildes < 0)
goto errm;
284 printf(
"error in CFOPEN\n");
295 chcur = chline + len;
296 while (chcur > chline) {
if (*--chcur !=
' ')
goto exit; }
298 exit:
return chcur+1 - chline;
void cfclos_(int *lundes, int *medium)
void vxinvb_(int *ixv, int *n)
unsigned int ishftr_(unsigned int *arg, int *len)
int cfstati_(char *fname, int *info, int *lgname)
int lnblnk_(char *chline, int len)
void cfget_(int *lundes, int *medium, int *nwrec, int *nwtak, char *mbuf, int *astat)
unsigned int lshift_(unsigned int *arg, int *len)
char * fchtak(char *ftext, int lgtext)
void vxinvc_(int *iv, int *ixv, int *n)
void cfseek_(int *lundes, int *medium, int *nwrec, int *jcrec, int *astat)
void cfopei_(int *lundes, int *medium, int *nwrec, int *mode, int *nbuf, char *ftext, int *astat, int *lgtx)
subroutine ptname(cname, pname)
printf("Client 0: bytes recv = %d, bytes sent = %d\n", s0->GetBytesRecv(), s0->GetBytesSent())