comparison src/lread.c @ 259:11cf20601dec r20-5b28

Import from CVS: tag r20-5b28
author cvs
date Mon, 13 Aug 2007 10:23:02 +0200
parents 677f6a0ee643
children 8efd647ea9ca
comparison
equal deleted inserted replaced
258:58424f6abf56 259:11cf20601dec
34 #include "insdel.h" 34 #include "insdel.h"
35 #include "lstream.h" 35 #include "lstream.h"
36 #include "opaque.h" 36 #include "opaque.h"
37 #include <paths.h> 37 #include <paths.h>
38 #endif 38 #endif
39 #ifdef MULE 39 #ifdef FILE_CODING
40 #include "mule-coding.h" 40 #include "file-coding.h"
41 #endif 41 #endif
42 42
43 #include "sysfile.h" 43 #include "sysfile.h"
44 44
45 #ifdef LISP_FLOAT_TYPE 45 #ifdef LISP_FLOAT_TYPE
594 594
595 /* Do this after the handler to avoid 595 /* Do this after the handler to avoid
596 the need to gcpro noerror, nomessage and nosuffix. 596 the need to gcpro noerror, nomessage and nosuffix.
597 (Below here, we care only whether they are nil or not.) */ 597 (Below here, we care only whether they are nil or not.) */
598 file = Fsubstitute_in_file_name (file); 598 file = Fsubstitute_in_file_name (file);
599 599 #ifdef FILE_CODING
600 #ifdef MULE
601 if (!NILP (used_codesys)) 600 if (!NILP (used_codesys))
602 CHECK_SYMBOL (used_codesys); 601 CHECK_SYMBOL (used_codesys);
603 #endif 602 #endif
604 603
605 /* Avoid weird lossage with null string as arg, 604 /* Avoid weird lossage with null string as arg,
730 lispstream = make_filedesc_input_stream (fd, 0, -1, LSTR_CLOSING); 729 lispstream = make_filedesc_input_stream (fd, 0, -1, LSTR_CLOSING);
731 /* 64K is used for normal files; 8K should be OK here because Lisp 730 /* 64K is used for normal files; 8K should be OK here because Lisp
732 files aren't really all that big. */ 731 files aren't really all that big. */
733 Lstream_set_buffering (XLSTREAM (lispstream), LSTREAM_BLOCKN_BUFFERED, 732 Lstream_set_buffering (XLSTREAM (lispstream), LSTREAM_BLOCKN_BUFFERED,
734 block_size); 733 block_size);
735 #ifdef MULE 734 #ifdef FILE_CODING
736 lispstream = make_decoding_input_stream 735 lispstream = make_decoding_input_stream
737 (XLSTREAM (lispstream), Fget_coding_system (codesys)); 736 (XLSTREAM (lispstream), Fget_coding_system (codesys));
738 Lstream_set_buffering (XLSTREAM (lispstream), LSTREAM_BLOCKN_BUFFERED, 737 Lstream_set_buffering (XLSTREAM (lispstream), LSTREAM_BLOCKN_BUFFERED,
739 block_size); 738 block_size);
740 #endif /* MULE */ 739 #endif
741
742 /* NOTE: Order of these is very important. Don't rearrange them. */ 740 /* NOTE: Order of these is very important. Don't rearrange them. */
743 record_unwind_protect (load_unwind, lispstream); 741 record_unwind_protect (load_unwind, lispstream);
744 record_unwind_protect (load_descriptor_unwind, Vload_descriptor_list); 742 record_unwind_protect (load_descriptor_unwind, Vload_descriptor_list);
745 record_unwind_protect (load_file_name_internal_unwind, 743 record_unwind_protect (load_file_name_internal_unwind,
746 Vload_file_name_internal); 744 Vload_file_name_internal);
780 } 778 }
781 else 779 else
782 load_byte_code_version = 100; /* no Ebolification needed */ 780 load_byte_code_version = 100; /* no Ebolification needed */
783 781
784 readevalloop (lispstream, file, Feval, 0); 782 readevalloop (lispstream, file, Feval, 0);
785 #ifdef MULE 783 #ifdef FILE_CODING
786 if (!NILP (used_codesys)) 784 if (!NILP (used_codesys))
787 Fset (used_codesys, 785 Fset (used_codesys,
788 XCODING_SYSTEM_NAME 786 XCODING_SYSTEM_NAME
789 (decoding_stream_coding_system (XLSTREAM (lispstream)))); 787 (decoding_stream_coding_system (XLSTREAM (lispstream))));
790 #endif /* MULE */ 788 #endif
791 unbind_to (speccount, Qnil); 789 unbind_to (speccount, Qnil);
792 790
793 NUNGCPRO; 791 NUNGCPRO;
794 } 792 }
795 793