aboutsummaryrefslogtreecommitdiffstats
path: root/vms/vms_fwrite.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-02-03 06:23:35 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-02-03 06:23:35 +0200
commit6471f08e36c2c3015d829cf0775d746701d1476b (patch)
treea89d31305d902bc792b9dec43625d5e1e20ea62b /vms/vms_fwrite.c
parent4fd275be1983c2b9d65fe3b67a87eeb31763f218 (diff)
parentafe565753eb654aa1b2280908701e8c0d8e7ccbb (diff)
downloadegawk-6471f08e36c2c3015d829cf0775d746701d1476b.tar.gz
egawk-6471f08e36c2c3015d829cf0775d746701d1476b.tar.bz2
egawk-6471f08e36c2c3015d829cf0775d746701d1476b.zip
Merge branch 'gawk-4.1-stable' of ssh://git.sv.gnu.org/srv/git/gawk into gawk-4.1-stable
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 */