From:	MERC::"uunet!VM1.NoDak.EDU!ANU-NEWS" 28-APR-1992 20:41:14.59
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>
CC:	
Subj:	Re: Bug report: NEWS V6.1a4 and callable EDT

In article <1992Apr27.194411.1@eql.caltech.edu>, rankin@eql.caltech.edu
 (Pat Rankin) writes:
> In article <1992Apr27.153837.1957@memstvx1.memst.edu>,
> flowers@memstvx1.memst.edu (Harry Flowers) writes:
>> I've further tracked this down to the fact that "edt" is stored as the
>> Edit_Cmd if you specify "edt" or "callable_edt", and is supposed to use
>> callable EDT either way.  However, in the invoke_editor routine, it's
>> looking for "callable_" in Edit_Cmd to determine whether to call an
>> editor.  Either invoke_editor in NEWSCALLEDIT needs to be fixed, or
>> the routines in NEWSPROFILE and NEWSSITE which explicitly store "edt"
>> as the editor.
>
>      Apply the following fix and you should be OK.  At least I'm
> [barely] managing to use EDT to compose this followup after applying it.
>
>               Pat Rankin, rankin@eql.caltech.edu
>
> *** newscalledit.c
> --- newscalledit.c-fix
> **************
> *** 174,180
>     logicalP = (Edit_Cmd && *Edit_Cmd) ? Edit_Cmd : "callable_tpu";

I took a slightly different approach by adding this line here:

      if (!strcmp(Edit_Cmd,"edt")) logicalP = "callable_edt";

>       /* Should we try for a callable editor? Or, go for a subprocess? */
> !   t = strlen(callable_prefixP);
>     if (strncmp(logicalP,callable_prefixP,t) == 0) {
>
>         /*
> --- 174,180 -----
>     logicalP = (Edit_Cmd && *Edit_Cmd) ? Edit_Cmd : "callable_tpu";
>
>       /* Should we try for a callable editor? Or, go for a subprocess? */
> !   t = (strcmp(logicalP,"edt") == 0) ? 0 : strlen(callable_prefixP);
>     if (strncmp(logicalP,callable_prefixP,t) == 0) {
>
>         /*

Neither approach seems very elegant.  Now, instead of one special case
(the null meaning use callable_tpu), we've got two (edt meaning callable_edt).
And these two "special cases" probably cover the majority of NEWS users.  Oh,
well, I don't know why I listen to the purist in me when I'm programming ;-).

BTW, thanks for the quick patch.  I guess I should've posted mine yesterday,
too, but I couldn't tell if anyone else needed it.  How many of us are using
V6.1a4?
--
Harry Flowers                           Internet: FLOWERS@MEMSTVX1.MEMST.EDU
Memphis State University                & Bitnet: FLOWERS@MEMSTVX1
