comparison src/fileio.c @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents 558f606b08ae
children e11d67e05968
comparison
equal deleted inserted replaced
285:9a3756523c1b 286:57709be46d1b
736 /* Poor man's congruential RN generator. Replace with ++count 736 /* Poor man's congruential RN generator. Replace with ++count
737 for debugging. */ 737 for debugging. */
738 count += 25229; 738 count += 25229;
739 count %= 225307; 739 count %= 225307;
740 740
741 QUIT;
742
741 if (stat ((CONST char *) data, &ignored) < 0) 743 if (stat ((CONST char *) data, &ignored) < 0)
742 { 744 {
743 /* We want to return only if errno is ENOENT. */ 745 /* We want to return only if errno is ENOENT. */
744 if (errno == ENOENT) 746 if (errno == ENOENT)
745 return val; 747 return val;
746 else 748 else
747 /* The error here is dubious, but there is little else we 749 /* The error here is dubious, but there is little else we
748 can do. The alternatives are to return nil, which is 750 can do. The alternatives are to return nil, which is
749 as bad as (and in many cases worse than) throwing the 751 as bad as (and in many cases worse than) throwing the
750 error, or to ignore the error, which will likely result 752 error, or to ignore the error, which will likely result
751 in looping through 225307 stat's, which is not only 753 in inflooping. */
752 dog-slow, but also useless since it will fallback to
753 the errow below, anyway. */
754 report_file_error ("Cannot create temporary name for prefix", 754 report_file_error ("Cannot create temporary name for prefix",
755 list1 (prefix)); 755 list1 (prefix));
756 /* not reached */ 756 /* not reached */
757 } 757 }
758 } 758 }
759 signal_simple_error ("Cannot create temporary name for prefix", prefix);
760 RETURN_NOT_REACHED (Qnil); 759 RETURN_NOT_REACHED (Qnil);
761 } 760 }
762 761
763 762
764 DEFUN ("expand-file-name", Fexpand_file_name, 1, 2, 0, /* 763 DEFUN ("expand-file-name", Fexpand_file_name, 1, 2, 0, /*