home *** CD-ROM | disk | FTP | other *** search
- /* filtnone -- does nothing */
- #include <string.h>
- #include <time.h>
- #define STANDALONE 0
- #include "callback.h"
-
- char *stackinfo="$STACKSIZE:2048";
-
- #define BUFFSIZE 1024
-
- int
- main(int argc, char *argv[])
- {
-
- char buff[BUFFSIZE];
- int x, eof;
- long start, end;
- long bytes = 0;
-
- buff[0] = 0;
-
- for(x = 0; x < argc; x++) {
- char tbuff[32];
-
- sprintf(tbuff,"%d(%s) ",x,argv[x]);
- strcat(buff,tbuff);
- }
- strcat(buff,"\n");
- write(STDERR,buff,strlen(buff));
- eof = 0;
- time(&start);
- while(!eof) {
- x = read(STDIN,buff, BUFFSIZE);
- if(x == -1)
- break;
- if(x < BUFFSIZE)
- eof = 1;
- bytes += x;
- write(STDOUT, buff, x);
- }
- time(&end);
- fprintf(STDERR,"copied %ld bytes in %d seconds\n",bytes, (int) end-start);
- return(RT_OK|RT_CHANGED_TEXT);
- }
-