summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-17 21:09:12 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-17 21:09:12 (EDT)
commitd178ff96b8ae52b834c2f627744f50fde0472f59 (patch)
tree910f4d9d8817e3277745938b7966f85275ba4a2f /src
parentde936a72906d75ab24f818f0b9a9a11e4d23e428 (diff)
text_*(): Store dimensions as size_t
Diffstat (limited to 'src')
-rw-r--r--src/text.c10
-rw-r--r--src/text.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/text.c b/src/text.c
index b9a0afb..695d5aa 100644
--- a/src/text.c
+++ b/src/text.c
@@ -31,15 +31,15 @@
struct text {
const char *string;
- int width;
- int height;
+ size_t width;
+ size_t height;
};
struct text *
text_new(const char *string)
{
struct text *text;
- int width;
+ size_t width;
int eol;
if (!string) {
@@ -82,13 +82,13 @@ text_new(const char *string)
return text;
}
-int
+size_t
text_get_width(struct text *text)
{
return text->width;
}
-int
+size_t
text_get_height(struct text *text)
{
return text->height;
diff --git a/src/text.h b/src/text.h
index e3596c3..86da775 100644
--- a/src/text.h
+++ b/src/text.h
@@ -31,10 +31,10 @@ struct text;
struct text *
text_new(const char *string);
-int
+size_t
text_get_width(struct text *text) __attribute__((pure));
-int
+size_t
text_get_height(struct text *text) __attribute__((pure));
void