Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!u3369429@seismo.CSS.GOV@murdu.OZ.AU From: u3369429@seismo.CSS.GOV@murdu.OZ.AU Newsgroups: mod.computers.vax Subject: Re: SWING problems!! Message-ID: <8703050903.2032@murdu.OZ> Date: Thu, 5-Mar-87 20:03:23 EST Article-I.D.: murdu.8703050903.2032 Posted: Thu Mar 5 20:03:23 1987 Date-Received: Sat, 7-Mar-87 00:52:37 EST References: <8703041819.AA06135@ucbvax.Berkeley.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: u3369429@murdu.oz.au (Michael Bednarek) Followup-To: mod.computers.vax Distribution: world Organization: I.A.E.S.R., Melbourne University Lines: 88 Keywords: fix SWING FIND_NODE Approved: info-vax@sri-kl.arpa In article <8703041819.AA06135@ucbvax.Berkeley.EDU> MCCORE::THURY@ti-eg.CSNET (Denny Thury -- VAX System Sup -- 952-2066) writes: >Well, I went through all the work of copying and building the SWING image >(it really sounded like a good utility). When I ran the resulting image, >everything SEEMED to work ok; I was able to more around, create, move, and >rename directories just fine. However, when I attempted to delete one of >my created test directories I got an array overflow message, and the program >bombed! The message should have said something about subscript out of bounds. I could re-construct that condition and the fix follows. >I then tried it again, showing it to some of my users (with the caveat about >the one bug with the delete function) to see what their impression of this >utility is. During this show and tell, I tried the HARDCOPY command. AGAIN >I got an array overflow error and the program bombed! Sorry, I could not reproduce this error. Try to implement the revised FIND_NODE and try again. But please, include some more info, e.g. trace back. > Denny Thury CSnet : THURY%MCCORE@TI-EG > VAX Systems Support ARPA : THURY%MCCORE$TI-EG.CSNET Thanks for this report. I could reproduce the crash when one creates and deletes directories. It occurred under certain circumstances when directories were created and then deleted without having left SWING. The guilty subroutine (FIND_NODE) follows (corrected). If you still have the files SWING.OLB and SWING.OBJ, you can repair the program using this: $ Fortran/Check FIND_NODE $ Library SWING FIND_NODE $ Delete FIND_NODE.OBJ;* $ Link SWING,SWING/Library Apologetic, Michael Bednarek (u3369429@murdu.oz.au) P.S.: sysykl@hujimd.bitnet (Melnik Yehezkel) complained that he got only part 0 of my posting. I suggest somebody closer to him than me mails parts 1-6 to him. X---X---X---X---X---X Cut here and execute (@) X---X---X---X---X---X---X---X $write sys$error "extract FIND_NODE.FOR" $copy sys$input FIND_NODE.FOR $deck/dollars="Fix_Find_Node" logical function find_node(dir_spec,ptr) ! Returns the pointer (ptr) of a given dir_spec include 'swing.cmn/List' character dir_spec*(*) integer ii,jj,ptr,ll logical found_node ! Find the non-blank length of dir_spec ii=len(dir_spec) do while (ii.gt.0 .and. dir_spec(ii:ii).eq.' ') ii=ii-1 end do ! Now search through node.spec jj=1 found_node=.false. do while (.not. found_node) ll=node(jj).length If (ll.gt.0) then if (node(jj).spec(1:ll).eq.dir_spec(1:ii)) then found_node=.true. ptr=jj end if End If jj=jj+1 end do find_node=found_node return end Fix_Find_Node