xstrm.c
/*---------------------------------------------------------------------
 * print_chunk - Print chunked column information. Only print the first
 *               50 bytes for each chunk.
 *---------------------------------------------------------------------*/
Print chunked column information. Only print the first
50 bytes for each chunk.
Print chunked column information . Only print the first 50 bytes for each chunk .
static void print_chunk (ub1 *chunk_ptr, ub4 chunk_len, ub2 dty)
{
#define MAX_PRINT_BYTES     (50)          /* print max of 50 bytes per chunk */
  ub4  print_bytes;
  if (chunk_len == 0)
    return;
  print_bytes = chunk_len > MAX_PRINT_BYTES ? MAX_PRINT_BYTES : chunk_len;
  printf("  Data = ");
  if (dty == SQLT_CHR)
    printf("%.*s", print_bytes, chunk_ptr);
  else
  {
    ub2  idx;
    for (idx = 0; idx < print_bytes; idx++)
      printf("%02x", chunk_ptr[idx]);
  }
  printf("\n");
}
static void print_chunk ( ub1 * chunk_ptr , ub4 chunk_len , ub2 dty ) { #define MAX_PRINT_BYTES      (50)          /* print max of 50 bytes per chunk */
 ub4 print_bytes ; if ( chunk_len == 0 ) return ; print_bytes = chunk_len > MAX_PRINT_BYTES ? MAX_PRINT_BYTES : chunk_len ; printf ( " " ) ; if ( dty == SQLT_CHR ) printf ( " " , print_bytes , chunk_ptr ) ; else { ub2 idx ; for ( idx = 0 ; idx < print_bytes ; idx ++ ) printf ( " " , chunk_ptr [ idx ] ) ; } printf ( " \n " ) ; }
print_chunk - Print chunked column information.
print_chunk - Print chunked column information .