[PATCH 62/65] Fixing a few details

From: FRIGN <dev_AT_frign.de>
Date: Mon, 9 May 2016 16:41:48 +0200

1.8 is not yet released, so don't denote it as such
---
 CHANGES        |  2 +-
 LICENSE        |  7 ++++---
 config.mk      | 10 +++++-----
 ii.c           | 43 +++++--------------------------------------
 util/eprintf.c |  2 +-
 5 files changed, 16 insertions(+), 48 deletions(-)
diff --git a/CHANGES b/CHANGES
index 423da4d..afd9a68 100644
--- a/CHANGES
+++ b/CHANGES
_AT_@ -1,4 +1,4 @@
-1.8 (2014-??-??)
+1.8
     - raw IRC output to stdout.
     - add quit command (/q [string]).
     - write timestamp in outfile as unix timestamp (UTC+0).
diff --git a/LICENSE b/LICENSE
index 590d0bc..9642a0e 100644
--- a/LICENSE
+++ b/LICENSE
_AT_@ -1,8 +1,9 @@
 MIT/X Consortium License
 
-(C)opyright 2005-2006 Anselm R. Garbe <garbeam_AT_wmii.de>
-(C)opyright 2005-2011 Nico Golde <nico at ngolde dot de>
-(C)opyright 2014 Hiltjo Posthuma <hiltjo at codemadness dot org>
+_AT_ 2005-2006 Anselm R. Garbe <garbeam_AT_wmii.de>
+_AT_ 2005-2011 Nico Golde <nico_AT_ngolde.de>
+_AT_ 2014-2015 Hiltjo Posthuma <hiltjo_AT_codemadness.org>
+_AT_ 2016 Laslo Hunhold <dev_AT_frign.de>
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
diff --git a/config.mk b/config.mk
index 8ac1c0e..84bc135 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -1,5 +1,5 @@
 # Customize to fit your system
-VERSION = 1.8
+VERSION = 1.7
 
 # paths
 PREFIX = /usr/local
_AT_@ -22,9 +22,9 @@ LIBS = -L${LIBDIR} -L/usr/lib -lc
 CC = cc
 
 # debug
-CFLAGS = -g -O0 -pedantic -Wall -Wextra ${INCLUDES} -DVERSION=\"${VERSION}\" -std=c99 -D_POSIX_C_SOURCE=200809L
-LDFLAGS = ${LIBS}
+#CFLAGS = -g -O0 -pedantic -Wall -Wextra ${INCLUDES} -DVERSION=\"${VERSION}\" -std=c99 -D_POSIX_C_SOURCE=200809L
+#LDFLAGS = ${LIBS}
 
 # release
-#CFLAGS = -Os ${INCLUDES} -DVERSION=\"${VERSION}\" -std=c99 -D_POSIX_C_SOURCE=200809L
-#LDFLAGS = -s
+CFLAGS = -Os ${INCLUDES} -DVERSION=\"${VERSION}\" -std=c99 -D_POSIX_C_SOURCE=200809L
+LDFLAGS = -s
diff --git a/ii.c b/ii.c
index a8bcc07..bb2372f 100644
--- a/ii.c
+++ b/ii.c
_AT_@ -37,39 +37,6 @@ struct Channel {
 	Channel *next;
 };
 
-static void      create_dirtree(const char *);
-static void      create_filepath(char *, size_t, const char *, const char *, const char *);
-static Channel * channel_add(const char *);
-static void      channel_free(Channel *);
-static Channel * channel_find(const char *);
-static Channel * channel_join(const char *);
-static void      channel_leave(Channel *);
-static Channel * channel_new(const char *);
-static void      channel_normalize_name(char *);
-static void      channel_normalize_path(char *);
-static int       channel_open(Channel *);
-static void      channel_print(Channel *, const char *);
-static int       channel_reopen(Channel *);
-static void      channel_rm(Channel *);
-static void *    ecalloc(size_t, size_t);
-static void      ewritestr(int, const char *);
-static void      handle_channels_input(int, Channel *);
-static void      handle_server_output(int );
-static int       isnumeric(const char *);
-static void      loginkey(int, const char *);
-static void      loginuser(int, const char *, const char *);
-static void      proc_channels_privmsg(int, Channel *, char *);
-static void      proc_channels_input(int, Channel *, char *);
-static void      proc_server_cmd(int, char *);
-static int       read_line(int, char *, size_t);
-static void      run(int, const char *);
-static void      setup(void);
-static void      sighandler(int);
-static int       tcpopen(const char *, const char *);
-static size_t    tokenize(char **, size_t, char *, int);
-static int       udsopen(const char *);
-static void      usage(void);
-
 static int      isrunning = 1;
 static time_t   last_response = 0;
 static Channel *channels = NULL;
_AT_@ -81,9 +48,9 @@ static char     msg[IRC_MSG_MAX];  /* message buf used for communication */
 static void
 usage(void)
 {
-	eprintf("usage: %s <-s host> [-i <irc dir>] [-p <port>] "
-	        "[-u <unix-domain-socket>] [-n <nick>] [-k <password>] "
-	        "[-f <fullname>]\n", argv0);
+	eprintf("usage: %s <-s host> [-i ircdir] [-p port] "
+	        "[-u unix-domain-socket] [-n nick] [-k password] "
+	        "[-f fullname]\n", argv0);
 }
 
 static void *
_AT_@ -716,7 +683,7 @@ run(int ircfd, const char *host)
 		} else if(r == 0) {
 			if(time(NULL) - last_response >= PING_TIMEOUT) {
 				channel_print(channelmaster, "-!- ii shutting down: ping timeout");
-				exit(EXIT_FAILURE);
+				exit(1);
 			}
 			ewritestr(ircfd, ping_msg);
 			continue;
_AT_@ -798,5 +765,5 @@ main(int argc, char *argv[])
 	for(c = channels; c; c = c->next)
 		channel_leave(c);
 
-	return EXIT_SUCCESS;
+	return 0;
 }
diff --git a/util/eprintf.c b/util/eprintf.c
index 91b19b7..5b7fb25 100644
--- a/util/eprintf.c
+++ b/util/eprintf.c
_AT_@ -16,7 +16,7 @@ eprintf(const char *fmt, ...)
 	va_list ap;
 
 	va_start(ap, fmt);
-	venprintf(EXIT_FAILURE, fmt, ap);
+	venprintf(1, fmt, ap);
 	va_end(ap);
 }
 
-- 
2.4.10
--Multipart=_Mon__9_May_2016_17_21_10_+0200_I.6cpFVydhq75aaE
Content-Type: text/x-diff;
 name="0063-remove-duplicate-word-thanks-Michael-Stevens.patch"
Content-Disposition: attachment;
 filename="0063-remove-duplicate-word-thanks-Michael-Stevens.patch"
Content-Transfer-Encoding: 7bit
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Mon May 09 2016 - 17:24:22 CEST