Skip to content

Commit

Permalink
Remove 'export_all' compile option and export public functions explic…
Browse files Browse the repository at this point in the history
…itly

Unlike the testsuite, modules updated by this patch have been updated to export
explicitly public functions instead of using 'expor_all' compile option. This
remove compilation errors in Erlang/OTP 20.
  • Loading branch information
capflam committed Apr 21, 2017
1 parent 8775ba2 commit 7088c72
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion applications/mail/src/attachment.erl
Expand Up @@ -6,7 +6,8 @@
%%% Created : 4 Feb 2004 by <klacke@hyber.org>
%%%-------------------------------------------------------------------
-module(attachment).
-compile(export_all).

-export([out/1]).

out(A) ->
case mail:check_session(A) of
Expand Down
8 changes: 7 additions & 1 deletion applications/wiki/src/wiki.erl
Expand Up @@ -21,7 +21,6 @@

-module('wiki').
-author('jb@son.bevemyr.com').
-compile(export_all).

-export([showPage/3, createNewPage/3, showHistory/3, allPages/3,
lastEdited/3, wikiZombies/3, editPage/3, editFiles/3,
Expand All @@ -42,6 +41,13 @@
-export([getPassword/1]).
-export([importFiles/1]).

%% Function exported to avoid warnings
-export([copyFiles2/3, session_proc/2, textarea/3, b/1, br/0,
pre/1, bgcolor/1, top_header/1, add_blanks_nicely/1,
big_letter/1, little_letter/1, show_error/1,
str2fileencoded/1, fileencoded2str/1, mime_type/1,
check_precon/2, getopt_options/2]).

-import(lists, [reverse/1, map/2, sort/1]).

-import(wiki_templates, [template/5, template2/5]).
Expand Down
4 changes: 2 additions & 2 deletions applications/wiki/src/wiki_format_txt.erl
Expand Up @@ -45,8 +45,8 @@
%% and the * (or Header) and Text
%% are not significant.

-export([format/3, collect_wiki_link/1]).
-compile(export_all).
-export([format/3, format_url/2, collect_wiki_link/1, emb/4,
enc_month/1, enc_day/1]).

-import(lists, [member/2, map/2, reverse/1, reverse/2]).

Expand Down
3 changes: 2 additions & 1 deletion www/code/myappmod.erl
Expand Up @@ -2,7 +2,8 @@
-author('klacke@bluetail.com').

-include("../../include/yaws_api.hrl").
-compile(export_all).

-export([out/1]).

box(Str) ->
{'div',[{class,"box"}],
Expand Down
2 changes: 1 addition & 1 deletion www/shoppingcart/shopcart.erl
Expand Up @@ -7,10 +7,10 @@
-module(shopcart).
-author('klacke@hyber.org').

-compile(export_all).
-include("../../include/yaws_api.hrl").
-include_lib("kernel/include/inet.hrl").

-export([top/1, buy/1, index/1, loginpost/1, login/1, logout/1, formupdate/1]).

%% this is the opaque structure we pass to the
%% yaws cookie session server
Expand Down

0 comments on commit 7088c72

Please sign in to comment.