comparison src/dired.c @ 15197:a97349b06c2c

Comment changes.
author Richard M. Stallman <rms@gnu.org>
date Thu, 09 May 1996 23:21:54 +0000
parents 488fa3e85f56
children a973e9f3f6d1
comparison
equal deleted inserted replaced
15196:414e523050d5 15197:a97349b06c2c
451 { 451 {
452 /* If this is an exact match except for case, 452 /* If this is an exact match except for case,
453 use it as the best match rather than one that is not 453 use it as the best match rather than one that is not
454 an exact match. This way, we get the case pattern 454 an exact match. This way, we get the case pattern
455 of the actual match. */ 455 of the actual match. */
456 /* This tests that the current file is an exact match
457 but BESTMATCH is not (it is too long). */
456 if ((matchsize == len 458 if ((matchsize == len
457 && matchsize + !!directoryp 459 && matchsize + !!directoryp
458 < XSTRING (bestmatch)->size) 460 < XSTRING (bestmatch)->size)
459 || 461 ||
460 /* If there is no exact match ignoring case, 462 /* If there is no exact match ignoring case,
461 prefer a match that does not change the case 463 prefer a match that does not change the case
462 of the input. */ 464 of the input. */
465 /* If there is more than one exact match aside from
466 case, and one of them is exact including case,
467 prefer that one. */
468 /* This == checks that, of current file and BESTMATCH,
469 either both or neither are exact. */
463 (((matchsize == len) 470 (((matchsize == len)
464 == 471 ==
465 (matchsize + !!directoryp 472 (matchsize + !!directoryp
466 == XSTRING (bestmatch)->size)) 473 == XSTRING (bestmatch)->size))
467 /* If there is more than one exact match aside from
468 case, and one of them is exact including case,
469 prefer that one. */
470 && !bcmp (p2, XSTRING (file)->data, XSTRING (file)->size) 474 && !bcmp (p2, XSTRING (file)->data, XSTRING (file)->size)
471 && bcmp (p1, XSTRING (file)->data, XSTRING (file)->size))) 475 && bcmp (p1, XSTRING (file)->data, XSTRING (file)->size)))
472 { 476 {
473 bestmatch = make_string (dp->d_name, len); 477 bestmatch = make_string (dp->d_name, len);
474 if (directoryp) 478 if (directoryp)