Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!aero-c!usasoc.soc.mil!news From: ted@arsocomvax.socom.mil (Ted Nolan) Newsgroups: comp.protocols.nfs Subject: Re: Harvard Graphics Summary: spaces in names Message-ID: <1991Mar6.225330.6511@usasoc.soc.mil> Date: 6 Mar 91 22:53:30 GMT References: <1991Mar4.212131.9490@midway.uchicago.edu> <1076@dcsc.dla.mil> Reply-To: ted@usasoc.soc.mil (Ted Nolan) Organization: SRI International, Ft. Bragg NC Lines: 107 >We have not used the network version of Harvard, but we did try to >share chart and symbol files over a PC-NFS network. The results >were rather strange... some files it would read, some it would not, >and on some it would give an error "Not in expected format" . >We were running PC-NFS on a Zenith-248, mounted to a drive on a >Gould Powernode running a BSD variant of unix. Harvard itself was >on the pc's, - only the charts and symbol files were on the network >drive. > > >Duane L. Rezac > Harvard Graphics generates it's filenames oddly. They actually have spaces in them. In other words, if you have a file "foo.cht", harvard really asks for "foo .cht". This works ok on your local disk, but if you copy it on to the network, it goes as just "foo.cht". There are two solutions: 1) Make sure all your filenames are exactly 8 chars long, eg: "foo00000.cht". This has the advantage of working with PC-NFS as is. 2) Put the /s flag on your pcnfs.sys line in config.sys. This should enable space significance in filenames (I haven't actually tried this BTW). The disadvantage is that you have to go to each PC and modify the config.sys -- too much pain. By the way, if you want to put a slide show on the network, and have some harvard weak users, you can use the little program below in a batch file to change the default harvard data directory to whereever you want. (you should of course restore the original config file on exit..). For example, to set them up to choose slide shows from the S:\ directory: pushd c:\hg copy hg.cfg hgrcfg.bak hgpatch S:\ hg copy hgrcfg.bak hg.cfg popd ================================hgpatch.c===================================== /* * Patch a default data directory into a harvard graphics config file * (hg.cfg). The format is that the first byte of the file is the * length of the data directory path, and up to the next 40 bytes are * the path itself. * * We use argv[1] as the string to patch. * */ #include #define CONFIG "hg.cfg" main(argc,argv) int argc; char **argv; { FILE *fp; int len; unsigned char clen; if(argc !=2){ fprintf(stderr,"No directory specified\n"); exit(1); } if( (len = strlen(argv[1])) > 40){ fprintf(stderr," %s: path too long!\n"); exit(1); } fp = fopen(CONFIG,"rb+"); /* Binary, update mode */ if(!fp) { fprintf(stderr,"Can't open config file!\n"); exit(1); } if(fseek(fp, 0L, SEEK_SET)){ fprintf(stderr,"Can't seek config file\n"); exit(1); } clen = (unsigned char ) len; if(fwrite(&clen,1,1,fp) != 1){ fprintf(stderr,"Can't write string length in config\n"); exit(1); } if(fwrite(argv[1],len,1,fp) != 1){ fprintf(stderr,"Can't write string in config\n"); exit(1); } fclose(fp); exit(0); } ============================================================================= Ted Nolan ted@usasoc.soc.mil