From c9a74b5be9a0461d5f864c56e6fb1c0fce13f16b Mon Sep 17 00:00:00 2001 From: Phillip Toland Date: Thu, 11 Dec 2008 15:15:25 -0600 Subject: [PATCH] Added some function documentation. --- src/bdberl_port.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bdberl_port.erl b/src/bdberl_port.erl index 46eb48b..12bc80b 100644 --- a/src/bdberl_port.erl +++ b/src/bdberl_port.erl @@ -157,12 +157,18 @@ to_binary(Term) -> Bin = term_to_binary(Term), {size(Bin), Bin}. - +%% +%% Given an array of options, produce a single integer with the numeric values +%% of the options joined with binary OR +%% process_flags([]) -> 0; process_flags([Flag|Flags]) -> flag_value(Flag) bor process_flags(Flags). +%% +%% Given an option as an atom, return the numeric value +%% flag_value(Flag) -> case Flag of append -> ?DB_APPEND;