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

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

Generated by: LTP GCOV extension version 1.1