~ubuntu-branches/ubuntu/natty/ncdu/natty

« back to all changes in this revision

Viewing changes to src/global.h

  • Committer: Bazaar Package Importer
  • Author(s): Eugene V. Lyubimkin
  • Date: 2009-10-12 13:36:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091012133653-fnkpopxwkqo6yu2a
Tags: 1.5-1
* New maintainer. Thanks for work, Luca Bedogni. (Closes: #550266)
  - Fixed segfault on empty directory. (Closes: #472294)
  - Use IEEE 1541 GiB not GB units. (Closes: #539553)
* New upstream release. (Closes: #522307, #531845)
* debian/patches:
  - Removed, all fixes applied upstream.
* debian/rules:
  - Rewritten using debhelper 7.
* debian/control:
  - Bumped build-dependency on debhelper to (>= 7).
  - Dropped weird build-dependency on debconf.
  - Dropped build-dependency on dpatch.
  - Bumped Standards-Version to 3.8.3, no changes needed.
  - Tiny capitalness correction in the long description.
* debian/compat:
  - Bumped to 7.
* debian/watch:
  - Removed auto-uupdate command, useless for me.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ncdu - NCurses Disk Usage 
 
2
    
 
3
  Copyright (c) 2007-2009 Yoran Heling
 
4
 
 
5
  Permission is hereby granted, free of charge, to any person obtaining
 
6
  a copy of this software and associated documentation files (the
 
7
  "Software"), to deal in the Software without restriction, including
 
8
  without limitation the rights to use, copy, modify, merge, publish,
 
9
  distribute, sublicense, and/or sell copies of the Software, and to
 
10
  permit persons to whom the Software is furnished to do so, subject to
 
11
  the following conditions:
 
12
  
 
13
  The above copyright notice and this permission notice shall be included
 
14
  in all copies or substantial portions of the Software.
 
15
  
 
16
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
17
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
18
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
19
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 
20
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 
21
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 
22
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
23
 
 
24
*/
 
25
 
 
26
#ifndef _global_h
 
27
#define _global_h
 
28
 
 
29
#include "config.h"
 
30
#include <stdio.h>
 
31
#include <sys/types.h>
 
32
 
 
33
/* File Flags (struct dir -> flags) */
 
34
#define FF_DIR    0x01
 
35
#define FF_FILE   0x02
 
36
#define FF_ERR    0x04 /* error while reading this item */
 
37
#define FF_OTHFS  0x08 /* excluded because it was an other filesystem */
 
38
#define FF_EXL    0x10 /* excluded using exlude patterns */
 
39
#define FF_SERR   0x20 /* error in subdirectory */
 
40
#define FF_BSEL   0x40 /* selected */
 
41
 
 
42
/* Program states */
 
43
#define ST_CALC   0
 
44
#define ST_BROWSE 1
 
45
#define ST_DEL    2
 
46
#define ST_HELP   3
 
47
#define ST_QUIT   4
 
48
 
 
49
 
 
50
/* structure representing a file or directory */
 
51
struct dir {
 
52
  struct dir *parent, *next, *sub;
 
53
  char *name;
 
54
  off_t size, asize;
 
55
  unsigned long items;
 
56
  unsigned char flags;
 
57
}; 
 
58
 
 
59
/* program state */
 
60
extern int pstate;
 
61
/* minimum screen update interval when calculating, in ms */
 
62
extern long update_delay;
 
63
 
 
64
/* handle input from keyboard and update display */
 
65
int input_handle(int);
 
66
 
 
67
 
 
68
/* import all other global functions and variables */
 
69
#include "exclude.h"
 
70
#include "util.h"
 
71
#include "calc.h"
 
72
#include "delete.h"
 
73
#include "browser.h"
 
74
#include "help.h"
 
75
#include "path.h"
 
76
 
 
77
#endif