diff options
Diffstat (limited to 'src/xine-utils')
| -rw-r--r-- | src/xine-utils/array.c | 10 | ||||
| -rw-r--r-- | src/xine-utils/color.c | 116 | ||||
| -rw-r--r-- | src/xine-utils/copy.c | 20 | ||||
| -rw-r--r-- | src/xine-utils/cpu_accel.c | 12 | ||||
| -rw-r--r-- | src/xine-utils/list.c | 10 | ||||
| -rw-r--r-- | src/xine-utils/mangle.h | 4 | ||||
| -rw-r--r-- | src/xine-utils/memcpy.c | 2 | ||||
| -rw-r--r-- | src/xine-utils/monitor.c | 10 | ||||
| -rw-r--r-- | src/xine-utils/pool.c | 12 | ||||
| -rw-r--r-- | src/xine-utils/ring_buffer.c | 10 | ||||
| -rw-r--r-- | src/xine-utils/sorted_array.c | 10 | ||||
| -rw-r--r-- | src/xine-utils/utils.c | 32 | ||||
| -rw-r--r-- | src/xine-utils/xine_buffer.c | 26 | ||||
| -rw-r--r-- | src/xine-utils/xine_check.c | 26 | ||||
| -rw-r--r-- | src/xine-utils/xine_mmx.h | 2 | ||||
| -rw-r--r-- | src/xine-utils/xine_mutex.c | 16 | ||||
| -rw-r--r-- | src/xine-utils/xmllexer.c | 4 | ||||
| -rw-r--r-- | src/xine-utils/xmlparser.c | 6 |
18 files changed, 164 insertions, 164 deletions
diff --git a/src/xine-utils/array.c b/src/xine-utils/array.c index 0db45be0c..2cc540c34 100644 --- a/src/xine-utils/array.c +++ b/src/xine-utils/array.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2006 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA diff --git a/src/xine-utils/color.c b/src/xine-utils/color.c index 69bba01c9..5c433ed59 100644 --- a/src/xine-utils/color.c +++ b/src/xine-utils/color.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * Color Conversion Utility Functions - * + * * Overview: xine's video output modules only accept YUV images from * video decoder modules. A video decoder can either send a planar (YV12) * image or a packed (YUY2) image to a video output module. However, many @@ -141,16 +141,16 @@ void (*yuv411_to_yv12) const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height); void (*yv12_to_yuy2) - (const unsigned char *y_src, int y_src_pitch, - const unsigned char *u_src, int u_src_pitch, - const unsigned char *v_src, int v_src_pitch, + (const unsigned char *y_src, int y_src_pitch, + const unsigned char *u_src, int u_src_pitch, + const unsigned char *v_src, int v_src_pitch, unsigned char *yuy2_map, int yuy2_pitch, int width, int height, int progressive); void (*yuy2_to_yv12) (const unsigned char *yuy2_map, int yuy2_pitch, - unsigned char *y_dst, int y_dst_pitch, - unsigned char *u_dst, int u_dst_pitch, - unsigned char *v_dst, int v_dst_pitch, + unsigned char *y_dst, int y_dst_pitch, + unsigned char *u_dst, int u_dst_pitch, + unsigned char *v_dst, int v_dst_pitch, int width, int height); /* @@ -184,7 +184,7 @@ void free_yuv_planes(yuv_planes_t *yuv_planes) { free(yuv_planes->v); } -/* +/* * yuv444_to_yuy2_c * * This is the simple, portable C version of the yuv444_to_yuy2() function. @@ -201,7 +201,7 @@ void free_yuv_planes(yuv_planes_t *yuv_planes) { * * YUY2 map: Y0 U0 Y1 V1 Y2 U2 Y3 V3 */ -static void yuv444_to_yuy2_c(const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, +static void yuv444_to_yuy2_c(const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch) { unsigned int row_ptr, pixel_ptr; @@ -236,12 +236,12 @@ static void yuv444_to_yuy2_c(const yuv_planes_t *yuv_planes, unsigned char *yuy2 } } -/* +/* * yuv444_to_yuy2_mmx * * This is the proper, filtering version of the yuv444_to_yuy2() function * optimized with basic Intel MMX instructions. - * + * * yuv_planes contains the 3 non-subsampled planes that represent Y, U, * and V samples for every pixel in the image. The goal is to convert the * 3 planes to a single packed YUY2 byte stream. Dealing with the Y @@ -346,7 +346,7 @@ static void yuv444_to_yuy2_mmx(const yuv_planes_t *yuv_planes, unsigned char *yu block_loops--; } - /* set up some MMX registers: + /* set up some MMX registers: * mm0 = 0, mm7 = color filter */ pxor_r2r(mm0, mm0); movq_m2r(*filter, mm7); @@ -526,8 +526,8 @@ static void vscale_chroma_line (unsigned char *dst, int pitch, } } -static void upsample_c_plane_c(const unsigned char *src, int src_width, - int src_height, unsigned char *dest, +static void upsample_c_plane_c(const unsigned char *src, int src_width, + int src_height, unsigned char *dest, unsigned int src_pitch, unsigned int dest_pitch) { unsigned char *cr1; @@ -586,11 +586,11 @@ static void yuv9_to_yv12_c } /* U plane */ - upsample_c_plane_c(u_src, width / 4, height / 4, u_dest, + upsample_c_plane_c(u_src, width / 4, height / 4, u_dest, u_src_pitch, u_dest_pitch); /* V plane */ - upsample_c_plane_c(v_src, width / 4, height / 4, v_dest, + upsample_c_plane_c(v_src, width / 4, height / 4, v_dest, v_src_pitch, v_dest_pitch); } @@ -629,7 +629,7 @@ static void yuv411_to_yv12_c c_src_pixel++) { /* downsample by averaging the samples from 2 rows */ - c_sample = + c_sample = (u_src[c_src_pixel] + u_src[c_src_pixel + u_src_pitch] + 1) / 2; /* upsample by outputting the sample twice on the YV12 row */ u_dest[c_dest_pixel++] = c_sample; @@ -648,7 +648,7 @@ static void yuv411_to_yv12_c c_src_pixel++) { /* downsample by averaging the samples from 2 rows */ - c_sample = + c_sample = (v_src[c_src_pixel] + v_src[c_src_pixel + v_src_pitch] + 1 ) / 2; /* upsample by outputting the sample twice on the YV12 row */ v_dest[c_dest_pixel++] = c_sample; @@ -671,9 +671,9 @@ static void yuv411_to_yv12_c * changed to support interlaced frames and use simple mean interpolation [MF] *****************************************************************************/ static void yv12_to_yuy2_c - (const unsigned char *y_src, int y_src_pitch, - const unsigned char *u_src, int u_src_pitch, - const unsigned char *v_src, int v_src_pitch, + (const unsigned char *y_src, int y_src_pitch, + const unsigned char *u_src, int u_src_pitch, + const unsigned char *v_src, int v_src_pitch, unsigned char *yuy2_map, int yuy2_pitch, int width, int height, int progressive) { @@ -698,15 +698,15 @@ static void yv12_to_yuy2_c { p_line1 = p_line2; p_line2 += yuy2_pitch; - + p_y1 = p_y2; p_y2 += y_src_pitch; - + for( i_x = width / 2 ; i_x-- ; ) { C_YUV420_YUYV( ); } - + p_y2 += i_source_margin; p_u += i_source_u_margin; p_v += i_source_v_margin; @@ -728,15 +728,15 @@ static void yv12_to_yuy2_c { p_line1 = p_line2; p_line2 += 2 * yuy2_pitch; - + p_y1 = p_y2; p_y2 += 2 * y_src_pitch; - + for( i_x = width / 2 ; i_x-- ; ) { C_YUV420_YUYV( ); } - + p_y2 += i_source_margin + y_src_pitch; p_u += i_source_u_margin + u_src_pitch; p_v += i_source_v_margin + v_src_pitch; @@ -749,27 +749,27 @@ static void yv12_to_yuy2_c } p_line2 += i_dest_margin + yuy2_pitch; } - + p_line2 = yuy2_map + yuy2_pitch; p_y2 = y_src + y_src_pitch; p_u = u_src + u_src_pitch; p_v = v_src + v_src_pitch; p_u2 = u_src + 3*u_src_pitch; p_v2 = v_src + 3*v_src_pitch; - + for( i_y = height / 4 ; i_y-- ; ) { p_line1 = p_line2; p_line2 += 2 * yuy2_pitch; - + p_y1 = p_y2; p_y2 += 2 * y_src_pitch; - + for( i_x = width / 2 ; i_x-- ; ) { C_YUV420_YUYV( ); } - + p_y2 += i_source_margin + y_src_pitch; p_u += i_source_u_margin + u_src_pitch; p_v += i_source_v_margin + v_src_pitch; @@ -826,9 +826,9 @@ do { #endif static void yv12_to_yuy2_mmxext - (const unsigned char *y_src, int y_src_pitch, - const unsigned char *u_src, int u_src_pitch, - const unsigned char *v_src, int v_src_pitch, + (const unsigned char *y_src, int y_src_pitch, + const unsigned char *u_src, int u_src_pitch, + const unsigned char *v_src, int v_src_pitch, unsigned char *yuy2_map, int yuy2_pitch, int width, int height, int progressive ) { #if defined(ARCH_X86) || defined(ARCH_X86_64) @@ -852,10 +852,10 @@ static void yv12_to_yuy2_mmxext { p_line1 = p_line2; p_line2 += yuy2_pitch; - + p_y1 = p_y2; p_y2 += y_src_pitch; - + for( i_x = width / 8 ; i_x-- ; ) { MMXEXT_YUV420_YUYV( ); @@ -864,7 +864,7 @@ static void yv12_to_yuy2_mmxext { C_YUV420_YUYV( ); } - + p_y2 += i_source_margin; p_u += i_source_u_margin; p_v += i_source_v_margin; @@ -886,10 +886,10 @@ static void yv12_to_yuy2_mmxext { p_line1 = p_line2; p_line2 += 2 * yuy2_pitch; - + p_y1 = p_y2; p_y2 += 2 * y_src_pitch; - + for( i_x = width / 8 ; i_x-- ; ) { MMXEXT_YUV420_YUYV( ); @@ -898,7 +898,7 @@ static void yv12_to_yuy2_mmxext { C_YUV420_YUYV( ); } - + p_y2 += i_source_margin + y_src_pitch; p_u += i_source_u_margin + u_src_pitch; p_v += i_source_v_margin + v_src_pitch; @@ -911,22 +911,22 @@ static void yv12_to_yuy2_mmxext } p_line2 += i_dest_margin + yuy2_pitch; } - + p_line2 = yuy2_map + yuy2_pitch; p_y2 = y_src + y_src_pitch; p_u = u_src + u_src_pitch; p_v = v_src + v_src_pitch; p_u2 = u_src + 3*u_src_pitch; p_v2 = v_src + 3*v_src_pitch; - + for( i_y = height / 4 ; i_y-- ; ) { p_line1 = p_line2; p_line2 += 2 * yuy2_pitch; - + p_y1 = p_y2; p_y2 += 2 * y_src_pitch; - + for( i_x = width / 8 ; i_x-- ; ) { MMXEXT_YUV420_YUYV( ); @@ -935,7 +935,7 @@ static void yv12_to_yuy2_mmxext { C_YUV420_YUYV( ); } - + p_y2 += i_source_margin + y_src_pitch; p_u += i_source_u_margin + u_src_pitch; p_v += i_source_v_margin + v_src_pitch; @@ -965,9 +965,9 @@ static void yv12_to_yuy2_mmxext static void yuy2_to_yv12_c (const unsigned char *yuy2_map, int yuy2_pitch, - unsigned char *y_dst, int y_dst_pitch, - unsigned char *u_dst, int u_dst_pitch, - unsigned char *v_dst, int v_dst_pitch, + unsigned char *y_dst, int y_dst_pitch, + unsigned char *u_dst, int u_dst_pitch, + unsigned char *v_dst, int v_dst_pitch, int width, int height) { const uint8_t *p_line1, *p_line2 = yuy2_map; @@ -987,10 +987,10 @@ static void yuy2_to_yv12_c { p_line1 = p_line2; p_line2 += yuy2_pitch; - + p_y1 = p_y2; p_y2 += y_dst_pitch; - + for( i_x = width / 8 ; i_x-- ; ) { C_YUYV_YUV420( ); @@ -998,7 +998,7 @@ static void yuy2_to_yv12_c C_YUYV_YUV420( ); C_YUYV_YUV420( ); } - + p_y2 += i_dest_margin; p_u += i_dest_u_margin; p_v += i_dest_v_margin; @@ -1058,9 +1058,9 @@ do { static void yuy2_to_yv12_mmxext (const unsigned char *yuy2_map, int yuy2_pitch, - unsigned char *y_dst, int y_dst_pitch, - unsigned char *u_dst, int u_dst_pitch, - unsigned char *v_dst, int v_dst_pitch, + unsigned char *y_dst, int y_dst_pitch, + unsigned char *u_dst, int u_dst_pitch, + unsigned char *v_dst, int v_dst_pitch, int width, int height) { #if defined(ARCH_X86) || defined(ARCH_X86_64) const uint8_t *p_line1, *p_line2 = yuy2_map; @@ -1084,15 +1084,15 @@ static void yuy2_to_yv12_mmxext { p_line1 = p_line2; p_line2 += yuy2_pitch; - + p_y1 = p_y2; p_y2 += y_dst_pitch; - + for( i_x = width / 8 ; i_x-- ; ) { MMXEXT_YUYV_YUV420( ); } - + p_y2 += i_dest_margin; p_u += i_dest_u_margin; p_v += i_dest_v_margin; diff --git a/src/xine-utils/copy.c b/src/xine-utils/copy.c index 500b6db73..ed762fad1 100644 --- a/src/xine-utils/copy.c +++ b/src/xine-utils/copy.c @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * - * $Id: + * $Id: * */ - + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -32,9 +32,9 @@ void yv12_to_yv12 const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch, int width, int height) { - + int y, half_width = width / 2; - + /* Y Plane */ if(y_src_pitch == y_dst_pitch) xine_fast_memcpy(y_dst, y_src, y_src_pitch*height); @@ -45,7 +45,7 @@ void yv12_to_yv12 y_dst += y_dst_pitch; } } - + /* U/V Planes */ if((u_src_pitch == u_dst_pitch) && (v_src_pitch == v_dst_pitch)) { xine_fast_memcpy(u_dst, u_src, u_src_pitch*height/2); @@ -54,12 +54,12 @@ void yv12_to_yv12 for(y = 0; y < (height / 2); y++) { xine_fast_memcpy(u_dst, u_src, half_width); xine_fast_memcpy(v_dst, v_src, half_width); - + u_src += u_src_pitch; v_src += v_src_pitch; - + u_dst += u_dst_pitch; - v_dst += v_dst_pitch; + v_dst += v_dst_pitch; } } } @@ -68,9 +68,9 @@ void yuy2_to_yuy2 (const unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch, int width, int height) { - + int y, double_width = width * 2; - + if(src_pitch == dst_pitch) xine_fast_memcpy(dst, src, src_pitch*height); else { diff --git a/src/xine-utils/cpu_accel.c b/src/xine-utils/cpu_accel.c index 629a09a50..adcc4edc0 100644 --- a/src/xine-utils/cpu_accel.c +++ b/src/xine-utils/cpu_accel.c @@ -305,10 +305,10 @@ static uint32_t arch_accel (void) } canjump = 1; - + /* pdist %f0, %f0, %f0 */ __asm__ __volatile__(".word\t0x81b007c0"); - + canjump = 0; flags |= MM_ACCEL_SPARC_VIS; @@ -316,15 +316,15 @@ static uint32_t arch_accel (void) signal(SIGILL, SIG_DFL); return flags; } - + canjump = 1; - + /* edge8n %g0, %g0, %g0 */ __asm__ __volatile__(".word\t0x81b00020"); - + canjump = 0; flags |= MM_ACCEL_SPARC_VIS2; - + signal(SIGILL, SIG_DFL); return flags; } diff --git a/src/xine-utils/list.c b/src/xine-utils/list.c index e57a6e604..32c1d8fac 100644 --- a/src/xine-utils/list.c +++ b/src/xine-utils/list.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2006 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA diff --git a/src/xine-utils/mangle.h b/src/xine-utils/mangle.h index 746317fa5..4ca7db7a5 100644 --- a/src/xine-utils/mangle.h +++ b/src/xine-utils/mangle.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c index 45009d23c..b7611ed86 100644 --- a/src/xine-utils/memcpy.c +++ b/src/xine-utils/memcpy.c @@ -470,7 +470,7 @@ void xine_probe_fast_memcpy(xine_t *xine) #endif NULL }; - + config_flags = xine_mm_accel(); best = xine->config->register_enum (xine->config, "engine.performance.memcpy_method", 0, diff --git a/src/xine-utils/monitor.c b/src/xine-utils/monitor.c index 906cd9278..0c68cd59b 100644 --- a/src/xine-utils/monitor.c +++ b/src/xine-utils/monitor.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2008 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA diff --git a/src/xine-utils/pool.c b/src/xine-utils/pool.c index 9dbe4c736..a6166bf62 100644 --- a/src/xine-utils/pool.c +++ b/src/xine-utils/pool.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2006 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -39,7 +39,7 @@ struct xine_pool_chunk_s { struct xine_pool_s { size_t object_size; - + /* callbacks */ void (*create_object)(void *object); void (*prepare_object)(void *object); diff --git a/src/xine-utils/ring_buffer.c b/src/xine-utils/ring_buffer.c index 7042eaa68..1da9d7c4d 100644 --- a/src/xine-utils/ring_buffer.c +++ b/src/xine-utils/ring_buffer.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2006 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA diff --git a/src/xine-utils/sorted_array.c b/src/xine-utils/sorted_array.c index 9dbe1fd0e..2f4bbeb0f 100644 --- a/src/xine-utils/sorted_array.c +++ b/src/xine-utils/sorted_array.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2006 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 3b84e6295..75caaf09f 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -1,18 +1,18 @@ /* * Copyright (C) 2000-2005 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -552,13 +552,13 @@ static const lang_locale_t *_get_first_lang_locale(const char *lcal) { lang_len = mod++ - lcal; else lang_len = strlen(lcal); - + while(*(llocale->language)) { if(!strncmp(lcal, llocale->language, lang_len)) { if ((!mod && !llocale->modifier) || (mod && llocale->modifier && !strcmp(mod, llocale->modifier))) return llocale; } - + llocale++; } } @@ -568,7 +568,7 @@ static const lang_locale_t *_get_first_lang_locale(const char *lcal) { static char *_get_lang(void) { char *lang; - + if(!(lang = getenv("LC_ALL"))) if(!(lang = getenv("LC_MESSAGES"))) lang = getenv("LANG"); @@ -582,7 +582,7 @@ static char *_get_lang(void) { */ char *xine_get_system_encoding(void) { char *codeset = NULL; - + #ifdef HAVE_NL_LANGINFO setlocale(LC_CTYPE, ""); codeset = nl_langinfo(CODESET); @@ -666,15 +666,15 @@ int xine_monotonic_clock(struct timeval *tv, struct timezone *tz) #if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) && defined(HAVE_POSIX_TIMERS) static int initialized = 0; static int use_clock_monotonic = 0; - + struct timespec tp; - - if( !initialized ) { + + if( !initialized ) { struct timespec res; int ret; - + ret = clock_getres(CLOCK_MONOTONIC, &res); - + if( ret != 0 ) { lprintf("get resolution of monotonic clock failed\n"); } else { @@ -693,8 +693,8 @@ int xine_monotonic_clock(struct timeval *tv, struct timezone *tz) } } initialized = 1; - } - + } + if(use_clock_monotonic && !clock_gettime(CLOCK_MONOTONIC, &tp)) { tv->tv_sec = tp.tv_sec; tv->tv_usec = tp.tv_nsec / 1000; @@ -704,7 +704,7 @@ int xine_monotonic_clock(struct timeval *tv, struct timezone *tz) } #else - + return gettimeofday(tv, tz); #endif diff --git a/src/xine-utils/xine_buffer.c b/src/xine-utils/xine_buffer.c index 4518d8f05..436991b33 100644 --- a/src/xine-utils/xine_buffer.c +++ b/src/xine-utils/xine_buffer.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2003 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -74,9 +74,9 @@ typedef struct { uint32_t size; uint32_t chunk_size; - + uint8_t magic; - + } xine_buffer_header_t; #define XINE_BUFFER_HEADER_SIZE 9 @@ -120,7 +120,7 @@ typedef struct { * reallocation on slow growing buffers. */ void *xine_buffer_init(int chunk_size) { - + uint8_t *data=calloc(1, chunk_size+XINE_BUFFER_HEADER_SIZE); xine_buffer_header_t *header=(xine_buffer_header_t*)data; @@ -157,7 +157,7 @@ void *_xine_buffer_free(void *buf) { void *xine_buffer_dup(const void *buf) { uint8_t *new; - + #ifdef CHECKS if (!buf) { lprintf("warning: got NULL pointer\n"); @@ -168,7 +168,7 @@ void *xine_buffer_dup(const void *buf) { new = malloc(GET_HEADER(buf)->size+XINE_BUFFER_HEADER_SIZE); - xine_fast_memcpy(new, ((uint8_t*)buf)-XINE_BUFFER_HEADER_SIZE, + xine_fast_memcpy(new, ((uint8_t*)buf)-XINE_BUFFER_HEADER_SIZE, GET_HEADER(buf)->size+XINE_BUFFER_HEADER_SIZE); return new+XINE_BUFFER_HEADER_SIZE; @@ -180,7 +180,7 @@ void *xine_buffer_dup(const void *buf) { #define xine_buffer_copyin(buf,i,data,len) \ buf=_xine_buffer_copyin(buf,i,data,len) void *_xine_buffer_copyin(void *buf, int index, const void *data, int len) { - + #ifdef CHECKS if (!buf || !data) { lprintf("warning: got NULL pointer\n"); @@ -237,7 +237,7 @@ void *_xine_buffer_set(void *buf, int index, uint8_t b, int len) { #endif GROW_TO(buf, index+len); - + memset(((uint8_t*)buf)+index, b, len); return buf; @@ -326,6 +326,6 @@ void *_xine_buffer_ensure_size(void *buf, int size) { #endif GROW_TO(buf, size); - + return buf; } diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index 9887915de..b0a252b6f 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -114,7 +114,7 @@ static xine_health_check_t* _x_health_check_kernel (xine_health_check_t* hc) { hc->status = XINE_HEALTH_CHECK_OK; } else { - set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, + set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED - Could not get kernel information."); } return hc; @@ -129,7 +129,7 @@ static xine_health_check_t* _x_health_check_mtrr (xine_health_check_t* hc) { fd = fopen("/proc/mtrr", "r"); if (!fd) { - set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, + set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED: mtrr is not enabled."); } else { hc->status = XINE_HEALTH_CHECK_OK; @@ -143,7 +143,7 @@ static xine_health_check_t* _x_health_check_mtrr (xine_health_check_t* hc) { hc->title = "Check for MTRR support"; hc->explanation = "Don't worry about this one"; - set_hc_result (hc, XINE_HEALTH_CHECK_OK, + set_hc_result (hc, XINE_HEALTH_CHECK_OK, "mtrr does not apply on this hw platform."); return hc; } @@ -162,12 +162,12 @@ static xine_health_check_t* _x_health_check_cdrom (xine_health_check_t* hc) { set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED - could not access cdrom: %s\n", hc->cdrom_dev); return hc; } - + if ((cdrom_st.st_mode & S_IFMT) != S_IFBLK) { set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED - %s is not a block device.\n", hc->cdrom_dev); return hc; } - + if ( (fd = open(hc->cdrom_dev, O_RDWR)) < 0) { switch (errno) { case EACCES: @@ -180,7 +180,7 @@ static xine_health_check_t* _x_health_check_cdrom (xine_health_check_t* hc) { } } else close(fd); - + hc->status = XINE_HEALTH_CHECK_OK; return hc; } @@ -279,7 +279,7 @@ static xine_health_check_t* _x_health_check_x (xine_health_check_t* hc) { char* env_display = getenv("DISPLAY"); hc->title = "Check for X11 environment"; - hc->explanation = "Make sure you're running X11, if this is an ssh connection,\n" + hc->explanation = "Make sure you're running X11, if this is an ssh connection,\n" "make sure you have X11 forwarding enabled (ssh -X ...)"; if (strlen (env_display) == 0) { @@ -341,7 +341,7 @@ static xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { dlclose(x11_handle); return hc; } - + dlerror(); /* clear error code */ xv_handle = dlopen(LIBXV_SO, RTLD_LAZY); if(!xv_handle) { @@ -362,7 +362,7 @@ static xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { dlclose(xv_handle); return hc; } - + /* Get reference to XvQueryAdaptors */ xvqueryadaptors = dlsym(xv_handle,"XvQueryAdaptors"); if((err = dlerror()) != NULL) { @@ -372,7 +372,7 @@ static xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { dlclose(xv_handle); return hc; } - + /* Get reference to XvListImageFormats */ xvlistimageformats = dlsym(xv_handle,"XvListImageFormats"); if((err = dlerror()) != NULL) { @@ -382,7 +382,7 @@ static xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { dlclose(xv_handle); return hc; } - + if(!(dpy = (*xopendisplay)(disname))) { if (!disname) { @@ -445,7 +445,7 @@ static xine_health_check_t* _x_health_check_xv (xine_health_check_t* hc) { dlclose(x11_handle); dlclose(xv_handle); - + return hc; #else hc->title = "Check for MIT Xv extension"; @@ -501,7 +501,7 @@ xine_health_check_t* xine_health_check (xine_health_check_t* hc, int check_num) hc->title = "xine health check not supported on this platform"; hc->explanation = "contact the xine-devel mailing list if you'd like to\n" "contribute code for your platform."; - set_hc_result(hc, XINE_HEALTH_CHECK_NO_SUCH_CHECK, + set_hc_result(hc, XINE_HEALTH_CHECK_NO_SUCH_CHECK, "xine health check not supported on the OS.\n"); return hc; } diff --git a/src/xine-utils/xine_mmx.h b/src/xine-utils/xine_mmx.h index 440d1efcc..26e712409 100644 --- a/src/xine-utils/xine_mmx.h +++ b/src/xine-utils/xine_mmx.h @@ -173,7 +173,7 @@ typedef union { #define punpckhwd_m2r(var,reg) mmx_m2r (punpckhwd, var, reg) #define punpckhwd_r2r(regs,regd) mmx_r2r (punpckhwd, regs, regd) -#define punpcklbw_m2r(var,reg) mmx_m2r (punpcklbw, var, reg) +#define punpcklbw_m2r(var,reg) mmx_m2r (punpcklbw, var, reg) #define punpcklbw_r2r(regs,regd) mmx_r2r (punpcklbw, regs, regd) #define punpckldq_m2r(var,reg) mmx_m2r (punpckldq, var, reg) #define punpckldq_r2r(regs,regd) mmx_r2r (punpckldq, regs, regd) diff --git a/src/xine-utils/xine_mutex.c b/src/xine-utils/xine_mutex.c index 52d17d8e5..64722e0be 100644 --- a/src/xine-utils/xine_mutex.c +++ b/src/xine-utils/xine_mutex.c @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000-2003 the xine project - * + * * This file is part of xine, a free video player. - * + * * xine 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 2 of the License, or * (at your option) any later version. - * + * * xine 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA @@ -40,7 +40,7 @@ int xine_mutex_init (xine_mutex_t *mutex, const pthread_mutexattr_t *mutexattr, return pthread_mutex_init (&mutex->mutex, mutexattr); } - + int xine_mutex_lock (xine_mutex_t *mutex, const char *who) { #ifndef DBG_MUTEX @@ -50,13 +50,13 @@ int xine_mutex_lock (xine_mutex_t *mutex, const char *who) { #else if (pthread_mutex_trylock (&mutex->mutex)) { - printf ("xine_mutex: BLOCK when %s tried to lock mutex %s because it is locked by %s. continue trying...)\n", + printf ("xine_mutex: BLOCK when %s tried to lock mutex %s because it is locked by %s. continue trying...)\n", who, mutex->id, mutex->locked_by); pthread_mutex_lock (&mutex->mutex); } - printf ("xine_mutex: %s has now locked mutex %s\n", + printf ("xine_mutex: %s has now locked mutex %s\n", who, mutex->id); mutex->locked_by = who; diff --git a/src/xine-utils/xmllexer.c b/src/xine-utils/xmllexer.c index c37510903..4e72ba57c 100644 --- a/src/xine-utils/xmllexer.c +++ b/src/xine-utils/xmllexer.c @@ -207,7 +207,7 @@ int lexer_get_token_d_r(struct lexer * lexer, char ** _tok, int * _tok_size, int break; case '/': - if (!lexer->in_comment) + if (!lexer->in_comment) state = STATE_T_M_STOP_2; tok[tok_pos] = c; tok_pos++; @@ -530,7 +530,7 @@ int lexer_get_token_d_r(struct lexer * lexer, char ** _tok, int * _tok_size, int break; } } - lprintf ("loop done tok_pos = %d, tok_size=%d, lexbuf_pos=%d, lexbuf_size=%d\n", + lprintf ("loop done tok_pos = %d, tok_size=%d, lexbuf_pos=%d, lexbuf_size=%d\n", tok_pos, tok_size, lexer->lexbuf_pos, lexer->lexbuf_size); /* pb */ diff --git a/src/xine-utils/xmlparser.c b/src/xine-utils/xmlparser.c index 7ae0626eb..9d29ca8e8 100644 --- a/src/xine-utils/xmlparser.c +++ b/src/xine-utils/xmlparser.c @@ -399,7 +399,7 @@ static int xml_parser_get_node_internal (xml_parser_t *xml_parser, current_subtree = subtree; } else { current_subtree->next = subtree; - current_subtree = subtree; + current_subtree = subtree; } state = STATE_IDLE; break; @@ -766,7 +766,7 @@ const char *xml_parser_get_property (const xml_node_t *node, const char *name) { return NULL; } -int xml_parser_get_property_int (const xml_node_t *node, const char *name, +int xml_parser_get_property_int (const xml_node_t *node, const char *name, int def_value) { const char *v; @@ -783,7 +783,7 @@ int xml_parser_get_property_int (const xml_node_t *node, const char *name, return ret; } -int xml_parser_get_property_bool (const xml_node_t *node, const char *name, +int xml_parser_get_property_bool (const xml_node_t *node, const char *name, int def_value) { const char *v; |
