From a7a7bebcecbcd22da76920cd0e46c455ec8b5bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 14 Sep 2019 08:56:40 +0800 Subject: Isolate headers to a directory Prepare for header system installation --- .gitignore | 2 +- Makefile.am | 5 +++-- rtclient.c | 2 +- rtclient.h | 23 ----------------------- rtclient/rtclient.h | 23 +++++++++++++++++++++++ rtclient/rtticket.h | 9 +++++++++ rtclient/rtuser.h | 33 +++++++++++++++++++++++++++++++++ rtticket.h | 9 --------- rtuser.h | 33 --------------------------------- test.c | 2 +- 10 files changed, 71 insertions(+), 70 deletions(-) delete mode 100644 rtclient.h create mode 100644 rtclient/rtclient.h create mode 100644 rtclient/rtticket.h create mode 100644 rtclient/rtuser.h delete mode 100644 rtticket.h delete mode 100644 rtuser.h diff --git a/.gitignore b/.gitignore index 07fcd69..b8cc4af 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,5 @@ configure depcomp install-sh missing -rtclient stamp-h1 +test diff --git a/Makefile.am b/Makefile.am index 37f2990..3a90116 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,6 @@ noinst_LIBRARIES = librtclient.a librtclient_a_SOURCES = \ - rtuser.h \ - rtclient.h \ + rtclient/rtuser.h \ + rtclient/rtticket.h \ + rtclient/rtclient.h \ rtclient.c diff --git a/rtclient.c b/rtclient.c index c623c84..d90ac42 100644 --- a/rtclient.c +++ b/rtclient.c @@ -8,7 +8,7 @@ #include #include #include -#include "rtclient.h" +#include "rtclient/rtclient.h" typedef struct rt_user rt_user; typedef struct rt_ticketlist rt_ticketlist; diff --git a/rtclient.h b/rtclient.h deleted file mode 100644 index a872f37..0000000 --- a/rtclient.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef RTCLIENT_H -#define RTCLIENT_H - -#include "rtuser.h" -#include "rtticket.h" - -#ifdef __cplusplus -extern "C" { -#endif - - bool rtclient_init(const char *server_url); - void rtclient_login(const char *name, const char *password); - void rtclient_user_show(struct rt_user **userptr, const char *name); - void rtclient_ticket_search(struct rt_ticketlist **listptr, const char *query); - void rtclient_ticket_freelist(struct rt_ticketlist *list); - void rtclient_user_free(struct rt_user *user); - void rtclient_cleanup(); - -#ifdef __cplusplus -} -#endif - -#endif // RTCLIENT_H diff --git a/rtclient/rtclient.h b/rtclient/rtclient.h new file mode 100644 index 0000000..a872f37 --- /dev/null +++ b/rtclient/rtclient.h @@ -0,0 +1,23 @@ +#ifndef RTCLIENT_H +#define RTCLIENT_H + +#include "rtuser.h" +#include "rtticket.h" + +#ifdef __cplusplus +extern "C" { +#endif + + bool rtclient_init(const char *server_url); + void rtclient_login(const char *name, const char *password); + void rtclient_user_show(struct rt_user **userptr, const char *name); + void rtclient_ticket_search(struct rt_ticketlist **listptr, const char *query); + void rtclient_ticket_freelist(struct rt_ticketlist *list); + void rtclient_user_free(struct rt_user *user); + void rtclient_cleanup(); + +#ifdef __cplusplus +} +#endif + +#endif // RTCLIENT_H diff --git a/rtclient/rtticket.h b/rtclient/rtticket.h new file mode 100644 index 0000000..3d78ac1 --- /dev/null +++ b/rtclient/rtticket.h @@ -0,0 +1,9 @@ +#ifndef RTTICKET_H +#define RTTICKET_H + +struct rt_ticketlist { + unsigned int length; + char *tickets[]; +}; + +#endif // RTTICKET_H diff --git a/rtclient/rtuser.h b/rtclient/rtuser.h new file mode 100644 index 0000000..9fccea8 --- /dev/null +++ b/rtclient/rtuser.h @@ -0,0 +1,33 @@ +#ifndef RTUSER_H +#define RTUSER_H + +#include + +struct rt_user { + char *id; + char *password; + char *name; + char *emailaddress; + char *realname; + char *nickname; + char *gecos; + char *organization; + char *address1; + char *address2; + char *city; + char *state; + char *zip; + char *country; + char *homephone; + char *workphone; + char *mobilephone; + char *pagerphone; + char *contactinfo; + char *comments; + char *signature; + char lang[2]; + bool privileged; + bool disabled; +}; + +#endif // RTUSER_H diff --git a/rtticket.h b/rtticket.h deleted file mode 100644 index 3d78ac1..0000000 --- a/rtticket.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef RTTICKET_H -#define RTTICKET_H - -struct rt_ticketlist { - unsigned int length; - char *tickets[]; -}; - -#endif // RTTICKET_H diff --git a/rtuser.h b/rtuser.h deleted file mode 100644 index 9fccea8..0000000 --- a/rtuser.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RTUSER_H -#define RTUSER_H - -#include - -struct rt_user { - char *id; - char *password; - char *name; - char *emailaddress; - char *realname; - char *nickname; - char *gecos; - char *organization; - char *address1; - char *address2; - char *city; - char *state; - char *zip; - char *country; - char *homephone; - char *workphone; - char *mobilephone; - char *pagerphone; - char *contactinfo; - char *comments; - char *signature; - char lang[2]; - bool privileged; - bool disabled; -}; - -#endif // RTUSER_H diff --git a/test.c b/test.c index 529da25..6dd385c 100644 --- a/test.c +++ b/test.c @@ -1,7 +1,7 @@ #include #include #include -#include "rtclient.h" +#include "rtclient/rtclient.h" int main(void) { -- cgit v1.2.3