Path: utzoo!mnetor!uunet!husc6!mailrus!ames!pasteur!ucbvax!FHCRCVAX.BITNET!JOE From: JOE@FHCRCVAX.BITNET (Joe Meadows) Newsgroups: comp.os.vms Subject: INDEX (FIND) bug fix Message-ID: Date: 4 Apr 88 21:41:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 42 This is a modification for the INDEX / FIND utility. Note that INDEX and FIND are the same utility, only the name is different. This utility can be found on the Fall '87 Decus tape, under [VAX87E.MEADOWS.INDEX], and was posted previously to info-vax. This fixes behaviour of /CHARACTERISTICS qualifier. --- In search.c , find the following ----------- if (search->si_v_char) { if (((search->si_l_charset & fh2->fh2$l_filechar) == search->si_l_charset) && ((search->si_l_charclr & fh2->fh2$l_filechar) == search->si_l_charclr)) --- and change to ------------------------------ if (search->si_v_char) { if ((search->si_l_charset & fh2->fh2$l_filechar) && (!(search->si_l_charclr & fh2->fh2$l_filechar))) ------------------------------------------------ This solves two problems at once, the previous code would force all negated keywords to behave as though they were not negated, and all present keywords would have to be true (i.e. /CHAR=(READ,WRITE) would only match if the file had BOTH read and write verify set, whereas the help said it would be EITHER). The behaviour with this modification is as documented, if any of the present keywords hold true and if none of the negated keywords hold true for the file, then the file is displayed. A possible future modification would be to modify it so that you can ask that BOTH need to be set. Perhaps I could change it so that /CHARACTERISTICS=(READ+WRITE) would test for read AND write, and /CHARACTERISTICS=(READ,WRITE) would test for read OR write. No one has written to me asking for such a modification, so perhaps it's not such a wanted item.. Joe Meadows Jr. VAX/VMS System Manager / guru in training Fred Hutchinson Cancer Research Center 1124 Columbia St. Seattle Wa. 98104 bitnet - JOE@FHCRCVAX arpa - JOE%FHCRCVAX.BITNET@WISCVM.WISC.EDU voice - (206) 467-4970