Linux and SVR4 don'thave 14-character filename limits.
Re-factor the #defines while I'm at it.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user