From: markus schnalke Date: Thu, 22 Mar 2012 14:26:19 +0000 (+0100) Subject: Rewrote late declations, which are part of C99, but not C89. X-Git-Tag: mmh-thesis-end~239 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3d3fd4b7278c48da489d2cc296c1027d7aa722f2;p=mmh Rewrote late declations, which are part of C99, but not C89. --- 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