comparison src/lread.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
2034 static Lisp_Object 2034 static Lisp_Object
2035 read_bit_vector (Lisp_Object readcharfun) 2035 read_bit_vector (Lisp_Object readcharfun)
2036 { 2036 {
2037 unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char); 2037 unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char);
2038 Emchar c; 2038 Emchar c;
2039 Lisp_Object val;
2039 2040
2040 while (1) 2041 while (1)
2041 { 2042 {
2042 c = readchar (readcharfun); 2043 c = readchar (readcharfun);
2043 if (c != '0' && c != '1') 2044 if (c != '0' && c != '1')
2046 } 2047 }
2047 2048
2048 if (c >= 0) 2049 if (c >= 0)
2049 unreadchar (readcharfun, c); 2050 unreadchar (readcharfun, c);
2050 2051
2051 return make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0), 2052 val = make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0),
2052 Dynarr_length (dyn)); 2053 Dynarr_length (dyn));
2054
2055 Dynarr_free (dyn);
2056
2057 return val;
2053 } 2058 }
2054 2059
2055 2060
2056 2061
2057 /* structures */ 2062 /* structures */
2995 3000
2996 for (i = 0, p = &(XVECTOR_DATA (s.head)[0]); 3001 for (i = 0, p = &(XVECTOR_DATA (s.head)[0]);
2997 i < len; 3002 i < len;
2998 i++, p++) 3003 i++, p++)
2999 { 3004 {
3000 struct Lisp_Cons *otem = XCONS (tem); 3005 Lisp_Cons *otem = XCONS (tem);
3001 tem = Fcar (tem); 3006 tem = Fcar (tem);
3002 *p = tem; 3007 *p = tem;
3003 tem = otem->cdr; 3008 tem = otem->cdr;
3004 free_cons (otem); 3009 free_cons (otem);
3005 } 3010 }
3027 return 3032 return
3028 continuable_syntax_error ("#[...] used with wrong number of elements"); 3033 continuable_syntax_error ("#[...] used with wrong number of elements");
3029 3034
3030 for (iii = 0; CONSP (stuff); iii++) 3035 for (iii = 0; CONSP (stuff); iii++)
3031 { 3036 {
3032 struct Lisp_Cons *victim = XCONS (stuff); 3037 Lisp_Cons *victim = XCONS (stuff);
3033 make_byte_code_args[iii] = Fcar (stuff); 3038 make_byte_code_args[iii] = Fcar (stuff);
3034 if ((purify_flag || load_force_doc_strings) 3039 if ((purify_flag || load_force_doc_strings)
3035 && CONSP (make_byte_code_args[iii]) 3040 && CONSP (make_byte_code_args[iii])
3036 && EQ (XCAR (make_byte_code_args[iii]), Vload_file_name_internal)) 3041 && EQ (XCAR (make_byte_code_args[iii]), Vload_file_name_internal))
3037 { 3042 {