Skip to content
Snippets Groups Projects
Select Git revision
  • ca66e334c1754a5644c3b106a9a39603cc0331e5
  • master default protected
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • servers
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

query.ts

Blame
  • calc.c 10.90 KiB
    /* ncdu - NCurses Disk Usage
    
      Copyright (c) 2007-2009 Yoran Heling
    
      Permission is hereby granted, free of charge, to any person obtaining
      a copy of this software and associated documentation files (the
      "Software"), to deal in the Software without restriction, including
      without limitation the rights to use, copy, modify, merge, publish,
      distribute, sublicense, and/or sell copies of the Software, and to
      permit persons to whom the Software is furnished to do so, subject to
      the following conditions:
    
      The above copyright notice and this permission notice shall be included
      in all copies or substantial portions of the Software.
    
      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
      EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
      MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
      IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
      CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
      TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
      SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    
    */
    
    #include "ncdu.h"
    #include "calc.h"
    #include "exclude.h"
    #include "util.h"
    #include "browser.h"
    
    #include <string.h>
    #include <stdlib.h>
    #include <errno.h>
    
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <sys/time.h>
    #include <dirent.h>
    
    
    /* set S_BLKSIZE if not defined already in sys/stat.h */
    #ifndef S_BLKSIZE
    # define S_BLKSIZE 512
    #endif
    
    #ifndef LINK_MAX
    # ifdef _POSIX_LINK_MAX
    #  define LINK_MAX _POSIX_LINK_MAX
    # else
    #  define LINK_MAX 32
    # endif
    #endif
    
    #ifndef S_ISLNK
    # ifndef S_IFLNK
    #  define S_IFLNK 0120000
    # endif
    # define S_ISLNK(x) (x & S_IFLNK)
    #endif
    
    
    /* external vars */
    int  calc_delay = 100;
    char calc_smfs  = 0;
    
    /* global vars for internal use */
    char failed;             /* 1 on fatal error */
    char curpath[PATH_MAX];  /* last lstat()'ed item */