From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,7b947278c7c7d7cb X-Google-Attributes: gidf7344,public X-Google-Thread: fc7fa,7b947278c7c7d7cb X-Google-Attributes: gidfc7fa,public X-Google-ArrivalTime: 1993-06-23 05:22:16 PST Path: gmd.de!xlink.net!howland.reston.ans.net!ux1.cso.uiuc.edu!uwm.edu!msuinfo!rudolf.nscl.msu.edu!fox From: fox@rudolf.nscl.msu.edu (Ron Fox) Newsgroups: comp.sys.vms,comp.os.vms Subject: Re: Create & QIO to DECterms Date: 23 Jun 1993 12:19:24 GMT Organization: National Superconducting Cycltron Lab Distribution: world Message-ID: <209hoc$vl9@msuinfo.cl.msu.edu> References: <1993Jun22.164105.23968@mprgate.mpr.ca> <1993Jun22.191457.28022@e2big.mko.dec.com> Reply-To: fox@rudolf.nscl.msu.edu (Ron Fox) NNTP-Posting-Host: foxsun.nscl.msu.edu Keywords: DECterm -- In article <1993Jun22.191457.28022@e2big.mko.dec.com>, kleinsorge@star.enet.dec.com (Fred Kleinsorge) writes: |>Newsgroups: comp.sys.vms,comp.os.vms |>Path: msuinfo!agate!ames!decwrl!pa.dec.com!e2big.mko.dec.com!star.enet.dec.com!kleinsorge |>From: kleinsorge@star.enet.dec.com (Fred Kleinsorge) |>Subject: Re: Create & QIO to DECterms |>Message-ID: <1993Jun22.191457.28022@e2big.mko.dec.com> |>Keywords: DECterm |>Lines: 27 |>Sender: usenet@e2big.mko.dec.com (Mr. USENET) |>Reply-To: kleinsorge@star.enet.dec.com (Fred Kleinsorge) |>Organization: Digital Equipment Corporation |>X-Newsreader: mxrn 6.18-4 |>References: <1993Jun22.164105.23968@mprgate.mpr.ca> |>Date: Tue, 22 Jun 93 15:14:57 EDT |>Xref: msuinfo comp.sys.vms:153 comp.os.vms:74069 |> |> |>The system service is giving you a error from the probe of the |>arguments. I'd check either the line: |> |> terminal.dsc$a_pointer = device_name; |> |>and make it: |> |> terminal.dsc$a_pointer = &device_name[]; |> |>or the line: |> |> status = sys$assign(terminal, &user_input_chan, 0, 0); |> |>and make it: |> |> status = sys$assign(&terminal, &user_input_chan, 0, 0); |> |>I always get into trouble on how C decides what to do when passing |>structures. |> |> |>-- |> +--------------------------------------+ |>Fred Kleinsorge | All opinions expressed are mine, and | |>kleinsorge@star.enet.dec.com | may not reflect those of my employer | |> +--------------------------------------+ |> The problem was the latter one I think. In VMS C, structures are passed by copy in the argument list. sys$assign, needs a pointer to the descriptor so you need &terminal in the SYS$ASSIGN. The fudging of the descriptor is O.K. since array names without subscripts can be treated as pointers to their contents. By the way, more standard and portable than what you showed is: terminal.dsc$a_pointer = &device_name[0]; Which should also work. RF. Ron Fox | FOX@MSUNSCL.BITNET | Where the name NSCL | FOX@RUDOLF.NSCL.MSU.EDU | goes on before Michigan State University | MSUHEP::RUDOLF::FOX | the quality East Lansing, MI 48824-1321 | | goes in. USA