🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.tpu
Article #124

Re: What is TPU_CALLUSER?

#124
From: Carl J Lydick
Date: Fri, 22 Jan 1993 09:38
57 lines
2863 bytes
In article <1jjngtINN1er@usenet.INS.CWRU.Edu>, at913@cleveland.Freenet.Edu (Mirko Vukovic) writes:
>What is TPU_CALLUSER?  What does it do?

TPU_CALLUSER isn't anything (except a string of characters you've put
together).  The CALL_USER primitive in TPU is a function that allow you to call
you own routine* and have it perform a task for you.  Since you're evidently
incapable of using the HELP facility, here's the on-line help for the primitive:

  CALL_USER

      Calls a program written in another language from within VAXTPU.
      CALL_USER parameters are passed to the external program exactly as you
      enter them; VAXTPU does not process them in any way.

   Syntax

      string2 := CALL_USER (integer, string1)

   Parameters

      integer    The integer passed to the external program by reference.

      string1    The string passed to the external program by descriptor.

   Note:  For an example of how to use CALL_USER with a BASIC program, see
          the VAX Text Processing Utility Manual.

Now, a bit more information, assuming you're capable of assimilating it:
	CALL_USER calls a subroutine (TPU$CALLUSER) in an executable (by
default SYS$SHARE:TPU$CALLUSER.EXE) with three arguments:
	1)  A read-only number passed by reference;
	2)  A read-only string, passed by descriptor;
	3)  A write-only dynamic string, passed by descriptor.
You can change the image used by defining the logical name TPU$CALLUSER.
An example of a CALL_USER routine (which returns the translation of the string
passed in the second argument) follows:

$ CREATE CALLUSER.C
#include descrip

long tpu$calluser(int *number, struct dsc$descriptor *string, struct
	dsc$descriptor *retval)
{	LIB$GET_SYMBOL(string, retval);
	return(1);
}
$ CC CALLUSER
$ LINK CALLUSER,SYS$INPUT:/OPT
UNIVERSAL=TPU$CALLUSER

--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
Technical Details
Message-ID: <1jofb4INNt5t@gap.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
References: <1jjngtINN1er@usenet.INS.CWRU.Edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: vmsnet.tpu
Subject: Re: What is TPU_CALLUSER?
Date: 22 Jan 1993 09:38:43 GMT
Organization: HST Wide Field/Planetary Camera
Lines: 57
Message-ID: <1jofb4INNt5t@gap.caltech.edu>
References: <1jjngtINN1er@usenet.INS.CWRU.Edu>
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu