X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Fmemory-stream.cc;h=c72eb53947a6b9c549368cf77d575b9bfb0d0e1e;hb=e0a9f2beaa2b434e7c44227eaac9c3f8c49ed5f2;hp=dbf6fd83f29555605f4fe42fc7ca5c8f77d3a86c;hpb=d664f5a7153ec2b1a1c4c9fba2d2174bf3140695;p=lilypond.git diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index dbf6fd83f2..c72eb53947 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -1,9 +1,20 @@ /* - memory-stream.cc -- implement Memory_out_stream + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2008 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include @@ -20,7 +31,8 @@ const int Memory_out_stream::block_size_ = 1024; lily_cookie_io_functions_t Memory_out_stream::functions_ -= { += +{ Memory_out_stream::reader, Memory_out_stream::writer, Memory_out_stream::seeker, @@ -76,8 +88,8 @@ Memory_out_stream::get_string () const ssize_t Memory_out_stream::writer (void *cookie, - char const *buffer, - size_t size) + char const *buffer, + size_t size) { Memory_out_stream *stream = (Memory_out_stream *) cookie; @@ -93,7 +105,7 @@ Memory_out_stream::writer (void *cookie, if (change) stream->buffer_ = (char *) realloc (stream->buffer_, - stream->buffer_blocks_ * block_size_); + stream->buffer_blocks_ * block_size_); memcpy (stream->buffer_ + stream->size_, buffer, size); stream->size_ = newsize; @@ -103,8 +115,8 @@ Memory_out_stream::writer (void *cookie, ssize_t Memory_out_stream::reader (void * /* cookie */, - char * /* buffer */, - size_t /* size */) + char * /* buffer */, + size_t /* size */) { assert (false); return 0; @@ -112,8 +124,8 @@ Memory_out_stream::reader (void * /* cookie */, int Memory_out_stream::seeker (void *, - off64_t *, - int) + off64_t *, + int) { assert (false); return 0;