#define DBGPRT(fmt,args...) \
   do{ \
    FILE* fp= fopen("/home/debug.log","a+"); \
    if( fp != NULL ) \
    { \
     fprintf(fp," \n %s(%d)-%s: \n",__FILE__,__LINE__,__FUNCTION__); \
     fprintf(fp,fmt,##args); \
     fclose(fp); \
     } \
   }while(0);