aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-10-27 12:27:33 +0200
committerBjörn Gustavsson <[email protected]>2011-10-27 12:27:33 +0200
commita971c9568ccebed4e8d00abf52faa59a2bcc1c18 (patch)
tree1a39c38bce2e27954ea772e80224069b41e5bcd9 /lib/gs
parent86e4b23fb4a11f18834e6b1be76642fbd71b9cf7 (diff)
parent3e8720728abe875683ad54fa4d93ba83df609f57 (diff)
downloadotp-a971c9568ccebed4e8d00abf52faa59a2bcc1c18.tar.gz
otp-a971c9568ccebed4e8d00abf52faa59a2bcc1c18.tar.bz2
otp-a971c9568ccebed4e8d00abf52faa59a2bcc1c18.zip
Merge branch 'bjorn/eliminate-regexp-usage'
* bjorn/eliminate-regexp-usage: erl_tidy: Eliminate two references to 'regexp' in the documentation erts/z_SUITE: Eliminate use of deprecated regexp module erts/nt_SUITE: Eliminate use of deprecated regexp module erl_html_tools: Eliminate mention of deprecated regexp module erl_interface tests: Eliminate use of deprecated regexp module tools test suite: Eliminate compilation warnings for the eed module tools test suite: Eliminate use of deprecated regexp module xmerl test suite: Eliminate use of deprecated regexp module appmon: Eliminate use of deprecated regexp module tv: Eliminate use of deprecated regexp module gs: Eliminate use of deprecated regexp module inviso: Eliminate use of deprecated regexp module
Diffstat (limited to 'lib/gs')
-rw-r--r--lib/gs/src/gstk_editor.erl4
-rw-r--r--lib/gs/src/gstk_generic.erl2
-rw-r--r--lib/gs/src/gstk_image.erl4
-rw-r--r--lib/gs/src/tool_utils.erl3
4 files changed, 7 insertions, 6 deletions
diff --git a/lib/gs/src/gstk_editor.erl b/lib/gs/src/gstk_editor.erl
index 3e0c8240e4..8cc7021cc6 100644
--- a/lib/gs/src/gstk_editor.erl
+++ b/lib/gs/src/gstk_editor.erl
@@ -243,14 +243,14 @@ option(Option, Gstkid, _MainW, DB, Editor) ->
Editor, " ins ",AI," ", gstk:to_ascii(Text)]};
clear -> {c, [Editor, " delete 1.0 end"]};
{load, File} ->
- {ok, F2,_} = regexp:gsub(File, [92,92], "/"),
+ F2 = re:replace(File, [92,92], "/", [global,{return,list}]),
case gstk:call(["ed_load ", Editor, " ", gstk:to_ascii(F2)]) of
{result, _} -> none;
{bad_result,Re} ->
{error,{no_such_file,editor,load,F2,Re}}
end;
{save, File} ->
- {ok, F2,_} = regexp:gsub(File, [92,92], "/"),
+ F2 = re:replace(File, [92,92], "/", [global,{return,list}]),
case gstk:call(["ed_save ",Editor," ",gstk:to_ascii(F2)]) of
{result, _} -> none;
{bad_result,Re} ->
diff --git a/lib/gs/src/gstk_generic.erl b/lib/gs/src/gstk_generic.erl
index 3ddb69efc5..2cc6c4c2d3 100644
--- a/lib/gs/src/gstk_generic.erl
+++ b/lib/gs/src/gstk_generic.erl
@@ -414,7 +414,7 @@ gen_font(_Opt,Gstkid,_TkW,DB,_ExtraArg) ->
gen_label({text,Text},Opts,Gstkid,TkW,DB,ExtraArg,S,P,C) ->
out_opts(Opts,Gstkid,TkW,DB,ExtraArg,[" -text ", gstk:to_ascii(Text), " -bi {}"|S],P,C);
gen_label({image,Img},Opts,Gstkid,TkW,DB,ExtraArg,S,P,C) ->
- {ok, I2,_} = regexp:gsub(Img, [92,92], "/"),
+ I2 = re:replace(Img, [92,92], "/", [global,{return,list}]),
out_opts(Opts,Gstkid,TkW,DB,ExtraArg,[" -bi \"@", I2, "\" -text {}"|S],P,C).
gen_label(_Opt,_Gstkid,TkW,_DB,_ExtraArg) ->
case gstk:call([TkW, " cg -bit"]) of
diff --git a/lib/gs/src/gstk_image.erl b/lib/gs/src/gstk_image.erl
index 5ad37cf6de..9adbe42386 100644
--- a/lib/gs/src/gstk_image.erl
+++ b/lib/gs/src/gstk_image.erl
@@ -227,10 +227,10 @@ event(DB, Gstkid, Etype, Edata, Args) ->
option(Option, Gstkid, _Canvas, _DB, _AItem) ->
case Option of
{bitmap, Bitmap} ->
- {ok, BF,_} = regexp:gsub(Bitmap, [92,92], "/"),
+ BF = re:replace(Bitmap, [92,92], "/", [global,{return,list}]),
{s, [" -bi @", BF]};
{load_gif, File} ->
- {ok, F2,_} = regexp:gsub(File, [92,92], "/"),
+ F2 = re:replace(File, [92,92], "/", [global,{return,list}]),
{Photo_item, _item} = Gstkid#gstkid.widget_data,
{c,[Photo_item, " configure -file ", gstk:to_ascii(F2)]};
{pix_val, {Coords,Color}} ->
diff --git a/lib/gs/src/tool_utils.erl b/lib/gs/src/tool_utils.erl
index b07e92c4f0..d09af5f22f 100644
--- a/lib/gs/src/tool_utils.erl
+++ b/lib/gs/src/tool_utils.erl
@@ -98,7 +98,8 @@ open_help_default(Parent, File) ->
_Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
end;
{win32,_AnyType} ->
- "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/");
+ "netscape.exe -h " ++
+ re:replace(File,"\\\\","/",[global,{return,list}]);
_Other ->
unknown
end;