summaryrefslogtreecommitdiffstats
path: root/vms/vmsruby_private.c
diff options
context:
space:
mode:
authorakiyoshi <akiyoshi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-17 05:03:33 +0000
committerakiyoshi <akiyoshi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-17 05:03:33 +0000
commit906ca0fd2a4b6050d2b8a9a14131f5380362fa18 (patch)
tree501206304a77d34f39385118a0bd29a2491dd9a4 /vms/vmsruby_private.c
parent6b296bd4078bb2eadf0a5c33324de021a2956325 (diff)
downloadruby-906ca0fd2a4b6050d2b8a9a14131f5380362fa18.tar.gz
ruby-906ca0fd2a4b6050d2b8a9a14131f5380362fa18.tar.xz
ruby-906ca0fd2a4b6050d2b8a9a14131f5380362fa18.zip
Add private initialization routine for VMS.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vms/vmsruby_private.c')
-rw-r--r--vms/vmsruby_private.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/vms/vmsruby_private.c b/vms/vmsruby_private.c
new file mode 100644
index 000000000..c1cbfcebe
--- /dev/null
+++ b/vms/vmsruby_private.c
@@ -0,0 +1,52 @@
+#include "vmsruby_private.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+void _vmsruby_init(void)
+{
+ _vmsruby_set_switch("DECC$WLS", "TRUE");
+}
+
+
+#include <starlet.h>
+#include <string.h>
+#include <descrip.h>
+#include <lnmdef.h>
+
+struct item_list_3 {
+ short buflen;
+ short itmcod;
+ void *bufadr;
+ void *retlen;
+};
+
+long _vmsruby_set_switch(char *name, char *value)
+{
+ long status;
+ struct item_list_3 itemlist[20];
+ int i;
+
+ i = 0;
+ itemlist[i].itmcod = LNM$_STRING;
+ itemlist[i].buflen = strlen(value);
+ itemlist[i].bufadr = value;
+ itemlist[i].retlen = NULL;
+ i++;
+ itemlist[i].itmcod = 0;
+ itemlist[i].buflen = 0;
+
+ $DESCRIPTOR(TABLE_d, "LNM$PROCESS");
+ $DESCRIPTOR(lognam_d, "");
+
+ lognam_d.dsc$a_pointer = name;
+ lognam_d.dsc$w_length = strlen(name);
+
+ status = sys$crelnm (
+ 0,
+ &TABLE_d,
+ &lognam_d,
+ 0, /* usermode */
+ itemlist);
+
+ return status;
+}