/[jscoverage]/trunk/util.c
ViewVC logotype

Diff of /trunk/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 359 by siliconforks, Sun Oct 26 05:09:51 2008 UTC revision 372 by siliconforks, Mon Oct 27 20:36:23 2008 UTC
# Line 61  Line 61 
61    exit(EXIT_FAILURE);    exit(EXIT_FAILURE);
62  }  }
63    
64    void fatal_source(const char * source_file, unsigned int line_number, const char * format, ...) {
65      fprintf(stderr, "%s:%s:%u: ", program, source_file, line_number);
66      va_list ap;
67      va_start(ap, format);
68      vfprintf(stderr, format, ap);
69      va_end(ap);
70      fputc('\n', stderr);
71      exit(EXIT_FAILURE);
72    }
73    
74    void warn_source(const char * source_file, unsigned int line_number, const char * format, ...) {
75      fprintf(stderr, "%s:%s:%u: ", program, source_file, line_number);
76      va_list ap;
77      va_start(ap, format);
78      vfprintf(stderr, format, ap);
79      va_end(ap);
80      fputc('\n', stderr);
81    }
82    
83  void version(void) {  void version(void) {
84    printf("%s %s\n", program, VERSION);    printf("%s %s\n", program, VERSION);
85    printf("Character encoding support: ");    printf("Character encoding support: ");
# Line 426  Line 445 
445        head = recursive_dir_list(root, entry_wrt_root, head);        head = recursive_dir_list(root, entry_wrt_root, head);
446        free(entry_wrt_root);        free(entry_wrt_root);
447      }      }
448    #ifndef _WIN32
449      else if (S_ISLNK(buf.st_mode)) {      else if (S_ISLNK(buf.st_mode)) {
450        /* check what it points to */        /* check what it points to */
451        xstat(entry, &buf);        xstat(entry, &buf);
# Line 439  Line 459 
459          fatal("refusing to follow symbolic link: %s", entry);          fatal("refusing to follow symbolic link: %s", entry);
460        }        }
461      }      }
462    #endif
463      else {      else {
464        fatal("unknown file type: %s", entry);        fatal("unknown file type: %s", entry);
465      }      }

Legend:
Removed from v.359  
changed lines
  Added in v.372

  ViewVC Help
Powered by ViewVC 1.1.24