~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/ic/src/ic_codegen.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
comment(Fd, C, A, java) -> 
76
76
    comment_prefixed(Fd, C, A, "//");
77
77
%% Should be removed after a check if it's used !!!!! (LTH)
78
 
comment(Fd, C, A, CommentSequence) when list(CommentSequence) ->
 
78
comment(Fd, C, A, CommentSequence) when is_list(CommentSequence) ->
79
79
    comment_prefixed(Fd, C, A, CommentSequence).
80
80
 
81
81
comment_inlined(Fd, C, A, Start, End) ->
131
131
mcomment_light(Fd, List, java) ->
132
132
    mcomment_light_prefixed(Fd, List, "//");
133
133
%% Should be removed after a check if it's used !!!!! (LTH)
134
 
mcomment_light(Fd, List, Prefix) when list(Prefix) ->
 
134
mcomment_light(Fd, List, Prefix) when is_list(Prefix) ->
135
135
    mcomment_light_prefixed(Fd, List, Prefix).
136
136
    
137
137
mcomment_light_inlined(Fd, List, Start, End, Intermediate) ->
159
159
%%--------------------------------------------------------------------
160
160
%% Emit record definitions for erlang
161
161
%%--------------------------------------------------------------------
162
 
record(G, X, Name, _IFRID, Recs) when record(X, struct) ->
 
162
record(G, X, Name, _IFRID, Recs) when is_record(X, struct) ->
163
163
    F = ic_genobj:hrlfiled(G),
164
164
    emit(F, "-record(~p, {~p", [ic_util:to_atom(Name),hd(Recs)]),
165
165
    lists:foreach(fun(Y) -> emit(F, ", ~p", [Y]) end, tl(Recs)),
166
166
    emit(F, "}).\n");
167
 
record(G, X, Name, _IFRID, _Recs) when record(X, union) ->
 
167
record(G, X, Name, _IFRID, _Recs) when is_record(X, union) ->
168
168
    F = ic_genobj:hrlfiled(G),
169
169
    emit(F, "-record(~p, {label, value}).\n",[ic_util:to_atom(Name)]);
170
170
record(G, _X, Name, IFRID, Recs) when length(Recs) > 3 ->