comparison src/lread.c @ 4556:a1f8c5c250c2

Automated merge with file:/Sources/xemacs-21.5-checked-out
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 11 May 2008 19:50:49 +0200
parents ac6231e0c1df
children 7869173584fc
comparison
equal deleted inserted replaced
4555:20c32e489235 4556:a1f8c5c250c2
741 internal_bind_lisp_object (&Vload_file_name, found); 741 internal_bind_lisp_object (&Vload_file_name, found);
742 #ifdef I18N3 742 #ifdef I18N3
743 /* set it to nil; a call to #'domain will set it. */ 743 /* set it to nil; a call to #'domain will set it. */
744 internal_bind_lisp_object (&Vfile_domain, Qnil); 744 internal_bind_lisp_object (&Vfile_domain, Qnil);
745 #endif 745 #endif
746
747 /* Is there a #!? If so, read it, and unread ;!.
748
749 GNU implement this by treating any #! anywhere in the source text as
750 commenting out the whole line. */
751 {
752 char shebangp[2];
753 int num_read;
754
755 num_read = Lstream_read (XLSTREAM (lispstream), shebangp,
756 sizeof(shebangp));
757 if (sizeof(shebangp) == num_read
758 && 0 == strncmp("#!", shebangp, sizeof(shebangp)))
759 {
760 shebangp[0] = ';';
761 }
762
763 Lstream_unread (XLSTREAM (lispstream), shebangp, num_read);
764 }
746 765
747 /* Now determine what sort of ELC file we're reading in. */ 766 /* Now determine what sort of ELC file we're reading in. */
748 internal_bind_int (&load_byte_code_version, load_byte_code_version); 767 internal_bind_int (&load_byte_code_version, load_byte_code_version);
749 if (reading_elc) 768 if (reading_elc)
750 { 769 {