~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/wx/src/wxe_master.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%%
4
 
%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
5
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
128
128
    process_flag(trap_exit, true),
129
129
    DriverWithArgs = DriverName ++ " " ++ code:priv_dir(wx) ++ [0],
130
130
    
131
 
    case catch open_port({spawn, DriverWithArgs},[binary]) of
132
 
        {'EXIT', Err} -> 
133
 
            erlang:error({open_port,Err});
134
 
        Port ->
135
 
            wx_debug_info = ets:new(wx_debug_info, [named_table]),
136
 
            wx_non_consts = ets:new(wx_non_consts, [named_table]),
137
 
            true = ets:insert(wx_debug_info, wxdebug_table()),
138
 
            spawn_link(fun() -> debug_ping(Port) end),
139
 
            receive 
140
 
                {wx_consts, List} ->
141
 
                    true = ets:insert(wx_non_consts, List)
142
 
            end,
143
 
            {ok, #state{cb_port=Port, driver=DriverName, users=gb_sets:empty()}}
 
131
    try
 
132
        Port = open_port({spawn, DriverWithArgs},[binary]),
 
133
        wx_debug_info = ets:new(wx_debug_info, [named_table]),
 
134
        wx_non_consts = ets:new(wx_non_consts, [named_table]),
 
135
        true = ets:insert(wx_debug_info, wxdebug_table()),
 
136
        spawn_link(fun() -> debug_ping(Port) end),
 
137
        receive
 
138
            {wx_consts, List} ->
 
139
                true = ets:insert(wx_non_consts, List)
 
140
        end,
 
141
        {ok, #state{cb_port=Port, driver=DriverName, users=gb_sets:empty()}}
 
142
    catch _:Err ->
 
143
            error({Err, "Could not initiate graphics"})
144
144
    end.
145
145
 
146
146
%%--------------------------------------------------------------------