[news.software.anu-news] Is this is bug in the UPDATE command?

gih900@UUNET.UU.NET (Geoff Huston) (07/14/89)

>Bob Sloane writes: --
>
>>Whenever I use the UPDATE command, it changes the DIRECTORY status from
>>REGISTER to ALL.  Is this the intended behavior, or is this a bug? Has anyone
>>else noticed this?
>
>I'll see what can be done with this cause it is logically a bug.
     
This is a fix to the update command
     
Geoff Huston
gih900@csc.anu.oz.au
----------------------------------------------------------
     
Replace the routine do_update (NEWSUTILITY.C) by:
     
do_update()
{
  int slevel=news_context,
      sg = curr_g,
      si = curr_i,
      g;
  char en[256];
  short en_len;
  $DESCRIPTOR(en_dsc,en);
     
  if (cli$get_value(c$dsc("ENTRYNAME"),&en_dsc,&en_len) & 1) {
    en[en_len] = '\0';
    s_to_lower(en);
    if (g = ga_search_name(en)) update_newsgroup(g);
    else err_line("\tError: Update - No such newsgroup located\n");
    return(0);
    }
  else {
    int cdt = cur_dir_type + 1;   /* remember what the screen was displaying */
     
    mem_reset();
    do_dir(cdt,1);                /* and restore it */
    do_select("%",sg,slevel);
    if (slevel > 1) cur_set_itm(sg,si);
    err_line("\tUpdate complete\n");
    return(0);
    }
}