Mercurial > hg > xemacs-beta
comparison src/lread.c @ 359:8e84bee8ddd0 r21-1-9
Import from CVS: tag r21-1-9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:57:55 +0200 |
parents | 7c94d56991e1 |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
358:fed6e0f6a03a | 359:8e84bee8ddd0 |
---|---|
1939 static Lisp_Object | 1939 static Lisp_Object |
1940 read_bit_vector (Lisp_Object readcharfun) | 1940 read_bit_vector (Lisp_Object readcharfun) |
1941 { | 1941 { |
1942 unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char); | 1942 unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char); |
1943 Emchar c; | 1943 Emchar c; |
1944 Lisp_Object val; | |
1944 | 1945 |
1945 while (1) | 1946 while (1) |
1946 { | 1947 { |
1947 c = readchar (readcharfun); | 1948 c = readchar (readcharfun); |
1948 if (c != '0' && c != '1') | 1949 if (c != '0' && c != '1') |
1951 } | 1952 } |
1952 | 1953 |
1953 if (c >= 0) | 1954 if (c >= 0) |
1954 unreadchar (readcharfun, c); | 1955 unreadchar (readcharfun, c); |
1955 | 1956 |
1956 return make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0), | 1957 val = make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0), |
1957 Dynarr_length (dyn)); | 1958 Dynarr_length (dyn)); |
1959 | |
1960 Dynarr_free (dyn); | |
1961 | |
1962 return val; | |
1958 } | 1963 } |
1959 | 1964 |
1960 | 1965 |
1961 | 1966 |
1962 /* structures */ | 1967 /* structures */ |