--- trunk/instrument-js.h 2008/09/21 18:35:21 179 +++ trunk/instrument-js.h 2009/02/18 16:08:33 427 @@ -1,6 +1,6 @@ /* instrument-js.h - JavaScript instrumentation routines - Copyright (C) 2007, 2008 siliconforks.com + Copyright (C) 2007, 2008, 2009 siliconforks.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,17 +20,27 @@ #ifndef INSTRUMENT_JS_H_ #define INSTRUMENT_JS_H_ +/* ISO C99 specifies that C++ code must define this to get UINT16_MAX etc. */ +#define __STDC_LIMIT_MACROS #include #include "stream.h" #include "util.h" +#ifdef __cplusplus +extern "C" { +#endif + enum FileType { FILE_TYPE_JS, FILE_TYPE_HTML, FILE_TYPE_OTHER }; +extern bool jscoverage_mozilla; + +void jscoverage_set_js_version(const char * version); + void jscoverage_init(void); void jscoverage_cleanup(void); @@ -64,4 +74,8 @@ void jscoverage_write_source(const char * id, const uint16_t * characters, size_t num_characters, Stream * output); +#ifdef __cplusplus +} #endif + +#endif /* INSTRUMENT_JS_H_ */