From 642a33a4fca84f3dcf9624bd05b3dc6aa1c0dd29 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 6 Jul 2001 15:34:42 +0000 Subject: [PATCH] updates --- apps/irssi/src/fe-text/textbuffer-view.c | 8 ++++---- apps/silcd/Makefile.am | 4 +++- configure.in.pre | 8 +------- lib/contrib/regex.c | 6 ------ lib/silccrypt/rc6.c | 6 +++--- lib/silccrypt/twofish.c | 16 ++++++++-------- 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/apps/irssi/src/fe-text/textbuffer-view.c b/apps/irssi/src/fe-text/textbuffer-view.c index 5cc6405a..449f20a9 100644 --- a/apps/irssi/src/fe-text/textbuffer-view.c +++ b/apps/irssi/src/fe-text/textbuffer-view.c @@ -844,7 +844,7 @@ static void bookmark_check_remove(char *key, LINE_REC *line, static void view_bookmarks_check(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) { BOOKMARK_FIND_REC rec; - LINE_REC *newline; + LINE_REC *new_line; GSList *tmp; rec.remove_line = line; @@ -855,14 +855,14 @@ static void view_bookmarks_check(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) if (rec.remove_list != NULL) { GList *pos = g_list_find(view->buffer->lines, line); - newline = pos == NULL || pos->prev == NULL ? NULL : + new_line = pos == NULL || pos->prev == NULL ? NULL : (pos->next == NULL ? pos->prev->data : pos->next->data); for (tmp = rec.remove_list; tmp != NULL; tmp = tmp->next) { g_hash_table_remove(view->bookmarks, tmp->data); - if (newline != NULL) { + if (new_line != NULL) { g_hash_table_insert(view->bookmarks, - tmp->data, newline); + tmp->data, new_line); } } g_slist_free(rec.remove_list); diff --git a/apps/silcd/Makefile.am b/apps/silcd/Makefile.am index 02589519..f3caad4b 100644 --- a/apps/silcd/Makefile.am +++ b/apps/silcd/Makefile.am @@ -18,7 +18,7 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign -sbin_PROGRAMS = silcd +sbin_PROGRAMS = silcd testi silcd_SOURCES = \ protocol.c \ @@ -35,6 +35,8 @@ silcd_SOURCES = \ server_version.c silcd_DEPENDENCIES = ../lib/libsilc.a +testi_SOURCES = testi.c + LIBS = $(SILC_COMMON_LIBS) LDADD = diff --git a/configure.in.pre b/configure.in.pre index cd7ccba1..80b8dec8 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -18,9 +18,6 @@ AC_INIT(includes/version.h) -# Compiler settings -CFLAGS="-Wall $CFLAGS" - # # Put here any platform specific stuff # @@ -50,10 +47,7 @@ AC_DEFINE(SILC_DIST_DEFINE) # XXX # Compiler flags if test "$GCC"; then - CFLAGS="-finline-functions $CFLAGS" -else - # Currently GCC is only supported compiler - AC_MSG_ERROR(GCC is only supported compiler currently) + CFLAGS="-Wall -finline-functions $CFLAGS" fi # Program checking diff --git a/lib/contrib/regex.c b/lib/contrib/regex.c index 5845a416..6aec4348 100644 --- a/lib/contrib/regex.c +++ b/lib/contrib/regex.c @@ -72,13 +72,7 @@ ifdef HAVE_CONFIG_H #include #endif -#ifdef STDC_HEADERS #include -#else -char *malloc (); -char *realloc (); -#endif - /* Define the syntax stuff for \<, \>, etc. */ diff --git a/lib/silccrypt/rc6.c b/lib/silccrypt/rc6.c index 07997d8f..68dcb3c0 100644 --- a/lib/silccrypt/rc6.c +++ b/lib/silccrypt/rc6.c @@ -151,7 +151,7 @@ u4byte *rc6_set_key(RC6Context *ctx, l[k] = in_key[k]; - t = (key_len / 32) - 1; // t = (key_len / 32); + t = (key_len / 32) - 1; /* t = (key_len / 32); */ a = b = i = j = 0; @@ -159,8 +159,8 @@ u4byte *rc6_set_key(RC6Context *ctx, { a = rotl(l_key[i] + a + b, 3); b += a; b = rotl(l[j] + b, b); l_key[i] = a; l[j] = b; - i = (i == 43 ? 0 : i + 1); // i = (i + 1) % 44; - j = (j == t ? 0 : j + 1); // j = (j + 1) % t; + i = (i == 43 ? 0 : i + 1); /* i = (i + 1) % 44; */ + j = (j == t ? 0 : j + 1); /* j = (j + 1) % t; */ } return l_key; diff --git a/lib/silccrypt/twofish.c b/lib/silccrypt/twofish.c index 1dadee25..b9036b4e 100644 --- a/lib/silccrypt/twofish.c +++ b/lib/silccrypt/twofish.c @@ -420,27 +420,27 @@ u4byte mds_rem(u4byte p0, u4byte p1) for(i = 0; i < 8; ++i) { - t = p1 >> 24; // get most significant coefficient + t = p1 >> 24; /* get most significant coefficient */ - p1 = (p1 << 8) | (p0 >> 24); p0 <<= 8; // shift others up + p1 = (p1 << 8) | (p0 >> 24); p0 <<= 8; /* shift others up */ - // multiply t by a (the primitive element - i.e. left shift) + /* multiply t by a (the primitive element - i.e. left shift) */ u = (t << 1); - if(t & 0x80) // subtract modular polynomial on overflow + if(t & 0x80) /* subtract modular polynomial on overflow */ u ^= G_MOD; - p1 ^= t ^ (u << 16); // remove t * (a * x^2 + 1) + p1 ^= t ^ (u << 16); /* remove t * (a * x^2 + 1) */ - u ^= (t >> 1); // form u = a * t + t / a = t * (a + 1 / a); + u ^= (t >> 1); /* form u = a * t + t / a = t * (a + 1 / a); */ - if(t & 0x01) // add the modular polynomial on underflow + if(t & 0x01) /* add the modular polynomial on underflow */ u ^= G_MOD >> 1; - p1 ^= (u << 24) | (u << 8); // remove t * (a + 1/a) * (x^3 + x) + p1 ^= (u << 24) | (u << 8); /* remove t * (a + 1/a) * (x^3 + x) */ } return p1; -- 2.24.0