Fix compile error under PHP5, light cleanup
Fix segfault: hide_password made wrong assumptions

hide_password() would segfault on input such as the empty string, or
strings not in the exact expected URL format. Rewrite the function to
be more robust and work on all inputs.
Boolean functions return false/true, not false/0

libsmbclient often returns 0 on success, < 0 on failure. Passing on
libcmbclient's return code on success means sending the "falsy" value of
0 to PHP. Return an actual 'true' instead.
Keep it simple, return quickly on success

Avoid cumbersome if/else logic. On success, bail out, else handle
the error without introducing an indent level.
Code style touchup, no functional changes

Change all leading spaces to tabs, space out control statements, etc.
Reshuffle functions into more natural order

Place opendir/readdir/closedir next to each other.
smbclient_read: clean up structure, close memory leak

Simplify things to make it more obvious what's going on. Close a
possible memory leak by freeing the allocated buffer if the read failed.
read, write: check for sizes < 0, overflow bug

The underlying smbclient_* functions expect a size_t parameter, which is
unsigned. Prevent a possible overflow bug by checking if the size given
by the user, which is a signed int, is negative.
creat, mkdir: bugfix in umask handling, make umask optional

libsmbclient expects a mode_t parameter, which is an integer bitmask,
not a string. Fix this bug.

Make the mode parameters optional for the caller, fall back on 0777
masks for the default case.
smbclient_open: add optional 'mode' flag, default to 0666
Use proper type when getting 'long' parameters

The manual warns against feeding ints to zend_get_parameter() when you
mean to get longs.
Bump version to 0.3, add credits

Since some functions changed interface and return signature, bump the
version number to distinguish this from the previous 0.2 code.
Merge pull request #1 from aklomp/cleanup

Cleanup, bugfixes