aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2021-06-15 01:35:15 +0200
committerqorg11 <qorg@vxempire.xyz>2021-06-15 01:35:15 +0200
commit502d33093fb33082813b630dcbb752763a7d16d7 (patch)
treec7969720b1733d591b1c476c7f8b0f991985416e
parenta7b4f8632271546ff24e4ba248531fc3f1c53f23 (diff)
downloaddemiurge-502d33093fb33082813b630dcbb752763a7d16d7.tar.gz
demiurge-502d33093fb33082813b630dcbb752763a7d16d7.zip
Move the eputs() funciton to util.c
-rw-r--r--src/main.c5
-rw-r--r--src/util.c8
-rw-r--r--src/util.h3
3 files changed, 12 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 729b498..486df78 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,12 +17,9 @@ usage(const char *progname)
printf("Usage: %s -s=status [-v=visibility] [-F=filename]\n",progname);
return;
}
+
/* prints a string to stderr */
-void
-eputs(const char *s) {
- fprintf(stderr,"%s\n",s);
-}
int
main(int argc, char **argv)
diff --git a/src/util.c b/src/util.c
index 4dc6e9c..abce04a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -32,3 +32,11 @@ write_data(void *buffer, size_t size, size_t nmemb, void *userp)
memcpy(userp,buffer,nmemb*size);
return 0;
}
+
+/* like puts() but writes to stderr */
+
+void
+eputs(const char *s)
+{
+ fprintf(stderr,"%s\n",s);
+}
diff --git a/src/util.h b/src/util.h
index 3fcb2ab..e952043 100644
--- a/src/util.h
+++ b/src/util.h
@@ -5,3 +5,6 @@ get_tokens_from_file(char *filename, char *instance,char *client_id,
char *client_secret, char *access_token);
size_t
write_data(void *buffer, size_t size, size_t nmemb, void *userp);
+
+void
+eputs(const char *s);