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)
27392739 break ;
27402740 case CB_TAG_LITERAL :
27412741 if (CB_TREE_CLASS (x ) == CB_CLASS_NUMERIC ) {
2742- joutput ("%d " , cb_get_int (x ));
2742+ joutput ("CobolDataStorage.primitiveToDataStorage(%d) " , cb_get_int (x ));
27432743 } else {
2744- joutput ("%d " , CB_LITERAL (x )-> data [0 ]);
2744+ joutput ("CobolDataStroage.primitiveToDataStorage(%d) " , CB_LITERAL (x )-> data [0 ]);
27452745 }
27462746 break ;
27472747 default :
Original file line number Diff line number Diff line change @@ -89,6 +89,17 @@ public ByteBuffer getByteBuffer(int size) {
8989 public void addIndex (int n ) {
9090 this .index += n ;
9191 }
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+ }
92103
93104 /**
94105 * コンストラクタ.文字列からバイト配列を構成する.
Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ AT_INIT([I18n Shift_JIS Tests])
2222
2323AT_TESTED ( [ cobc] )
2424
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