mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-30 17:43:57 +01:00
Remove obsolete code for Erlang/OTP older than 20.0
This commit is contained in:
parent
0d31482647
commit
9a6bd83aa1
@ -598,17 +598,9 @@ get_shell_info() ->
|
|||||||
_:_ -> {78, false}
|
_:_ -> {78, false}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% Erlang/OTP 20.0 introduced string:find/2, but we must support old 19.3
|
|
||||||
string_find([], _SearchPattern) ->
|
|
||||||
nomatch;
|
|
||||||
string_find([A | String], [A]) ->
|
|
||||||
String;
|
|
||||||
string_find([_ | String], SearchPattern) ->
|
|
||||||
string_find(String, SearchPattern).
|
|
||||||
|
|
||||||
%% Split this command description in several lines of proper length
|
%% Split this command description in several lines of proper length
|
||||||
prepare_description(DescInit, MaxC, Desc) ->
|
prepare_description(DescInit, MaxC, Desc) ->
|
||||||
case string_find(Desc, "\n") of
|
case string:find(Desc, "\n") of
|
||||||
nomatch ->
|
nomatch ->
|
||||||
prepare_description2(DescInit, MaxC, Desc);
|
prepare_description2(DescInit, MaxC, Desc);
|
||||||
_ ->
|
_ ->
|
||||||
|
Loading…
Reference in New Issue
Block a user