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 *s;
|
||||||
{
|
{
|
||||||
register char *lp;
|
register char *lp;
|
||||||
#if defined(SYSV) && !defined(AIX_31) && defined(COMPRESS)
|
|
||||||
int i;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while((lp=index(s, '.')) || (lp=index(s, '/')) || (lp=index(s,' ')))
|
while((lp=index(s, '.')) || (lp=index(s, '/')) || (lp=index(s,' ')))
|
||||||
*lp = '_';
|
*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 */
|
/* avoid problems with 14 character file name limit */
|
||||||
# ifdef COMPRESS
|
# ifdef COMPRESS
|
||||||
/* leave room for .e from error and .Z from compress appended to
|
/* leave room for .e from error and .Z from compress appended to
|
||||||
* save files */
|
* save files */
|
||||||
|
{
|
||||||
# ifdef COMPRESS_EXTENSION
|
# ifdef COMPRESS_EXTENSION
|
||||||
i = 12 - strlen(COMPRESS_EXTENSION);
|
int i = 12 - strlen(COMPRESS_EXTENSION);
|
||||||
# else
|
# else
|
||||||
i = 10; /* should never happen... */
|
int i = 10; /* should never happen... */
|
||||||
# endif
|
# endif
|
||||||
if(strlen(s) > i)
|
if(strlen(s) > i)
|
||||||
s[i] = '\0';
|
s[i] = '\0';
|
||||||
|
}
|
||||||
# else
|
# else
|
||||||
if(strlen(s) > 11)
|
if(strlen(s) > 11)
|
||||||
/* leave room for .nn appended to level files */
|
/* leave room for .nn appended to level files */
|
||||||
|
|||||||
Reference in New Issue
Block a user