1
1
Граф коммитов

153 Коммитов

Автор SHA1 Сообщение Дата
Yorhel
101731ed13 Copyright year bump 2010-02-27 15:20:57 +01:00
Yorhel
24db8a8866 ChangeLog & man page version/date bump for 1.6 2009-10-23 14:37:07 +02:00
Yorhel
06cab8cc30 Added some keybindings and changed 'h' to 'e' in browser 2009-10-18 12:52:00 +02:00
Yorhel
adaf8a6098 Call setlocale() at initialization
This (in combination with linking to ncursesw) fixes the display of
non-ASCII characters.
2009-10-18 12:05:36 +02:00
Yorhel
783993dbf5 Link to ncursesw when available
Or force the use of a library with --with-ncurses or --with-ncursesw.
Implementation based on/stolen from the configure.ac in ncmpc.
2009-10-18 11:55:47 +02:00
Yorhel
51e52f85c1 Update TODO file with some ideas for improvements in hard link handling
These ideas may not be very easy to implement, and may not be worth
the performance penalty they might introduce. But that's something that
still needs to be investigated.
2009-08-03 14:40:25 +02:00
Yorhel
b7d59bee5b Properly display MiB units instead of MB
Fixes bug #2831412 (debian #539553)
2009-08-03 14:26:10 +02:00
Yorhel
26c77cfc14 Return to previously opened directory on failed recalculation
...instead of displaying an empty and unusable browser.
2009-06-06 23:26:05 +02:00
Yorhel
e5cc7703d7 Properly free return value of opendir() on calculation interrupt
When interrupinting the calculation process by pressing 'q' while
it's looping through a directory, or when a directory could be openend
but not chdir()'ed into, closedir() wasn't called.
2009-06-06 23:22:30 +02:00
Yorhel
21f2e62793 Removed another occurence of dirfd()
This fixes a tiny memory leak as well, as the return value of opendir()
wasn't passed to a closedir() after use.
2009-06-06 21:04:47 +02:00
Yorhel
e5dccc1719 Don't call link_del() on free'd memory 2009-06-06 20:43:52 +02:00
Sebastian Kayser
3d8751b495 Fixed non-void return in void delete_process()
Fixes bug #2789781.
2009-05-16 10:36:03 +02:00
Yorhel
a0bf6deebb Removed reliance on dirfd() 2009-05-16 10:20:58 +02:00
Yorhel
aef88fb773 Removed the ST_QUIT state
There shouldn't be a need for such a state when there's a central
place where the program execution keeps returning to.
2009-05-12 19:06:15 +02:00
Yorhel
9d07027553 calc.c: Removed an unused variable in calc_item() 2009-05-12 18:39:00 +02:00
Yorhel
2828bfe6a8 util.h: Typo in function declaration 2009-05-12 18:37:49 +02:00
Yorhel
06a5f5215f Properly select the next item after deletion
Setting FF_BSEL after calling browse_init() causes two items to be
selected, as browse_init() makes sure something will be selected,
while calc_process() assumes nothing is, because the previously
selected item had just been deleted.
2009-05-11 20:14:52 +02:00
Yorhel
6de0a8ec00 Use correct hard link information after partial recalculation or deletion
Hard link detection is now done in a separate pass on the in-memory tree,
and duplicates can be 'removed' and 're-added' on the fly. When making any
changes in the tree, all hard links are re-added before the operation and
removed again afterwards.

While this guarantees that all hard link information is correct, it does
have a few drawbacks. I can currently think of two:

 1. It's not the most efficient way to do it, and may be quite slow on
    large trees. Will have to do some benchmarks later to see whether
    it is anything to be concerned about.

 2. The first encountered item is considered as 'counted' and all items
    encountered after that are considered as 'duplicate'. Because the
    order in which we traverse the tree doesn't always have to be the
    same, the items that will be considered as 'duplicate' can vary with
    each deletion or re-calculation. This might cause confusion for
    people who aren't aware of how hard links work.
2009-05-11 20:02:46 +02:00
Yorhel
8209a7efe3 Allocate correct amount of memory for the links list
I happen to make these kinds of mistakes a lot, for some strange
reason. Maybe I should just get more sleep...
2009-05-05 19:33:30 +02:00
Yorhel
fd984e754c Added hard link indicator in browser and help window 2009-05-05 19:25:52 +02:00
Yorhel
757bdff7ed Implemented hardlink detection 2009-05-05 19:13:52 +02:00
Yorhel
188265c594 Version & date bump for ChangeLog and manual page 2009-05-02 13:11:02 +02:00
Yorhel
d571c080b5 Fixed a browsing bug related to hiding items
Reproducable with the following steps:
- Make sure the first item in the list is a directory starting with a dot
- Make sure the next item is a normal directory
- Select first item
- Press 'h' to hide it, next item will properly be selected
- Open selected directory (right arrow), and see how the first (hidden)
  directory was opened.

It's amazing how I've even found this bug, considering that really is the
only way to reproduce it...
2009-05-02 13:01:12 +02:00
Yorhel
f416a7a121 Removed powers of 1000/1024 toggle from help.c 2009-05-02 12:40:53 +02:00
Yorhel
4ea817568f Use absolute path for matching excluded items 2009-05-02 10:45:33 +02:00
Yorhel
46de3510cd Fixed buffer overrun in calc.c 2009-05-02 10:21:29 +02:00
Yorhel
0fe0d11e3b Don't divide by zero when size of parent dir = 0
It's a floating point division, so won't really cause any real problems
on most systems. Still, a percentage of 'nan' isn't really useful.
2009-05-01 09:07:28 +02:00
Yorhel
95b314de73 Fixed line width when displaying 100%
Which would happen if there's only one file is in a directory
2009-05-01 09:00:59 +02:00
Yorhel
2d1060709b Cleaned up configure.in
Removed some obsolete macros and added a few more headers and function
checks.
2009-04-30 11:25:06 +02:00
Yorhel
3610121dab Don't try to delete a directory that's not empty 2009-04-28 11:07:24 +02:00
Yorhel
bba85675a9 Replaced the NEWS file with a symlink pointing to the ChangeLog 2009-04-26 15:48:27 +02:00
Yorhel
ae14721c5f Fixed segfault after aborting calculation
I really, really, wasn't think when writing commit
91b131a080
2009-04-26 15:23:09 +02:00
Yorhel
eb3310060f Fixed display bug on deletion error 2009-04-26 14:57:20 +02:00
Yorhel
2a5c9a242f Fixed display of one-component-after-root directory
Bug introduced in ece21a668d
It's amazing how many mistakes one person can make in a few hours.
2009-04-26 13:26:20 +02:00
Yorhel
91b131a080 Fixed segault after finishing calculation
Bug introduced in 796d043c0d
Apparently I was still sleeping or something...
2009-04-26 13:15:53 +02:00
Yorhel
ece21a668d Fixed display of the root directory 2009-04-26 13:10:00 +02:00
Yorhel
9cc79b0fab Properly call calc_leavepath() on error 2009-04-26 12:58:22 +02:00
Yorhel
796d043c0d Fixed bug with opening the root directory 2009-04-26 12:55:27 +02:00
Yorhel
219ae8a6db Removed useless call to path_real() 2009-04-26 12:45:42 +02:00
Yorhel
67ce0af650 Fixed bug with configure still relying on ncdu.h 2009-04-26 11:54:27 +02:00
Yorhel
91ad9df126 Updated ChangeLog and TODO 2009-04-26 11:35:03 +02:00
Yorhel
ceecccc3ae Move cursor to the correct line in browse_draw() 2009-04-26 11:22:24 +02:00
Yorhel
43fec63281 Removed last occurence of PATH_MAX
And it wasn't even used for a path, but for a row on the screen...
2009-04-26 11:18:45 +02:00
Yorhel
290c7a7d70 Renamed ncdu.h to global.h and #included all other header files into that
So we're actually back to having one header file for everything,
except it's now maintainable.
2009-04-26 11:08:40 +02:00
Yorhel
4b6456d0b9 Improved deletion performance 2009-04-26 10:54:14 +02:00
Yorhel
f6e34e520e Don't re-sort when pressing the browse keys without affecting the dir 2009-04-26 09:55:23 +02:00
Yorhel
ba243df042 Centralized screen update delay into input_handle() 2009-04-26 09:49:51 +02:00
Yorhel
8ddec92724 Huge performance improvement with the calculation 2009-04-26 09:35:16 +02:00
Yorhel
c079e0d23a Fixed another memory allocation issue 2009-04-25 16:30:59 +02:00
Yorhel
027c0c2eba Don't segfault when browsing an empty dir... 2009-04-25 15:46:00 +02:00