comparison src/nt.c @ 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents 4be1180a9e89
children 41ff10fd062f
comparison
equal deleted inserted replaced
202:61eefc8fc970 203:850242ba4a81
201 strcpy (dir_static.d_name, find_data.cFileName); 201 strcpy (dir_static.d_name, find_data.cFileName);
202 if (dir_is_fat) 202 if (dir_is_fat)
203 _strlwr (dir_static.d_name); 203 _strlwr (dir_static.d_name);
204 else if (!NILP (Vwin32_downcase_file_names)) 204 else if (!NILP (Vwin32_downcase_file_names))
205 { 205 {
206 register char *p; 206 REGISTER char *p;
207 for (p = dir_static.d_name; *p; p++) 207 for (p = dir_static.d_name; *p; p++)
208 if (*p >= 'a' && *p <= 'z') 208 if (*p >= 'a' && *p <= 'z')
209 break; 209 break;
210 if (!*p) 210 if (!*p)
211 _strlwr (dir_static.d_name); 211 _strlwr (dir_static.d_name);
395 the specified separator. Also conditionally convert upper 395 the specified separator. Also conditionally convert upper
396 case path name components to lower case. */ 396 case path name components to lower case. */
397 397
398 static void 398 static void
399 normalize_filename (fp, path_sep) 399 normalize_filename (fp, path_sep)
400 register char *fp; 400 REGISTER char *fp;
401 char path_sep; 401 char path_sep;
402 { 402 {
403 char sep; 403 char sep;
404 char *elem; 404 char *elem;
405 405
453 } 453 }
454 454
455 /* Destructively turn backslashes into slashes. */ 455 /* Destructively turn backslashes into slashes. */
456 void 456 void
457 dostounix_filename (p) 457 dostounix_filename (p)
458 register char *p; 458 REGISTER char *p;
459 { 459 {
460 normalize_filename (p, '/'); 460 normalize_filename (p, '/');
461 } 461 }
462 462
463 /* Destructively turn slashes into backslashes. */ 463 /* Destructively turn slashes into backslashes. */
464 void 464 void
465 unixtodos_filename (p) 465 unixtodos_filename (p)
466 register char *p; 466 REGISTER char *p;
467 { 467 {
468 normalize_filename (p, '\\'); 468 normalize_filename (p, '\\');
469 } 469 }
470 470
471 /* Remove all CR's that are followed by a LF. 471 /* Remove all CR's that are followed by a LF.
472 (From msdos.c...probably should figure out a way to share it, 472 (From msdos.c...probably should figure out a way to share it,
473 although this code isn't going to ever change.) */ 473 although this code isn't going to ever change.) */
474 int 474 int
475 crlf_to_lf (n, buf) 475 crlf_to_lf (n, buf)
476 register int n; 476 REGISTER int n;
477 register unsigned char *buf; 477 REGISTER unsigned char *buf;
478 { 478 {
479 unsigned char *np = buf; 479 unsigned char *np = buf;
480 unsigned char *startp = buf; 480 unsigned char *startp = buf;
481 unsigned char *endp = buf + n; 481 unsigned char *endp = buf + n;
482 482
835 char c; 835 char c;
836 char * path; 836 char * path;
837 837
838 if (is_fat_volume (name, &path)) /* truncate to 8.3 */ 838 if (is_fat_volume (name, &path)) /* truncate to 8.3 */
839 { 839 {
840 register int left = 8; /* maximum number of chars in part */ 840 REGISTER int left = 8; /* maximum number of chars in part */
841 register int extn = 0; /* extension added? */ 841 REGISTER int extn = 0; /* extension added? */
842 register int dots = 2; /* maximum number of dots allowed */ 842 REGISTER int dots = 2; /* maximum number of dots allowed */
843 843
844 while (name < path) 844 while (name < path)
845 *str++ = *name++; /* skip past UNC header */ 845 *str++ = *name++; /* skip past UNC header */
846 846
847 while ((c = *name++)) 847 while ((c = *name++))