xine-lib  1.2.10
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 
37  void XINE_FORMAT_PRINTF(2, 0)
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 
47  int num_lines;
48  int cur;
49 
50  pthread_mutex_t lock;
51 };
52 
54 
55 #endif
scratch_buffer_s::XINE_FORMAT_PRINTF
void XINE_FORMAT_PRINTF(2, 0)(*scratch_printf)(scratch_buffer_t *this_gen
XINE_MALLOC
#define XINE_MALLOC
Definition: attributes.h:139
scratch_buffer_s::dispose
void(* dispose)(scratch_buffer_t *this_gen)
Definition: scratch.h:42
_x_new_scratch_buffer
scratch_buffer_t * _x_new_scratch_buffer(int num_lines)
Definition: scratch.c:111
scratch_buffer_s::format
void const char * format
Definition: scratch.h:38
attributes.h
scratch_buffer_s::num_lines
int num_lines
Definition: scratch.h:47
scratch_buffer_s::ordered
char ** ordered
Definition: scratch.h:45
scratch_buffer_s
Definition: scratch.h:35
scratch_buffer_s::cur
int cur
Definition: scratch.h:48
scratch_buffer_s::ap
void const char va_list ap
Definition: scratch.h:38
scratch_buffer_s::lock
pthread_mutex_t lock
Definition: scratch.h:50
XINE_PROTECTED
#define XINE_PROTECTED
Definition: attributes.h:73
scratch_buffer_s::lines
char ** lines
Definition: scratch.h:44