diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-12-10 22:53:23 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-12-10 22:53:23 +0000 |
commit | 0c276a7b6e65654337c0db6dd5f3149778db6b40 (patch) | |
tree | cfeeb6133e5a5cd2da7f7f3cd5389cae69b8cd3c | |
parent | 6651035e2d430fd3fe1e22f5cce9e297b4255af7 (diff) | |
download | xine-lib-0c276a7b6e65654337c0db6dd5f3149778db6b40.tar.gz xine-lib-0c276a7b6e65654337c0db6dd5f3149778db6b40.tar.bz2 |
scratch buffer bugfixes
CVS patchset: 1216
CVS date: 2001/12/10 22:53:23
-rw-r--r-- | src/xine-engine/scratch.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index 88079be12..94492a50f 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.c,v 1.2 2001/12/10 22:30:53 guenter Exp $ + * $Id: scratch.c,v 1.3 2001/12/10 22:53:23 guenter Exp $ * * top-level xine functions * @@ -33,10 +33,19 @@ #include "scratch.h" #include "xineutils.h" +/* +#define LOG +*/ + static void scratch_printf (scratch_buffer_t *this, const char *format, va_list argp) { vsprintf (this->lines[this->cur], format, argp); +#ifdef LOG + printf ("scratch: printing format %s to line %d\n", + format, this->cur); +#endif + this->cur = (this->cur + 1) % this->num_lines; } @@ -46,9 +55,11 @@ static char **scratch_get_content (scratch_buffer_t *this) { int i; for (i=0; i<this->num_lines; i++) { + this->ordered[i] = this->lines[(this->cur + i + 1) % this->num_lines]; - this->lines[i] = xine_xmalloc (1024); - this->ordered[i] = this->lines[(this->cur + i) % this->num_lines]; +#ifdef LOG + printf ("scratch: line %d contains >%s<\n",i,this->lines[i]); +#endif } |