Erlang Development Environment

Ulf Wiger etxuwig@REDACTED
Fri Mar 9 14:43:43 CET 2001


On Fri, 9 Mar 2001, Peter Andersson wrote:

>While we're on the subject of easy access to documentation... I've
>sometimes found it useful to be able to view Erlang man pages from
>the Erlang shell.

Perhaps you could fix the man.erl program in the gs examples while
you're at it. It seems to have rotted a bit.

With the following, it will at least display man pages. Unfortunately,
they're not properly formatted. I'll leave that for someone else to
play with.

/Uffe

> diff man.erl
/OTP/.../lib/gs-1.3.7/examples/src/man.erl
89c89
<     sort(FirstList).
---
>     sort(check_4_last(FirstList)).
90a91,98
> check_4_last([]) -> [];
> check_4_last([H|T]) ->
>     case catch(get_4_last(reverse(H))) of
>       [46,116,120,116] -> % ".txt"
>           [remove_4_last(H)|check_4_last(T)];
>       Any ->
>           check_4_last(T)
>     end.
91a100,101
> get_4_last([H1,H2,H3,H4|T]) ->
>     [H4,H3,H2,H1].
92a103,106
> remove_4_last(Str) ->
>     reverse(tl(tl(tl(tl(reverse(Str)))))).
> 
> 
98c112
<     Filename = filename:join(dirManual(), Page),
---
>     Filename = lists:flatten([dirManual(),Page,".txt"]),



/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB





More information about the erlang-questions mailing list