openbsd-ports/net/silc-server/patches/patch-lib_silcutil_silcconfig_c

43 lines
1.5 KiB
Plaintext

$OpenBSD: patch-lib_silcutil_silcconfig_c,v 1.3 2007/04/01 20:43:59 steven Exp $
--- lib/silcutil/silcconfig.c.orig Sun May 1 10:00:16 2005
+++ lib/silcutil/silcconfig.c Sun Apr 1 22:42:28 2007
@@ -93,7 +93,7 @@ char *silc_config_strerror(int errnum)
/* Points the first non-space character */
static void my_trim_spaces(SilcConfigFile *file)
{
- register char *r = file->p;
+ signed char *r = file->p;
while ((*r != '\0' && *r != EOF) && isspace(*r))
if (*r++ == '\n') file->line++;
file->p = r;
@@ -101,7 +101,7 @@ static void my_trim_spaces(SilcConfigFile *file)
/* Skips the current line until newline (lf or cr) */
static void my_skip_line(SilcConfigFile *file)
{
- register char *r = file->p;
+ signed char *r = file->p;
while ((*r != '\0' && *r != EOF) && (*r != '\n') && (*r != '\r')) r++;
file->p = ((*r != '\0' && *r != EOF) ? r + 1 : r);
file->line++;
@@ -320,9 +320,9 @@ SilcUInt32 silc_config_get_line(SilcConfigFile *file)
char *silc_config_read_line(SilcConfigFile *file, SilcUInt32 line)
{
- register char *p;
+ signed char *p;
int len;
- char *ret = NULL, *endbuf;
+ signed char *ret = NULL, *endbuf;
if (!file || (line <= 0))
return NULL;
@@ -445,7 +445,7 @@ bool silc_config_register_table(SilcConfigEntity ent,
static int silc_config_main_internal(SilcConfigEntity ent)
{
SilcConfigFile *file = ent->file;
- char **p = &file->p;
+ signed char **p = &file->p;
/* loop throught statements */
while (1) {