summaryrefslogtreecommitdiff
path: root/src/xine-utils/utils.c
AgeCommit message (Collapse)Author
2009-11-30Trim trailing space & reduce space+tab.Darren Salt
2009-05-07Character encoding is stored in LC_CTYPESander Jansen
2008-09-28Fix xine_usec_sleep for mingw+msysMatthias Ringwald
Bug was found and fixed by Carlo Bramini. select() does not work on mingw+msys causing xine_usec_sleep to sleep much longer than requested which completely broke audio playback
2008-07-11Fix xine_get_pluginroot (mingw32)Matthias Ringwald
xine_get_pluginroot now makes use of the XINE_REL_PLUGINROOT define
2008-06-12Fix up reporting of supported formats by the ALSA & OSS output plugins.Darren Salt
Adjust translations for the spacing changes etc. which this introduces.
2008-05-09Use size_t to keep the value returned by strlen().Diego 'Flameeyes' Pettenò
When using a variable to store the result of strlen(), make sure its type is size_t just like the function returns, rather than using a smaller type like int. --HG-- extra : transplant_source : %B0%D5%3B%D7%1Dy%0A%7E%7D%7C%023%08%B2%CE%D3t%0B3%D7
2008-05-07Deprecate xine_xmalloc().Diego 'Flameeyes' Pettenò
2008-05-07xine_xmalloc() deprecation: replace its use with static and non-zero size.Diego 'Flameeyes' Pettenò
The xine_xmalloc() function is going to be deprecated, as its behaviour is rarely needed as such, and it's thus misused. With this, almost all uses of xine_xmalloc() with static size (for instance the value returned by sizeof()) or with a size that is guaranteed not to be zero (like strlen()+1) are replaced with calls to either calloc(1, ...) or malloc(). malloc() is used whenever the allocated memory is going to be immediately overwritten, while calloc() is used in every other case, as it sets the whole memory area to zero. --HG-- extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
2008-04-28Add xine_get_pluginroot() for win32. Completely untested.Darren Salt
2008-02-09Remove some unnecessary tests (which the compiler would discard).Darren Salt
2007-11-23Merge.Darren Salt
2007-11-15using select instead of nanosleep the wakeup count reported by powertop is ↵Matthias Kretz
reduced by 50%
2007-11-10Delete most of the CVS $Id$/$Log$ lines.Darren Salt
--HG-- extra : transplant_source : %E0%D0%C5%8B%BEU%DD%24%5D7%1F%ADV%AD%EB%23%CBU%80%EB
2007-11-09Update FSF address on non-contributed code and COPYING files.Diego 'Flameeyes' Pettenò
For contributed code, leave whatever the version we last synced for is using to make simpler future syncs.
2006-07-21When trying to get the langinfo code, first of all, set the locale, or ↵Diego 'Flameeyes' Pettenò
you'll always get ANSI/ASCII. CVS patchset: 8138 CVS date: 2006/07/21 04:47:17
2006-06-23Miscellaneous static/const fixups.Darren Salt
Optimise away _xine_buffer_strcat. CVS patchset: 8073 CVS date: 2006/06/23 18:24:22
2006-06-10Don't trust internal gettext macros, they are unreliable and change between ↵Diego 'Flameeyes' Pettenò
versions. Check for nl_langinfo() explicitely and use that instead. CVS patchset: 8023 CVS date: 2006/06/10 00:21:51
2006-02-05Fix detection of locale containing a modifier (like "@euro")Miguel Freitas
thanks Reinhard Nissl CVS patchset: 7874 CVS date: 2006/02/05 16:15:12
2005-09-05*BUGFIX*František Dvořák
Build improvements and WIN32 port updates: - add --with-pthread-pefix and --with-zlib-pefix options - prepare for removing internal zlib and pthreads-win32 relics, updated documentation for possible WIN32 developers (only for me? :->) - fixed bug in unimportant part of configure.ac for MinGW due to xine paths - fixed my bug in cdda (but it compiled fine anyway) - fixed unimportant bug in planar Makefile.am - next MSVC update due to external zlib, pthreads and latest changes, removed relic includes - checked distcheck CVS patchset: 7719 CVS date: 2005/09/05 17:02:56
2005-08-30Better names for directory separators.František Dvořák
CVS patchset: 7715 CVS date: 2005/08/30 15:27:58
2005-08-29*BUGFIX*František Dvořák
Windows ports updates: - finished M$VC port update - moved xine plugins back to normal location for Windows ports, added relative directories (used relative to ${prefix}), make sure it's thread-safe (but it's still hacky) - fixed ugly bug with loading plugins, when working drive was differrent from plugins directory directory - directory and subdirectory separator called as platform specific - fix crash with newer win32 pthread (missing mutex_init in vo plugin), yes! - small doc update CVS patchset: 7712 CVS date: 2005/08/29 15:28:16
2005-04-01Fixed currently unused xine_chomp() (maybe it's used in future)Hans-Dieter Kosch
CVS patchset: 7445 CVS date: 2005/04/01 23:15:38
2005-03-31- handle EINTR when calling nanosleep, spotted by Mathieu RouthierBastien Nocera
CVS patchset: 7444 CVS date: 2005/03/31 22:46:15
2004-10-30better check for posix timersMiguel Freitas
CVS patchset: 7092 CVS date: 2004/10/30 15:04:46
2004-10-29use monotonic clock when availableMiguel Freitas
CVS patchset: 7087 CVS date: 2004/10/29 23:11:37
2004-09-26 - almost finalize headers refactoring needed for MSVC frontends (and for otherFrantišek Dvořák
poor platforms, of course) - fix a bug in generated xine-config for WIN32 and make it relocateable under Windows - MSVC port: update, fix some warnings, remove old unneeded files - improve function for getting runtime directory, it will need next fix yet (bug probably due to active volume drives) CVS patchset: 7001 CVS date: 2004/09/26 22:54:51
2004-09-20Build system improvements:František Dvořák
- use replacement functions (macro AC_REPLACE_FUNCS and variable LTLIBOBJS), each function is in a file placed into lib/ directory, it was not necessary, but it looks nice, IMHO - headers cleanups (this was needed): - prototypes of replacement funtions and macros are placed into separate os_internal.h (and included by config.h) - drop include inttypes.h from public xine.h, replaced by custom os_type.h, idea origins from Ogg/Vorbis public headers - disable generating inttypes.h: generated replacement isn't enough for xine-lib but nobody complained (and for M$VC we have special version) - better including headers for win32, let dvdnav use its mutex wrapper - updated M$VC port Result: - xine is compiled nicely by MinGW, CygWin and paritaly M$VC - frontends in M$VC port don't require additional helping headers - moved some platform specific things from xine-utils and win32/contrib to lib/ Finally I can start with real coding. :-) CVS patchset: 6982 CVS date: 2004/09/20 19:30:02
2004-09-12including <unistd.h>, which has been removed from the global headersMichael Roitzsch
CVS patchset: 6968 CVS date: 2004/09/12 19:23:36
2004-09-02Warnings on WIN32.František Dvořák
Compilation fix for CygWin. CVS patchset: 6932 CVS date: 2004/09/02 19:56:40
2004-09-01Improvements and implementing Michael's suggestions:František Dvořák
- new flags added at the end, so the users can override them properly - removed X11 libs and cflags from xine-config and libxine.pc - removed replacing for setenv (thanks to Robin for the hint) - better way for temporary disabling of w32dll module - data directories will be different on Windows - force installing catalogs with translation into XINE_LOCALEDIR - timer linked in xine-engine (just central place for linking such stuff) - adjusted load_plugins and remove reduntant WIN32 conditionals - removed unused $(lib_thr) CVS patchset: 6927 CVS date: 2004/09/01 18:19:49
2004-08-27MINGW32 port. Engine library and most of plugins compiles now.František Dvořák
List of some changes: - replaced some _MSC_VER by more common WIN32 - define INTLDIR, remove -static flag for included intl - shared more common CFLAGS with DEBUG_CFLAGS - use WIN32_CFLAGS for all building - separate some flags into THREAD_CFLAGS_CONFIG, THREAD_CFLAGS_CONFIG and ZLIB_LIB_CONFIG for public xine-config, automatically use internal libs if necessary - don't warn about missing X for mingw and cygwin - libw32dll disabled for WIN32 (making native loader would be interesting, or porting wine code to Windows? :->) - DVB and RTP disabled for WIN32, not ported yet - fix build and fix a warning in cdda - fix build for nosefart and libfaad - implement configure option --disable-freetype - sync libxine.pc and xine-config.in - add -liberty to goom under WIN32 - move original build files from included phread and zlib into archives and replace them by autotools CVS patchset: 6910 CVS date: 2004/08/27 19:33:17
2004-07-25protect bufferMichael Roitzsch
CVS patchset: 6854 CVS date: 2004/07/25 17:47:01
2004-07-14 - Use Windows encoding for the external subtitles, guessed according to ↵František Dvořák
current locale. - Add "-" into encoding names. - Fix a typo. CVS patchset: 6793 CVS date: 2004/07/14 18:51:29
2004-05-09Valid error description for gethostbyname. Obsolete function hstrerror() has ↵František Dvořák
no replacement, so it's used, but with configure check. CVS patchset: 6503 CVS date: 2004/05/09 17:42:23
2004-04-06Prepare for MinGW port:František Dvořák
move M$VC specific header files into sparate directory regenerate config.h for M$VC compilation fixes add some getchar()s into xineui.exe (popup dialogs would be better) CVS patchset: 6338 CVS date: 2004/04/06 19:20:15
2004-03-29fix prototypeMichael Roitzsch
CVS patchset: 6316 CVS date: 2004/03/29 19:10:36
2004-03-27"+y"+p code from xine-ui for guessing locale codeset (default encoding for OSD).František Dvořák
CVS patchset: 6309 CVS date: 2004/03/27 12:59:45
2003-12-09update copyright year (and we have to do it again in 3 weeks... ;-) )Daniel Caujolle-Bert
CVS patchset: 5879 CVS date: 2003/12/09 00:02:28
2003-12-07get rid of XINE_{ASSERT,ABORT} and useless xine_print_trace (useless). ↵Daniel Caujolle-Bert
Replace XINE_ASSERT by _x_assert, which works exaclty as assert, except that it still warns with NDEBUG defined (but don't abort). Fix missuning of assert(0), which isn't safe, abort is abort, assert is for debugging purpose only, so all assert(0) has been converted to abort() alls. In osd_preload_fonts(): alloc needed memory chunk. Define NDEBUG in CFLAGS, for non DEBUG build only. CVS patchset: 5860 CVS date: 2003/12/07 15:34:29
2003-12-06fix mem overlap reported by valgrindMiguel Freitas
CVS patchset: 5852 CVS date: 2003/12/06 16:10:01
2003-12-04some const correctnessJames Stembridge
CVS patchset: 5841 CVS date: 2003/12/04 22:15:25
2003-11-04Final patches for compiling xine under MSVC:František Dvořák
- basename() is added to xine-utils, if it isn't found by configure - macros with variable number of arguments are simplified to ignore additional arguments (only for MSVC), lprintf macro simplified with full functionality - minor update for building a52, some preparation for ffmpeg CVS patchset: 5687 CVS date: 2003/11/04 14:38:26
2003-09-16Removed headers that provided nothing needed to the build.Stephen Torri
Replaced 'while((int) ptr % alignment)' with 'while((size_t) ptr % alignment)' On a 32-bit architecture the comparision of ptr and alignment is fine. On a 64-bit architecture the comparision of ptr (32bits) and alignment (64bits) can cause problems in the desired behaviour. So casting the ptr to the same size as alignment cleared this issue. CVS patchset: 5392 CVS date: 2003/09/16 02:11:45
2003-07-27- removed xine-engine/locale.c as it is unused, fix static functions in theBastien Nocera
engine and the utils, removed unused variables CVS patchset: 5219 CVS date: 2003/07/27 12:47:23
2003-07-16don't try to print del eitherJames Stembridge
CVS patchset: 5172 CVS date: 2003/07/16 22:11:14
2003-07-161) signed data needs casting to unsignedJames Stembridge
2) don't print out control characters CVS patchset: 5170 CVS date: 2003/07/16 21:55:02
2003-07-16more cleanup; remove unused variables; use lprintfMarco Zuehlke
CVS patchset: 5168 CVS date: 2003/07/16 14:14:17
2003-04-20merging in win32 portGuenter Bartsch
CVS patchset: 4643 CVS date: 2003/04/20 21:13:21
2003-03-03implementing the backtrace function in the header results in the code being ↵Michael Roitzsch
included in every single plugin (possibly multiple times due to inlining) -> move the code to libxineutil seems more sensible CVS patchset: 4327 CVS date: 2003/03/03 17:29:07
2003-01-12i got the case that getpwuid_r returns 0 _and_ NULL in pwStefan Holst
CVS patchset: 3879 CVS date: 2003/01/12 16:38:08