Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
38eadd51
Commit
38eadd51
authored
May 04, 2012
by
Alejandro Mery
Browse files
fex2bin: allocate and delete an script tree
parent
93dd0a48
Changes
3
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
38eadd51
...
...
@@ -13,6 +13,8 @@ clean:
$(TOOLS)
:
Makefile sunxi-tools.h
fex2bin
:
script.c script.h
%
:
%.c %.h
$(CC)
$(CFLAGS)
$(LDFLAGS)
-o
$@
$(
filter
%.c,
$^
)
$(LIBS)
...
...
@@ -20,4 +22,3 @@ $(TOOLS): Makefile sunxi-tools.h
@
for
x
in
$(TOOLS)
'*.o'
'*.swp'
;
do
\
echo
$$
x
;
\
done
>
$@
fex2bin.c
View file @
38eadd51
...
...
@@ -27,6 +27,7 @@ int main(int argc, char *argv[])
int
ret
=
-
1
;
FILE
*
in
=
stdin
,
*
out
=
stdout
;
const
char
*
fn
[]
=
{
"stdin"
,
"stdout"
};
struct
script
*
script
;
if
(
argc
>
1
)
{
if
(
strcmp
(
argv
[
1
],
"-"
)
==
0
)
...
...
@@ -46,6 +47,13 @@ int main(int argc, char *argv[])
}
}
}
if
((
script
=
script_new
())
==
NULL
)
{
errf
(
"malloc: %s
\n
"
,
strerror
(
errno
));
goto
done
;
}
script_delete
(
script
);
goto
done
;
usage:
errf
(
"Usage: %s [<script.fex> [<script.bin>]
\n
"
,
argv
[
0
]);
...
...
fex2bin.h
View file @
38eadd51
...
...
@@ -19,4 +19,6 @@
#include "sunxi-tools.h"
#include "script.h"
#endif
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