LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test - printf_hack.h (source / functions) Coverage Total Hit CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 100.0 % 3 3 3
Current Date: 2024-04-14 14:21:10 Functions: 100.0 % 1 1 1
Baseline: 16@8cea358b128 Branches: - 0 0
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (240..) days: 100.0 % 3 3 3
Function coverage date bins:
(240..) days: 100.0 % 1 1 1

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * print_double(x) has the same effect as printf("%g", x), but is intended
                                  3                 :                :  * to produce the same formatting across all platforms.
                                  4                 :                :  */
                                  5                 :                : static void
 2011 tgl@sss.pgh.pa.us           6                 :CBC          28 : print_double(double x)
                                  7                 :                : {
                                  8                 :                : #ifdef WIN32
                                  9                 :                :     /* Change Windows' 3-digit exponents to look like everyone else's */
                                 10                 :                :     char        convert[128];
                                 11                 :                :     int         vallen;
                                 12                 :                : 
                                 13                 :                :     sprintf(convert, "%g", x);
                                 14                 :                :     vallen = strlen(convert);
                                 15                 :                : 
                                 16                 :                :     if (vallen >= 6 &&
                                 17                 :                :         convert[vallen - 5] == 'e' &&
                                 18                 :                :         convert[vallen - 3] == '0')
                                 19                 :                :     {
                                 20                 :                :         convert[vallen - 3] = convert[vallen - 2];
                                 21                 :                :         convert[vallen - 2] = convert[vallen - 1];
                                 22                 :                :         convert[vallen - 1] = '\0';
                                 23                 :                :     }
                                 24                 :                : 
                                 25                 :                :     printf("%s", convert);
                                 26                 :                : #else
                                 27                 :             28 :     printf("%g", x);
                                 28                 :                : #endif
                                 29                 :             28 : }
        

Generated by: LCOV version 2.1-beta2-3-g6141622