15 #define min(a,b) (a<b)?a:b 21 int count, size, sh_off;
25 infd=open(argv[1], O_RDONLY);
26 outfd=open(argv[2], O_WRONLY | O_CREAT,0755);
27 read(infd, buf, 0x20);
28 write(outfd,buf,0x20);
29 read(infd, &count, 4);
30 write(outfd, &zero, 4);
32 printf(
"%x\n", count);
34 size=read(infd,buf,
min(8192,count));
36 write(outfd, buf, size);}
37 close(infd); close(outfd);
static char buf[CHAR_SIZE]