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;
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);
AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
-sbin_PROGRAMS = silcd
+sbin_PROGRAMS = silcd testi
silcd_SOURCES = \
protocol.c \
server_version.c
silcd_DEPENDENCIES = ../lib/libsilc.a
+testi_SOURCES = testi.c
+
LIBS = $(SILC_COMMON_LIBS)
LDADD =
AC_INIT(includes/version.h)
-# Compiler settings
-CFLAGS="-Wall $CFLAGS"
-
#
# Put here any platform specific stuff
#
# 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
#include <strings.h>
#endif
-#ifdef STDC_HEADERS
#include <stdlib.h>
-#else
-char *malloc ();
-char *realloc ();
-#endif
-
/* Define the syntax stuff for \<, \>, etc. */
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;
{ 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;
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;