Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nccf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
702
Provoz
nccf
Commits
2b209ba9
Commit
2b209ba9
authored
16 years ago
by
Yorhel
Browse files
Options
Downloads
Patches
Plain Diff
Moved SF_SMFS in ncdu.h to char calc_smfs in calc.h
Another code cleanup, many more to come...
parent
2a25bfdc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/calc.c
+3
-2
3 additions, 2 deletions
src/calc.c
src/calc.h
+2
-1
2 additions, 1 deletion
src/calc.h
src/main.c
+2
-1
2 additions, 1 deletion
src/main.c
with
7 additions
and
4 deletions
src/calc.c
+
3
−
2
View file @
2b209ba9
...
@@ -61,7 +61,8 @@
...
@@ -61,7 +61,8 @@
#endif
#endif
int
calc_delay
;
int
calc_delay
;
char
calc_smfs
;
struct
{
struct
{
char
err
;
/* 1/0, error or not */
char
err
;
/* 1/0, error or not */
...
@@ -223,7 +224,7 @@ int calc_item(struct dir *par, char *path, char *name) {
...
@@ -223,7 +224,7 @@ int calc_item(struct dir *par, char *path, char *name) {
if
(
exclude_match
(
tmp
))
if
(
exclude_match
(
tmp
))
d
->
flags
|=
FF_EXL
;
d
->
flags
|=
FF_EXL
;
if
(
sflags
&
SF_SMFS
&&
stcalc
.
curdev
!=
fs
.
st_dev
)
if
(
calc_smfs
&&
stcalc
.
curdev
!=
fs
.
st_dev
)
d
->
flags
|=
FF_OTHFS
;
d
->
flags
|=
FF_OTHFS
;
/* determine type of this item */
/* determine type of this item */
...
...
This diff is collapsed.
Click to expand it.
src/calc.h
+
2
−
1
View file @
2b209ba9
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
#include
"ncdu.h"
#include
"ncdu.h"
extern
int
calc_delay
;
/* minimum screen update interval when calculating, in ms */
extern
int
calc_delay
;
/* minimum screen update interval when calculating, in ms */
extern
char
calc_smfs
;
/* stay on the same filesystem */
void
calc_process
(
void
);
void
calc_process
(
void
);
int
calc_key
(
int
);
int
calc_key
(
int
);
...
...
This diff is collapsed.
Click to expand it.
src/main.c
+
2
−
1
View file @
2b209ba9
...
@@ -81,6 +81,7 @@ void argv_parse(int argc, char **argv, char *dir) {
...
@@ -81,6 +81,7 @@ void argv_parse(int argc, char **argv, char *dir) {
getcwd
(
dir
,
PATH_MAX
);
getcwd
(
dir
,
PATH_MAX
);
sflags
=
0
;
sflags
=
0
;
calc_delay
=
100
;
calc_delay
=
100
;
calc_smfs
=
0
;
/* read from commandline */
/* read from commandline */
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
...
@@ -104,7 +105,7 @@ void argv_parse(int argc, char **argv, char *dir) {
...
@@ -104,7 +105,7 @@ void argv_parse(int argc, char **argv, char *dir) {
len
=
strlen
(
argv
[
i
]);
len
=
strlen
(
argv
[
i
]);
for
(
j
=
1
;
j
<
len
;
j
++
)
for
(
j
=
1
;
j
<
len
;
j
++
)
switch
(
argv
[
i
][
j
])
{
switch
(
argv
[
i
][
j
])
{
case
'x'
:
sflag
s
|
=
SF_SMFS
;
break
;
case
'x'
:
calc_smf
s
=
1
;
break
;
case
'q'
:
calc_delay
=
2000
;
break
;
case
'q'
:
calc_delay
=
2000
;
break
;
case
'?'
:
case
'?'
:
case
'h'
:
case
'h'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment