~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to vms/vmsruby_private.c

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "vmsruby_private.h"
 
2
#include <stdio.h>
 
3
#include <stdlib.h>
 
4
 
 
5
void _vmsruby_init(void)
 
6
{
 
7
    _vmsruby_set_switch("DECC$WLS", "TRUE");
 
8
}
 
9
 
 
10
 
 
11
#include <starlet.h>
 
12
#include <string.h>
 
13
#include <descrip.h>
 
14
#include <lnmdef.h>
 
15
 
 
16
struct item_list_3 {
 
17
    short buflen;
 
18
    short itmcod;
 
19
    void *bufadr;
 
20
    void *retlen;
 
21
};
 
22
 
 
23
long _vmsruby_set_switch(char *name, char *value)
 
24
{
 
25
    long status;
 
26
    struct item_list_3 itemlist[20];
 
27
    int i;
 
28
 
 
29
    i = 0;
 
30
    itemlist[i].itmcod = LNM$_STRING;
 
31
    itemlist[i].buflen = strlen(value);
 
32
    itemlist[i].bufadr = value;
 
33
    itemlist[i].retlen = NULL;
 
34
    i++;
 
35
    itemlist[i].itmcod = 0;
 
36
    itemlist[i].buflen = 0;
 
37
 
 
38
    $DESCRIPTOR(TABLE_d, "LNM$PROCESS");
 
39
    $DESCRIPTOR(lognam_d, "");
 
40
 
 
41
    lognam_d.dsc$a_pointer = name;
 
42
    lognam_d.dsc$w_length  = strlen(name);
 
43
 
 
44
    status = sys$crelnm (
 
45
                 0, 
 
46
                 &TABLE_d, 
 
47
                 &lognam_d, 
 
48
                 0,  /* usermode */
 
49
                 itemlist);
 
50
 
 
51
    return status;
 
52
}