aboutsummaryrefslogtreecommitdiffstats
path: root/vms/vms_fwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'vms/vms_fwrite.c')
-rw-r--r--vms/vms_fwrite.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/vms/vms_fwrite.c b/vms/vms_fwrite.c
index f29ec832..76eec6bd 100644
--- a/vms/vms_fwrite.c
+++ b/vms/vms_fwrite.c
@@ -78,12 +78,16 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file )
if (chan == 0) { /* if not initialized, need to assign a channel */
if (isatty(file_num) > 0 /* isatty: 1=yes, 0=no, -1=problem */
&& ! do_debug) {
- Dsc device;
+ struct dsc$descriptor_s device;
char devnam[255+1];
fgetname(file, devnam); /* get 'file's name */
- device.len = strlen(device.adr = devnam); /* create descriptor */
- if (vmswork(SYS$ASSIGN(&device, &chan, 0, (Dsc *)0))) {
+ /* create descriptor */
+ device.dsc$w_length = strlen(device.dsc$a_pointer = devnam);
+ device.dsc$b_dtype = DSC$K_DTYPE_T;
+ device.dsc$b_class = DSC$K_CLASS_S;
+ if (vmswork(SYS$ASSIGN(&device, &chan, 0,
+ (struct dsc$descriptor_s *)0))) {
/* get an event flag; use #0 if problem */
if (evfn == -1 && vmsfail(LIB$GET_EF(&evfn))) evfn = 0;
} else chan = 0; /* $ASSIGN failed */