1 //------------------------------------------------------------------------------
2 // GB_entry_check: print a single entry for a built-in type
3 //------------------------------------------------------------------------------
4 
5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
6 // SPDX-License-Identifier: Apache-2.0
7 
8 //------------------------------------------------------------------------------
9 
10 #include "GB.h"
11 
12 GB_PUBLIC   // accessed by the MATLAB tests in GraphBLAS/Test only
GB_entry_check(const GrB_Type type,const void * x,int pr,FILE * f)13 GrB_Info GB_entry_check     // print a single value
14 (
15     const GrB_Type type,    // type of value to print
16     const void *x,          // value to print
17     int pr,                 // print level
18     FILE *f                 // file to print to
19 )
20 {
21 
22     //--------------------------------------------------------------------------
23     // check inputs
24     //--------------------------------------------------------------------------
25 
26     GB_RETURN_IF_NULL (x) ;
27     GB_RETURN_IF_NULL_OR_FAULTY (type) ;
28 
29     //--------------------------------------------------------------------------
30     // print the value
31     //--------------------------------------------------------------------------
32 
33     return (GB_code_check (type->code, x, pr, f)) ;
34 }
35 
36