LTP GCOV extension - code coverage report
Current view: directory - src/bin2c - bin2c.c
Test: app.info
Date: 2008-11-20 Instrumented lines: 12
Code covered: 100.0 % Executed lines: 12

       1                 : #include <stdlib.h>
       2                 : #include <stdio.h>
       3                 : #include <stdarg.h>
       4                 : 
       5                 : void print(const char *format, ...)
       6            6820 : {
       7                 :     va_list ap;
       8            6820 :     va_start(ap, format);
       9            6820 :     if (vprintf(format, ap) < 0) abort();
      10            6820 :     va_end(ap);
      11            6820 : }
      12                 : 
      13                 : int main(int argc, char * * argv)
      14               5 : {
      15                 :     int c;
      16               5 :     if (argc != 2) abort();
      17               5 :     print("static unsigned char %s[] = {", argv[1]);
      18            6820 :     while ((c = getchar()) != EOF) {
      19            6810 :         print("0x%02x, ", (unsigned char) c);
      20                 :     }
      21               5 :     print("};\n");
      22               5 :     return 0;
      23                 : }

Generated by: LTP GCOV extension version 1.6