Mercurial > hg > xemacs-beta
comparison src/lstream.c @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
132 | 132 |
133 #define DEFAULT_BLOCK_BUFFERING_SIZE 512 | 133 #define DEFAULT_BLOCK_BUFFERING_SIZE 512 |
134 #define MAX_READ_SIZE 512 | 134 #define MAX_READ_SIZE 512 |
135 | 135 |
136 static Lisp_Object | 136 static Lisp_Object |
137 mark_lstream (Lisp_Object obj, void (*markobj) (Lisp_Object)) | 137 mark_lstream (Lisp_Object obj) |
138 { | 138 { |
139 Lstream *lstr = XLSTREAM (obj); | 139 Lstream *lstr = XLSTREAM (obj); |
140 return lstr->imp->marker ? (lstr->imp->marker) (obj, markobj) : Qnil; | 140 return lstr->imp->marker ? (lstr->imp->marker) (obj) : Qnil; |
141 } | 141 } |
142 | 142 |
143 static void | 143 static void |
144 print_lstream (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) | 144 print_lstream (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) |
145 { | 145 { |
1212 str->offset = pos; | 1212 str->offset = pos; |
1213 return 0; | 1213 return 0; |
1214 } | 1214 } |
1215 | 1215 |
1216 static Lisp_Object | 1216 static Lisp_Object |
1217 lisp_string_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) | 1217 lisp_string_marker (Lisp_Object stream) |
1218 { | 1218 { |
1219 struct lisp_string_stream *str = LISP_STRING_STREAM_DATA (XLSTREAM (stream)); | 1219 struct lisp_string_stream *str = LISP_STRING_STREAM_DATA (XLSTREAM (stream)); |
1220 return str->obj; | 1220 return str->obj; |
1221 } | 1221 } |
1222 | 1222 |
1610 set_marker_position (str->start, pos); | 1610 set_marker_position (str->start, pos); |
1611 return 0; | 1611 return 0; |
1612 } | 1612 } |
1613 | 1613 |
1614 static Lisp_Object | 1614 static Lisp_Object |
1615 lisp_buffer_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) | 1615 lisp_buffer_marker (Lisp_Object stream) |
1616 { | 1616 { |
1617 struct lisp_buffer_stream *str = | 1617 struct lisp_buffer_stream *str = |
1618 LISP_BUFFER_STREAM_DATA (XLSTREAM (stream)); | 1618 LISP_BUFFER_STREAM_DATA (XLSTREAM (stream)); |
1619 | 1619 |
1620 markobj (str->start); | 1620 mark_object (str->start); |
1621 markobj (str->end); | 1621 mark_object (str->end); |
1622 return str->buffer; | 1622 return str->buffer; |
1623 } | 1623 } |
1624 | 1624 |
1625 Bufpos | 1625 Bufpos |
1626 lisp_buffer_stream_startpos (Lstream *stream) | 1626 lisp_buffer_stream_startpos (Lstream *stream) |
1671 LSTREAM_HAS_METHOD (lisp_buffer, rewinder); | 1671 LSTREAM_HAS_METHOD (lisp_buffer, rewinder); |
1672 LSTREAM_HAS_METHOD (lisp_buffer, marker); | 1672 LSTREAM_HAS_METHOD (lisp_buffer, marker); |
1673 } | 1673 } |
1674 | 1674 |
1675 void | 1675 void |
1676 reinit_vars_of_lstream (void) | |
1677 { | |
1678 int i; | |
1679 | |
1680 for (i = 0; i < countof (Vlstream_free_list); i++) | |
1681 { | |
1682 Vlstream_free_list[i] = Qnil; | |
1683 staticpro_nodump (&Vlstream_free_list[i]); | |
1684 } | |
1685 } | |
1686 | |
1687 void | |
1676 vars_of_lstream (void) | 1688 vars_of_lstream (void) |
1677 { | 1689 { |
1678 int i; | 1690 reinit_vars_of_lstream (); |
1679 | 1691 } |
1680 for (i = 0; i < countof (Vlstream_free_list); i++) | |
1681 { | |
1682 Vlstream_free_list[i] = Qnil; | |
1683 staticpro (&Vlstream_free_list[i]); | |
1684 } | |
1685 } |