xine-lib 1.2.13-20230125hg15249
scratch.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2017 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 *
20 * scratch buffer for log output
21 */
22
23#ifndef HAVE_SCRATCH_H
24#define HAVE_SCRATCH_H
25
26#include <stdarg.h>
27#include <pthread.h>
28
29#include <xine/attributes.h>
30
32
33#define SCRATCH_LINE_LEN_MAX 1024
34
36
38 (*scratch_printf) (scratch_buffer_t *this_gen, const char *format, va_list ap);
39
40 char **(*get_content) (scratch_buffer_t *this_gen);
41
42 void (*dispose) (scratch_buffer_t *this_gen);
43
44 char **lines;
45 char **ordered;
46
48 int cur;
49
50 pthread_mutex_t lock;
51};
52
54
55#endif
#define XINE_MALLOC
Definition attributes.h:141
#define XINE_PROTECTED
Definition attributes.h:75
scratch_buffer_t * _x_new_scratch_buffer(int num_lines)
Definition scratch.c:111
Definition scratch.h:35
int cur
Definition scratch.h:48
char ** lines
Definition scratch.h:44
void XINE_FORMAT_PRINTF(2, 0)(*scratch_printf)(scratch_buffer_t *this_gen
void const char * format
Definition scratch.h:38
void const char va_list ap
Definition scratch.h:38
void(* dispose)(scratch_buffer_t *this_gen)
Definition scratch.h:42
char ** ordered
Definition scratch.h:45
int num_lines
Definition scratch.h:47
pthread_mutex_t lock
Definition scratch.h:50