[comp.sources.d] Unofficial patch for Calctool V2.4

jdonsbac@thing.prime.com (Jeff Donsbach) (01/19/90)

After making Calctool 2.4 by Rich Burridge, I noticed it was having problems
finding the default help file. I think this problem only occurs when the
help file is in the last directory in your search path. Here are the context
diffs to get.c that fixed the problems for me. Use patch to apply the diffs.

-Jeff

p.s. I'm sending this to Rich via e-mail as well so he can incorporate this
    into a future 'official' patch if he makes any.....

---------------- Cut Here and one more time below ---------------------------
*** get.c~      Thu Jan 18 10:57:22 1990
--- get.c       Thu Jan 18 10:39:14 1990
***************
*** 168,174 ****
          for (;;)
!           if (*ptr == ':' || *ptr == 0)
              {
-               if (*ptr == 0) break ;
                name[i++] = '/' ;
!               name[i] = 0 ;
                STRCAT(name, helpname) ;
--- 168,173 ----
          for (;;)
!           if (*ptr == ':' || *ptr == '\0')
              {
                name[i++] = '/' ;
!               name[i] = '\0' ;
                STRCAT(name, helpname) ;
***************
*** 175,176 ****
--- 174,176 ----
                if ((hfd = fopen(name, "r")) != NULL) return ;
+               if (*ptr == '\0') break ;
                *ptr++ ;
---------------------- Cut Here -------------------------------------

==========================
Jeff Donsbach, Computervision,  A Prime Computer Company, Bedford, MA 
UUCP: {decvax|linus|sun}!cvbnet!jdonsbac | Internet: jdonsbac@cvbnet.prime.com
"You can't have everything, because where would you put it?" -Steven Wright