From 3d3fd4b7278c48da489d2cc296c1027d7aa722f2 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 22 Mar 2012 15:26:19 +0100 Subject: [PATCH] Rewrote late declations, which are part of C99, but not C89. --- sbr/path.c | 3 ++- uip/repl.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sbr/path.c b/sbr/path.c index e5576b8..27af5b3 100644 --- a/sbr/path.c +++ b/sbr/path.c @@ -234,12 +234,13 @@ char * expanddir(char *d) { static char buf[BUFSIZ]; + int len; if (*d == '/') { strcpy(buf, d); } else { getcwd(buf, sizeof buf); - int len = strlen(buf); + len = strlen(buf); snprintf(buf+len, sizeof buf - len, "/%s", d); } packpath(buf); diff --git a/uip/repl.c b/uip/repl.c index dff8a9e..3cba512 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -149,12 +149,12 @@ main(int argc, char **argv) struct msgs *mp = NULL; FILE *in; - filter = getcpy(etcpath(mhlreply)); - #ifdef MHE int buildsw = 0; #endif /* MHE */ + filter = getcpy(etcpath(mhlreply)); + #ifdef LOCALE setlocale(LC_ALL, ""); #endif -- 1.7.10.4