Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
c37f8e90
Commit
c37f8e90
authored
Aug 25, 2014
by
Gianfranco Costamagna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix return exit value, shared libs cannot use exit, but return instead
parent
27312e38
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
compress42.c
src/C/compress/compress42.c
+14
-14
No files found.
src/C/compress/compress42.c
View file @
c37f8e90
...
...
@@ -193,7 +193,6 @@
extern
void
*
memset
LARGS
((
void
*
,
char
,
unsigned
int
));
extern
void
*
memcpy
LARGS
((
void
*
,
void
const
*
,
unsigned
int
));
extern
int
atoi
LARGS
((
char
const
*
));
extern
void
exit
LARGS
((
int
));
extern
int
isatty
LARGS
((
int
));
#endif
...
...
@@ -645,7 +644,7 @@ long bytes_out; /* Total number of byte to output */
#endif
int
main
ARGS
((
int
,
char
**
));
void
Usage
ARGS
((
void
));
int
Usage
ARGS
((
void
));
void
comprexx
ARGS
((
char
**
));
void
compdir
ARGS
((
char
*
));
void
compress
ARGS
((
int
,
int
));
...
...
@@ -654,9 +653,9 @@ void compress ARGS((int,int));
int
is_compressed
ARGS
((
char
*
,
int
));
void
read_error
ARGS
((
void
));
void
write_error
ARGS
((
void
));
void
abort_compress
ARGS
((
void
));
int
abort_compress
ARGS
((
void
));
void
prratio
ARGS
((
FILE
*
,
long
,
long
));
void
about
ARGS
((
void
));
int
about
ARGS
((
void
));
/*****************************************************************
* TAG( main )
...
...
@@ -724,7 +723,7 @@ main(argc, argv)
if
(
filelist
==
NULL
)
{
fprintf
(
stderr
,
"Cannot allocate memory for file list.
\n
"
);
exit
(
1
)
;
return
1
;
}
fileptr
=
filelist
;
*
filelist
=
NULL
;
...
...
@@ -765,8 +764,7 @@ main(argc, argv)
{
case
'V'
:
about
();
break
;
return
0
;
case
's'
:
silent
=
1
;
quiet
=
1
;
...
...
@@ -799,6 +797,7 @@ main(argc, argv)
{
fprintf
(
stderr
,
"Missing maxbits
\n
"
);
Usage
();
return
1
;
}
maxbits
=
atoi
(
*
argv
);
...
...
@@ -823,6 +822,7 @@ main(argc, argv)
default
:
fprintf
(
stderr
,
"Unknown flag: '%c'; "
,
**
argv
);
Usage
();
return
1
;
}
}
}
...
...
@@ -873,10 +873,10 @@ nextarg: continue;
//rsize = read(0, input_buffer, sizeof(input_buffer));
//decompress(input_buffer, rsize);
//
exit((exit_code== -1) ? 1:exit_code)
;
//
return (exit_code== -1) ? 1:exit_code
;
}
void
int
Usage
()
{
fprintf
(
stderr
,
"\
...
...
@@ -894,7 +894,7 @@ Usage: %s [-dfvcVr] [-b maxbits] [file ...]\n\
-r Recursive. If a filename is a directory, descend
\n
\
into it and compress everything in it.
\n
"
);
exit
(
1
)
;
return
1
;
}
void
...
...
@@ -1888,13 +1888,13 @@ write_error()
abort_compress
();
}
void
int
abort_compress
()
{
if
(
remove_ofname
)
unlink
(
ofname
);
exit
(
1
)
;
return
1
;
}
void
...
...
@@ -1924,7 +1924,7 @@ prratio(stream, num, den)
fprintf
(
stream
,
"%d.%02d%%"
,
q
/
100
,
q
%
100
);
}
void
int
about
()
{
/* CJH */
...
...
@@ -1977,5 +1977,5 @@ Authors version 4.0 (World release in 1985):\n\
Spencer W. Thomas, Jim McKie, Steve Davies,
\n
\
Ken Turkowski, James A. Woods, Joe Orost
\n
"
);
exit
(
0
)
;
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment