/* scivi - visualization plugin for XMMS * Copyright (C) 2003 Vitaly V. Bursov * * This program 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. * * This program 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef COMMON_H #define COMMON_H /* #define USE_ASM_K7 */ #ifdef DMALLOC #include #endif #ifndef HAVE_STRNCASECMP #define strncasecmp(a,b,c) strncmp(a,b,c) #endif #ifndef HAVE_STRTOF #define strtof(a,b) atof(a) #endif #ifndef HAVE_STRTOL #define strtol(a,b,c) atol(a) #endif #ifndef HAVE_SINCOSF #define sincosf(a,s,c) { \ (*(s)) = sinf(a); \ (*(c)) = cosf(a); \ } #endif #if 0 #define dprintf(s, p...) \ fprintf(stderr, "%s:%d: " s, __FUNCTION__, __LINE__, ## p) #else #define dprintf(s, p...) #endif #if 0 #define d2printf(s, p...) \ fprintf(stderr, "%s:%d: " s, __FUNCTION__, __LINE__, ## p) #else #define d2printf(s, p...) #endif #define eprintf(s, p...) \ fprintf(stderr, s, ## p) int scivi_get_xmms_session(); void scivi_display_message(const char *msg, ...); void scivi_complier_error(const char *msg, ...); void scivi_complier_warning(const char *msg, ...); #define Xprintf scivi_display_message #define SES scivi_get_xmms_session() #ifdef USE_ASM_K7 typedef int v8qi __attribute__ ((mode(V8QI))); typedef int v4hi __attribute__ ((mode(V4HI))); typedef int v2si __attribute__ ((mode(V2SI))); typedef int v2sf __attribute__ ((mode(V2SF))); #endif /* USE_ASM_K7 */ #if 0 # include # include # define PROFILE_INIT struct timeval ___tv1, ___tv2; # define PROFILE_START gettimeofday(&___tv1, NULL); # define PROFILE_END gettimeofday(&___tv2, NULL); \ printf("t1: %d %d\n",(int)(___tv2.tv_sec - ___tv1.tv_sec), \ (int)(___tv2.tv_usec - ___tv1.tv_usec)); #else # define PROFILE_INIT # define PROFILE_START # define PROFILE_END #endif #endif /* ! COMMON_H */