summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-10Converted all code to call the compll functionscompllYorhel12-314/+348
2010-05-07Added compll to the compilation environment and allow linking to zlibYorhel6-1/+33
2010-04-28Only create the line format once when drawing the browser windowYorhel1-21/+16
The memory for this format is now statically allocated as well. I was under the impression its size would depend on wincols, but this is the format we're talking about, the string does not have to hold the actual line contents. I must have been sleeping again... Oh well, this is a slight performance improvement, although it doesn't seem the be the cause of the browing slowness when running under valgrind. (Obviously running ncdu with valgrind is supposed to be slower, but the current performance is rather bad...)
2010-04-28Got rid of segfault when the root dir only contains hidden filesYorhel1-6/+9
Instead you now get the usual 'no items to display' message when hiding hidden files in the root directory.
2010-04-28Reset descending/ascending order when changing sort columnYorhel1-2/+2
This changes the behaviour back to it was before the dirlist abstraction, which is the behaviour I prefer.
2010-04-28Store the name of the item in the dir struct itselfYorhel4-11/+15
Rather than storing a pointer to another memory allocation in the struct. This saves some memory and improves performance by significantly decreasing the number of calls to [c|m]alloc() and free().
2010-04-28More intuitive multi-page browsingYorhel6-7/+84
Here is the new multi-page listing functionality I promised in 5db9c2aea11052451c7e11bf8eef73393e4a072e. It may look very easy, but getting this to work right wasn't, unfortunately.
2010-04-28Fixed buffer overflow when some directories can't be scannedYorhel2-3/+4
Also changed other occurences of the same situation to use the same checking method (>= rather than a +1) for consistency. Fixes bug #2981704.
2010-04-27Determine which item to select after deletion in browser.cYorhel2-7/+4
Rather than the ugly hack in delete.c.
2010-04-27Changed directory listings to a doubly linked listYorhel4-30/+40
This significantly improves the performance when browsing large directories. It is somewhat costly on the memory usage, though. :-(
2010-04-27Properly fixed crash on browsing dirs with a small window sizeYorhel1-1/+1
I was overseeing a stupid mistake in a7b7841ac084b21afd85c85c896fe89c441d4062 Obviously, you need to check against wincols and not winrows...
2010-04-27Updated ChangeLog with the changes on the git repoYorhel1-0/+7
2010-04-27Properly free() the pattern in exclude_clear()Yorhel1-0/+1
Fixes a tiny, insignificant memory leak.
2010-04-27Fixed crash on browsing dirs with a small window sizeYorhel1-1/+1
Fixes bug #2991787
2010-04-27Don't select first item when browsing back using parent dirYorhel1-0/+1
The parent directory reference is the same for all directories, so we'll have to make sure to reset its FF_BSEL flag when opening another directory.
2010-03-07Abstracted dir list handling from browser.c into dirlist.cYorhel5-286/+476
This optimizes a few actions (though not all), and makes the code easier to understand and expand. The behaviour of the browser has changed a bit with regards to multi-page listings. Personally I don't like this change much, so I'd probably fix that later on.
2010-03-03Correctly update directory sizes upon removing a hard linkYorhel1-15/+41
2010-02-28Only count the size of each hard link once for each directoryYorhel3-23/+46
The displayed directory sizes are now fully correct, although in its current state it's not all that intuitive because: directory size != sum(size of all files and subdirectories) This should probably be fixed later on by splitting the sizes into a shared and non-shared part. Also, the sizes displayed after a recalculation or deletion are incorrect, I'll fix this later on.
2010-02-28Misc. minor fixesYorhel3-3/+4
2010-02-27List detected links in a separate tab in info windowYorhel1-34/+125
2010-02-27Link hard linked files together with a circular linked listYorhel6-105/+94
The directory sizes are now incorrect as hard links will be counted twice again (as if there wasn't any detection in the first place), but this will get fixed by adding a shared size field. This method of keeping track of hard links is a lot faster and allows adding an interface which lists the found links.
2010-02-27Copyright year bumpYorhel18-18/+18
2009-10-23ChangeLog & man page version/date bump for 1.6v1.6Yorhel2-4/+4
2009-10-18Added some keybindings and changed 'h' to 'e' in browserYorhel5-10/+25
2009-10-18Call setlocale() at initializationYorhel4-2/+9
This (in combination with linking to ncursesw) fixes the display of non-ASCII characters.
2009-10-18Link to ncursesw when availableYorhel2-7/+28
Or force the use of a library with --with-ncurses or --with-ncursesw. Implementation based on/stolen from the configure.ac in ncmpc.
2009-08-03Update TODO file with some ideas for improvements in hard link handlingYorhel1-2/+7
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-03Properly display MiB units instead of MBYorhel3-14/+15
Fixes bug #2831412 (debian #539553)
2009-06-06Return to previously opened directory on failed recalculationYorhel2-1/+2
...instead of displaying an empty and unusable browser.
2009-06-06Properly free return value of opendir() on calculation interruptYorhel2-0/+4
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-06Removed another occurence of dirfd()Yorhel1-6/+0
This fixes a tiny memory leak as well, as the return value of opendir() wasn't passed to a closedir() after use.
2009-06-06Don't call link_del() on free'd memoryYorhel1-1/+2
2009-05-16Fixed non-void return in void delete_process()Sebastian Kayser2-2/+5
Fixes bug #2789781.
2009-05-16Removed reliance on dirfd()Yorhel3-5/+2
2009-05-12Removed the ST_QUIT stateYorhel4-9/+12
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-12calc.c: Removed an unused variable in calc_item()Yorhel1-1/+0
2009-05-12util.h: Typo in function declarationYorhel1-1/+1
2009-05-11Properly select the next item after deletionYorhel2-1/+2
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-11Use correct hard link information after partial recalculation or deletionYorhel6-39/+116
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-05Allocate correct amount of memory for the links listYorhel1-2/+2
I happen to make these kinds of mistakes a lot, for some strange reason. Maybe I should just get more sleep...
2009-05-05Added hard link indicator in browser and help windowYorhel4-6/+10
2009-05-05Implemented hardlink detectionYorhel1-9/+47
2009-05-02Version & date bump for ChangeLog and manual pagev1.5Yorhel2-2/+2
2009-05-02Fixed a browsing bug related to hiding itemsYorhel1-2/+6
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-02Removed powers of 1000/1024 toggle from help.cYorhel1-2/+1
2009-05-02Use absolute path for matching excluded itemsYorhel1-1/+1
2009-05-02Fixed buffer overrun in calc.cYorhel1-1/+1
2009-05-01Don't divide by zero when size of parent dir = 0Yorhel1-1/+3
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-01Fixed line width when displaying 100%Yorhel2-5/+5
Which would happen if there's only one file is in a directory
2009-04-30Cleaned up configure.inYorhel1-10/+6
Removed some obsolete macros and added a few more headers and function checks.