Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sven Gestegård Robertz
LabComm
Commits
b106fb26
Commit
b106fb26
authored
May 31, 2013
by
Anders Blomdell
Browse files
Added distclean target.
Somewhat improved error handling in readers.
parent
ebae0d9b
Changes
7
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
b106fb26
...
...
@@ -32,3 +32,14 @@ clean-compiler:
.PHONY
:
clean-%
clean-%
:
$(MAKE)
-C
$*
-e
clean
.PHONY
:
distclean
distclean
:
$(SUBDIRS:%=distclean-%)
.PHONY
:
distclean-compiler
distclean-compiler
:
cd
compiler
;
ant clean
.PHONY
:
distclean-%
distclean-%
:
$(MAKE)
-C
$*
-e
distclean
examples/Makefile
View file @
b106fb26
...
...
@@ -6,5 +6,5 @@ test:
echo
More to be
done
...
cd
simple
;
sh compile.sh
&&
sh run.sh
clean
:
clean dist
clean
:
echo
To be
done
...
lib/Makefile
View file @
b106fb26
...
...
@@ -10,3 +10,8 @@ clean:
cd
c
;
make clean
cd
csharp
;
make clean
cd
java
;
make clean
distclean
:
cd
c
;
make distclean
cd
csharp
;
make clean
cd
java
;
make clean
lib/c/labcomm.c
View file @
b106fb26
...
...
@@ -568,6 +568,7 @@ struct labcomm_decoder *labcomm_decoder_new(
result
->
reader
->
data_size
=
0
;
result
->
reader
->
count
=
0
;
result
->
reader
->
pos
=
0
;
result
->
reader
->
error
=
0
;
result
->
lock
=
lock
;
result
->
on_error
=
on_error_fprintf
;
result
->
on_new_datatype
=
on_new_datatype
;
...
...
lib/c/labcomm_fd_reader.c
View file @
b106fb26
...
...
@@ -76,6 +76,7 @@ static int fd_fill(struct labcomm_reader *r, void *context)
err
=
read
(
fd_context
->
fd
,
r
->
data
,
r
->
data_size
);
if
(
err
<=
0
)
{
r
->
count
=
0
;
r
->
error
=
-
EPIPE
;
result
=
-
EPIPE
;
}
else
{
r
->
count
=
err
;
...
...
lib/c/labcomm_private.h
View file @
b106fb26
...
...
@@ -158,6 +158,9 @@ static inline unsigned int labcomm_read_packed32(struct labcomm_reader *r)
if
(
r
->
pos
>=
r
->
count
)
{
r
->
action
->
fill
(
r
,
r
->
context
);
if
(
r
->
error
!=
0
)
{
goto
out
;
}
}
tmp
=
r
->
data
[
r
->
pos
];
r
->
pos
++
;
...
...
@@ -166,6 +169,7 @@ static inline unsigned int labcomm_read_packed32(struct labcomm_reader *r)
break
;
}
}
out:
return
result
;
}
...
...
test/Makefile
View file @
b106fb26
...
...
@@ -10,8 +10,8 @@ test: $(TESTS:%=test_%)
# PYTHONPATH=../lib/python \
# ./test_encoder_decoder.py --labcomm="$(LABCOMM)" basic.lc
.PHONY
:
clean
clean
:
.PHONY
:
clean
distclean
clean dist
clean
:
rm
-rf
gen
.PHONY
:
test_%
...
...
Write
Preview
Supports
Markdown
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