CogniBoost/sw/libCogniBoost/cbLibError.c
void cbLogBuf(const char *sPreface, int buf[], size_t uCount, const char *sFmt)
{
  FILE   *fp;   // log file pointer
  size_t  i;    // working index

  fp = LOG_GET_LOGFP();

  fprintf(fp, "%sDiag%d: %s", LOG_PREFACE, LOG_GET_THRESHOLD()-1, sPreface);
  for(i=0; i<uCount; ++i)
  {
    if( (i % 8) == 0 )
    {
      fprintf(fp, "\n");
    }
    fprintf(fp, sFmt, buf[i]);
  }
  fprintf(fp, "\n");
}
/*! 
 * \brief Log integer data.
 *
 * Print diagnostic logging of the contents of a buffer of bytes.
 *
 * \param sPreface  Buffer preface string.
 * \param buf       Buffer.
 * \param uCount    Number of entries to log.
 * \param sFmt      Buffer entry format string.
 */
\brief Log integer data.
Print diagnostic logging of the contents of a buffer of bytes.

\param sPreface  Buffer preface string.
\param buf       Buffer.
\param uCount    Number of entries to log.
\param sFmt      Buffer entry format string.
\ brief Log integer data . Print diagnostic logging of the contents of a buffer of bytes . \ param sPreface Buffer preface string . \ param buf Buffer . \ param uCount Number of entries to log . \ param sFmt Buffer entry format string .
void cbLogBuf(const char *sPreface, int buf[], size_t uCount, const char *sFmt)
{
  FILE   *fp;   
  size_t  i;    
  fp = LOG_GET_LOGFP();
  fprintf(fp, "%sDiag%d: %s", LOG_PREFACE, LOG_GET_THRESHOLD()-1, sPreface);
  for(i=0; i<uCount; ++i)
  {
    if( (i % 8) == 0 )
    {
      fprintf(fp, "\n");
    }
    fprintf(fp, sFmt, buf[i]);
  }
  fprintf(fp, "\n");
}
void cbLogBuf ( const char * sPreface , int buf [ ] , size_t uCount , const char * sFmt ) { FILE * fp ; size_t i ; fp = LOG_GET_LOGFP ( ) ; fprintf ( fp , " " , LOG_PREFACE , LOG_GET_THRESHOLD ( ) - 1 , sPreface ) ; for ( i = 0 ; i < uCount ; ++ i ) { if ( ( i % 8 ) == 0 ) { fprintf ( fp , " \n " ) ; } fprintf ( fp , sFmt , buf [ i ] ) ; } fprintf ( fp , " \n " ) ; }
\brief Log integer data.
\ brief Log integer data .
// log file pointer // working index