diff options
Diffstat (limited to 'lib/gs')
48 files changed, 304 insertions, 97 deletions
diff --git a/lib/gs/contribs/bonk/bonk.erl b/lib/gs/contribs/bonk/bonk.erl index 79f01bf659..7e68a4ddc5 100644 --- a/lib/gs/contribs/bonk/bonk.erl +++ b/lib/gs/contribs/bonk/bonk.erl @@ -19,6 +19,12 @@ %% -module(bonk). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,start,0}}]). + -export([run/0, run/1,bonk_dir/0,start/0]). -record(colors, {miss, x, bomb, face}). diff --git a/lib/gs/contribs/bonk/sounder.erl b/lib/gs/contribs/bonk/sounder.erl index 11ab03d167..e6f69a1616 100644 --- a/lib/gs/contribs/bonk/sounder.erl +++ b/lib/gs/contribs/bonk/sounder.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -72,13 +72,13 @@ stop() -> sounder ! {stop}, ok end. -new(File) when list(File) -> new(list_to_atom(File)); -new(File) when atom(File) -> +new(File) when is_list(File) -> new(list_to_atom(File)); +new(File) when is_atom(File) -> catch begin check(), sounder ! {new,File,self()}, wait_for_ack(sounder) end. -play(No) when integer(No) -> +play(No) when is_integer(No) -> catch begin check(), sounder ! {play, No, self()}, wait_for_ack(sounder) end. @@ -94,14 +94,14 @@ go() -> loop(Port) -> receive - {new, File, From} when atom(File) -> + {new, File, From} when is_atom(File) -> Port ! {self(),{command,lists:append([0],atom_to_list(File))}}, From ! {sounder,wait_for_ack(Port)}, loop(Port); {play,silent,From} -> From ! {sounder,false}, loop(Port); - {play,No,From} when integer(No) -> + {play,No,From} when is_integer(No) -> Port ! {self(),{command,[No]}}, From ! {sounder,wait_for_ack(Port)}, loop(Port); @@ -118,13 +118,13 @@ loop(Port) -> nosound() -> receive - {new,File,From} when atom(File) -> + {new,File,From} when is_atom(File) -> From ! {sounder,{ok,silent}}, nosound(); {play,silent,From} -> From ! {sounder,true}, nosound(); - {play,No,From} when integer(No) -> + {play,No,From} when is_integer(No) -> From ! {sounder,{error,no_audio_cap}}, nosound(); {stop} -> @@ -135,7 +135,7 @@ nosound() -> wait_for_ack(sounder) -> receive {sounder,Res} -> Res end; -wait_for_ack(Port) when port(Port) -> +wait_for_ack(Port) when is_port(Port) -> receive {Port,{data,"ok"}} -> ok; @@ -149,7 +149,7 @@ wait_for_ack(Port) when port(Port) -> check() -> case whereis(sounder) of - Pid when pid(Pid) -> + Pid when is_pid(Pid) -> ok; undefined -> throw({error,sounder_not_started}) diff --git a/lib/gs/contribs/cols/cols.erl b/lib/gs/contribs/cols/cols.erl index 67b46d0dfb..9c44837f3e 100644 --- a/lib/gs/contribs/cols/cols.erl +++ b/lib/gs/contribs/cols/cols.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,6 +19,12 @@ %% -module(cols). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}]). -export([start/0, init/0]). @@ -278,7 +284,7 @@ fall_column([], _X, _Y, ColumnAcc, ChecksAcc) -> fall_column([black|Colors], X, Y, ColumnAcc, ChecksAcc) -> case find_box(Colors) of false -> {ColumnAcc, ChecksAcc}; - NewColors when list(NewColors) -> + NewColors when is_list(NewColors) -> fall_one_step(NewColors, X, Y, ColumnAcc, ChecksAcc) end; fall_column([Color|Colors], X, Y, ColumnAcc, ChecksAcc) -> @@ -330,7 +336,7 @@ new_column_list([], _, _) -> []. %%---------------------------------------------------------------------- %% Returns: a reversed list of colors. %%---------------------------------------------------------------------- -columntuple_to_list(ColumnTuple) when tuple(ColumnTuple) -> +columntuple_to_list(ColumnTuple) when is_tuple(ColumnTuple) -> columntuple_to_list(tuple_to_list(ColumnTuple),[]). columntuple_to_list([],Acc) -> Acc; diff --git a/lib/gs/contribs/cols/highscore.erl b/lib/gs/contribs/cols/highscore.erl index 9ffbea50a7..8f984aaa83 100644 --- a/lib/gs/contribs/cols/highscore.erl +++ b/lib/gs/contribs/cols/highscore.erl @@ -19,6 +19,13 @@ %% -module(highscore). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,grid,2}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([run/2]). diff --git a/lib/gs/contribs/mandel/mandel.erl b/lib/gs/contribs/mandel/mandel.erl index d4d2452463..6293f867e2 100644 --- a/lib/gs/contribs/mandel/mandel.erl +++ b/lib/gs/contribs/mandel/mandel.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -18,6 +18,11 @@ %% -module(mandel). +-compile([{nowarn_deprecated_function,{gs,assq,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,image,2}}, + {nowarn_deprecated_function,{gs,start,0}}]). -author('(mbj,eklas)@erlang.ericsson.se'). %% User's interface @@ -119,7 +124,7 @@ start_client(Opts,Nodes) -> try_random(random,Low,High) -> random:uniform()*(High-Low)+Low; -try_random(Float,_Low,_High) when number(Float) -> Float. +try_random(Float,_Low,_High) when is_number(Float) -> Float. %%----------------------------------------------------------------- diff --git a/lib/gs/contribs/othello/othello_board.erl b/lib/gs/contribs/othello/othello_board.erl index 0206ba2ded..c52211a495 100644 --- a/lib/gs/contribs/othello/othello_board.erl +++ b/lib/gs/contribs/othello/othello_board.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,6 +19,12 @@ %% -module(othello_board). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,start,0}}]). + -export([start/0,stop/0,init/0]). @@ -147,7 +153,7 @@ but_pressed("Help",_ButtId,_User,GamePid,_Shell,_Wids,_Op) -> but_pressed("Newgame",_ButtId,_User,GamePid,_Shell,Wids,Options) -> new_game(GamePid,Wids,Options); but_pressed([],ButtId,User,GamePid,_Shell,_Wids,_Op) - when pid(GamePid),User == player -> + when is_pid(GamePid),User == player -> [C,R] = atom_to_list(ButtId), GamePid ! {self(),position,othello_adt:pos(C-96,translate(R-48))}, GamePid; @@ -243,7 +249,7 @@ game_msg(Msg,User,GamePid,Shell,Wids,Options) -> end. -new_game(GamePid,Wids,Options) when pid(GamePid) -> +new_game(GamePid,Wids,Options) when is_pid(GamePid) -> exit(GamePid,kill), new_game(Wids,Options); new_game(_,Wids,Options) -> diff --git a/lib/gs/doc/src/gs.xml b/lib/gs/doc/src/gs.xml index f2182fc673..c61e8c4938 100644 --- a/lib/gs/doc/src/gs.xml +++ b/lib/gs/doc/src/gs.xml @@ -39,9 +39,7 @@ graphical user interface. </p> <p> - GS is not maintained and we plan to deprecate and remove it from - the distribution as soon as possible, maybe already in the next - major release (R15). + GS is deprecated and will be removed in the R16 release. </p> </warning> <p>The Graphics System, GS, is easy to learn and diff --git a/lib/gs/doc/src/make.dep b/lib/gs/doc/src/make.dep deleted file mode 100644 index b33ed3b2de..0000000000 --- a/lib/gs/doc/src/make.dep +++ /dev/null @@ -1,58 +0,0 @@ -# ---------------------------------------------------- -# >>>> Do not edit this file <<<< -# This file was automaticly generated by -# /home/otp/bin/docdepend -# ---------------------------------------------------- - - -# ---------------------------------------------------- -# TeX files that the DVI file depend on -# ---------------------------------------------------- - -book.dvi: book.tex gs.tex gs_chapter1.tex gs_chapter2.tex \ - gs_chapter3.tex gs_chapter4.tex gs_chapter5.tex \ - gs_chapter6.tex gs_chapter7.tex gs_chapter8.tex \ - part.tex ref_man.tex - -# ---------------------------------------------------- -# Source inlined when transforming from source to LaTeX -# ---------------------------------------------------- - -book.tex: ref_man.xml - -gs_chapter2.tex: examples/ex1.erl examples/ex2.erl - -gs_chapter4.tex: examples/ex3.erl examples/ex4.erl examples/ex5.erl \ - examples/ex6.erl - -gs_chapter5.tex: examples/ex15.erl - -gs_chapter6.tex: examples/ex16.erl - -gs_chapter7.tex: examples/ex17.erl - -gs_chapter8.tex: examples/ex10.erl examples/ex11.erl examples/ex12.erl \ - examples/ex13.erl examples/ex14.erl examples/ex7.erl \ - examples/ex8.erl examples/ex9.erl - -# ---------------------------------------------------- -# Pictures that the DVI file depend on -# ---------------------------------------------------- - -book.dvi: pics/gs1-1-image-1.ps pics/gs1-1-image-2.ps \ - pics/gs1-1-image-3.ps - -book.dvi: pics/ex1.ps pics/gs1-1-image-4.ps - -book.dvi: pics/ex15.ps - -book.dvi: pics/ex16.ps - -book.dvi: pics/packer1.ps pics/packer2.ps - -book.dvi: pics/arc.ps pics/buttons.ps pics/ex10.ps pics/ex11.ps \ - pics/ex12.ps pics/ex13.ps pics/ex14.ps pics/ex8.ps \ - pics/ex9.ps pics/image.ps pics/line.ps pics/oval.ps \ - pics/polygon.ps pics/rectangle.ps pics/text.ps \ - pics/window.ps - diff --git a/lib/gs/doc/src/notes.xml b/lib/gs/doc/src/notes.xml index 744efbd4fc..cd63104346 100644 --- a/lib/gs/doc/src/notes.xml +++ b/lib/gs/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2010</year> + <year>2004</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -30,7 +30,45 @@ </header> <p>This document describes the changes made to the GS application.</p> - <section><title>GS 1.5.13</title> + <section><title>GS 1.5.15</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Erlang/OTP can now be built using parallel make if you + limit the number of jobs, for instance using '<c>make + -j6</c>' or '<c>make -j10</c>'. '<c>make -j</c>' does not + work at the moment because of some missing + dependencies.</p> + <p> + Own Id: OTP-9451</p> + </item> + <item> + <p> + Eliminate use of deprecated regexp module</p> + <p> + Own Id: OTP-9810</p> + </item> + </list> + </section> + +</section> + +<section><title>GS 1.5.14</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>Remove misc. compiler warnings</p> + <p> + Own Id: OTP-9542</p> + </item> + </list> + </section> + +</section> + +<section><title>GS 1.5.13</title> <section><title>Improvements and New Features</title> <list> diff --git a/lib/gs/examples/ball.erl b/lib/gs/examples/ball.erl index 3f91a7b379..03fac3b5fc 100644 --- a/lib/gs/examples/ball.erl +++ b/lib/gs/examples/ball.erl @@ -24,6 +24,12 @@ %% ------------------------------------------------------------ -module(ball). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,canvas,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,oval,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,init/0]). diff --git a/lib/gs/examples/browser.erl b/lib/gs/examples/browser.erl index 1dba5a915b..0f8b3fc7e6 100644 --- a/lib/gs/examples/browser.erl +++ b/lib/gs/examples/browser.erl @@ -23,6 +23,14 @@ %% ------------------------------------------------------------ -module(browser). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,entry,2}}, + {nowarn_deprecated_function,{gs,label,2}}, + {nowarn_deprecated_function,{gs,listbox,2}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,start/2,init/3]). diff --git a/lib/gs/examples/calc.erl b/lib/gs/examples/calc.erl index 992b8adb4e..ca29ae1cb9 100644 --- a/lib/gs/examples/calc.erl +++ b/lib/gs/examples/calc.erl @@ -23,6 +23,11 @@ %% ------------------------------------------------------------ -module(calc). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,label,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,calc/0]). diff --git a/lib/gs/examples/calc2.erl b/lib/gs/examples/calc2.erl index d28780de01..83e1870b7a 100644 --- a/lib/gs/examples/calc2.erl +++ b/lib/gs/examples/calc2.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -24,6 +24,12 @@ %% ------------------------------------------------------------ -module(calc2). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,label,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). + -export([start/0,calc/0]). start() -> @@ -54,7 +60,7 @@ calc() -> calc_loop(Lbl,M,V,Op) -> receive - {gs,_,click,D,_} when integer(D) -> + {gs,_,click,D,_} when is_integer(D) -> digit_press(Lbl,M,V*10+D,Op); {gs,_,click,'C',_} -> c(Lbl,M,V,Op); diff --git a/lib/gs/examples/color_demo.erl b/lib/gs/examples/color_demo.erl index 650f853061..a2f4d0eb87 100644 --- a/lib/gs/examples/color_demo.erl +++ b/lib/gs/examples/color_demo.erl @@ -24,6 +24,11 @@ %% ------------------------------------------------------------ -module(color_demo). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,scale,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,init/0]). diff --git a/lib/gs/examples/color_demo2.erl b/lib/gs/examples/color_demo2.erl index 817cc9ed7d..3b0b36221d 100644 --- a/lib/gs/examples/color_demo2.erl +++ b/lib/gs/examples/color_demo2.erl @@ -24,6 +24,10 @@ %% ------------------------------------------------------------ -module(color_demo2). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,start,0}}]). -export([start/0,init/0]). diff --git a/lib/gs/examples/distrib_draw.erl b/lib/gs/examples/distrib_draw.erl index ecb1386c25..8f76bc6650 100644 --- a/lib/gs/examples/distrib_draw.erl +++ b/lib/gs/examples/distrib_draw.erl @@ -43,6 +43,11 @@ %% -module(distrib_draw). +-compile([{nowarn_deprecated_function,{gs,canvas,3}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,line,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,3}}]). -export([start/2,init/0]). diff --git a/lib/gs/examples/entry_demo.erl b/lib/gs/examples/entry_demo.erl index a5ecfbc4d3..4bb64e949e 100644 --- a/lib/gs/examples/entry_demo.erl +++ b/lib/gs/examples/entry_demo.erl @@ -23,6 +23,12 @@ %% ------------------------------------------------------------ -module(entry_demo). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,init/1]). diff --git a/lib/gs/examples/event_test.erl b/lib/gs/examples/event_test.erl index f6fcc9b4b9..8c0a109df4 100644 --- a/lib/gs/examples/event_test.erl +++ b/lib/gs/examples/event_test.erl @@ -21,6 +21,9 @@ %% Demo for testing some events -module(event_test). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,init/0]). diff --git a/lib/gs/examples/file_dialog.erl b/lib/gs/examples/file_dialog.erl index ff20321374..c1ef6ed8b1 100644 --- a/lib/gs/examples/file_dialog.erl +++ b/lib/gs/examples/file_dialog.erl @@ -23,6 +23,11 @@ %% ------------------------------------------------------------ -module(file_dialog). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,label,2}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}]). -export([start/0,start/1,start/2,fs_init/3]). diff --git a/lib/gs/examples/focus_demo.erl b/lib/gs/examples/focus_demo.erl index b9d86866e6..71ca9c6ff5 100644 --- a/lib/gs/examples/focus_demo.erl +++ b/lib/gs/examples/focus_demo.erl @@ -23,6 +23,11 @@ %% ------------------------------------------------------------ -module(focus_demo). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,init/0]). diff --git a/lib/gs/examples/frac.erl b/lib/gs/examples/frac.erl index 139a4be310..46af83de8a 100644 --- a/lib/gs/examples/frac.erl +++ b/lib/gs/examples/frac.erl @@ -21,6 +21,9 @@ %% Purpose : Fractal trees -module(frac). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,start,0}}]). -export([start/0, go/0, test/0, grow/2, expand/3, subst/2]). diff --git a/lib/gs/examples/line_demo.erl b/lib/gs/examples/line_demo.erl index c8a6a69e2e..ba88605118 100644 --- a/lib/gs/examples/line_demo.erl +++ b/lib/gs/examples/line_demo.erl @@ -24,6 +24,12 @@ %% ------------------------------------------------------------ -module(line_demo). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,canvas,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,line,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0,init/0,line/3]). diff --git a/lib/gs/examples/man.erl b/lib/gs/examples/man.erl index a0ffd3364e..bddd6930ab 100644 --- a/lib/gs/examples/man.erl +++ b/lib/gs/examples/man.erl @@ -23,6 +23,15 @@ %% ------------------------------------------------------------ -module(man). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,entry,2}}, + {nowarn_deprecated_function,{gs,label,2}}, + {nowarn_deprecated_function,{gs,listbox,2}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,3}}]). -export([start/0,init/0]). -export([man_list/0]). diff --git a/lib/gs/examples/menu_demo.erl b/lib/gs/examples/menu_demo.erl index c95fc33152..6b2fc4113a 100644 --- a/lib/gs/examples/menu_demo.erl +++ b/lib/gs/examples/menu_demo.erl @@ -19,6 +19,12 @@ %% -module(menu_demo). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -compile(export_all). diff --git a/lib/gs/examples/rubber.erl b/lib/gs/examples/rubber.erl index ba263f07ac..da4aa57391 100644 --- a/lib/gs/examples/rubber.erl +++ b/lib/gs/examples/rubber.erl @@ -23,6 +23,14 @@ %% ------------------------------------------------------------ -module(rubber). +-compile([{nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,canvas,2}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,radiobutton,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,2}}]). -export([start/0, init/0]). diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile index a648d3cf13..43b530295b 100644 --- a/lib/gs/src/Makefile +++ b/lib/gs/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1996-2009. All Rights Reserved. +# Copyright Ericsson AB 1996-2011. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -90,7 +90,7 @@ clean: # Special Build Targets # ---------------------------------------------------- -gstk_generic.hrl: gs_make.erl +gstk_generic.hrl: gs_make.erl ../ebin/gs_make.$(EMULATOR) ../ebin/gs.$(EMULATOR) $(ERL) -pa $(EBIN) -s gs_make -s erlang halt -noshell $(APP_TARGET): $(APP_SRC) ../vsn.mk @@ -99,6 +99,8 @@ $(APP_TARGET): $(APP_SRC) ../vsn.mk $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk sed -e 's;%VSN%;$(VSN);' $< > $@ +$(GSTK_GENERIC_TARGET): gstk_generic.hrl + # ---------------------------------------------------- # Release Target # ---------------------------------------------------- diff --git a/lib/gs/src/gs.erl b/lib/gs/src/gs.erl index 3e9a1c4b8b..92dce12580 100644 --- a/lib/gs/src/gs.erl +++ b/lib/gs/src/gs.erl @@ -24,7 +24,13 @@ %% -module(gs). - +-deprecated(module). +-compile([{nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,create_tree,2}}, + {nowarn_deprecated_function,{gs,foreach,3}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,1}}]). %% ----- Exports ----- -export([start/0, stop/0, start/1]). diff --git a/lib/gs/src/gs_frontend.erl b/lib/gs/src/gs_frontend.erl index 009b264e69..73954baa8d 100644 --- a/lib/gs/src/gs_frontend.erl +++ b/lib/gs/src/gs_frontend.erl @@ -24,6 +24,8 @@ %% -module(gs_frontend). +-compile([{nowarn_deprecated_function,{gs,assq,2}}, + {nowarn_deprecated_function,{gs,error,2}}]). -export([create/2, config/2, diff --git a/lib/gs/src/gs_make.erl b/lib/gs/src/gs_make.erl index e41183f9bf..bf8a66001f 100644 --- a/lib/gs/src/gs_make.erl +++ b/lib/gs/src/gs_make.erl @@ -19,6 +19,7 @@ %% -module(gs_make). +-compile([{nowarn_deprecated_function,{gs,assq,2}}]). -export([start/0]). diff --git a/lib/gs/src/gse.erl b/lib/gs/src/gse.erl index b3ea2af4d4..c62badcc27 100644 --- a/lib/gs/src/gse.erl +++ b/lib/gs/src/gse.erl @@ -23,6 +23,68 @@ %%%---------------------------------------------------------------------- -module(gse). +-compile([{nowarn_deprecated_function,{gs,arc,2}}, + {nowarn_deprecated_function,{gs,arc,3}}, + {nowarn_deprecated_function,{gs,button,2}}, + {nowarn_deprecated_function,{gs,button,3}}, + {nowarn_deprecated_function,{gs,canvas,2}}, + {nowarn_deprecated_function,{gs,canvas,3}}, + {nowarn_deprecated_function,{gs,checkbutton,2}}, + {nowarn_deprecated_function,{gs,checkbutton,3}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,create,4}}, + {nowarn_deprecated_function,{gs,create_tree,2}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,editor,2}}, + {nowarn_deprecated_function,{gs,editor,3}}, + {nowarn_deprecated_function,{gs,entry,2}}, + {nowarn_deprecated_function,{gs,entry,3}}, + {nowarn_deprecated_function,{gs,frame,2}}, + {nowarn_deprecated_function,{gs,frame,3}}, + {nowarn_deprecated_function,{gs,grid,2}}, + {nowarn_deprecated_function,{gs,grid,3}}, + {nowarn_deprecated_function,{gs,gridline,2}}, + {nowarn_deprecated_function,{gs,gridline,3}}, + {nowarn_deprecated_function,{gs,image,2}}, + {nowarn_deprecated_function,{gs,image,3}}, + {nowarn_deprecated_function,{gs,label,2}}, + {nowarn_deprecated_function,{gs,label,3}}, + {nowarn_deprecated_function,{gs,line,2}}, + {nowarn_deprecated_function,{gs,line,3}}, + {nowarn_deprecated_function,{gs,listbox,2}}, + {nowarn_deprecated_function,{gs,listbox,3}}, + {nowarn_deprecated_function,{gs,menu,2}}, + {nowarn_deprecated_function,{gs,menu,3}}, + {nowarn_deprecated_function,{gs,menubar,2}}, + {nowarn_deprecated_function,{gs,menubar,3}}, + {nowarn_deprecated_function,{gs,menubutton,2}}, + {nowarn_deprecated_function,{gs,menubutton,3}}, + {nowarn_deprecated_function,{gs,menuitem,2}}, + {nowarn_deprecated_function,{gs,menuitem,3}}, + {nowarn_deprecated_function,{gs,message,2}}, + {nowarn_deprecated_function,{gs,message,3}}, + {nowarn_deprecated_function,{gs,oval,2}}, + {nowarn_deprecated_function,{gs,oval,3}}, + {nowarn_deprecated_function,{gs,polygon,2}}, + {nowarn_deprecated_function,{gs,polygon,3}}, + {nowarn_deprecated_function,{gs,prompter,2}}, + {nowarn_deprecated_function,{gs,prompter,3}}, + {nowarn_deprecated_function,{gs,radiobutton,2}}, + {nowarn_deprecated_function,{gs,radiobutton,3}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,rectangle,2}}, + {nowarn_deprecated_function,{gs,rectangle,3}}, + {nowarn_deprecated_function,{gs,scale,2}}, + {nowarn_deprecated_function,{gs,scale,3}}, + {nowarn_deprecated_function,{gs,scrollbar,2}}, + {nowarn_deprecated_function,{gs,scrollbar,3}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,start,1}}, + {nowarn_deprecated_function,{gs,text,2}}, + {nowarn_deprecated_function,{gs,text,3}}, + {nowarn_deprecated_function,{gs,window,2}}, + {nowarn_deprecated_function,{gs,window,3}}]). %%-compile(export_all). -export([ diff --git a/lib/gs/src/gstk.erl b/lib/gs/src/gstk.erl index 6f83cf8be4..ee974a5f63 100644 --- a/lib/gs/src/gstk.erl +++ b/lib/gs/src/gstk.erl @@ -20,6 +20,8 @@ %% -module(gstk). +-compile([{nowarn_deprecated_function,{gs,assq,2}}, + {nowarn_deprecated_function,{gs,creation_error,2}}]). -export([start_link/4, stop/1, diff --git a/lib/gs/src/gstk_arc.erl b/lib/gs/src/gstk_arc.erl index 8e80ef92b5..3c6fe54d36 100644 --- a/lib/gs/src/gstk_arc.erl +++ b/lib/gs/src/gstk_arc.erl @@ -23,6 +23,7 @@ %% ------------------------------------------------------------ -module(gstk_arc). +-compile([{nowarn_deprecated_function,{gs,creation_error,2}}]). %%----------------------------------------------------------------------------- %% ARC OPTIONS diff --git a/lib/gs/src/gstk_canvas.erl b/lib/gs/src/gstk_canvas.erl index 868b3020fe..5d15529995 100644 --- a/lib/gs/src/gstk_canvas.erl +++ b/lib/gs/src/gstk_canvas.erl @@ -23,6 +23,8 @@ %% ------------------------------------------------------------ -module(gstk_canvas). +-compile([{nowarn_deprecated_function,{gs,pair,2}}, + {nowarn_deprecated_function,{gs,val,2}}]). %%----------------------------------------------------------------------------- %% CANVAS OPTIONS diff --git a/lib/gs/src/gstk_editor.erl b/lib/gs/src/gstk_editor.erl index 3e0c8240e4..2686997036 100644 --- a/lib/gs/src/gstk_editor.erl +++ b/lib/gs/src/gstk_editor.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -23,6 +23,9 @@ %% ------------------------------------------------------------ -module(gstk_editor). +-compile([{nowarn_deprecated_function,{gs,assq,2}}, + {nowarn_deprecated_function,{gs,error,2}}, + {nowarn_deprecated_function,{gs,val,2}}]). %%------------------------------------------------------------------------------ %% CANVAS OPTIONS @@ -243,14 +246,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_entry.erl b/lib/gs/src/gstk_entry.erl index 14f7831151..432ccd5fde 100644 --- a/lib/gs/src/gstk_entry.erl +++ b/lib/gs/src/gstk_entry.erl @@ -23,6 +23,7 @@ %% ------------------------------------------------------------ -module(gstk_entry). +-compile([{nowarn_deprecated_function,{gs,error,2}}]). %%------------------------------------------------------------------------------ %% ENTRY OPTIONS diff --git a/lib/gs/src/gstk_generic.erl b/lib/gs/src/gstk_generic.erl index 3ddb69efc5..50c3da8dc5 100644 --- a/lib/gs/src/gstk_generic.erl +++ b/lib/gs/src/gstk_generic.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -20,6 +20,7 @@ %% -module(gstk_generic). +-compile([{nowarn_deprecated_function,{gs,assq,2}}]). -export([out_opts/8, read_option/5, @@ -414,7 +415,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_grid.erl b/lib/gs/src/gstk_grid.erl index 4189246822..f703dad074 100644 --- a/lib/gs/src/gstk_grid.erl +++ b/lib/gs/src/gstk_grid.erl @@ -19,6 +19,7 @@ %% -module(gstk_grid). +-compile([{nowarn_deprecated_function,{gs,val,2}}]). -export([event/5,create/3,config/3,option/5,read/3,delete/2,destroy/2, mk_create_opts_for_child/4,read_option/5]). diff --git a/lib/gs/src/gstk_gridline.erl b/lib/gs/src/gstk_gridline.erl index c1dd5a1443..4585c7e043 100644 --- a/lib/gs/src/gstk_gridline.erl +++ b/lib/gs/src/gstk_gridline.erl @@ -19,6 +19,8 @@ %% -module(gstk_gridline). +-compile([{nowarn_deprecated_function,{gs,val,2}}, + {nowarn_deprecated_function,{gs,val,3}}]). -export([event/5,create/3,config/3,option/5,read/3,delete/2,destroy/3, read_option/5]). diff --git a/lib/gs/src/gstk_image.erl b/lib/gs/src/gstk_image.erl index 5ad37cf6de..2b7a324e28 100644 --- a/lib/gs/src/gstk_image.erl +++ b/lib/gs/src/gstk_image.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -23,6 +23,7 @@ %% ------------------------------------------------------------ -module(gstk_image). +-compile([{nowarn_deprecated_function,{gs,pair,2}}]). %%----------------------------------------------------------------------------- %% BITMAP OPTIONS @@ -227,10 +228,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/gstk_menu.erl b/lib/gs/src/gstk_menu.erl index 3957951a35..e878669de6 100644 --- a/lib/gs/src/gstk_menu.erl +++ b/lib/gs/src/gstk_menu.erl @@ -23,6 +23,7 @@ %%------------------------------------------------------------------------------ -module(gstk_menu). +-compile([{nowarn_deprecated_function,{gs,error,2}}]). %%------------------------------------------------------------------------------ %% MENU OPTIONS diff --git a/lib/gs/src/gstk_menuitem.erl b/lib/gs/src/gstk_menuitem.erl index 36a9253598..8abf5d13aa 100644 --- a/lib/gs/src/gstk_menuitem.erl +++ b/lib/gs/src/gstk_menuitem.erl @@ -23,6 +23,7 @@ %% ------------------------------------------------------------ -module(gstk_menuitem). +-compile([{nowarn_deprecated_function,{gs,error,2}}]). %%----------------------------------------------------------------------------- %% MENUITEM OPTIONS diff --git a/lib/gs/src/gstk_port_handler.erl b/lib/gs/src/gstk_port_handler.erl index 93f3e58dc2..c6ca2c0f5b 100644 --- a/lib/gs/src/gstk_port_handler.erl +++ b/lib/gs/src/gstk_port_handler.erl @@ -34,6 +34,7 @@ %% ------------------------------------------------------------ -module(gstk_port_handler). +-compile([{nowarn_deprecated_function,{gs,error,2}}]). -include("gstk.hrl"). diff --git a/lib/gs/src/gstk_rectangle.erl b/lib/gs/src/gstk_rectangle.erl index 1e02977c9a..14be16c990 100644 --- a/lib/gs/src/gstk_rectangle.erl +++ b/lib/gs/src/gstk_rectangle.erl @@ -23,6 +23,7 @@ %% ------------------------------------------------------------ -module(gstk_rectangle). +-compile([{nowarn_deprecated_function,{gs,pair,2}}]). %%----------------------------------------------------------------------------- %% RECTANGLE OPTIONS diff --git a/lib/gs/src/gstk_window.erl b/lib/gs/src/gstk_window.erl index acac452ed1..4b4706eb88 100644 --- a/lib/gs/src/gstk_window.erl +++ b/lib/gs/src/gstk_window.erl @@ -23,6 +23,7 @@ %% ------------------------------------------------------------ -module(gstk_window). +-compile([{nowarn_deprecated_function,{gs,destroy,1}}]). %%------------------------------------------------------------------------------ %% WINDOW OPTIONS diff --git a/lib/gs/src/tcl2erl.erl b/lib/gs/src/tcl2erl.erl index 8845cf0b9a..d159681c5c 100644 --- a/lib/gs/src/tcl2erl.erl +++ b/lib/gs/src/tcl2erl.erl @@ -25,6 +25,7 @@ %% ------------------------------------------------------------ -module(tcl2erl). +-compile([{nowarn_deprecated_function,{gs,error,2}}]). -export([parse_event/1, ret_int/1, diff --git a/lib/gs/src/tool_file_dialog.erl b/lib/gs/src/tool_file_dialog.erl index 6b2c2e8c81..cfcfcd1bf6 100644 --- a/lib/gs/src/tool_file_dialog.erl +++ b/lib/gs/src/tool_file_dialog.erl @@ -19,6 +19,16 @@ %% -module(tool_file_dialog). +-compile([{nowarn_deprecated_function,{gs,button,3}}, + {nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,entry,3}}, + {nowarn_deprecated_function,{gs,frame,3}}, + {nowarn_deprecated_function,{gs,label,3}}, + {nowarn_deprecated_function,{gs,listbox,3}}, + {nowarn_deprecated_function,{gs,read,2}}, + {nowarn_deprecated_function,{gs,start,0}}, + {nowarn_deprecated_function,{gs,window,3}}]). + -export([start/1]). -record(opts, {type, % open | save | multiselect diff --git a/lib/gs/src/tool_utils.erl b/lib/gs/src/tool_utils.erl index b07e92c4f0..69919b18bd 100644 --- a/lib/gs/src/tool_utils.erl +++ b/lib/gs/src/tool_utils.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,6 +19,11 @@ %% -module(tool_utils). +-compile([{nowarn_deprecated_function,{gs,config,2}}, + {nowarn_deprecated_function,{gs,create,3}}, + {nowarn_deprecated_function,{gs,destroy,1}}, + {nowarn_deprecated_function,{gs,read,2}}]). + -include_lib("kernel/include/file.hrl"). %%%--------------------------------------------------------------------- @@ -98,7 +103,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; diff --git a/lib/gs/vsn.mk b/lib/gs/vsn.mk index 4c91857572..41a2561809 100644 --- a/lib/gs/vsn.mk +++ b/lib/gs/vsn.mk @@ -1,2 +1,2 @@ -GS_VSN = 1.5.13 +GS_VSN = 1.5.15 |