Change make:files to behave more like erlc

Currently make:files will fail with the atom 'error' and
no message when the input (.erl) file is unreadable or the
output (.beam) file is unwritable. This differs from erlc
which will print a useful error message, or when possible,
remove the unwritable output file and continue successfully.

This change removes the unnecessary checks on the files when
make:files is called and allows the error checking to be
done in compile:file, where the error messages are produced.
It does not affect the return value.

In particular this resolves the mysterious problem of make:files
failing but erlc succeeding, caused by an unwritable (usually
root owned) beam file in an otherwise writable build directory.
Fix format_status bug for unregistered gen_event processes

Port the gen_fsm code for format_status to gen_event in order to
prevent a lists:concat([...,pid()]) crash when calling
sys:get_status/1 on an unregistered gen_event process.

Refactor format_status header code from gen_* behaviours to module gen.

Extend the format_status tests in gen_event_SUITE to cover
format_status bugs with anonymous gen_event processes.
Change pool module to attempt to attach to nodes that are already running

The pool module prints out an error message and takes no
further action for nodes that are already running. This
patch changes that behavior so that if the return from
slave:start/3 is {already_running, Node} then an attempt
to attach to the node is still made. This makes sense
because the node has been specified by the user in the
.hosts.erlang file indicating a wish for the node to
be part of the pool and a manual attach can be
successfully made after the pool is started.
add user specified compiler options on form reloading

In order to be able to test non-exported functions from another (test) module
it is necessary to compile the specific module (at least during the test phase)
with the export_all compiler option. This allows complete separation of testing
and productive code. At the moment it is not possible to combine this with a
test code coverage using the cover module. The problem is that when cover
compiling a module using cover:compile_* the code is reloaded into the emulator
omitting/filtering the passed user options. In my example above the export_all
option would be removed and the non-exported functions cannot be called any
more.
tv: Allow table viewer to display refs, ports and small binaries

Table viewer displayed #Port, #Ref, or #Bin as place holders for their
respective object types in ets and mnesia tables.  This can make table
viewer difficult to use when viewing tables containing those data types.
It doesn't make sense to render large binaries so #Bin will still be
used for binaries that exceed 100 bytes.
prim_file:exists/{1,2} which is lightweight file existence check

This function is meant to be faster / simpler check for the existence
of a file or directory.  Most all erlang functions that do this end
up calling prim_file:read_file_info at some point.   When
read_file_info is used as a simple existence check, time is wasted
collecting file stats data only to turn around and throw the data
away.  If a file exists, read_file_info can take three times longer
to return than when the file doesn't exist.  Return values are true,
false, or {error, eisdir}.  The low level implementation of this
function was already defined via efile_may_openfile, this patch just
exposes it to prim_file.  filelib:is_dir/1, filelib:is_file/1,
filelib:is_regular/1 could be changed from calling read_file_info to
prim_file:exists/{1,2} or better yet to calling to a yet unwritten
file:exists/{1,2} function.
Fix epmd's dbg_perror() output

The dbg_perror() function now hands the current errno value over to
dbg_gen_printf(). This fixes the problem that errno had been reset to
zero by the time it was used (to print the corresponding error message)
in the dbg_gen_printf() function.
Call chmod without the "-f" flag

"-f" is a non-standard chmod option which at least SGI IRIX and HP UX do
not support. As the only effect of the "-f" flag is to suppress warning
messages, it can be safely omitted.
Allow user to specify the IP address epmd binds to

The IP address(es) epmd binds to can now be specified by the user,
either via epmd's new "-address" option or (if that's not used) by
setting the environment variable ERL_EPMD_ADDRESS. Multiple addresses
may be specified using a comma-separated list. If the loopback address
is not in this list, it will be added implicitly, so that the daemon can
be queried by an interactive epmd process.
epmd: include host address in local access check

In FreeBSD jails, the source and destination address of connections
to localhost are changed to be the IP address of the jail. Consider
connections from the host's IP address to itself (e.g., the source and
destination address match) to be local for the access control checks.

Reported-By: tom@diogunix.com
Improve implicit_inet6 testcase skip conditions
Fix for Makefile.in invoking xref_mod_app.escript
Fix list returned by net_kernel:epmd_module

Function epmd_module of net_kernel returns a list
instead of an atom, when the epmd_module-flag is used.
Cosmetic changes
Fix errors in the handling of 'and'/'or' guards

Apart from the obvious bug in the negative evaluation of an 'and'
guard, Dialyzer handled dont_know cases rather single-mindedly
towards the positive branch. This patch allows for negative results
as well and does some clever guesses to narrow them down. It was
constructed similarly to the handling of the 'not' guard.
Fix warnings about guards containing not

The wording of warnings about unsatisfiable guards that used
'not' was incorrect (the 'not' was not mentioned and it appeared
as "Guard test is_atom(atom()) can never succeed").
Add a --fullpath option to Dialyzer

This change adds a --fullpath option to Dialyzer, which makes the
warning messages contain the full path of the corresponding file.

Original patch submitted by Magnus Henoch (legoscia) on 15/9/2010
and cooked to death in the 'pu' branch all this time.

The patch was essentially correct and most of it has been used as
is, but there have been some changes to make the code slightly
prettier, avoid some code duplication, and add documentation to
dialyzer's doc files and to its help message.
Take into account arity len when calculating field's width
edlin_expand: fix matches formatting

Fix formatting on terminals with width,
that is different from 80 chars.
Fix tab expansion in remote shell

Expand names of modules/functions which has been loaded
on remote node, instead of local ones.

Credits to: Mats Cronqvist <mats.cronqvist <at> gmail.com>
Credits to: Serge Aleynikov <saleyn <at> gmail.com>