File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed
libcobj/src/jp/osscons/opensourcecobol/libcobj/data Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -2739,9 +2739,9 @@ joutput_call (struct cb_call *p)
2739
2739
break ;
2740
2740
case CB_TAG_LITERAL :
2741
2741
if (CB_TREE_CLASS (x ) == CB_CLASS_NUMERIC ) {
2742
- joutput ("%d " , cb_get_int (x ));
2742
+ joutput ("CobolDataStorage.primitiveToDataStorage(%d) " , cb_get_int (x ));
2743
2743
} else {
2744
- joutput ("%d " , CB_LITERAL (x )-> data [0 ]);
2744
+ joutput ("CobolDataStroage.primitiveToDataStorage(%d) " , CB_LITERAL (x )-> data [0 ]);
2745
2745
}
2746
2746
break ;
2747
2747
default :
Original file line number Diff line number Diff line change @@ -89,6 +89,17 @@ public ByteBuffer getByteBuffer(int size) {
89
89
public void addIndex (int n ) {
90
90
this .index += n ;
91
91
}
92
+
93
+ static public CobolDataStorage primitiveToDataStorage (int n ) {
94
+ byte [] bytes = new byte [4 ];
95
+ ByteBuffer buffer = ByteBuffer .wrap (bytes );
96
+ buffer .putInt (n );
97
+ return new CobolDataStorage (bytes );
98
+ }
99
+
100
+ static public CobolDataStorage primitiveToDataStorage (String s ) {
101
+ return new CobolDataStorage (s );
102
+ }
92
103
93
104
/**
94
105
* コンストラクタ.文字列からバイト配列を構成する.
Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ AT_INIT([I18n Shift_JIS Tests])
22
22
23
23
AT_TESTED ( [ cobc] )
24
24
25
- # m4_include([user-defined-word.at])
26
- m4_include ( [ pic-x.at] )
27
- m4_include ( [ pic-n.at] )
28
- # m4_include([program-id.at])
29
- # m4_include([error-print.at])
30
- # m4_include([limits.at])
31
- m4_include ( [ national.at] )
32
- # m4_include([mb-space.at])
25
+ m4_include ( [ user-defined-word.at] )
26
+ # m4_include([pic-x.at])
27
+ # m4_include([pic-n.at])
28
+ m4_include ( [ program-id.at] )
29
+ m4_include ( [ error-print.at] )
30
+ m4_include ( [ limits.at] )
31
+ # m4_include([national.at])
32
+ m4_include ( [ mb-space.at] )
You can’t perform that action at this time.
0 commit comments