comparison src/fileio.c @ 391:289b19a6f2ed v7.0103

updated for version 7.0103
author vimboss
date Tue, 05 Jul 2005 21:48:14 +0000
parents f14cbd913415
children 9595cf1d80a7
comparison
equal deleted inserted replaced
390:bded5839a32e 391:289b19a6f2ed
5433 * search backwards until we hit a '/', '\' or ':' replacing all '.' 5433 * search backwards until we hit a '/', '\' or ':' replacing all '.'
5434 * by '_' for MSDOS or when shortname option set and ext starts with a dot. 5434 * by '_' for MSDOS or when shortname option set and ext starts with a dot.
5435 * Then truncate what is after the '/', '\' or ':' to 8 characters for 5435 * Then truncate what is after the '/', '\' or ':' to 8 characters for
5436 * MSDOS and 26 characters for AMIGA, a lot more for UNIX. 5436 * MSDOS and 26 characters for AMIGA, a lot more for UNIX.
5437 */ 5437 */
5438 for (ptr = retval + fnamelen; ptr >= retval; mb_ptr_back(retval, ptr)) 5438 for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr))
5439 { 5439 {
5440 #ifndef RISCOS 5440 #ifndef RISCOS
5441 if (*ext == '.' 5441 if (*ext == '.'
5442 #ifdef USE_LONG_FNAME 5442 # ifdef USE_LONG_FNAME
5443 && (!USE_LONG_FNAME || shortname) 5443 && (!USE_LONG_FNAME || shortname)
5444 #else 5444 # else
5445 # ifndef SHORT_FNAME 5445 # ifndef SHORT_FNAME
5446 && shortname 5446 && shortname
5447 # endif
5447 # endif 5448 # endif
5448 #endif
5449 ) 5449 )
5450 if (*ptr == '.') /* replace '.' by '_' */ 5450 if (*ptr == '.') /* replace '.' by '_' */
5451 *ptr = '_'; 5451 *ptr = '_';
5452 #endif /* RISCOS */ 5452 #endif
5453 if (vim_ispathsep(*ptr)) 5453 if (vim_ispathsep(*ptr))
5454 {
5455 ++ptr;
5454 break; 5456 break;
5455 } 5457 }
5456 ptr++; 5458 }
5457 5459
5458 /* the file name has at most BASENAMELEN characters. */ 5460 /* the file name has at most BASENAMELEN characters. */
5459 #ifndef SHORT_FNAME 5461 #ifndef SHORT_FNAME
5460 if (STRLEN(ptr) > (unsigned)BASENAMELEN) 5462 if (STRLEN(ptr) > (unsigned)BASENAMELEN)
5461 ptr[BASENAMELEN] = '\0'; 5463 ptr[BASENAMELEN] = '\0';