Lines 58-65
Link Here
|
58 |
upstream to it, which has much the same effect. |
58 |
upstream to it, which has much the same effect. |
59 |
*/ |
59 |
*/ |
60 |
|
60 |
|
61 |
#define TeamLVOLSZ (off_t unsigned)(1L<<10) |
61 |
#define TeamLVOLSZ (off_t )(1L<<10) |
62 |
#define TeamHVOLSZ ((off_t unsigned) 3 * ((off_t unsigned) 1 << 62)) |
62 |
#define TeamHVOLSZ ((off_t ) 3 * ((off_t) 1 << 62)) |
63 |
|
63 |
|
64 |
#define TeamLBUFSZ (64) /* Low buffer size */ |
64 |
#define TeamLBUFSZ (64) /* Low buffer size */ |
65 |
#define TeamDBUFSZ (60*512) /* Default buffer size */ |
65 |
#define TeamDBUFSZ (60*512) /* Default buffer size */ |
Lines 203-209
Link Here
|
203 |
{ |
203 |
{ |
204 |
int fd; |
204 |
int fd; |
205 |
short status; |
205 |
short status; |
206 |
off_t unsigned size; |
206 |
off_t size; |
207 |
}; |
207 |
}; |
208 |
|
208 |
|
209 |
local Fd FdIn,FdOut; |
209 |
local Fd FdIn,FdOut; |
Lines 212-218
Link Here
|
212 |
( |
212 |
( |
213 |
fast Fd *fd |
213 |
fast Fd *fd |
214 |
_ int ffd |
214 |
_ int ffd |
215 |
_ off_t unsigned size |
215 |
_ off_t size |
216 |
) |
216 |
) |
217 |
{ |
217 |
{ |
218 |
fd->status = (ffd >= 0) ? FdOPEN : FdCLOSED; |
218 |
fd->status = (ffd >= 0) ? FdOPEN : FdCLOSED; |
Lines 265-276
Link Here
|
265 |
to->fd = from->fd; |
265 |
to->fd = from->fd; |
266 |
} |
266 |
} |
267 |
|
267 |
|
268 |
local off_t unsigned FdRetry on((fd,which,done,space)) is |
268 |
local off_t FdRetry on((fd,which,done,space)) is |
269 |
( |
269 |
( |
270 |
fast Fd *fd |
270 |
fast Fd *fd |
271 |
_ char *which |
271 |
_ char *which |
272 |
_ off_t unsigned done |
272 |
_ off_t done |
273 |
_ off_t unsigned space |
273 |
_ off_t space |
274 |
) |
274 |
) |
275 |
{ |
275 |
{ |
276 |
int tty; |
276 |
int tty; |
Lines 338-344
Link Here
|
338 |
local unsigned FdCanDo on((remaining,available)) is |
338 |
local unsigned FdCanDo on((remaining,available)) is |
339 |
( |
339 |
( |
340 |
fast address remaining |
340 |
fast address remaining |
341 |
_ fast off_t unsigned available |
341 |
_ fast off_t available |
342 |
) |
342 |
) |
343 |
{ |
343 |
{ |
344 |
return (remaining < available) |
344 |
return (remaining < available) |
Lines 350-359
Link Here
|
350 |
fast Fd *fd |
350 |
fast Fd *fd |
351 |
_ pointer buffer |
351 |
_ pointer buffer |
352 |
_ fast address todo |
352 |
_ fast address todo |
353 |
_ off_t unsigned done |
353 |
_ off_t done |
354 |
) |
354 |
) |
355 |
{ |
355 |
{ |
356 |
fast off_t unsigned space; |
356 |
fast off_t space; |
357 |
fast int bytesRead; |
357 |
fast int bytesRead; |
358 |
fast address justDone; |
358 |
fast address justDone; |
359 |
|
359 |
|
Lines 391-400
Link Here
|
391 |
fast Fd *fd |
391 |
fast Fd *fd |
392 |
_ pointer buffer |
392 |
_ pointer buffer |
393 |
_ fast address todo |
393 |
_ fast address todo |
394 |
_ off_t unsigned done |
394 |
_ off_t done |
395 |
) |
395 |
) |
396 |
{ |
396 |
{ |
397 |
fast off_t unsigned space; |
397 |
fast off_t space; |
398 |
fast int bytesWritten; |
398 |
fast int bytesWritten; |
399 |
fast address justDone; |
399 |
fast address justDone; |
400 |
|
400 |
|
Lines 471-477
Link Here
|
471 |
{ |
471 |
{ |
472 |
Token token; |
472 |
Token token; |
473 |
short status; |
473 |
short status; |
474 |
off_t unsigned done; |
474 |
off_t done; |
475 |
}; |
475 |
}; |
476 |
|
476 |
|
477 |
local bool StreamSend on((fd,token,status,done)) is |
477 |
local bool StreamSend on((fd,token,status,done)) is |
Lines 479-485
Link Here
|
479 |
fast Fd *fd |
479 |
fast Fd *fd |
480 |
_ Token token |
480 |
_ Token token |
481 |
_ short status |
481 |
_ short status |
482 |
_ off_t unsigned done |
482 |
_ off_t done |
483 |
) |
483 |
) |
484 |
{ |
484 |
{ |
485 |
fast int n; |
485 |
fast int n; |
Lines 501-507
Link Here
|
501 |
fast Fd *fd |
501 |
fast Fd *fd |
502 |
_ Token *tokenp |
502 |
_ Token *tokenp |
503 |
_ short *statusp |
503 |
_ short *statusp |
504 |
_ off_t unsigned *donep |
504 |
_ off_t *donep |
505 |
) |
505 |
) |
506 |
{ |
506 |
{ |
507 |
fast int n; |
507 |
fast int n; |
Lines 554-560
Link Here
|
554 |
#define GuyRECEIVE(guy,tokenp,statusp,donep) \ |
554 |
#define GuyRECEIVE(guy,tokenp,statusp,donep) \ |
555 |
StreamReceive(&guy->upStream,tokenp,statusp,donep) |
555 |
StreamReceive(&guy->upStream,tokenp,statusp,donep) |
556 |
|
556 |
|
557 |
local bool GuyStop of((Guy *,char *,off_t unsigned)); |
557 |
local bool GuyStop of((Guy *,char *,off_t )); |
558 |
|
558 |
|
559 |
local bool GuyStart on((guy,bufsize)) is |
559 |
local bool GuyStart on((guy,bufsize)) is |
560 |
( |
560 |
( |
Lines 565-571
Link Here
|
565 |
fast char *buffer; |
565 |
fast char *buffer; |
566 |
Token token; |
566 |
Token token; |
567 |
short status; |
567 |
short status; |
568 |
off_t unsigned done; |
568 |
off_t done; |
569 |
bool received; |
569 |
bool received; |
570 |
static int bytesRead,bytesWritten; |
570 |
static int bytesRead,bytesWritten; |
571 |
|
571 |
|
Lines 637-643
Link Here
|
637 |
( |
637 |
( |
638 |
fast Guy *guy |
638 |
fast Guy *guy |
639 |
_ char *errormsg |
639 |
_ char *errormsg |
640 |
_ off_t unsigned done |
640 |
_ off_t done |
641 |
) |
641 |
) |
642 |
{ |
642 |
{ |
643 |
Mesg(("GuyStop guy %#o\n",guy)); |
643 |
Mesg(("GuyStop guy %#o\n",guy)); |
Lines 646-652
Link Here
|
646 |
{ |
646 |
{ |
647 |
if (report) |
647 |
if (report) |
648 |
mesg("%qu kilobytes, %lu seconds\r\n", |
648 |
mesg("%qu kilobytes, %lu seconds\r\n", |
649 |
done>>10,(off_t unsigned) (time((time_t *) 0)-origin)); |
649 |
done>>10,(off_t ) (time((time_t *) 0)-origin)); |
650 |
else if (verbose) |
650 |
else if (verbose) |
651 |
mesg("\n"); |
651 |
mesg("\n"); |
652 |
} |
652 |
} |
Lines 715-722
Link Here
|
715 |
( |
715 |
( |
716 |
fast Team *team |
716 |
fast Team *team |
717 |
_ address bufsize |
717 |
_ address bufsize |
718 |
_ off_t unsigned isize |
718 |
_ off_t isize |
719 |
_ off_t unsigned osize |
719 |
_ off_t osize |
720 |
) |
720 |
) |
721 |
{ |
721 |
{ |
722 |
/* |
722 |
/* |
Lines 956-974
Link Here
|
956 |
/*NOTREACHED*/ |
956 |
/*NOTREACHED*/ |
957 |
} |
957 |
} |
958 |
|
958 |
|
959 |
local off_t unsigned atos on((s)) is |
959 |
local off_t atos on((s)) is |
960 |
( |
960 |
( |
961 |
fast char *s |
961 |
fast char *s |
962 |
) |
962 |
) |
963 |
{ |
963 |
{ |
964 |
fast off_t unsigned l; |
964 |
fast off_t l; |
965 |
|
965 |
|
966 |
for ( |
966 |
for ( |
967 |
s, l = 0L; |
967 |
s, l = 0L; |
968 |
*s >= '0' && *s <= '9'; |
968 |
*s >= '0' && *s <= '9'; |
969 |
s++ |
969 |
s++ |
970 |
) |
970 |
) |
971 |
l = l*10L + (off_t unsigned) (*s-'0'); |
971 |
l = l*10L + (off_t ) (*s-'0'); |
972 |
|
972 |
|
973 |
if (*s == 'b') l *= (1L<<9); |
973 |
if (*s == 'b') l *= (1L<<9); |
974 |
if (*s == 'k') l *= (1L<<10); |
974 |
if (*s == 'k') l *= (1L<<10); |
Lines 987-994
Link Here
|
987 |
short unsigned teamsize; |
987 |
short unsigned teamsize; |
988 |
|
988 |
|
989 |
address bufsize; |
989 |
address bufsize; |
990 |
off_t unsigned isize; |
990 |
off_t isize; |
991 |
off_t unsigned osize; |
991 |
off_t osize; |
992 |
int opt; |
992 |
int opt; |
993 |
|
993 |
|
994 |
teamsize = TeamDTEAMSZ; |
994 |
teamsize = TeamDTEAMSZ; |