Changeset 7 in code for trunk/lib/header_pack.ml
- Timestamp:
- Jun 18, 2022, 8:45:45 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/header_pack.ml
r3 r7 69 69 | _ -> prerr_endline ("Invalid record pattern"); false 70 70 71 let numof_texts pack = List.length (Msgpck.to_list pack.texts) 72 73 let iteri fn pack = 74 let of_pck i = function Msgpck.List (id::time::title::authors::topics::[]) -> 75 let t = match time with Msgpck.Int i -> Int32.of_int i | Msgpck.Uint32 i -> i 76 | x -> Msgpck.to_uint32 x in 77 let id = to_id id in 78 let title = Msgpck.to_string title in 79 let topics = to_str_list topics in 80 let authors = to_str_list authors in 81 fn i id t title authors topics 82 | _ -> prerr_endline ("\n\nInvalid record structure\n\n") 83 in List.iteri of_pck (Msgpck.to_list pack.texts); 71 84 72 85 (*let pack_filename ?(filename="index.pck") archive =*)
Note:
See TracChangeset
for help on using the changeset viewer.