mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Fixing some whitespace issues
This commit is contained in:
parent
21c056f51d
commit
dfbeed9daf
6 changed files with 25 additions and 25 deletions
2
README
2
README
|
|
@ -9,7 +9,7 @@ DESCRIPTION
|
||||||
|
|
||||||
|
|
||||||
REQUIREMENTS
|
REQUIREMENTS
|
||||||
|
|
||||||
In order to compile and install ncdu, you need to have
|
In order to compile and install ncdu, you need to have
|
||||||
at least...
|
at least...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ncdu - NCurses Disk Usage
|
/* ncdu - NCurses Disk Usage
|
||||||
|
|
||||||
Copyright (c) 2007-2012 Yoran Heling
|
Copyright (c) 2007-2012 Yoran Heling
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
the following conditions:
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
The above copyright notice and this permission notice shall be included
|
||||||
in all copies or substantial portions of the Software.
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|
|
||||||
10
src/global.h
10
src/global.h
|
|
@ -1,5 +1,5 @@
|
||||||
/* ncdu - NCurses Disk Usage
|
/* ncdu - NCurses Disk Usage
|
||||||
|
|
||||||
Copyright (c) 2007-2012 Yoran Heling
|
Copyright (c) 2007-2012 Yoran Heling
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
the following conditions:
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
The above copyright notice and this permission notice shall be included
|
||||||
in all copies or substantial portions of the Software.
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|
@ -63,7 +63,7 @@ struct dir {
|
||||||
int items;
|
int items;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
char name[3]; /* must be large enough to hold ".." */
|
char name[3]; /* must be large enough to hold ".." */
|
||||||
};
|
};
|
||||||
/* sizeof(total dir) = SDIRSIZE + strlen(name) = sizeof(struct dir) - 3 + strlen(name) + 1 */
|
/* sizeof(total dir) = SDIRSIZE + strlen(name) = sizeof(struct dir) - 3 + strlen(name) + 1 */
|
||||||
#define SDIRSIZE (sizeof(struct dir)-2)
|
#define SDIRSIZE (sizeof(struct dir)-2)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ncdu - NCurses Disk Usage
|
/* ncdu - NCurses Disk Usage
|
||||||
|
|
||||||
Copyright (c) 2007-2012 Yoran Heling
|
Copyright (c) 2007-2012 Yoran Heling
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
the following conditions:
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
The above copyright notice and this permission notice shall be included
|
||||||
in all copies or substantial portions of the Software.
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ncdu - NCurses Disk Usage
|
/* ncdu - NCurses Disk Usage
|
||||||
|
|
||||||
Copyright (c) 2007-2012 Yoran Heling
|
Copyright (c) 2007-2012 Yoran Heling
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
the following conditions:
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
The above copyright notice and this permission notice shall be included
|
||||||
in all copies or substantial portions of the Software.
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|
|
||||||
14
src/util.c
14
src/util.c
|
|
@ -1,5 +1,5 @@
|
||||||
/* ncdu - NCurses Disk Usage
|
/* ncdu - NCurses Disk Usage
|
||||||
|
|
||||||
Copyright (c) 2007-2012 Yoran Heling
|
Copyright (c) 2007-2012 Yoran Heling
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
the following conditions:
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
The above copyright notice and this permission notice shall be included
|
||||||
in all copies or substantial portions of the Software.
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
|
@ -56,7 +56,7 @@ char *cropstr(const char *from, int s) {
|
||||||
|
|
||||||
char *formatsize(int64_t from) {
|
char *formatsize(int64_t from) {
|
||||||
static char dat[9]; /* "xxx.xMiB" */
|
static char dat[9]; /* "xxx.xMiB" */
|
||||||
float r = from;
|
float r = from;
|
||||||
char c = ' ';
|
char c = ' ';
|
||||||
if(r < 1000.0f) { }
|
if(r < 1000.0f) { }
|
||||||
else if(r < 1023e3f) { c = 'K'; r/=1024.0f; }
|
else if(r < 1023e3f) { c = 'K'; r/=1024.0f; }
|
||||||
|
|
@ -111,7 +111,7 @@ int ncresize(int minrows, int mincols) {
|
||||||
erase();
|
erase();
|
||||||
refresh();
|
refresh();
|
||||||
endwin();
|
endwin();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if(ch == 'i')
|
if(ch == 'i')
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -218,7 +218,7 @@ void freedir(struct dir *dr) {
|
||||||
/* free dr->sub recursively */
|
/* free dr->sub recursively */
|
||||||
if(dr->sub)
|
if(dr->sub)
|
||||||
freedir_rec(dr->sub);
|
freedir_rec(dr->sub);
|
||||||
|
|
||||||
/* update references */
|
/* update references */
|
||||||
if(dr->parent && dr->parent->sub == dr)
|
if(dr->parent && dr->parent->sub == dr)
|
||||||
dr->parent->sub = dr->next;
|
dr->parent->sub = dr->next;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue