lemon/lemon_reader.h
changeset 1729 06f939455cb1
parent 1705 3f63d9db307b
child 1746 874e4bc21435
equal deleted inserted replaced
6:2ac77655d3e6 7:372cac544ec8
   272       void setb(char_type* buf, int len) {
   272       void setb(char_type* buf, int len) {
   273 	_base = buf;
   273 	_base = buf;
   274 	_eptr = buf + len;
   274 	_eptr = buf + len;
   275       }
   275       }
   276   
   276   
   277       virtual std::streambuf* setbuf(char *buf, int len) {
   277       virtual std::streambuf* setbuf(char *buf, std::streamsize len) {
   278 	if (base()) return 0;
   278 	if (base()) return 0;
   279 	if (buf != 0 && len >= (int)sizeof(small_buf)) {
   279 	if (buf != 0 && len >= (int)sizeof(small_buf)) {
   280 	  setb(buf, len);
   280 	  setb(buf, len);
   281 	} else {
   281 	} else {
   282 	  setb(small_buf, sizeof(small_buf));
   282 	  setb(small_buf, sizeof(small_buf));