diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index bb45f3639..df8caec83 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -194,24 +194,23 @@ regularize(s) /* normalize file name - we don't like .'s, /'s, spaces */ register char *s; { register char *lp; -#if defined(SYSV) && !defined(AIX_31) && defined(COMPRESS) - int i; -#endif while((lp=index(s, '.')) || (lp=index(s, '/')) || (lp=index(s,' '))) *lp = '_'; -#if defined(SYSV) && !defined(AIX_31) +#if defined(SYSV) && !defined(AIX_31) && !defined(SVR4) && !defined(LINUX) /* avoid problems with 14 character file name limit */ # ifdef COMPRESS /* leave room for .e from error and .Z from compress appended to * save files */ + { # ifdef COMPRESS_EXTENSION - i = 12 - strlen(COMPRESS_EXTENSION); + int i = 12 - strlen(COMPRESS_EXTENSION); # else - i = 10; /* should never happen... */ + int i = 10; /* should never happen... */ # endif - if(strlen(s) > i) + if(strlen(s) > i) s[i] = '\0'; + } # else if(strlen(s) > 11) /* leave room for .nn appended to level files */