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
Yorhel
3dc21365f5
Fixed another PATH_MAX reliance in calc.c
...
Make sure not to pass the absolute root directory to lstat() and
chdir(), as these functions can't handle long path names.
2009-04-25 14:31:54 +02:00
Yorhel
c432928bd2
Fixed subdirectory name after refresh and a tiny memory leak
2009-04-25 14:29:20 +02:00
Yorhel
2738177fff
Fixed memory overflow bug in path_real_rec()
2009-04-25 14:26:52 +02:00
Yorhel
1f341f8b4c
Fixed segfault on specifying an empty dir
2009-04-25 12:11:53 +02:00
Yorhel
18211ebe2e
Properly chdir() before lstat()
2009-04-25 11:49:20 +02:00
Yorhel
00217dd86e
Fixed segfault on specifying a dir to process from cli
2009-04-24 18:18:17 +02:00
Yorhel
124296ee19
Fixed infinite calc_process() on error
2009-04-24 18:17:34 +02:00
Yorhel
731bfccfb5
Removed PATH_MAX reliance in main.c
2009-04-23 22:12:50 +02:00
Yorhel
5c6f057840
Fixed a few occurences of wrong arguments for getpath()
...
That's what you get when you change the way a function works...
2009-04-23 22:03:24 +02:00
Yorhel
4bb7d6b7c2
Removed reliance on PATH_MAX on most places
...
ncdu already does seem to handle longer paths now, though there are
still a few places where the code still relies on PATH_MAX. Will fix
those later.
2009-04-23 21:15:11 +02:00
Yorhel
bb7119c642
main.c should include help.h
2009-04-23 20:47:01 +02:00
Yorhel
7698bfd980
Split path handling into path.c and replaced rpath() with a better implementation
...
This is the first step into replacing all code that relies on PATH_MAX,
more changes will follow.
2009-04-23 19:44:37 +02:00
Yorhel
1739ee74d6
Updated manpage to reflect the removal of the 1000/1024 switch
2009-04-19 14:56:50 +02:00
Yorhel
d75cc8fb72
Replace 'suseconds_t' with 'long'
...
suseconds_t isn't always defined on some systems, but all possible
values are guaranteed to fit into a long, so use that.
2009-04-19 14:29:49 +02:00
Yorhel
97fefbaffb
Disabled blocking wait for user input while deleting
...
...that was for debugging, which isn't necessary anymore.
2009-04-19 13:17:21 +02:00
Yorhel
a71bc36860
Select next item after deleting
...
This makes deleting multiple files a -lot- easier...
2009-04-19 13:16:31 +02:00
Yorhel
44f64cf3d3
Go the correct directory after a deletion
2009-04-19 13:02:02 +02:00
Yorhel
bb8c2e66e7
freedir() shouldn't need to return anything
2009-04-19 12:47:22 +02:00
Yorhel
d8058362ec
Actually delete parents as well when deleting directories
2009-04-19 12:43:25 +02:00
Yorhel
ba4d06e09e
(partly) rewrote delete.c for the new framework and re-added the deletion feature
2009-04-19 11:38:35 +02:00
Yorhel
daba2128fc
Don't quit ncdu when pressing 'q' while the info window is shown
...
Just hide the info window in that case.
2009-04-19 10:06:33 +02:00
Yorhel
6568a962bc
Converted help.c to the new framework and re-added help window
2009-04-19 10:03:42 +02:00
Yorhel
76a2530579
Fixed bug in calculation window title
2009-04-19 09:45:27 +02:00
Yorhel
8daeeea1d9
Re-added file information window in browser.c
2009-04-18 16:02:46 +02:00
Yorhel
ddd8a639b7
Only sort directory when necessary
2009-04-18 15:45:58 +02:00
Yorhel
33cd126197
Draw browser on background while calculating
2009-04-18 15:35:37 +02:00
Yorhel
42ca499730
Allow drawing the browser frame when there's no directory structure
2009-04-18 15:34:47 +02:00
Yorhel
e079026ac8
Kept internal variables internal in browser.c and added browse_init()
...
Looks much better this way!
2009-04-18 15:23:33 +02:00
Yorhel
3ad39f3741
Don't touch the original tree while recalculating
...
This change makes it possible to still show the browser with correct
(previous) data while calculating.
2009-04-18 15:07:23 +02:00
Yorhel
4a751f0564
Removed stcalc and used several global variables instead
...
Considering it's now all internal in calc.c, anyway.
2009-04-18 14:36:24 +02:00
Yorhel
372f69853c
Initialize calc_delay and calc_smfs in calc.c rather than main.c
2009-04-18 14:16:48 +02:00
Yorhel
ca11083385
Moved minimum screen size handling to main.c
...
And with that, finally managed to get rid of sflags in ncdu.h
2009-04-18 14:12:30 +02:00
Yorhel
b24c3dee40
Got rid of SF_SI
...
It was a totally useless feature, anyway.
2009-04-18 14:05:45 +02:00
Yorhel
2b209ba9b2
Moved SF_SMFS in ncdu.h to char calc_smfs in calc.h
...
Another code cleanup, many more to come...
2009-04-18 14:04:53 +02:00
Yorhel
2a25bfdc7a
Moved and renamed sdelay in ncdu.h to calc_delay in calc.h
...
Because that's where it's supposed to be.
(geez, the current code is still a mess)
2009-04-18 13:51:45 +02:00
Yorhel
05756ad567
Remove some calc.c specific defines from ncdu.h
...
And updated TODO a bit
2009-04-18 13:45:32 +02:00
Yorhel
6d5ae5eb76
Fixed minor size + item count inconsistency on recalculating a dir
...
Namely, the 'parent' dir item itself that is recalculated isn't
reconsidered in its parents.
2009-04-16 19:05:11 +02:00
Yorhel
d297af2ce8
Fixed major bug with counting all sizes twice
...
I have absolutely no idea when I introduced this bug, will check
the history later.
2009-04-16 19:00:13 +02:00
Yorhel
34ba5348c8
Made stcalc static within calc.c and abstracted access to it with calc_init()
...
This actually makes the struct itself obsolete, as all information is now only
useful within calc.c itself and other files don't have to do anything with it.
2009-04-16 18:26:39 +02:00
Yorhel
5790b817f9
Re-added recalculating (sub)directories
2009-04-13 19:32:40 +02:00
Yorhel
b8877be907
Fixed display bug while calculating
2009-04-13 18:38:07 +02:00
Yorhel
7a0730f5d2
(Partly) rewrote browser.c to the new system
...
Not fully finished yet with this one, though.
2009-04-13 17:25:46 +02:00