Branch: Tag:

1999-12-27

1999-12-27 12:36:16 by Martin Stjernholm <mast@lysator.liu.se>

Use a weak mapping to reverse programs to names, since we sometimes want to
look up the name when the program has been superseded in master()->programs.

Rev: server/base_server/roxen.pike:1.374
Rev: server/base_server/roxenlib.pike:1.134
Rev: server/etc/roxen_master.pike:1.66

5:    */      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.373 1999/12/21 16:46:36 per Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.374 1999/12/27 12:36:12 mast Exp $";      object backend_thread;   ArgCache argcache;
156:    RequestID clone_me();   };    - mapping old_programs = set_weak_flag( ([]),1 ); -  +    string filename( program|object o )   {    if( objectp( o ) )    o = object_program( o );    -  string fname = search( master()->programs, o ); +  string fname = master()->program_name (o);    if( !fname ) -  if( old_programs[ o ] ) -  fname = old_programs[ o ]; -  if( !fname ) +     fname = "Unknown Program";    return fname-(getcwd()+"/");   }