From: SMTP%"Free-VMS@lp.se" 14-OCT-1996 20:22:09.47 To: EVERHART CC: Subj: Re: More software on ftp.wku.edu X-ListName: Mailing list for the Free-VMS development team Warnings-To: <> Errors-To: owner-free-vms@lp.se Sender: owner-free-vms@lp.se Date: Mon, 14 Oct 1996 18:16:09 -0400 Message-ID: <199610142216.SAA10587@harvey.cyclic.com> From: Jim Kingdon Reply-To: Free-VMS@lp.se To: Free-VMS@lp.se In-reply-to: <009A9D71.057BC4ED.31@ALPHA.WKU.EDU> (message from Hunter Goatley on Mon, 14 Oct 1996 15:58:36 CST) Subject: Re: More software on ftp.wku.edu >str.tar - VMS str$ functions. It's just a start to see how hard > it would be to write. Compiles on Linux. (Written in C) Cool! I haven't used str$ enough to be able to say a lot about how close this is, but it looks like a good start to me. My compliments to the chef. I did find one bug. I've enclosed a patch to teststr.c which tests for it; without the fix the new test prints "str$case_blind_compare(1,3) = 0" which is wrong; with the fix the new test prints "str$case_blind_compare(1,3) = 1" bash$ diff -u teststr.c~ teststr.c --- teststr.c~ Sun Oct 13 00:17:07 1996 +++ teststr.c Mon Oct 14 18:01:40 1996 @@ -29,6 +29,7 @@ */ $DESCRIPTOR(GlobalString1, "This is global1"); $DESCRIPTOR(GlobalString2, "This is GlObAl2 . . . Longer"); +$DESCRIPTOR(GlobalString3, "This is foobar1"); main() { @@ -116,6 +117,8 @@ str$case_blind_compare(&GlobalString2, &GlobalString1)); printf("str$case_blind_compare(2,2) = %d\n", str$case_blind_compare(&GlobalString2, &GlobalString2)); + printf("str$case_blind_compare(1,3) = %d\n", + str$case_blind_compare(&GlobalString1, &GlobalString3)); printf("\n"); printf("Copy_r = %ld\n", str$copy_r(&Test1, &ten, &"A Test String")); bash$ diff -u str.c~ str.c --- str.c~ Sun Oct 13 00:25:06 1996 +++ str.c Mon Oct 14 18:02:41 1996 @@ -971,7 +971,7 @@ /* * Do the comparison */ - while((length != 0) && (result = 0)) + while((length != 0) && (result == 0)) { result = tolower(*str1++) - tolower(*str2++); length--; bash$