[comp.protocols.nfs] Harvard Graphics

darius@delphi.uchicago.edu (Darius Caine) (03/05/91)

Has anyone installed Harvard Graphics Network Version 2.0 on
a PC-NFS network ?  If so, what were the results ?

You can reply directly to me and I will summarize.

--Darius

drezac@dcsc.dla.mil (Duane L. Rezac) (03/06/91)

From article <1991Mar4.212131.9490@midway.uchicago.edu>, by darius@delphi.uchicago.edu (Darius Caine):
> 
> Has anyone installed Harvard Graphics Network Version 2.0 on
> a PC-NFS network ?  If so, what were the results ?
> 
> You can reply directly to me and I will summarize.
> 
> --Darius
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

--
Verse of the Hour:
Train up a child in the way he should go: and when he is old, he will not
depart from it.
    Prov. 22:6
-- 
+-----------------------+---------------------------------------------------+
| Duane L. Rezac |These views are my own, and NOT representitive of my place|
| dsacg1!dcscg1!drezac    drezac@dcscg1.dcsc.dla.mil      of Employment.    |
+-----------------------+---------------------------------------------------+

ted@arsocomvax.socom.mil (Ted Nolan) (03/07/91)

>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 <stdio.h>

#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