FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
jruby/core/src/main/java/org/jruby/util/Sprintf.java at master · jruby/jruby · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
jruby
/
jruby
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
946
Star
3.9k
Code
Issues
840
Pull requests
109
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
jruby
/
core
/
src
/
main
/
java
/
org
/
jruby
/
util
/
Sprintf.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
1960 lines (1747 loc) · 82.5 KB
Breadcrumbs
jruby
/
core
/
src
/
main
/
java
/
org
/
jruby
/
util
/
Sprintf.java
Copy path
File metadata and controls
1960 lines (1747 loc) · 82.5 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/***** BEGIN LICENSE BLOCK *****
* Version: EPL 2.0/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Eclipse Public
* License Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.eclipse.org/legal/epl-v20.html
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2007 William N Dortch <bill.dortch@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the EPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the EPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****/
package
org
.
jruby
.
util
;
import
java
.
math
.
BigInteger
;
import
java
.
text
.
DecimalFormatSymbols
;
import
java
.
text
.
NumberFormat
;
import
java
.
util
.
HashMap
;
import
java
.
util
.
Locale
;
import
java
.
util
.
Map
;
import
org
.
jcodings
.
Encoding
;
import
org
.
jcodings
.
exception
.
EncodingException
;
import
org
.
jcodings
.
specific
.
UTF8Encoding
;
import
org
.
jruby
.*;
import
org
.
jruby
.
api
.
Warn
;
import
org
.
jruby
.
common
.
IRubyWarnings
.
ID
;
import
org
.
jruby
.
runtime
.
ThreadContext
;
import
org
.
jruby
.
runtime
.
builtin
.
IRubyObject
;
import
org
.
jruby
.
util
.
io
.
EncodingUtils
;
import
static
org
.
jruby
.
api
.
Access
.
fixnumClass
;
import
static
org
.
jruby
.
api
.
Access
.
integerClass
;
import
static
org
.
jruby
.
api
.
Access
.
stringClass
;
import
static
org
.
jruby
.
api
.
Convert
.
asFixnum
;
import
static
org
.
jruby
.
api
.
Convert
.
asInteger
;
import
static
org
.
jruby
.
api
.
Convert
.
toLong
;
import
static
org
.
jruby
.
api
.
Create
.
newString
;
import
static
org
.
jruby
.
api
.
Error
.
argumentError
;
import
static
org
.
jruby
.
api
.
Error
.
typeError
;
import
static
org
.
jruby
.
api
.
Warn
.
warn
;
import
static
org
.
jruby
.
runtime
.
Helpers
.
arrayOf
;
public
class
Sprintf
{
private
static
final
int
FLAG_NONE
=
0
;
private
static
final
int
FLAG_SPACE
=
1
;
private
static
final
int
FLAG_ZERO
=
1
<<
1
;
private
static
final
int
FLAG_PLUS
=
1
<<
2
;
private
static
final
int
FLAG_MINUS
=
1
<<
3
;
private
static
final
int
FLAG_SHARP
=
1
<<
4
;
private
static
final
int
FLAG_WIDTH
=
1
<<
5
;
private
static
final
int
FLAG_PRECISION
=
1
<<
6
;
private
static
final
byte
[]
PREFIX_OCTAL
= {
'0'
};
private
static
final
byte
[]
PREFIX_HEX_LC
= {
'0'
,
'x'
};
private
static
final
byte
[]
PREFIX_HEX_UC
= {
'0'
,
'X'
};
private
static
final
byte
[]
PREFIX_BINARY_LC
= {
'0'
,
'b'
};
private
static
final
byte
[]
PREFIX_BINARY_UC
= {
'0'
,
'B'
};
private
static
final
byte
[]
PREFIX_NEGATIVE
= {
'.'
,
'.'
};
private
static
final
byte
[]
NAN_VALUE
= {
'N'
,
'a'
,
'N'
};
private
static
final
byte
[]
INFINITY_VALUE
= {
'I'
,
'n'
,
'f'
};
private
static
final
BigInteger
BIG_32
=
BigInteger
.
valueOf
(((
long
)
Integer
.
MAX_VALUE
+
1L
) <<
1
);
private
static
final
BigInteger
BIG_64
=
BIG_32
.
shiftLeft
(
32
);
private
static
final
BigInteger
BIG_MINUS_32
=
BigInteger
.
valueOf
((
long
)
Integer
.
MIN_VALUE
<<
1
);
private
static
final
BigInteger
BIG_MINUS_64
=
BIG_MINUS_32
.
shiftLeft
(
32
);
private
static
final
String
ERR_MALFORMED_FORMAT
=
"malformed format string"
;
private
static
final
String
ERR_MALFORMED_NUM
=
"malformed format string - %[0-9]"
;
private
static
final
String
ERR_MALFORMED_DOT_NUM
=
"malformed format string - %.[0-9]"
;
private
static
final
String
ERR_MALFORMED_STAR_NUM
=
"malformed format string - %*[0-9]"
;
private
static
final
String
ERR_ILLEGAL_FORMAT_CHAR
=
"illegal format character - %"
;
private
static
final
String
ERR_INCOMPLETE_FORMAT_SPEC
=
"incomplete format specifier; use %% (double %) instead"
;
private
static
final
String
ERR_MALFORMED_NAME
=
"malformed name - unmatched parenthesis"
;
private
static
final
ThreadLocal
<
Map
<
Locale
,
NumberFormat
>>
LOCALE_NUMBER_FORMATS
=
new
ThreadLocal
<
Map
<
Locale
,
NumberFormat
>>();
private
static
final
ThreadLocal
<
Map
<
Locale
,
DecimalFormatSymbols
>>
LOCALE_DECIMAL_FORMATS
=
new
ThreadLocal
<
Map
<
Locale
,
DecimalFormatSymbols
>>();
private
static
final
class
Args
{
private
final
Ruby
runtime
;
private
final
Locale
locale
;
private
final
IRubyObject
rubyObject
;
private
final
RubyArray
rubyArray
;
private
final
RubyHash
rubyHash
;
private
final
int
length
;
private
int
positionIndex
;
// last index (+1) accessed by next()
private
int
nextIndex
;
private
IRubyObject
nextObject
;
Args
(
Locale
locale
,
IRubyObject
rubyObject
) {
if
(
rubyObject
==
null
)
throw
new
IllegalArgumentException
(
"null IRubyObject passed to sprintf"
);
this
.
locale
=
locale
==
null
?
Locale
.
getDefault
() :
locale
;
this
.
rubyObject
=
rubyObject
;
if
(
rubyObject
instanceof
RubyArray
) {
this
.
rubyArray
= (
RubyArray
)
rubyObject
;
if
(
rubyArray
.
last
(
rubyArray
.
getRuntime
().
getCurrentContext
())
instanceof
RubyHash
) {
this
.
rubyHash
= (
RubyHash
)
rubyArray
.
pop
(
rubyArray
.
getRuntime
().
getCurrentContext
());
}
else
{
this
.
rubyHash
=
null
;
}
this
.
length
=
rubyArray
.
size
();
}
else
if
(
rubyObject
instanceof
RubyHash
) {
// allow a hash for args if in 1.9 mode
this
.
rubyHash
= (
RubyHash
)
rubyObject
;
this
.
rubyArray
=
null
;
this
.
length
=
1
;
}
else
{
this
.
length
=
1
;
this
.
rubyArray
=
null
;
this
.
rubyHash
=
null
;
}
positionIndex
=
0
;
nextIndex
=
1
;
this
.
runtime
=
rubyObject
.
getRuntime
();
}
Args
(
IRubyObject
rubyObject
) {
this
(
Locale
.
getDefault
(),
rubyObject
);
}
// temporary hack to handle non-Ruby values
// will come up with better solution shortly
Args
(
Ruby
runtime
,
long
value
) {
this
(
RubyFixnum
.
newFixnum
(
runtime
,
value
));
}
void
raiseArgumentError
(
String
message
) {
throw
argumentError
(
runtime
.
getCurrentContext
(),
message
);
}
void
raiseKeyError
(
String
message
,
IRubyObject
recv
,
IRubyObject
key
) {
throw
runtime
.
newKeyError
(
message
,
recv
,
key
);
}
void
warn
(
ID
id
,
String
message
) {
runtime
.
getWarnings
().
warn
(
id
,
message
);
}
private
IRubyObject
getHashValue
(
ByteList
name
,
char
startDelim
,
char
endDelim
) {
// FIXME: get_hash does hash conversion of argv and arity check...this is a bit complicated with
// our version. Implement it.
if
(
rubyHash
==
null
) {
raiseArgumentError
(
"one hash required"
);
}
checkNameArg
(
name
,
startDelim
,
endDelim
);
RubySymbol
nameSym
=
runtime
.
newSymbol
(
name
);
IRubyObject
object
=
rubyHash
.
fastARef
(
nameSym
);
// if not found, try dispatching to pick up default hash value
// MRI: spliced together bits from rb_hash_default_value
if
(
object
==
null
) {
object
=
rubyHash
.
getIfNone
();
if
(
object
==
RubyBasicObject
.
UNDEF
) {
RubyString
nameStr
=
newString
(
runtime
.
getCurrentContext
(),
name
);
raiseKeyError
(
"key"
+
startDelim
+
nameStr
+
endDelim
+
" not found"
,
rubyHash
,
nameSym
);
}
else
if
(
rubyHash
.
hasDefaultProc
()) {
object
=
object
.
callMethod
(
runtime
.
getCurrentContext
(),
"call"
,
arrayOf
(
rubyHash
,
nameSym
));
}
if
(
object
.
isNil
())
throw
runtime
.
newKeyError
(
"key"
+
startDelim
+
nameSym
+
endDelim
+
" not found"
,
rubyHash
,
nameSym
);
}
return
object
;
}
private
IRubyObject
getNthArg
(
int
index
) {
if
(
index
>
length
) {
if
(
index
==
length
+
1
&&
rubyHash
!=
null
) {
return
rubyHash
;
}
raiseArgumentError
(
"too few arguments"
);
}
return
rubyArray
==
null
?
rubyObject
:
rubyArray
.
eltInternal
(
index
-
1
);
}
// MRI: GETARG
private
IRubyObject
getArg
() {
final
IRubyObject
nextObject
=
this
.
nextObject
;
if
(
nextObject
!=
null
) {
// This is different in MRI. The do a retry and avoid part of the for loop
// which resets nextvalue. We do not do that so we null out here since we
// cannot get same value twice.
this
.
nextObject
=
null
;
return
nextObject
;
}
return
getNextArg
();
}
// MRI: GETNEXTARG
private
IRubyObject
getNextArg
() {
checkNextArg
();
positionIndex
=
nextIndex
++;
return
getNthArg
(
positionIndex
);
}
// MRI: GETPOSARG
private
IRubyObject
getPositionArg
(
int
index
) {
checkPositionArg
(
index
);
positionIndex
= -
1
;
return
getNthArg
(
index
);
}
// MRI: check_next_arg
private
void
checkNextArg
() {
if
(
positionIndex
== -
1
)
raiseArgumentError
(
"unnumbered("
+
nextIndex
+
") mixed with numbered"
);
if
(
positionIndex
== -
2
)
raiseArgumentError
(
"unnumbered("
+
nextIndex
+
") mixed with named"
);
}
// MRI: check_pos_arg
private
void
checkPositionArg
(
int
nthArg
) {
if
(
positionIndex
>
0
)
raiseArgumentError
(
"numbered("
+
nthArg
+
") after unnumbered("
+
positionIndex
+
")"
);
if
(
positionIndex
== -
2
)
raiseArgumentError
(
"numbered("
+
nthArg
+
") after named"
);
if
(
nthArg
<
1
)
raiseArgumentError
(
"invalid index - "
+
nthArg
+
"$"
);
}
// MRI: check_name_arg, CHECKNAMEARG
private
void
checkNameArg
(
ByteList
name
,
char
startDelim
,
char
endDelim
) {
if
(
positionIndex
>
0
)
raiseArgumentError
(
"named"
+
startDelim
+
RubyString
.
newString
(
runtime
,
name
) +
endDelim
+
" after unnumbered("
+
positionIndex
+
")"
);
if
(
positionIndex
== -
1
)
raiseArgumentError
(
"named"
+
startDelim
+
RubyString
.
newString
(
runtime
,
name
) +
endDelim
+
" after numbered"
);
positionIndex
= -
2
;
}
int
intValue
(
ThreadContext
context
,
IRubyObject
obj
) {
if
(
obj
instanceof
RubyNumeric
num
)
return
num
.
asInt
(
context
);
// basically just forcing a TypeError here to match MRI
obj
=
TypeConverter
.
convertToType
(
obj
,
fixnumClass
(
context
),
"to_int"
,
true
);
return
((
RubyFixnum
)
obj
).
asInt
(
context
);
}
byte
getDecimalSeparator
() {
return
(
byte
)
getDecimalFormat
(
locale
).
getDecimalSeparator
();
}
}
// Args
// static methods only
private
Sprintf
() {}
// Special form of sprintf that returns a RubyString.
public
static
boolean
sprintf
(
ByteList
to
,
Locale
locale
,
CharSequence
format
,
IRubyObject
args
) {
rubySprintfToBuffer
(
to
,
format
,
new
Args
(
locale
,
args
));
return
false
;
}
// Special form of sprintf that returns a RubyString. Version for 1.9.
public
static
boolean
sprintf1_9
(
ByteList
to
,
Locale
locale
,
CharSequence
format
,
IRubyObject
args
) {
rubySprintfToBuffer
(
to
,
format
,
new
Args
(
locale
,
args
),
false
);
return
false
;
}
public
static
boolean
sprintf
(
ByteList
to
,
CharSequence
format
,
IRubyObject
args
) {
rubySprintf
(
to
,
format
,
new
Args
(
args
));
return
false
;
}
public
static
ByteList
sprintf
(
Encoding
encoding
,
CharSequence
format
,
IRubyObject
args
) {
ByteList
to
=
new
ByteList
(
16
,
encoding
);
rubySprintfToBuffer
(
to
,
format
,
new
Args
(
args
),
false
);
return
to
;
}
public
static
boolean
sprintf
(
Ruby
runtime
,
ByteList
to
,
CharSequence
format
,
int
arg
) {
rubySprintf
(
to
,
format
,
new
Args
(
runtime
, (
long
)
arg
));
return
false
;
}
public
static
boolean
sprintf
(
Ruby
runtime
,
ByteList
to
,
CharSequence
format
,
long
arg
) {
rubySprintf
(
to
,
format
,
new
Args
(
runtime
,
arg
));
return
false
;
}
public
static
boolean
sprintf
(
ByteList
to
,
RubyString
format
,
IRubyObject
args
) {
rubySprintf
(
to
,
format
.
getByteList
(),
new
Args
(
args
));
return
false
;
}
private
static
void
rubySprintf
(
ByteList
to
,
CharSequence
charFormat
,
Args
args
) {
rubySprintfToBuffer
(
to
,
charFormat
,
args
);
}
private
static
void
rubySprintfToBuffer
(
ByteList
buf
,
CharSequence
charFormat
,
Args
args
) {
rubySprintfToBuffer
(
buf
,
charFormat
,
args
,
true
);
}
private
static
void
rubySprintfToBuffer
(
final
ByteList
buf
,
final
CharSequence
charFormat
,
final
Args
args
,
final
boolean
usePrefixForZero
) {
ThreadContext
context
=
args
.
runtime
.
getCurrentContext
();
final
byte
[]
format
;
Encoding
encoding
;
int
offset
,
length
;
if
(
charFormat
instanceof
ByteList
) {
ByteList
list
= (
ByteList
)
charFormat
;
format
=
list
.
getUnsafeBytes
();
int
begin
=
list
.
begin
();
offset
=
begin
;
length
=
begin
+
list
.
length
();
encoding
=
list
.
getEncoding
();
}
else
{
format
=
stringToBytes
(
charFormat
);
offset
=
0
;
length
=
charFormat
.
length
();
encoding
=
UTF8Encoding
.
INSTANCE
;
}
while
(
offset
<
length
) {
ByteList
name
=
null
;
final
int
start
=
offset
;
for
( ;
offset
<
length
&&
format
[
offset
] !=
'%'
;
offset
++) {}
if
(
offset
>
start
) {
buf
.
append
(
format
,
start
,
offset
-
start
);
// start = offset;
}
if
(
offset
++ >=
length
)
break
;
IRubyObject
arg
;
int
flags
=
0
;
int
width
=
0
;
int
precision
=
0
;
int
number
;
byte
fchar
;
boolean
incomplete
=
true
;
for
( ;
incomplete
&&
offset
<
length
; ) {
switch
(
fchar
=
format
[
offset
]) {
default
:
if
(
isPrintable
(
fchar
)) {
raiseArgumentError
(
args
,
"malformed format string - %"
+ (
char
)
fchar
);
}
else
{
raiseArgumentError
(
args
,
ERR_MALFORMED_FORMAT
);
}
break
;
case
' '
:
flags
|=
FLAG_SPACE
;
offset
++;
break
;
case
'+'
:
flags
|=
FLAG_PLUS
;
offset
++;
break
;
case
'-'
:
flags
|=
FLAG_MINUS
;
offset
++;
break
;
case
'#'
:
flags
|=
FLAG_SHARP
;
offset
++;
break
;
case
'0'
:
flags
|=
FLAG_ZERO
;
offset
++;
break
;
case
'1'
:
case
'2'
:
case
'3'
:
case
'4'
:
case
'5'
:
case
'6'
:
case
'7'
:
case
'8'
:
case
'9'
:
// MRI doesn't flag it as an error if width is given multiple
// times as a number (but it does for *)
number
=
0
;
// GETNUM(n, width) :
for
(;
offset
<
length
&&
isDigit
(
fchar
=
format
[
offset
]);
offset
++) {
number
=
extendWidth
(
args
,
number
,
fchar
,
"width too big"
);
}
checkOffset
(
args
,
offset
,
length
,
ERR_MALFORMED_NUM
);
//
if
(
fchar
==
'$'
) {
if
(
args
.
nextObject
!=
null
) {
raiseArgumentError
(
args
,
"value given twice - "
+
number
+
"$"
);
}
args
.
nextObject
=
args
.
getPositionArg
(
number
);
offset
++;
break
;
}
if
((
flags
&
FLAG_WIDTH
) !=
0
)
raiseArgumentError
(
args
,
"width given twice"
);
width
=
number
;
flags
|=
FLAG_WIDTH
;
break
;
case
'<'
: {
int
nameStart
= ++
offset
;
int
nameEnd
=
nameStart
;
for
( ;
offset
<
length
;
offset
++) {
if
(
format
[
offset
] ==
'>'
) {
nameEnd
=
offset
;
offset
++;
break
;
}
}
if
(
nameEnd
==
nameStart
)
raiseArgumentError
(
args
,
ERR_MALFORMED_NAME
);
ByteList
newName
=
new
ByteList
(
format
,
nameStart
,
nameEnd
-
nameStart
,
encoding
,
false
);
if
(
name
!=
null
)
raiseArgumentError
(
args
,
"named<"
+
newString
(
context
,
newName
) +
"> after <"
+
newString
(
context
,
name
) +
">"
);
name
=
newName
;
// we retrieve value from hash so we can generate argument error as side-effect.
args
.
nextObject
=
args
.
getHashValue
(
name
,
'<'
,
'>'
);
break
;
}
case
'{'
: {
int
nameStart
= ++
offset
;
int
nameEnd
=
nameStart
;
for
( ;
offset
<
length
;
offset
++) {
if
(
format
[
offset
] ==
'}'
) {
nameEnd
=
offset
;
offset
++;
break
;
}
}
if
(
nameEnd
==
nameStart
)
raiseArgumentError
(
args
,
ERR_MALFORMED_NAME
);
ByteList
localName
=
new
ByteList
(
format
,
nameStart
,
nameEnd
-
nameStart
,
encoding
,
false
);
IRubyObject
value
=
args
.
getHashValue
(
localName
,
'{'
,
'}'
);
RubyString
str
= (
RubyString
)
TypeConverter
.
convertToType
(
value
,
stringClass
(
context
),
"to_s"
);
ByteList
bytes
=
str
.
getByteList
();
// peek to see if it has a format specifier. If not we need to handle it now.
if
(
offset
<
length
&& !
isFormatSpecifier
(
format
[
offset
]) ||
offset
==
length
) {
int
len
=
bytes
.
length
();
Encoding
enc
=
RubyString
.
checkEncoding
(
context
.
runtime
,
buf
,
bytes
);
if
((
flags
& (
FLAG_PRECISION
|
FLAG_WIDTH
)) !=
0
) {
int
strLen
=
str
.
strLength
();
if
((
flags
&
FLAG_PRECISION
) !=
0
&&
precision
<
strLen
) {
strLen
=
precision
;
len
=
StringSupport
.
nth
(
enc
,
bytes
.
getUnsafeBytes
(),
bytes
.
begin
(),
bytes
.
begin
() +
bytes
.
getRealSize
(),
precision
);
if
(
len
== -
1
)
len
=
0
;
// we might return -1 but MRI's rb_enc_nth does 0 for not-found
len
=
len
-
bytes
.
begin
();
}
/* need to adjust multi-byte string pos */
if
((
flags
&
FLAG_WIDTH
) !=
0
&&
width
>
strLen
) {
width
-=
strLen
;
if
((
flags
&
FLAG_MINUS
) ==
0
) {
buf
.
fill
(
' '
,
width
);
width
=
0
;
}
buf
.
append
(
bytes
.
getUnsafeBytes
(),
bytes
.
begin
(),
len
);
if
((
flags
&
FLAG_MINUS
) !=
0
) {
buf
.
fill
(
' '
,
width
);
}
buf
.
setEncoding
(
enc
);
offset
++;
incomplete
=
false
;
break
;
}
}
else
{
buf
.
append
(
bytes
);
incomplete
=
false
;
}
}
else
{
buf
.
append
(
bytes
);
incomplete
=
false
;
}
break
;
}
case
'*'
:
if
((
flags
&
FLAG_WIDTH
) !=
0
)
raiseArgumentError
(
args
,
"width given twice"
);
flags
|=
FLAG_WIDTH
;
int
[]
p_width
=
GETASTER
(
context
,
args
,
format
,
offset
,
length
,
true
);
offset
=
p_width
[
0
];
width
=
p_width
[
1
];
if
(
width
<
0
) {
flags
|=
FLAG_MINUS
;
width
= -
width
;
if
(
width
<
0
)
throw
argumentError
(
context
,
"width too big"
);
}
break
;
case
'.'
:
if
((
flags
&
FLAG_PRECISION
) !=
0
) {
raiseArgumentError
(
args
,
"precision given twice"
);
}
flags
|=
FLAG_PRECISION
;
checkOffset
(
args
, ++
offset
,
length
,
ERR_MALFORMED_DOT_NUM
);
fchar
=
format
[
offset
];
if
(
fchar
==
'*'
) {
int
[]
p_prec
=
GETASTER
(
context
,
args
,
format
,
offset
,
length
,
false
);
offset
=
p_prec
[
0
];
precision
=
p_prec
[
1
];
if
(
precision
<
0
) {
flags
&= ~
FLAG_PRECISION
;
}
break
;
}
// GETNUM(prec, precision) :
number
=
0
;
for
( ;
offset
<
length
&&
isDigit
(
fchar
=
format
[
offset
]);
offset
++) {
number
=
extendWidth
(
args
,
number
,
fchar
,
"width too big"
);
}
checkOffset
(
args
,
offset
,
length
,
ERR_MALFORMED_DOT_NUM
);
precision
=
number
;
//
break
;
case
'%'
:
if
(
flags
!=
FLAG_NONE
) {
raiseArgumentError
(
args
,
ERR_ILLEGAL_FORMAT_CHAR
);
}
buf
.
append
(
'%'
);
offset
++;
incomplete
=
false
;
break
;
case
'c'
: {
arg
=
args
.
getArg
();
int
c
;
int
n
;
IRubyObject
tmp
=
arg
.
checkStringType
();
if
(!
tmp
.
isNil
()) {
if
(((
RubyString
)
tmp
).
strLength
() ==
0
) {
c
=
0
;
n
=
0
;
}
else
{
ByteList
bl
= ((
RubyString
)
tmp
).
getByteList
();
c
=
StringSupport
.
codePoint
(
context
,
encoding
,
bl
.
unsafeBytes
(),
bl
.
begin
(),
bl
.
begin
() +
bl
.
realSize
());
n
=
StringSupport
.
codeLength
(
bl
.
getEncoding
(),
c
);
}
}
else
{
c
= (
int
)
toLong
(
context
,
arg
) &
0xFFFFFFFF
;
if
(
c
>=
0
) {
try
{
n
=
StringSupport
.
codeLength
(
encoding
,
c
);
}
catch
(
EncodingException
e
) {
n
= -
1
;
}
}
else
{
n
= -
1
;
}
}
if
(
n
<=
0
)
throw
argumentError
(
context
,
"invalid character"
);
Encoding
appendableEncoding
=
EncodingUtils
.
rbAscii8bitAppendableEncodingIndex
(
context
,
encoding
,
c
);
if
(
appendableEncoding
!=
null
&&
appendableEncoding
!=
encoding
) {
buf
.
setEncoding
(
appendableEncoding
);
encoding
=
appendableEncoding
;
}
if
((
flags
&
FLAG_WIDTH
) ==
0
) {
buf
.
ensure
(
buf
.
length
() +
n
);
EncodingUtils
.
encMbcput
(
context
,
c
,
buf
.
unsafeBytes
(),
buf
.
begin
() +
buf
.
realSize
(),
encoding
);
buf
.
realSize
(
buf
.
realSize
() +
n
);
}
else
if
((
flags
&
FLAG_MINUS
) !=
0
) {
buf
.
ensure
(
buf
.
length
() +
n
);
EncodingUtils
.
encMbcput
(
context
,
c
,
buf
.
unsafeBytes
(),
buf
.
begin
() +
buf
.
realSize
(),
encoding
);
buf
.
realSize
(
buf
.
realSize
() +
n
);
buf
.
fill
(
' '
,
width
-
n
);
}
else
{
buf
.
fill
(
' '
,
width
-
n
);
buf
.
ensure
(
buf
.
length
() +
n
);
EncodingUtils
.
encMbcput
(
context
,
c
,
buf
.
unsafeBytes
(),
buf
.
begin
() +
buf
.
realSize
(),
encoding
);
buf
.
realSize
(
buf
.
realSize
() +
n
);
}
offset
++;
incomplete
=
false
;
break
;
}
case
'a'
:
case
'A'
: {
arg
=
args
.
getArg
();
ByteList
bytes
=
new
ByteList
();
final
boolean
positive
=
isPositive
(
context
,
arg
);
double
fval
=
RubyKernel
.
new_float
(
context
,
arg
).
asDouble
(
context
);
boolean
negative
=
fval
<
0.0d
|| (
fval
==
0.0d
&&
Double
.
doubleToLongBits
(
fval
) ==
Double
.
doubleToLongBits
(-
0.0
));
boolean
isnan
=
Double
.
isNaN
(
fval
);
boolean
isinf
=
fval
==
Double
.
POSITIVE_INFINITY
||
fval
==
Double
.
NEGATIVE_INFINITY
;
if
(
isnan
||
isinf
) {
printSpecialValue
(
buf
,
flags
,
width
,
isnan
,
negative
);
offset
++;
incomplete
=
false
;
break
;
}
if
((
flags
&
FLAG_MINUS
) !=
0
) {
if
(!
positive
) {
bytes
.
append
(
'-'
);
}
else
if
((
flags
&
FLAG_PLUS
) !=
0
) {
bytes
.
append
(
'+'
);
}
else
if
((
flags
&
FLAG_SPACE
) !=
0
) {
bytes
.
append
(
' '
);
}
bytes
.
append
(
'0'
);
bytes
.
append
(
fchar
==
'a'
?
'x'
:
'X'
);
}
precision
=
generateBinaryFloat
(
context
,
flags
,
precision
,
fchar
,
bytes
,
arg
);
int
bytesLength
=
bytes
.
length
();
// We know numbers will be 7 bit ascii.
if
((
flags
&
FLAG_MINUS
) ==
0
) {
if
(!
positive
) {
buf
.
append
(
'-'
);
}
else
if
((
flags
&
FLAG_PLUS
) !=
0
) {
buf
.
append
(
'+'
);
}
else
if
((
flags
&
FLAG_SPACE
) !=
0
) {
buf
.
append
(
' '
);
}
}
if
((
flags
&
FLAG_MINUS
) ==
0
&&
width
<=
bytesLength
) {
buf
.
append
(
'0'
);
buf
.
append
(
fchar
==
'a'
?
'x'
:
'X'
);
}
else
if
(
width
>
bytesLength
) {
if
((
flags
&
FLAG_ZERO
) !=
0
) {
buf
.
append
(
'0'
);
buf
.
append
(
fchar
==
'a'
?
'x'
:
'X'
);
buf
.
fill
(
'0'
,
width
-
bytesLength
-
2
);
}
else
if
((
flags
&
FLAG_MINUS
) ==
0
) {
buf
.
fill
(
' '
,
width
-
bytesLength
-
2
);
buf
.
append
(
'0'
);
buf
.
append
(
fchar
==
'a'
?
'x'
:
'X'
);
}
}
buf
.
append
(
bytes
);
if
(
width
>
bytesLength
&& ((
flags
&
FLAG_MINUS
) !=
0
)) {
buf
.
fill
(
' '
,
width
-
bytesLength
);
}
offset
++;
incomplete
=
false
;
break
;
}
case
'p'
:
case
's'
: {
// format_s:
arg
=
args
.
getArg
();
if
(
fchar
==
'p'
) {
arg
=
arg
.
callMethod
(
context
,
"inspect"
);
}
RubyString
str
=
arg
.
asString
();
ByteList
bytes
=
str
.
getByteList
();
int
len
=
bytes
.
length
();
Encoding
enc
=
RubyString
.
checkEncoding
(
context
.
runtime
,
buf
,
bytes
);
if
((
flags
& (
FLAG_PRECISION
|
FLAG_WIDTH
)) !=
0
) {
int
strLen
=
str
.
strLength
();
if
((
flags
&
FLAG_PRECISION
) !=
0
&&
precision
<
strLen
) {
strLen
=
precision
;
len
=
StringSupport
.
nth
(
enc
,
bytes
.
getUnsafeBytes
(),
bytes
.
begin
(),
bytes
.
begin
() +
bytes
.
getRealSize
(),
precision
);
if
(
len
== -
1
)
len
=
0
;
// we might return -1 but MRI's rb_enc_nth does 0 for not-found
len
=
len
-
bytes
.
begin
();
}
/* need to adjust multi-byte string pos */
if
((
flags
&
FLAG_WIDTH
) !=
0
&&
width
>
strLen
) {
width
-=
strLen
;
if
((
flags
&
FLAG_MINUS
) ==
0
) {
buf
.
fill
(
' '
,
width
);
width
=
0
;
}
buf
.
append
(
bytes
.
getUnsafeBytes
(),
bytes
.
begin
(),
len
);
if
((
flags
&
FLAG_MINUS
) !=
0
) {
buf
.
fill
(
' '
,
width
);
}
buf
.
setEncoding
(
enc
);
offset
++;
incomplete
=
false
;
break
;
}
}
buf
.
append
(
bytes
.
getUnsafeBytes
(),
bytes
.
begin
(),
len
);
buf
.
setEncoding
(
enc
);
offset
++;
incomplete
=
false
;
break
;
}
case
'd'
:
case
'i'
:
case
'o'
:
case
'x'
:
case
'X'
:
case
'b'
:
case
'B'
:
case
'u'
: {
arg
=
args
.
getArg
();
switch
(
arg
.
getMetaClass
().
getClassIndex
()) {
case
INTEGER
:
// no-op
break
;
case
FLOAT
:
arg
=
asInteger
(
context
, ((
RubyFloat
)
arg
).
asDouble
(
context
));
break
;
case
STRING
:
arg
= ((
RubyString
)
arg
).
stringToInum
(
0
,
true
);
break
;
default
:
arg
=
TypeConverter
.
convertToInteger
(
context
,
arg
,
0
);
if
(!(
arg
instanceof
RubyInteger
))
throw
typeError
(
context
,
arg
,
integerClass
(
context
));
break
;
}
byte
[]
bytes
;
int
first
=
0
;
final
boolean
sign
,
negative
;
byte
signChar
=
0
;
byte
leadChar
=
0
;
switch
(
fchar
) {
case
'd'
:
case
'i'
:
fchar
=
'd'
;
// 'd' and 'i' are the same
sign
=
true
;
break
;
case
'u'
:
if
((
flags
& (
FLAG_PLUS
|
FLAG_SPACE
)) !=
0
)
fchar
=
'd'
;
sign
=
true
;
break
;
case
'o'
:
case
'x'
:
case
'X'
:
case
'b'
:
case
'B'
:
sign
= (
flags
& (
FLAG_PLUS
|
FLAG_SPACE
)) !=
0
;
break
;
default
:
sign
=
false
;
break
;
}
final
int
base
;
switch
(
fchar
) {
case
'o'
:
base
=
8
;
break
;
case
'x'
:
case
'X'
:
base
=
16
;
break
;
case
'b'
:
case
'B'
:
base
=
2
;
break
;
// case 'u': case 'd': case 'i':
default
:
base
=
10
;
break
;
}
// We depart here from strict adherence to MRI code, as MRI
// uses C-sprintf, in part, to format numeric output, while
// we'll use Java's numeric formatting code (and our own).
boolean
zero
;
if
(
arg
instanceof
RubyFixnum
fixnum
) {
final
long
v
=
fixnum
.
getValue
();
negative
=
v
<
0
;
zero
=
v
==
0
;
if
(
negative
&&
fchar
==
'u'
) {
bytes
=
getUnsignedNegativeBytes
(
v
);
}
else
{
bytes
=
getFixnumBytes
(
v
,
base
,
sign
,
fchar
==
'X'
);
}
}
else
{
final
BigInteger
v
= ((
RubyBignum
)
arg
).
getValue
();
negative
=
v
.
signum
() <
0
;
zero
=
v
.
signum
() ==
0
;
if
(
negative
&&
fchar
==
'u'
&&
usePrefixForZero
) {
bytes
=
getUnsignedNegativeBytes
(
v
);
}
else
{
bytes
=
getBignumBytes
(
v
,
base
,
sign
,
fchar
==
'X'
);
}
}
//
byte
[]
prefix
=
null
;
if
((
flags
&
FLAG_SHARP
) !=
0
) {
if
(!
zero
||
usePrefixForZero
) {
switch
(
fchar
) {
case
'o'
:
if
(!
negative
)
prefix
=
PREFIX_OCTAL
;
break
;
case
'x'
:
prefix
=
PREFIX_HEX_LC
;
break
;
case
'X'
:
prefix
=
PREFIX_HEX_UC
;
break
;
case
'b'
:
prefix
=
PREFIX_BINARY_LC
;
break
;
case
'B'
:
prefix
=
PREFIX_BINARY_UC
;
break
;
}
if
(
prefix
!=
null
)
width
-=
prefix
.
length
;
}
}
int
len
=
0
;
if
(
sign
) {
if
(
negative
) {
signChar
=
'-'
;
width
--;
first
=
1
;
// skip '-' in bytes, will add where appropriate
}
else
if
((
flags
&
FLAG_PLUS
) !=
0
) {
signChar
=
'+'
;
width
--;
}
else
if
((
flags
&
FLAG_SPACE
) !=
0
) {
signChar
=
' '
;
width
--;
}
}
else
if
(
negative
) {
if
(
base
==
10
) {
Warn
.
warning
(
context
,
"negative number for %u specifier"
);
leadChar
=
'.'
;
len
+=
2
;
}
else
{
if
((
flags
& (
FLAG_PRECISION
|
FLAG_ZERO
)) ==
0
)
len
+=
2
;
// ..
first
=
skipSignBits
(
bytes
,
base
);
switch
(
fchar
) {
case
'b'
:
case
'B'
:
leadChar
=
'1'
;
break
;
case
'o'
:
leadChar
=
'7'
;
break
;
case
'x'
:
leadChar
=
'f'
;
break
;
case
'X'
:
leadChar
=
'F'
;
break
;
}
if
(
leadChar
!=
0
)
len
++;
}
}
int
numlen
=
bytes
.
length
-
first
;
switch
(
fchar
) {
case
'd'
:
case
'i'
:
case
'u'
:
// If the precision is 0 and the value is 0, nothing is written.
if
((
flags
&
FLAG_PRECISION
) !=
0
&&
precision
==
0
&&
zero
) {
numlen
=
0
;
}
}
len
+=
numlen
;
if
((
flags
& (
FLAG_ZERO
|
FLAG_PRECISION
)) ==
FLAG_ZERO
) {
precision
=
width
;
width
=
0
;
}
else
{
if
(
precision
<
len
)
precision
=
len
;
width
-=
precision
;
}
if
((
flags
&
FLAG_MINUS
) ==
0
) {
buf
.
fill
(
' '
,
width
);
width
=
0
;
}
if
(
signChar
!=
0
)
buf
.
append
(
signChar
);
if
(
prefix
!=
null
)
buf
.
append
(
prefix
);
if
(
len
<
precision
) {
if
(
leadChar
==
0
) {
if
(
fchar
!=
'd'
||
usePrefixForZero
|| !
negative
||
(
flags
&
FLAG_PRECISION
) !=
0
||
((
flags
&
FLAG_ZERO
) !=
0
&& (
flags
&
FLAG_MINUS
) ==
0
)) {
buf
.
fill
(
'0'
,
precision
-
len
);
}
}
else
if
(
leadChar
==
'.'
) {
buf
.
fill
(
leadChar
,
precision
-
len
);
buf
.
append
(
PREFIX_NEGATIVE
);
}
else
if
(!
usePrefixForZero
) {
buf
.
append
(
PREFIX_NEGATIVE
);
buf
.
fill
(
leadChar
,
precision
-
len
-
1
);
}
else
{
buf
.
fill
(
leadChar
,
precision
-
len
+
1
);
// the 1 is for the stripped sign char
}
}
else
if
(
leadChar
!=
0
) {
if
(((
flags
& (
FLAG_PRECISION
|
FLAG_ZERO
)) ==
0
&&
usePrefixForZero
) ||
(!
usePrefixForZero
&&
"xXbBo"
.
indexOf
(
fchar
) != -
1
)) {
buf
.
append
(
PREFIX_NEGATIVE
);
}
if
(
leadChar
!=
'.'
)
buf
.
append
(
leadChar
);
}
buf
.
append
(
bytes
,
first
,
numlen
);
if
(
width
>
0
)
buf
.
fill
(
' '
,
width
);
if
(
len
<
precision
&&
fchar
==
'd'
&&
negative
&&
!
usePrefixForZero
&& (
flags
&
FLAG_MINUS
) !=
0
) {
buf
.
fill
(
' '
,
precision
-
len
);
}
offset
++;
incomplete
=
false
;
break
;
}
case
'f'
: {
arg
=
args
.
getArg
();
RubyInteger
num
,
den
;
byte
sign
= (
flags
&
FLAG_PLUS
) !=
0
? (
byte
)
1
: (
byte
)
0
;
int
zero
=
0
;
if
(
arg
instanceof
RubyInteger
) {
den
=
asFixnum
(
context
,
1
);
num
= (
RubyInteger
)
arg
;
}
else
if
(
arg
instanceof
RubyRational
) {
den
= ((
RubyRational
)
arg
).
getDenominator
();
num
= ((
RubyRational
)
arg
).
getNumerator
();
}
else
{
args
.
nextObject
=
arg
;
// goto float_value;
num
=
null
;
den
=
null
;
}
if
(
num
!=
null
) {
// else -> goto float_value;
if
((
flags
&
FLAG_PRECISION
) ==
0
)
precision
=
6
;
// default_float_precision;
if
(
num
.
isNegativeNumber
(
context
)) {
num
= (
RubyInteger
)
num
.
op_uminus
(
context
);
sign
= -
1
;
}
if
(!(
den
instanceof
RubyFixnum
fixnum
) ||
fixnum
.
getValue
() !=
1
) {
num
= (
RubyInteger
)
num
.
op_mul
(
context
,
Numeric
.
int_pow
(
context
,
10
,
precision
));
num
= (
RubyInteger
)
num
.
op_plus
(
context
,
den
.
idiv
(
context
,
2
));
num
= (
RubyInteger
)
num
.
idiv
(
context
,
den
);
}
else
if
(
precision
>=
0
) {
zero
=
precision
;
}
RubyString
val
=
num
.
to_s
(
context
);
int
len
=
val
.
length
() +
zero
;
if
(
precision
>=
len
)
len
=
precision
+
1
;
// integer part 0
if
(
sign
!=
0
|| (
flags
&
FLAG_SPACE
) !=
0
) ++
len
;
if
(
precision
>
0
) ++
len
;
// period
int
fill
=
width
>
len
?
width
-
len
:
0
;
// CHECK(fill + len)
buf
.
ensure
(
buf
.
length
() +
fill
+
len
);
if
(
fill
>
0
&& (
flags
& (
FLAG_MINUS
|
FLAG_ZERO
)) ==
0
) {
buf
.
fill
(
' '
,
fill
);
}
if
(
sign
!=
0
|| (
flags
&
FLAG_SPACE
) !=
0
) {
buf
.
append
(
sign
>
0
?
'+'
:
sign
<
0
?
'-'
:
' '
);
}
if
(
fill
>
0
&& (
flags
& (
FLAG_MINUS
|
FLAG_ZERO
)) ==
FLAG_ZERO
) {
buf
.
fill
(
'0'
,
fill
);
}
len
=
val
.
length
() +
zero
;
// t = RSTRING_PTR(val);
if
(
len
>
precision
) {
// PUSH_(t, len - prec) :
buf
.
append
(
val
.
getByteList
(),
0
,
len
-
precision
);
}
else
{
buf
.
append
(
'0'
);
}
if
(
precision
>
0
) {
buf
.
append
(
'.'
);
}
if
(
zero
>
0
) {
buf
.
fill
(
'0'
,
zero
);
}
else
if
(
precision
>
len
) {
buf
.
fill
(
'0'
,
precision
-
len
);
// PUSH_(t, len) :
buf
.
append
(
val
.
getByteList
(),
0
,
len
);
}
else
if
(
precision
>
0
) {
// PUSH_(t + len - prec, prec) :
buf
.
append
(
val
.
getByteList
(),
len
-
precision
,
precision
);
}
if
(
fill
>
0
&& (
flags
&
FLAG_MINUS
) !=
0
) {
buf
.
fill
(
' '
,
fill
);
}
offset
++;
incomplete
=
false
;
break
;
}
}
case
'E'
:
case
'e'
:
case
'G'
:
case
'g'
:
float_value
: {
arg
=
args
.
getArg
();
double
fval
=
RubyKernel
.
new_float
(
context
,
arg
).
asDouble
(
context
);
boolean
isnan
=
Double
.
isNaN
(
fval
);
boolean
isinf
=
fval
==
Double
.
POSITIVE_INFINITY
||
fval
==
Double
.
NEGATIVE_INFINITY
;
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL