Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!encore!cloud9!juo
From: juo@cloud9.Stratus.COM (John Oleynick)
Newsgroups: comp.soft-sys.andrew
Subject: Re: AMS, CUI, VUI problems
Message-ID: <7097@cloud9.Stratus.COM>
Date: 15 Aug 89 18:41:00 GMT
Distribution: na
Organization: Stratus Computer, Inc., Marlboro, MA
Lines: 58


Thanks for the messages help.  I installed the fix a few days
ago, and it works fine.

I think I have figured out why vui would not read my mail.
It looks like a minor bug in vui.  I'm not sure if this has
already been found and fixed, but here it is anyway.

In andrew/ams/msclients/vui/vuipnl.c, GetCurrentDir seems to be
missing a return statement.  It's last statement sets the
status, but it did not return anything.  When Dir_Panel, in
andrew/ams/msclients/vui/vui.c called GetCurrentDir, though,
it checked the return value.  I guess this usually worked by
compiler luck, register allocation, etc.  I made GetCurrentDir
return the status value, and now it seems to work fine.  Is this
what it really should return?

I also figured out why cui would not read my mail, it was because
of "operator error".

Here is what I changed.  The change was around line 538
of andrew/ams/msclients/vui/vuipnl.c

vuipnl.c:

	...

GetCurrentDir (current_dir, status, wantshort)
char *current_dir, *status;
Boolean wantshort;
{
char long_name[MAXPATHLEN+1], *long_name_p = long_name, *shortname;
    shortname = dir_data[N_DIR_FIELDS * DIR_CurrentRow].pdata;
    *current_dir = '\0';
    if (wantshort) {
	strcpy(current_dir, shortname);
	debug((2,"Returning current directory of %s\n", shortname));
	return(0);
    }

    ...

    CUI_CacheDirName(shortname, long_name_p);
    strcpy(current_dir, long_name_p);
    debug((2,"Returning current directory of %s\n", current_dir));
    if (status!=NIL) (*status)=dir_data[1+N_DIR_FIELDS*DIR_CurrentRow].pdata[0];
    return (*status);	/* <-- Added this */
}

    ...


		John


# John Oleynick	    	juo@cloud9.stratus.com  #
#    uunet!harvard!husc6!encore!cloud9!juo      #
#     Snappy signature saying coming soon 	#