Mercurial > hg > xemacs-beta
comparison src/lread.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | bfd6434d15b3 |
children | a2f645c6b9f8 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
144 #endif | 144 #endif |
145 | 145 |
146 static int load_byte_code_version; | 146 static int load_byte_code_version; |
147 | 147 |
148 /* An array describing all known built-in structure types */ | 148 /* An array describing all known built-in structure types */ |
149 static Structure_type_dynarr *the_structure_type_dynarr; | 149 static structure_type_dynarr *the_structure_type_dynarr; |
150 | 150 |
151 #if 0 /* FSFmacs defun hack */ | 151 #if 0 /* FSFmacs defun hack */ |
152 /* When nonzero, read conses in pure space */ | 152 /* When nonzero, read conses in pure space */ |
153 static int read_pure; | 153 static int read_pure; |
154 #endif | 154 #endif |
828 } | 828 } |
829 #endif /* 0 */ | 829 #endif /* 0 */ |
830 | 830 |
831 DEFUN ("locate-file", Flocate_file, 2, 4, 0, /* | 831 DEFUN ("locate-file", Flocate_file, 2, 4, 0, /* |
832 Search for FILENAME through PATH-LIST, expanded by one of the optional | 832 Search for FILENAME through PATH-LIST, expanded by one of the optional |
833 SUFFIXES (string of suffixes separated by \":\"s), checking for access | 833 SUFFIXES (string of suffixes separated by ":"s), checking for access |
834 MODE (0|1|2|4 = exists|executable|writeable|readable), default readable. | 834 MODE (0|1|2|4 = exists|executable|writeable|readable), default readable. |
835 | 835 |
836 `locate-file' keeps hash tables of the directories it searches through, | 836 `locate-file' keeps hash tables of the directories it searches through, |
837 in order to speed things up. It tries valiantly to not get confused in | 837 in order to speed things up. It tries valiantly to not get confused in |
838 the face of a changing and unpredictable environment, but can occasionally | 838 the face of a changing and unpredictable environment, but can occasionally |
1907 } | 1907 } |
1908 | 1908 |
1909 static Lisp_Object | 1909 static Lisp_Object |
1910 read_bit_vector (Lisp_Object readcharfun) | 1910 read_bit_vector (Lisp_Object readcharfun) |
1911 { | 1911 { |
1912 unsigned_char_dynarr *dyn = Dynarr_new (unsigned char); | 1912 unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char); |
1913 Emchar c; | 1913 Emchar c; |
1914 | 1914 |
1915 while (1) | 1915 while (1) |
1916 { | 1916 { |
1917 c = readchar (readcharfun); | 1917 c = readchar (readcharfun); |
1938 Lisp_Object (*instantiate) (Lisp_Object data)) | 1938 Lisp_Object (*instantiate) (Lisp_Object data)) |
1939 { | 1939 { |
1940 struct structure_type st; | 1940 struct structure_type st; |
1941 | 1941 |
1942 st.type = type; | 1942 st.type = type; |
1943 st.keywords = Dynarr_new (struct structure_keyword_entry); | 1943 st.keywords = Dynarr_new (structure_keyword_entry); |
1944 st.validate = validate; | 1944 st.validate = validate; |
1945 st.instantiate = instantiate; | 1945 st.instantiate = instantiate; |
1946 Dynarr_add (the_structure_type_dynarr, st); | 1946 Dynarr_add (the_structure_type_dynarr, st); |
1947 | 1947 |
1948 return Dynarr_atp (the_structure_type_dynarr, | 1948 return Dynarr_atp (the_structure_type_dynarr, |
2623 }; | 2623 }; |
2624 | 2624 |
2625 static void * | 2625 static void * |
2626 read_list_conser (Lisp_Object readcharfun, void *state, Charcount len) | 2626 read_list_conser (Lisp_Object readcharfun, void *state, Charcount len) |
2627 { | 2627 { |
2628 struct read_list_state *s = state; | 2628 struct read_list_state *s = (struct read_list_state *) state; |
2629 Lisp_Object elt; | 2629 Lisp_Object elt; |
2630 | 2630 |
2631 elt = read1 (readcharfun); | 2631 elt = read1 (readcharfun); |
2632 | 2632 |
2633 if (CONSP (elt) && UNBOUNDP (XCAR (elt))) | 2633 if (CONSP (elt) && UNBOUNDP (XCAR (elt))) |
2821 s.length = 0; | 2821 s.length = 0; |
2822 s.allow_dotted_lists = 0; | 2822 s.allow_dotted_lists = 0; |
2823 GCPRO2 (s.head, s.tail); | 2823 GCPRO2 (s.head, s.tail); |
2824 | 2824 |
2825 sequence_reader (readcharfun, terminator, &s, read_list_conser); | 2825 sequence_reader (readcharfun, terminator, &s, read_list_conser); |
2826 | 2826 |
2827 UNGCPRO; | 2827 UNGCPRO; |
2828 tem = s.head; | 2828 tem = s.head; |
2829 len = XINT (Flength (tem)); | 2829 len = XINT (Flength (tem)); |
2830 | 2830 |
2831 #if 0 /* FSFmacs defun hack */ | 2831 #if 0 /* FSFmacs defun hack */ |
2928 startup.el will try and deduce one. If it fails, it knows how to | 2928 startup.el will try and deduce one. If it fails, it knows how to |
2929 handle things. */ | 2929 handle things. */ |
2930 #if 0 | 2930 #if 0 |
2931 #ifndef WINDOWSNT | 2931 #ifndef WINDOWSNT |
2932 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is | 2932 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is |
2933 almost never correct, thereby causing a warning to be printed out that | 2933 almost never correct, thereby causing a warning to be printed out that |
2934 confuses users. Since PATH_LOADSEARCH is always overriden by the | 2934 confuses users. Since PATH_LOADSEARCH is always overriden by the |
2935 EMACSLOADPATH environment variable below, disable the warning on NT. */ | 2935 EMACSLOADPATH environment variable below, disable the warning on NT. */ |
2936 | 2936 |
2937 /* Warn if dirs in the *standard* path don't exist. */ | 2937 /* Warn if dirs in the *standard* path don't exist. */ |
2938 if (!turn_off_warning) | 2938 if (!turn_off_warning) |
3011 } | 3011 } |
3012 | 3012 |
3013 void | 3013 void |
3014 structure_type_create (void) | 3014 structure_type_create (void) |
3015 { | 3015 { |
3016 the_structure_type_dynarr = Dynarr_new (struct structure_type); | 3016 the_structure_type_dynarr = Dynarr_new (structure_type); |
3017 } | 3017 } |
3018 | 3018 |
3019 void | 3019 void |
3020 vars_of_lread (void) | 3020 vars_of_lread (void) |
3021 { | 3021 { |
3032 | 3032 |
3033 DEFVAR_LISP ("load-path", &Vload_path /* | 3033 DEFVAR_LISP ("load-path", &Vload_path /* |
3034 *List of directories to search for files to load. | 3034 *List of directories to search for files to load. |
3035 Each element is a string (directory name) or nil (try default directory). | 3035 Each element is a string (directory name) or nil (try default directory). |
3036 | 3036 |
3037 Note that the elements of this list *may not* begin with \"~\", so you must | 3037 Note that the elements of this list *may not* begin with "~", so you must |
3038 call `expand-file-name' on them before adding them to this list. | 3038 call `expand-file-name' on them before adding them to this list. |
3039 | 3039 |
3040 Initialized based on EMACSLOADPATH environment variable, if any, | 3040 Initialized based on EMACSLOADPATH environment variable, if any, |
3041 otherwise to default specified in by file `paths.h' when XEmacs was built. | 3041 otherwise to default specified in by file `paths.h' when XEmacs was built. |
3042 If there were no paths specified in `paths.h', then XEmacs chooses a default | 3042 If there were no paths specified in `paths.h', then XEmacs chooses a default |
3167 #endif | 3167 #endif |
3168 | 3168 |
3169 #ifdef LISP_BACKQUOTES | 3169 #ifdef LISP_BACKQUOTES |
3170 old_backquote_flag = new_backquote_flag = 0; | 3170 old_backquote_flag = new_backquote_flag = 0; |
3171 #endif | 3171 #endif |
3172 | 3172 |
3173 #ifdef I18N3 | 3173 #ifdef I18N3 |
3174 Vfile_domain = Qnil; | 3174 Vfile_domain = Qnil; |
3175 #endif | 3175 #endif |
3176 } | 3176 } |