From: CSBVAX::MRGATE!J.SKELTON@UK.AC.LSE.VAX1@SMTP 27-JAN-1988 19:37 To: ARISIA::EVERHART Subj: logical names in C Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Tue 26 Jan 88 01:24:30-PST Received: from UKACRL.BITNET by CUNYVM.CUNY.EDU ; Tue, 26 Jan 88 04:11:18 EST Received: from RL.IB by UKACRL.BITNET (Mailer X1.25) with BSMTP id 6760; Tue, 26 Jan 88 09:10:39 GMT Via: UK.AC.RL.EARN; Tue, 26 Jan 88 09:10:37 GMT Received: from RL.IB by UK.AC.RL.IB (Mailer X1.25) with BSMTP id 6758; Tue, 26 Jan 88 09:10:37 GM Via: UK.AC.LSE.VAX1; 26 JAN 88 9:10:32 GMT Date: 26-JAN-1988 09:09:47 GMT From: SKELTON@VAX1.LSE.AC.UK To: INFO-VAX@KL.SRI.COM Subject: logical names in C Sender: (Jeremy Skelton, London School of Economics) One small point that noone else has mentioned - the C rtl routine getenv claims that it translates logical names. Specifically, given a pointer to a string it will return a pointer to another string as follows: If the argument is "HOME","TERM","PATH" or "USER" it returns the appropriate information. Otherwise, it first tries to translate the string as a logical name, looking in the default tables, and if that fails it tries to interpret a CLI symbol. If all this fails, it returns a null pointer. If you expect the name you wish to translate to be not more than one of these three types of object, getenv provides a simple method of tranlating either a logical name or a CLI symbol. Note: if your CLI is DEC/Shell, logical name translation is not attempted since the environment symbols are implemented as CLI symbols. This gives rise to very simple code such as $ printf("Translation of %s is %s.\n",logical_name,getenv(logical_name));  Having said all this, I haven't tried it myself because although I program in C almost exclusively I am using system services for almost everything else and think in terms of SYS$TRNLNM etc. I hope this is some use to someone, anyway. Jeremy Skelton, London School of Economics Computer Service.