aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_name.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-21 13:15:43 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:12 +0200
commit988846bb26e652ad2272fac24a679259059bcf39 (patch)
tree55eba4234efcde03a4d62797efd1f89b299f0b6c /lib/asn1/src/asn1ct_name.erl
parentdf4fe8fac6425a85c5366e540b588b6e084ca798 (diff)
downloadotp-988846bb26e652ad2272fac24a679259059bcf39.tar.gz
otp-988846bb26e652ad2272fac24a679259059bcf39.tar.bz2
otp-988846bb26e652ad2272fac24a679259059bcf39.zip
asn1ct_name: Remove unused functions
asn1ct_name:delete/1 is used from asn1ct_gen_ber_bin_v2:add_removed_bytes/1, but that function is not used.
Diffstat (limited to 'lib/asn1/src/asn1ct_name.erl')
-rw-r--r--lib/asn1/src/asn1ct_name.erl51
1 files changed, 0 insertions, 51 deletions
diff --git a/lib/asn1/src/asn1ct_name.erl b/lib/asn1/src/asn1ct_name.erl
index 3ab6f7b0ed..24b28ade7e 100644
--- a/lib/asn1/src/asn1ct_name.erl
+++ b/lib/asn1/src/asn1ct_name.erl
@@ -22,11 +22,8 @@
%%-compile(export_all).
-export([start/0,
stop/0,
- push/1,
- pop/1,
curr/1,
clear/0,
- delete/1,
active/1,
prev/1,
next/1,
@@ -56,15 +53,6 @@ name_server_loop({Ref, Parent} = Monitor,Vars) ->
{From,{current,Variable}} ->
From ! {?MODULE,get_curr(Vars,Variable)},
name_server_loop(Monitor,Vars);
- {From,{pop,Variable}} ->
- From ! {?MODULE,done},
- name_server_loop(Monitor,pop_var(Vars,Variable));
- {From,{push,Variable}} ->
- From ! {?MODULE,done},
- name_server_loop(Monitor,push_var(Vars,Variable));
- {From,{delete,Variable}} ->
- From ! {?MODULE,done},
- name_server_loop(Monitor,delete_var(Vars,Variable));
{From,{new,Variable}} ->
From ! {?MODULE,done},
name_server_loop(Monitor,new_var(Vars,Variable));
@@ -94,12 +82,9 @@ req(Req) ->
exit(name_server_timeout)
end.
-pop(V) -> req({pop,V}).
-push(V) -> req({push,V}).
clear() -> stop(), start().
curr(V) -> req({current,V}).
new(V) -> req({new,V}).
-delete(V) -> req({delete,V}).
prev(V) ->
case req({prev,V}) of
none ->
@@ -146,26 +131,6 @@ get_digs([H|T]) ->
[]
end.
-push_var(Vars,Variable) ->
- case lists:keysearch(Variable,1,Vars) of
- false ->
- [{Variable,[0]}|Vars];
- {value,{Variable,[Digit|Drest]}} ->
- NewVars = lists:keydelete(Variable,1,Vars),
- [{Variable,[Digit,Digit|Drest]}|NewVars]
- end.
-
-pop_var(Vars,Variable) ->
- case lists:keysearch(Variable,1,Vars) of
- false ->
- ok;
- {value,{Variable,[_Dig]}} ->
- lists:keydelete(Variable,1,Vars);
- {value,{Variable,[_Dig|Digits]}} ->
- NewVars = lists:keydelete(Variable,1,Vars),
- [{Variable,Digits}|NewVars]
- end.
-
get_curr([],Variable) ->
Variable;
get_curr([{Variable,[0|_Drest]}|_Tail],Variable) ->
@@ -185,22 +150,6 @@ new_var(Vars,Variable) ->
[{Variable,[Digit+1|Drest]}|NewVars]
end.
-delete_var(Vars,Variable) ->
- case lists:keysearch(Variable,1,Vars) of
- false ->
- Vars;
- {value,{Variable,[N]}} when N =< 1 ->
- lists:keydelete(Variable,1,Vars);
- {value,{Variable,[Digit|Drest]}} ->
- case Digit of
- 0 ->
- Vars;
- _ ->
- NewVars = lists:keydelete(Variable,1,Vars),
- [{Variable,[Digit-1|Drest]}|NewVars]
- end
- end.
-
get_prev(Vars,Variable) ->
case lists:keysearch(Variable,1,Vars) of
false ->