Path: utzoo!attcan!uunet!wuarchive!emory!wa4mei!bcs800!jeffr From: jeffr@bcs800.UUCP (Jeff Riegel) Newsgroups: comp.os.os9 Subject: Question on _gs_gfd Message-ID: <1069@bcs800.UUCP> Date: 12 Oct 90 18:09:29 GMT Organization: Brock Control Systems, Atlanta, Georgia Lines: 34 /* @(#)help.c 1.0 */ /* ** why doesn't this work ??? */ #include #include main(argc,argv) int argc char *argv[]; { int fd; struct fildes fdbuf; if (fd = open(argv[1],1) < 0) { printf("Could not open %s \n",argv[1]); exit(1); } _gs_gfd(fd,&fdbuf,sizeof(struct fildes)); printf("The file size is %ld \n",fdbuf.fd_fsize); close(fd); } This does not return the proper file size, any suggestions -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jeff Riegel | uucp: ...!gatech!emory!bcs800!jeffr Technical Support | delphi: j2 tel: +800 444 3070 | A process is a terrible thing to waste!