summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.c1
-rw-r--r--main.c5
-rw-r--r--rtclient/client.h3
-rw-r--r--rtclient/ticket.h2
-rw-r--r--rtclient/user.h2
-rw-r--r--user.c1
6 files changed, 7 insertions, 7 deletions
diff --git a/client.c b/client.c
index 2972167..f6fdc4a 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,5 @@
#include <stdlib.h>
+#include <stdbool.h>
#include "request.h"
#include "rtclient/client.h"
diff --git a/main.c b/main.c
index adf3dfb..03dc2e3 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdbool.h>
#include <rtclient/client.h>
+#include <rtclient/user.h>
+#include <rtclient/ticket.h>
int main(void)
{
@@ -66,7 +69,7 @@ int main(void)
sprintf(query, "%s%s'", prefix, name);
rtclient_ticket_search(&list, query);
if (list) {
- for (unsigned short i = 0; i < list->length; i++) {
+ for (size_t i = 0; i < list->length; i++) {
char *ticket = list->tickets[i];
printf("Ticket %d: %s\n", i, ticket);
}
diff --git a/rtclient/client.h b/rtclient/client.h
index b132564..4f74536 100644
--- a/rtclient/client.h
+++ b/rtclient/client.h
@@ -1,9 +1,6 @@
#ifndef RTCLIENT_CLIENT_H
#define RTCLIENT_CLIENT_H
-#include "user.h"
-#include "ticket.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/rtclient/ticket.h b/rtclient/ticket.h
index 74db994..87e7496 100644
--- a/rtclient/ticket.h
+++ b/rtclient/ticket.h
@@ -2,7 +2,7 @@
#define RTCLIENT_TICKET_H
struct rtclient_ticketlist {
- unsigned int length;
+ size_t length;
char *tickets[];
};
diff --git a/rtclient/user.h b/rtclient/user.h
index e9768a6..5c57cb7 100644
--- a/rtclient/user.h
+++ b/rtclient/user.h
@@ -1,8 +1,6 @@
#ifndef RTCLIENT_USER_H
#define RTCLIENT_USER_H
-#include <stdbool.h>
-
enum rtclient_lang {
RTCLIENT_LANG_NONE = 0
, RTCLIENT_LANG_ar
diff --git a/user.c b/user.c
index 9bfdf96..3e1db94 100644
--- a/user.c
+++ b/user.c
@@ -1,4 +1,5 @@
#include <stdlib.h>
+#include <stdbool.h>
#include "post.h"
#include "rtclient/user.h"