🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2786

Re: Information on handlers wanted

#2786
From: Doug Walker
Date: Wed, 17 Jan 1990 03:46
32 lines
1525 bytes
In article <1577@geocub.greco-prog.fr> olch@geocub.greco-prog.fr (Olivier Charrier) writes:
>.fastdir on a hard disk). The CD is effectively done (I use CurrentDir) but
>the bug is that the prompt isn't updated (if it includes %S, of course).

You need to update the cli_SetName field in the CLI structure associated with
your process.  To get this, do the following:


#include <exec/types.h>
#include <libraries/dosextens.h>

Process = (struct Process *)FindTask(0L);
CLI     = (struct CommandLineInterface *)BADDR(Process->pr_CLI);
cname   = (unsigned char *)BADDR(cli->cli_SetName);
if((len=strlen(cname)) > 254) len = 254;
cname[0] = len;
memcpy(cname, NewDirectoryName, len);

The 'BADDR' macro converts a BCPL address to a normal C address.  It's defined 
in some header file somewhere, probably as

#define BADDR(xxx) ((APTR)((LONG)xxx)<<2)

or some such thing.


  *****
=*|_o_o|\\=====Doug Walker, Software Distiller=======================
 *|. o.| ||
  | o  |//     For all you do, this bug's for you! 
  ======  
usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker 
Technical Details
Message-ID: <1466@sas.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!mcnc!rti!sas!walker
References: <1577@geocub.greco-prog.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!mcnc!rti!sas!walker
From: walker@sas.UUCP (Doug Walker)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Information on handlers wanted
Message-ID: <1466@sas.UUCP>
Date: 17 Jan 90 03:46:31 GMT
References: <1577@geocub.greco-prog.fr>
Reply-To: walker@sas.UUCP (Doug Walker)
Organization: SAS Institute Inc, Cary NC
Lines: 32