468 |
else None |
else None |
469 |
|
|
470 |
let decode_bow s = |
let decode_bow s = |
471 |
if "BOW" = String.sub s 0 3 then |
if "BOW" = String.sub s 0 3 || |
472 |
|
(check_all s 45 [0;7] && "BOW" = String.sub s 1 4) then |
473 |
Some (Brand_bitsonwheels, (String.sub s 4 3)) |
Some (Brand_bitsonwheels, (String.sub s 4 3)) |
474 |
else None |
else None |
475 |
|
|
528 |
let brand = if "LORD" = String.sub s 6 4 then |
let brand = if "LORD" = String.sub s 6 4 then |
529 |
Brand_bitlord else Brand_bitcomet |
Brand_bitlord else Brand_bitcomet |
530 |
in |
in |
531 |
let version = Printf.sprintf "%d.%d%d" |
let versionMajorNumber = int_of_char s.[4] in |
532 |
(int_of_char s.[4]) |
let versionMinorNubmer = |
533 |
((int_of_char s.[5]) / 10) |
match versionMajorNumber with |
534 |
((int_of_char s.[5]) mod 10) |
0 -> (int_of_char s.[5]) |
535 |
|
| _ -> ((int_of_char s.[5]) mod 10) |
536 |
in |
in |
537 |
|
let version = Printf.sprintf "%d.%d" |
538 |
|
versionMajorNumber versionMinorNubmer in |
539 |
Some (brand, version) |
Some (brand, version) |
540 |
else None |
else None |
541 |
|
|