pinosaur
/
smdp.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add vi-ish navigation to first and last slide
[smdp.git]
/
src
/
cstack.c
diff --git
a/src/cstack.c
b/src/cstack.c
index
31611c2
..
4763b5b
100644
(file)
--- a/
src/cstack.c
+++ b/
src/cstack.c
@@
-59,13
+59,11
@@
char cstack_pop(cstack_t *self) {
return self->content[self->head--];
}
return self->content[self->head--];
}
-int cstack_top(cstack_t *self, char c) {
- if(self->head >= 0 && self->content[self->head] == c)
- return 1;
- return 0;
+bool cstack_top(cstack_t *self, char c) {
+ return self->head >= 0 && self->content[self->head] == c;
}
}
-
int
cstack_empty(cstack_t *self) {
+
bool
cstack_empty(cstack_t *self) {
return self->head == -1;
}
return self->head == -1;
}