src/lib/message.c
void j_msg(const char *file, int line, JCR *jcr, int type, utime_t mtime, const char *fmt,...)
{
   va_list   arg_ptr;
   int i, len, maxlen;
   POOLMEM *pool_buf;

   va_start(arg_ptr, fmt);
   vd_msg(file, line, 0, fmt, arg_ptr);
   va_end(arg_ptr);

   pool_buf = get_pool_memory(PM_EMSG);
   i = Mmsg(pool_buf, "%s:%d ", get_basename(file), line);

   for (;;) {
      maxlen = sizeof_pool_memory(pool_buf) - i - 1;
      va_start(arg_ptr, fmt);
      len = bvsnprintf(pool_buf+i, maxlen, fmt, arg_ptr);
      va_end(arg_ptr);
      if (len < 0 || len >= (maxlen-5)) {
         pool_buf = realloc_pool_memory(pool_buf, maxlen + i + maxlen/2);
         continue;
      }
      break;
   }

   Jmsg(jcr, type, mtime, "%s", pool_buf);
   free_memory(pool_buf);
}
/*
 * If we come here, prefix the message with the file:line-number,
 *  then pass it on to the normal Jmsg routine.
 */
If we come here, prefix the message with the file:line-number,
then pass it on to the normal Jmsg routine.
If we come here prefix the message with the file : line - number then pass it on to the normal Jmsg routine .
void j_msg(const char *file, int line, JCR *jcr, int type, utime_t mtime, const char *fmt,...)
{
   va_list   arg_ptr;
   int i, len, maxlen;
   POOLMEM *pool_buf;
   va_start(arg_ptr, fmt);
   vd_msg(file, line, 0, fmt, arg_ptr);
   va_end(arg_ptr);
   pool_buf = get_pool_memory(PM_EMSG);
   i = Mmsg(pool_buf, "%s:%d ", get_basename(file), line);
   for (;;) {
      maxlen = sizeof_pool_memory(pool_buf) - i - 1;
      va_start(arg_ptr, fmt);
      len = bvsnprintf(pool_buf+i, maxlen, fmt, arg_ptr);
      va_end(arg_ptr);
      if (len < 0 || len >= (maxlen-5)) {
         pool_buf = realloc_pool_memory(pool_buf, maxlen + i + maxlen/2);
         continue;
      }
      break;
   }
   Jmsg(jcr, type, mtime, "%s", pool_buf);
   free_memory(pool_buf);
}
void j_msg ( const char * file , int line , JCR * jcr , int type , utime_t mtime , const char * fmt , ... ) { va_list arg_ptr ; int i , len , maxlen ; POOLMEM * pool_buf ; va_start ( arg_ptr , fmt ) ; vd_msg ( file , line , 0 , fmt , arg_ptr ) ; va_end ( arg_ptr ) ; pool_buf = get_pool_memory ( PM_EMSG ) ; i = Mmsg ( pool_buf , " " , get_basename ( file ) , line ) ; for ( ; ; ) { maxlen = sizeof_pool_memory ( pool_buf ) - i - 1 ; va_start ( arg_ptr , fmt ) ; len = bvsnprintf ( pool_buf + i , maxlen , fmt , arg_ptr ) ; va_end ( arg_ptr ) ; if ( len < 0 || len >= ( maxlen - 5 ) ) { pool_buf = realloc_pool_memory ( pool_buf , maxlen + i + maxlen / 2 ) ; continue ; } break ; } Jmsg ( jcr , type , mtime , " " , pool_buf ) ; free_memory ( pool_buf ) ; }
If we come here, prefix the message with the file:line-number,
  then pass it on to the normal Jmsg routine.
If we come here prefix the message with the file : line - number then pass it on to the normal Jmsg routine .