1
1

52 Коммитов

Автор SHA1 Сообщение Дата
Yorhel
10dca5503a Added -f option to import an exported directory structure
This is the first working version. There's a few TODO's left.
2012-09-05 13:52:12 +02:00
Yorhel
7ccb98006a Support exporting to stdout while still allowing -u 2 to work 2012-08-29 10:26:37 +02:00
Yorhel
59a9c6b877 Added -o option to export dir structure to a JSON-encoded file
!WARNING! The export option is experimental, and the file format is not
final. I make no promise that a future version of ncdu will be able to
read the current format. There's also quite a few TODO's left.
2012-08-28 17:22:33 +02:00
Yorhel
dfbeed9daf Fixing some whitespace issues 2012-08-27 21:51:08 +02:00
Yorhel
44e63ce2e7 Added -u option to change the scan UI
This allows scanning stuff without initializing ncurses. Not too useful
at this point since ncdu will switch to an ncurses environment when it's
done anyway, but this will become more useful when the export-to-file
feature has been implemented.
2012-08-27 14:17:40 +02:00
Yorhel
5064b4d651 Re-added scanning UI and improved error handling 2012-08-26 17:08:10 +02:00
Yorhel
0fd7dec7b0 Split calc.c into separate components (dir_(mem|scan|common).c)
The architecture is explained in dir.h. The reasons for these changes is
two-fold:
- calc.c was too complex, it simply did too many things. 399ccdeb is a
  nice example of that: Should have been an easy fix, but it introduced
  a segfault (fixed in 0b49021a), and added a small memory leak.
- This architecture features a pluggable input/output system, which
  should make a file export/import feature relatively simple.

The current commit does not feature any user interface, so there's no
feedback yet when scanning a directory. I'll get to that in a bit.

I've also not tested the new scanning code very well yet, so I might
have introduced some bugs.
2012-08-26 15:29:55 +02:00
Yorhel
a87e90c3c2 main.c: Revert nodelay() status after calling ncresize()
This fixes a bug where ncdu would stop scanning a directory if the
terminal window has been resized to a small enough space that the
warning would show up.
2012-08-18 08:47:39 +02:00
Yorhel
7fcae11d4d Copyright year bump
Damn, it's 2012 already.
2012-01-18 11:40:50 +01:00
Yorhel
5243e2daf4 Code cleanup: Use `static' where applicable.
This should also allow compilers to generate better code.
2011-10-31 15:09:49 +01:00
Yorhel
00bd015d79 Belated copyright year bump 2011-10-31 14:47:15 +01:00
Rodolfo Borges
57164c8ca6 read-only flag 2011-09-09 08:47:41 +02:00
Yorhel
101731ed13 Copyright year bump 2010-02-27 15:20:57 +01: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
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
219ae8a6db Removed useless call to path_real() 2009-04-26 12:45:42 +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
ba243df042 Centralized screen update delay into input_handle() 2009-04-26 09:49:51 +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
bb7119c642 main.c should include help.h 2009-04-23 20:47:01 +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
6568a962bc Converted help.c to the new framework and re-added help window 2009-04-19 10:03:42 +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
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
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
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
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
Yorhel
690eb3f593 Header file cleanup
Moved everything that doesn't belong in ncdu.h into the other header
or c files. Looks much better this way.
2009-04-11 13:49:08 +02:00
Yorhel
fa90c77c96 Rewrote util.h to the new style 2009-04-11 11:38:36 +02:00
Yorhel
6c0a56a26f Rewrote exclude.c to the new style 2009-04-11 10:53:13 +02:00
Yorhel
cc8cc99213 Moved definitions for calc.c to separate header file
Though it's not really useful yet now ncdu.h still includes it
2009-04-11 10:04:24 +02:00
Yorhel
c4be23a4c5 Each state can have it's own global variable 2009-04-11 09:58:33 +02:00
Yorhel
f392bf3ee1 Rewrote calc.c in the new style & framework
ncdu is currently pretty much in a non-working state, but things will
get fixed eventually after porting the other source files to the new
framework.
2009-04-10 18:16:33 +02:00
Yorhel
02705d2c7f Renamed parseCli() and added argument for root dir 2009-04-08 19:40:18 +02:00
yorhel
e7fb90fc67 Year bump
git-svn-id: svn://blicky.net/ncdu/trunk@48 ce56bc8d-f834-0410-b703-f827bd498a76
2009-01-11 09:34:19 +00:00
yorhel
57be9e2905 Current directory is assumed when no directory is given on the commandline (more du-like), and give a proper error if a given dir exceeds PATH_MAX
git-svn-id: svn://blicky.net/ncdu/trunk@43 ce56bc8d-f834-0410-b703-f827bd498a76
2008-10-10 10:56:48 +00:00
yorhel
04b7032846 Decided to get rid of that startup window...
git-svn-id: svn://blicky.net/ncdu/trunk@40 ce56bc8d-f834-0410-b703-f827bd498a76
2008-09-10 15:14:12 +00:00
yorhel
c306d3fe3b Updated copyright year to cover 2008 as well
git-svn-id: svn://blicky.net/ncdu/trunk@36 ce56bc8d-f834-0410-b703-f827bd498a76
2008-08-02 13:59:58 +00:00
yorhel
6621d70d99 Removed export and import code from trunk and created separate development branch.
git-svn-id: svn://blicky.net/ncdu/trunk@32 ce56bc8d-f834-0410-b703-f827bd498a76
2008-08-02 09:37:49 +00:00
yorhel
1313c268dd Updated ncdu -h
git-svn-id: svn://blicky.net/ncdu/trunk@31 ce56bc8d-f834-0410-b703-f827bd498a76
2007-11-24 08:54:22 +00:00
yorhel
8a71f8860c Fixed buffer overflow when supplying a path longer than PATH_MAX (patch by Tobias Stoeckmann)
git-svn-id: svn://blicky.net/ncdu/trunk@28 ce56bc8d-f834-0410-b703-f827bd498a76
2007-11-01 19:40:30 +00:00
yorhel
db920f8dab * Added error handling for the import feature
* Created own window-functions and removed ncurses window usage
* Rewrote fullsize


git-svn-id: svn://blicky.net/ncdu/trunk@27 ce56bc8d-f834-0410-b703-f827bd498a76
2007-08-16 08:36:58 +00:00
yorhel
55405140f7 * (BETA) Implemented file list exporting and importing
* Added file format specification (README.fileformat)
* Moved settingsCli in settings.c to parseCli in main.c
* Bugfix: drawError in calc.c was not shown when an error occurred while reading the main dir


git-svn-id: svn://blicky.net/ncdu/trunk@25 ce56bc8d-f834-0410-b703-f827bd498a76
2007-08-11 20:01:16 +00:00
yorhel
362554d2ac Added 'r' key to refresh the current directory
git-svn-id: svn://blicky.net/ncdu/trunk@11 ce56bc8d-f834-0410-b703-f827bd498a76
2007-07-26 12:56:24 +00:00
yorhel
ce6785124c Rewrote calc.c to be more flexible and clarifying, and changed the global 'dir' to a pointer
git-svn-id: svn://blicky.net/ncdu/trunk@10 ce56bc8d-f834-0410-b703-f827bd498a76
2007-07-25 18:38:49 +00:00