1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-19 01:36:33 -04:00
Commit Graph

14 Commits

Author SHA1 Message Date
Witold Filipczyk
00ebb8ef4b SMB directory listing looks like normal directory listing. 2010-09-06 18:38:36 +02:00
Witold Filipczyk
f994ef4335 mkalldirs: Reset ret when errno is EEXIST.
This bug was revelead while using bittorrent.
For filenames started with a dot and two slashes .//
the open_bittorrent_file returned -1 and set errno to EEXIST.
2008-03-29 18:41:22 +02:00
Kalle Olavi Niemitalo
e2cc0bd434 Don't cast qsort comparison function pointers.
Instead, convert the element pointers inside the comparison functions.

The last argument of qsort() is supposed to be of type
int (*)(const void *, const void *).  Previously, comp_links() was
defined to take struct link * instead of const void *, and the type
mismatch was silenced by casting the function pointer to void *.
This was in principle not portable because:

(1) The different pointer types may have different representations.
    In a word-oriented machine, the const void * might include a byte
    selector while the struct link * might not.

(2) Casting a function pointer to a data pointer can lose bits in some
    memory models.  Apparently this does not occur in POSIX-conforming
    systems though, as dlsym() would fail if it did.

This commit also fixes hits_cmp() and compare_dir_entries(), which
had similar problems.  However, I'm leaving alias_compare() in
src/intl/gettext/localealias.c unchanged for now, so as not to diverge
from the GNU version.

I also checked the bsearch() calls but they were all okay, apart from
one that used the alias_compare() mentioned above.
2007-10-06 23:05:05 +03:00
Kalle Olavi Niemitalo
e530fbe8e2 Doxygenate src/util/ 2007-07-27 13:10:50 +03:00
Kalle Olavi Niemitalo
7645a836fc Cast the NULL argument of straconcat to unsigned char *.
straconcat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to straconcat.  This
is in principle also a violation, but I'm ignoring it for now because
if it becomes a problem with some C implementation, then so will the
use of unsigned char * with printf "%s", which is so widespread in
ELinks that I'm not going to try fixing it now.
2007-03-11 12:59:11 +02:00
Laurent MONIN
5acb5e6663 Trim trailing whitespaces. 2006-05-31 19:34:49 +02:00
Witold Filipczyk
3dc145bde2 Changes related to Win32 port. S_IRWXG and S_IRWXO were undefined
under crossmingw32. init_static_version must be called after init_options
because ELinks wanted to read "verbose" option before it was initialized.
2006-05-18 21:46:42 +02:00
Laurent MONIN
151bcbd3a2 Prefer S_I?USR and S_IRWXU over obsolete S_IREAD, S_IWRITE, S_IEXEC. 2006-01-10 23:40:39 +01:00
Laurent MONIN
9b88da873a Use mode_t and mode macros everywhere. 2006-01-10 23:35:22 +01:00
Laurent MONIN
9dc2a7ffb7 Merge code from create_bittorrent_path() and mkalldirs(). Suggested by
Jonas. Simpler and better.
2006-01-05 10:49:05 +01:00
Laurent MONIN
73a99b6b99 Introduce functions to make directories, partly borrowed to wget. Not
yet used.
2006-01-04 21:43:42 +01:00
Laurent MONIN
2a71adda10 Revert
http://cvsweb.elinks.cz/cvsweb.cgi/elinks/src/util/file.c.diff?r1=1.44;r2=1.45
patch, which has to be reworked, without modifying file_exists().
2006-01-04 21:41:56 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00