From b2a5c30a44e2750276e12ba2edc40cd5e4849e05 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 20 Dec 2013 22:28:25 -0600 Subject: [PATCH 1/2] A C++ shibboleth? --- lib/linguist/heuristics.rb | 4 +- lib/linguist/samples.json | 69 +++++++++++++++++++++++++++++----- samples/C++/render_adapter.cpp | 6 +++ test/test_heuristics.rb | 6 +++ 4 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 samples/C++/render_adapter.cpp diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 01e12e78..1b85108e 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -16,12 +16,14 @@ module Linguist end # .h extensions are ambigious between C, C++, and Objective-C. - # We want to shortcut look for Objective-C. + # We want to shortcut look for Objective-C _and_ now C++ too! # # Returns an array of Languages or [] + # TODO rename this method as we're not strictly disambiguating between .h files here. def self.disambiguate_h(data, languages) matches = [] matches << Language["Objective-C"] if data.include?("@interface") + matches << Language["C++"] if data.include?("#include ") matches end end diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index aedb3d84..84c86f83 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -163,6 +163,9 @@ ".json", ".lock" ], + "JSON5": [ + ".json5" + ], "Julia": [ ".jl" ], @@ -509,8 +512,8 @@ ".gemrc" ] }, - "tokens_total": 428226, - "languages_total": 503, + "tokens_total": 428289, + "languages_total": 506, "tokens": { "ABAP": { "*/**": 1, @@ -8560,7 +8563,7 @@ "C++": { "class": 40, "Bar": 2, - "{": 562, + "{": 563, "protected": 4, "char": 126, "*name": 6, @@ -8570,15 +8573,15 @@ "hello": 2, "(": 2498, ")": 2500, - "}": 562, + "}": 563, "#pragma": 2, "once": 2, - "#include": 117, + "#include": 118, "": 4, "": 4, "": 2, "using": 4, - "namespace": 30, + "namespace": 31, "std": 52, "#define": 197, "DEFAULT_DELIMITER": 1, @@ -9957,6 +9960,8 @@ "wrapMode": 2, "wmode.": 1, "wmode": 1, + "": 1, + "Gui": 1, "v8": 9, "Scanner": 16, "UnicodeCache*": 4, @@ -23686,6 +23691,50 @@ "}": 73, "true": 3 }, + "JSON5": { + "{": 6, + "foo": 1, + "while": 1, + "true": 1, + "this": 1, + "here": 1, + "//": 2, + "inline": 1, + "comment": 1, + "hex": 1, + "xDEADbeef": 1, + "half": 1, + ".5": 1, + "delta": 1, + "+": 1, + "to": 1, + "Infinity": 1, + "and": 1, + "beyond": 1, + "finally": 1, + "oh": 1, + "[": 3, + "]": 3, + "}": 6, + "name": 1, + "version": 1, + "description": 1, + "keywords": 1, + "author": 1, + "contributors": 1, + "main": 1, + "bin": 1, + "dependencies": 1, + "devDependencies": 1, + "mocha": 1, + "scripts": 1, + "build": 1, + "test": 1, + "homepage": 1, + "repository": 1, + "type": 1, + "url": 1 + }, "Julia": { "##": 5, "Test": 1, @@ -45100,7 +45149,7 @@ "Bluespec": 1298, "Brightscript": 579, "C": 58858, - "C++": 22665, + "C++": 22671, "Ceylon": 50, "Clojure": 510, "COBOL": 90, @@ -45134,6 +45183,7 @@ "Java": 8987, "JavaScript": 76934, "JSON": 183, + "JSON5": 57, "Julia": 247, "Kotlin": 155, "KRL": 25, @@ -45235,7 +45285,7 @@ "Bluespec": 2, "Brightscript": 1, "C": 26, - "C++": 23, + "C++": 24, "Ceylon": 1, "Clojure": 7, "COBOL": 4, @@ -45269,6 +45319,7 @@ "Java": 6, "JavaScript": 20, "JSON": 4, + "JSON5": 2, "Julia": 1, "Kotlin": 1, "KRL": 1, @@ -45356,5 +45407,5 @@ "Xtend": 2, "YAML": 1 }, - "md5": "7e305e6e7267f7d227fa871bf83546b8" + "md5": "1b96eb81ded03f57c14ee681d73d5db6" } \ No newline at end of file diff --git a/samples/C++/render_adapter.cpp b/samples/C++/render_adapter.cpp new file mode 100644 index 00000000..4a18f6f6 --- /dev/null +++ b/samples/C++/render_adapter.cpp @@ -0,0 +1,6 @@ +#include + +namespace Gui +{ + +} diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index e499cf7e..0fea2933 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -27,6 +27,12 @@ class TestHeuristcs < Test::Unit::TestCase assert_equal Language["Objective-C"], results.first end end + + def test_cpp_by_heuristics + languages = ["C++", "Objective-C"] + results = Heuristics.find_by_heuristics(fixture("C++/render_adapter.cpp"), languages) + assert_equal Language["C++"], results.first + end def test_detect_still_works_if_nothing_matches match = Language.detect("Hello.m", fixture("Objective-C/hello.m")) From 300d47b36bc642e00fe9eb3fee13d2892f3817f8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 22 Dec 2013 19:27:14 -0600 Subject: [PATCH 2/2] Regenerating samples.json and bringing C++ heuristic test up to date --- lib/linguist/samples.json | 1571 ++++++++++++++++++++++++++++++++++++- test/test_heuristics.rb | 2 +- 2 files changed, 1557 insertions(+), 16 deletions(-) diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index 30c56b35..fc8b6755 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -511,8 +511,8 @@ ".gemrc" ] }, - "tokens_total": 428289, - "languages_total": 506, + "tokens_total": 436401, + "languages_total": 508, "tokens": { "ABAP": { "*/**": 1, @@ -8562,7 +8562,7 @@ "C++": { "class": 40, "Bar": 2, - "{": 563, + "{": 581, "protected": 4, "char": 127, "*name": 6, @@ -8570,16 +8570,1556 @@ "public": 33, "void": 225, "hello": 2, - "(": 2498, - ")": 2500, - "}": 563, - "#pragma": 2, - "once": 2, - "#include": 118, + "(": 2729, + ")": 2731, + "}": 581, + "//": 278, + "///": 843, + "mainpage": 1, + "C": 6, + "library": 14, + "for": 98, + "Broadcom": 3, + "BCM": 14, + "as": 28, + "used": 17, + "in": 165, + "Raspberry": 6, + "Pi": 5, + "This": 18, + "is": 100, + "a": 156, + "RPi": 17, + ".": 16, + "It": 7, + "provides": 3, + "access": 17, + "to": 253, + "GPIO": 87, + "and": 118, + "other": 17, + "IO": 2, + "functions": 19, + "on": 55, + "the": 537, + "chip": 9, + "allowing": 3, + "pins": 40, + "pin": 90, + "IDE": 4, + "plug": 3, + "board": 2, + "so": 2, + "you": 29, + "can": 21, + "control": 17, + "interface": 9, + "with": 32, + "various": 4, + "external": 3, + "devices.": 1, + "reading": 3, + "digital": 2, + "inputs": 2, + "setting": 2, + "outputs": 1, + "using": 11, + "SPI": 44, + "I2C": 29, + "accessing": 2, + "system": 9, + "timers.": 1, + "Pin": 65, + "event": 3, + "detection": 2, + "supported": 3, + "by": 53, + "polling": 1, + "interrupts": 1, + "are": 36, + "not": 26, + "+": 60, + "compatible": 1, + "installs": 1, + "header": 7, + "file": 31, + "non": 2, + "-": 349, + "shared": 2, + "any": 23, + "Linux": 2, + "based": 4, + "distro": 1, + "but": 5, + "clearly": 1, + "no": 7, + "use": 34, + "except": 2, + "or": 44, + "another": 1, + "The": 50, + "version": 38, + "of": 211, + "package": 1, + "that": 33, + "this": 52, + "documentation": 3, + "refers": 1, + "be": 35, + "downloaded": 1, + "from": 91, + "http": 11, + "//www.airspayce.com/mikem/bcm2835/bcm2835": 1, + "tar.gz": 1, + "You": 9, + "find": 2, + "latest": 2, + "at": 20, + "//www.airspayce.com/mikem/bcm2835": 1, + "Several": 1, + "example": 3, + "programs": 4, + "provided.": 1, + "Based": 1, + "data": 26, + "//elinux.org/RPi_Low": 1, + "level_peripherals": 1, + "//www.raspberrypi.org/wp": 1, + "content/uploads/2012/02/BCM2835": 1, + "ARM": 5, + "Peripherals.pdf": 1, + "//www.scribd.com/doc/101830961/GPIO": 2, + "Pads": 3, + "Control2": 2, + "also": 3, + "online": 1, + "help": 1, + "discussion": 1, + "//groups.google.com/group/bcm2835": 1, + "Please": 4, + "group": 23, + "all": 11, + "questions": 1, + "discussions": 1, + "topic.": 1, + "Do": 1, + "contact": 1, + "author": 3, + "directly": 2, + "unless": 1, + "it": 19, + "discuss": 1, + "commercial": 1, + "licensing.": 1, + "Tested": 1, + "debian6": 1, + "wheezy": 3, + "raspbian": 3, + "Occidentalisv01": 2, + "CAUTION": 1, + "has": 29, + "been": 14, + "observed": 1, + "when": 22, + "detect": 3, + "enables": 3, + "such": 4, + "bcm2835_gpio_len": 5, + "pulled": 1, + "LOW": 8, + "cause": 1, + "temporary": 1, + "hangs": 1, + "Occidentalisv01.": 1, + "Reason": 1, + "yet": 1, + "determined": 1, + "suspect": 1, + "an": 23, + "interrupt": 1, + "handler": 1, + "hitting": 1, + "hard": 1, + "loop": 2, + "those": 3, + "OSs.": 1, + "If": 11, + "must": 6, + "friends": 2, + "make": 6, + "sure": 3, + "disable": 2, + "bcm2835_gpio_cler_len": 1, + "after": 18, + "use.": 1, + "par": 9, + "Installation": 1, + "consists": 1, + "single": 2, + "which": 14, + "will": 15, + "installed": 1, + "usual": 3, + "places": 1, + "install": 3, + "code": 12, + "#": 1, + "download": 2, + "say": 1, + "bcm2835": 7, + "xx.tar.gz": 2, + "then": 15, + "tar": 1, + "zxvf": 1, + "cd": 1, + "xx": 2, + "./configure": 1, + "sudo": 2, + "check": 3, + "endcode": 2, + "Physical": 21, + "Addresses": 6, + "bcm2835_peri_read": 3, + "bcm2835_peri_write": 3, + "bcm2835_peri_set_bits": 2, + "low": 2, + "level": 10, + "peripheral": 14, + "register": 17, + "functions.": 4, + "They": 1, + "designed": 3, + "physical": 4, + "addresses": 4, + "described": 1, + "section": 6, + "BCM2835": 2, + "Peripherals": 1, + "manual.": 1, + "range": 3, + "FFFFFF": 1, + "peripherals.": 1, + "bus": 4, + "peripherals": 2, + "set": 18, + "up": 18, + "map": 3, + "onto": 1, + "address": 13, + "starting": 1, + "E000000.": 1, + "Thus": 1, + "advertised": 1, + "manual": 8, + "Ennnnnn": 1, + "available": 6, + "nnnnnn.": 1, + "base": 4, + "registers": 12, + "following": 2, + "externals": 1, + "bcm2835_gpio": 2, + "bcm2835_pwm": 2, + "bcm2835_clk": 2, + "bcm2835_pads": 2, + "bcm2835_spio0": 1, + "bcm2835_st": 1, + "bcm2835_bsc0": 1, + "bcm2835_bsc1": 1, + "Numbering": 1, + "numbering": 1, + "different": 5, + "inconsistent": 1, + "underlying": 4, + "numbering.": 1, + "//elinux.org/RPi_BCM2835_GPIOs": 1, + "some": 4, + "well": 1, + "power": 1, + "ground": 1, + "pins.": 1, + "Not": 4, + "header.": 1, + "Version": 40, + "P5": 6, + "connector": 1, + "V": 2, + "Gnd.": 1, + "passed": 4, + "number": 52, + "_not_": 1, + "number.": 1, + "There": 1, + "symbolic": 1, + "definitions": 3, + "each": 7, + "should": 10, + "convenience.": 1, + "See": 7, + "ref": 32, + "RPiGPIOPin.": 22, + "Pins": 2, + "bcm2835_spi_*": 1, + "allow": 5, + "SPI0": 17, + "send": 3, + "received": 3, + "Serial": 3, + "Peripheral": 6, + "Interface": 2, + "For": 6, + "more": 4, + "information": 3, + "about": 6, + "see": 14, + "//en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus": 1, + "When": 12, + "bcm2835_spi_begin": 3, + "called": 13, + "changes": 2, + "bahaviour": 1, + "their": 6, + "default": 14, + "behaviour": 1, + "order": 14, + "support": 4, + "SPI.": 1, + "While": 1, + "able": 2, + "state": 22, + "through": 4, + "bcm2835_spi_gpio_write": 1, + "bcm2835_spi_end": 4, + "revert": 1, + "configured": 1, + "controled": 1, + "bcm2835_gpio_*": 1, + "calls.": 1, + "P1": 56, + "MOSI": 8, + "MISO": 6, + "CLK": 6, + "CE0": 5, + "CE1": 6, + "bcm2835_i2c_*": 2, + "BSC": 10, + "generically": 1, + "referred": 1, + "I": 4, + "//en.wikipedia.org/wiki/I": 1, + "%": 6, + "C2": 1, + "B2C": 1, + "V2": 2, + "SDA": 3, + "SLC": 1, + "Real": 1, + "Time": 1, + "performance": 2, + "constraints": 2, + "user": 3, + "i.e.": 1, + "they": 2, + "run": 1, + "Such": 1, + "part": 1, + "kernel": 4, + "usually": 2, + "subject": 1, + "paging": 1, + "swapping": 2, + "while": 12, + "does": 4, + "things": 1, + "besides": 1, + "running": 1, + "your": 12, + "program.": 1, + "means": 8, + "expect": 2, + "get": 5, + "real": 4, + "time": 10, + "timing": 3, + "programs.": 1, + "In": 2, + "particular": 1, + "there": 4, + "guarantee": 1, + "bcm2835_delay": 5, + "bcm2835_delayMicroseconds": 6, + "return": 164, + "exactly": 2, + "requested.": 1, + "fact": 2, + "depending": 1, + "activity": 1, + "host": 1, + "etc": 1, + "might": 1, + "significantly": 1, + "longer": 1, + "delay": 9, + "times": 2, + "than": 5, + "one": 73, + "asked": 1, + "for.": 1, + "So": 1, + "please": 2, + "dont": 1, + "request.": 1, + "Arjan": 2, + "reports": 1, + "prevent": 4, + "fragment": 2, + "struct": 12, + "sched_param": 1, + "sp": 4, + "memset": 3, + "&": 149, + "sizeof": 15, + "sp.sched_priority": 1, + "sched_get_priority_max": 1, + "SCHED_FIFO": 2, + "sched_setscheduler": 1, + "mlockall": 1, + "MCL_CURRENT": 1, + "|": 14, + "MCL_FUTURE": 1, + "Open": 2, + "Source": 2, + "Licensing": 2, + "GPL": 2, + "appropriate": 7, + "option": 1, + "if": 306, + "want": 5, + "share": 2, + "source": 12, + "application": 2, + "everyone": 1, + "distribute": 1, + "give": 2, + "them": 1, + "right": 9, + "who": 1, + "uses": 4, + "it.": 3, + "wish": 2, + "software": 1, + "under": 2, + "contribute": 1, + "open": 6, + "community": 1, + "accordance": 1, + "distributed.": 1, + "//www.gnu.org/copyleft/gpl.html": 1, + "COPYING": 1, + "Acknowledgements": 1, + "Some": 1, + "inspired": 2, + "Dom": 1, + "Gert.": 1, + "Alan": 1, + "Barr.": 1, + "Revision": 1, + "History": 1, + "Initial": 1, + "release": 1, + "Minor": 1, + "bug": 1, + "fixes": 1, + "Added": 11, + "bcm2835_spi_transfern": 3, + "Fixed": 4, + "problem": 2, + "prevented": 1, + "being": 4, + "used.": 2, + "Reported": 5, + "David": 1, + "Robinson.": 1, + "bcm2835_close": 4, + "deinit": 1, + "library.": 3, + "Suggested": 1, + "sar": 1, + "Ortiz": 1, + "Document": 1, + "testing": 1, + "Functions": 1, + "bcm2835_gpio_ren": 3, + "bcm2835_gpio_fen": 3, + "bcm2835_gpio_hen": 3, + "bcm2835_gpio_aren": 3, + "bcm2835_gpio_afen": 3, + "now": 4, + "only": 6, + "specified.": 1, + "Other": 1, + "were": 1, + "already": 1, + "previously": 10, + "enabled": 4, + "stay": 1, + "enabled.": 1, + "bcm2835_gpio_clr_ren": 2, + "bcm2835_gpio_clr_fen": 2, + "bcm2835_gpio_clr_hen": 2, + "bcm2835_gpio_clr_len": 2, + "bcm2835_gpio_clr_aren": 2, + "bcm2835_gpio_clr_afen": 2, + "clear": 3, + "enable": 3, + "individual": 1, + "suggested": 3, + "Andreas": 1, + "Sundstrom.": 1, + "bcm2835_spi_transfernb": 2, + "buffers": 3, + "read": 21, + "write.": 1, + "Improvements": 3, + "barrier": 3, + "maddin.": 1, + "contributed": 1, + "mikew": 1, + "noticed": 1, + "was": 6, + "mallocing": 1, + "memory": 14, + "mmaps": 1, + "/dev/mem.": 1, + "ve": 4, + "removed": 1, + "mallocs": 1, + "frees": 1, + "found": 1, + "calling": 8, + "nanosleep": 7, + "takes": 1, + "least": 2, + "us.": 1, + "need": 3, + "link": 3, + "version.": 1, + "s": 18, + "doc": 1, + "Also": 1, + "added": 2, + "define": 2, + "passwrd": 1, + "value": 50, + "Gert": 1, + "says": 1, + "needed": 3, + "change": 3, + "pad": 4, + "settings.": 1, + "Changed": 1, + "names": 3, + "collisions": 1, + "wiringPi.": 1, + "Macros": 2, + "delayMicroseconds": 3, + "disabled": 2, + "defining": 1, + "BCM2835_NO_DELAY_COMPATIBILITY": 2, + "incorrect": 2, + "New": 6, + "mapping": 3, + "Hardware": 1, + "pointers": 2, + "initialisation": 2, + "externally": 1, + "bcm2835_spi0.": 1, + "Now": 4, + "compiles": 1, + "even": 2, + "CLOCK_MONOTONIC_RAW": 1, + "CLOCK_MONOTONIC": 1, + "instead.": 1, + "errors": 1, + "divider": 15, + "frequencies": 2, + "MHz": 14, + "clock.": 6, + "Ben": 1, + "Simpson.": 1, + "end": 23, + "examples": 1, + "Mark": 5, + "Wolfe.": 1, + "bcm2835_gpio_set_multi": 2, + "bcm2835_gpio_clr_multi": 2, + "bcm2835_gpio_write_multi": 4, + "mask": 20, + "once.": 1, + "Requested": 2, + "Sebastian": 2, + "Loncar.": 2, + "bcm2835_gpio_write_mask.": 1, + "Changes": 1, + "timer": 2, + "counter": 1, + "instead": 1, + "clock_gettime": 1, + "improved": 1, + "accuracy.": 1, + "No": 2, + "lrt": 1, + "now.": 1, + "Contributed": 1, + "van": 1, + "Vught.": 1, + "Removed": 1, + "inlines": 1, + "previous": 6, + "patch": 1, + "since": 3, + "don": 1, + "t": 15, + "seem": 1, + "work": 1, + "everywhere.": 1, + "olly.": 1, + "Patch": 2, + "Dootson": 2, + "close": 3, + "/dev/mem": 4, + "granted.": 1, + "susceptible": 1, + "bit": 19, + "overruns.": 1, + "courtesy": 1, + "Jeremy": 1, + "Mortis.": 1, + "definition": 3, + "BCM2835_GPFEN0": 2, + "broke": 1, + "ability": 1, + "falling": 4, + "edge": 8, + "events.": 1, + "Dootson.": 2, + "bcm2835_i2c_set_baudrate": 2, + "bcm2835_i2c_read_register_rs.": 1, + "bcm2835_i2c_read": 4, + "bcm2835_i2c_write": 4, + "fix": 1, + "ocasional": 1, + "reads": 2, + "completing.": 1, + "Patched": 1, + "p": 6, + "[": 274, + "atched": 1, + "his": 1, + "submitted": 1, + "high": 1, + "load": 1, + "processes.": 1, + "Updated": 1, + "distribution": 1, + "location": 6, + "details": 1, + "airspayce.com": 1, + "missing": 1, + "unmapmem": 1, + "pads": 7, + "leak.": 1, + "Hartmut": 1, + "Henkel.": 1, + "Mike": 1, + "McCauley": 1, + "mikem@airspayce.com": 1, + "DO": 1, + "NOT": 3, + "CONTACT": 1, + "THE": 2, + "AUTHOR": 1, + "DIRECTLY": 1, + "USE": 1, + "LISTS": 1, + "#ifndef": 27, + "BCM2835_H": 3, + "#define": 341, + "#include": 121, + "": 2, + "defgroup": 7, + "constants": 1, + "Constants": 1, + "passing": 1, + "values": 3, + "here": 1, + "@": 14, + "HIGH": 12, + "true": 41, + "volts": 2, + "pin.": 21, + "false": 45, + "Speed": 1, + "core": 1, + "clock": 21, + "core_clk": 1, + "BCM2835_CORE_CLK_HZ": 1, + "<": 247, + "Base": 17, + "Address": 10, + "BCM2835_PERI_BASE": 9, + "System": 10, + "Timer": 9, + "BCM2835_ST_BASE": 1, + "BCM2835_GPIO_PADS": 2, + "Clock/timer": 1, + "BCM2835_CLOCK_BASE": 1, + "BCM2835_GPIO_BASE": 6, + "BCM2835_SPI0_BASE": 1, + "BSC0": 2, + "BCM2835_BSC0_BASE": 1, + "PWM": 2, + "BCM2835_GPIO_PWM": 1, + "C000": 1, + "BSC1": 2, + "BCM2835_BSC1_BASE": 1, + "ST": 1, + "registers.": 10, + "Available": 8, + "bcm2835_init": 11, + "extern": 72, + "volatile": 13, + "uint32_t": 37, + "*bcm2835_st": 1, + "*bcm2835_gpio": 1, + "*bcm2835_pwm": 1, + "*bcm2835_clk": 1, + "PADS": 1, + "*bcm2835_pads": 1, + "*bcm2835_spi0": 1, + "*bcm2835_bsc0": 1, + "*bcm2835_bsc1": 1, + "Size": 2, + "page": 5, + "BCM2835_PAGE_SIZE": 1, + "*1024": 2, + "block": 4, + "BCM2835_BLOCK_SIZE": 1, + "offsets": 2, + "BCM2835_GPIO_BASE.": 1, + "Offsets": 1, + "into": 6, + "bytes": 29, + "per": 3, + "Register": 1, + "View": 1, + "BCM2835_GPFSEL0": 1, + "Function": 8, + "Select": 49, + "BCM2835_GPFSEL1": 1, + "BCM2835_GPFSEL2": 1, + "BCM2835_GPFSEL3": 1, + "c": 62, + "BCM2835_GPFSEL4": 1, + "BCM2835_GPFSEL5": 1, + "BCM2835_GPSET0": 1, + "Output": 6, + "Set": 2, + "BCM2835_GPSET1": 1, + "BCM2835_GPCLR0": 1, + "Clear": 18, + "BCM2835_GPCLR1": 1, + "BCM2835_GPLEV0": 1, + "Level": 2, + "BCM2835_GPLEV1": 1, + "BCM2835_GPEDS0": 1, + "Event": 11, + "Detect": 35, + "Status": 6, + "BCM2835_GPEDS1": 1, + "BCM2835_GPREN0": 1, + "Rising": 8, + "Edge": 16, + "Enable": 38, + "BCM2835_GPREN1": 1, + "Falling": 8, + "BCM2835_GPFEN1": 1, + "BCM2835_GPHEN0": 1, + "High": 4, + "BCM2835_GPHEN1": 1, + "BCM2835_GPLEN0": 1, + "Low": 5, + "BCM2835_GPLEN1": 1, + "BCM2835_GPAREN0": 1, + "Async.": 4, + "BCM2835_GPAREN1": 1, + "BCM2835_GPAFEN0": 1, + "BCM2835_GPAFEN1": 1, + "BCM2835_GPPUD": 1, + "Pull": 11, + "up/down": 10, + "BCM2835_GPPUDCLK0": 1, + "Clock": 11, + "BCM2835_GPPUDCLK1": 1, + "brief": 12, + "bcm2835PortFunction": 1, + "Port": 1, + "function": 18, + "select": 9, + "modes": 1, + "bcm2835_gpio_fsel": 2, + "typedef": 50, + "enum": 17, + "BCM2835_GPIO_FSEL_INPT": 1, + "b000": 1, + "Input": 2, + "BCM2835_GPIO_FSEL_OUTP": 1, + "b001": 1, + "BCM2835_GPIO_FSEL_ALT0": 1, + "b100": 1, + "Alternate": 6, + "BCM2835_GPIO_FSEL_ALT1": 1, + "b101": 1, + "BCM2835_GPIO_FSEL_ALT2": 1, + "b110": 1, + "BCM2835_GPIO_FSEL_ALT3": 1, + "b111": 2, + "BCM2835_GPIO_FSEL_ALT4": 1, + "b011": 1, + "BCM2835_GPIO_FSEL_ALT5": 1, + "b010": 1, + "BCM2835_GPIO_FSEL_MASK": 1, + "bits": 11, + "bcm2835FunctionSelect": 2, + "bcm2835PUDControl": 4, + "Pullup/Pulldown": 1, + "defines": 3, + "bcm2835_gpio_pud": 5, + "BCM2835_GPIO_PUD_OFF": 1, + "b00": 1, + "Off": 3, + "pull": 1, + "BCM2835_GPIO_PUD_DOWN": 1, + "b01": 1, + "Down": 1, + "BCM2835_GPIO_PUD_UP": 1, + "b10": 1, + "Up": 1, + "Pad": 11, + "BCM2835_PADS_GPIO_0_27": 1, + "BCM2835_PADS_GPIO_28_45": 1, + "BCM2835_PADS_GPIO_46_53": 1, + "Control": 6, + "masks": 1, + "BCM2835_PAD_PASSWRD": 1, + "A": 7, + "<<": 29, + "Password": 1, + "BCM2835_PAD_SLEW_RATE_UNLIMITED": 1, + "Slew": 1, + "rate": 3, + "unlimited": 1, + "BCM2835_PAD_HYSTERESIS_ENABLED": 1, + "Hysteresis": 1, + "BCM2835_PAD_DRIVE_2mA": 1, + "mA": 8, + "drive": 8, + "current": 26, + "BCM2835_PAD_DRIVE_4mA": 1, + "BCM2835_PAD_DRIVE_6mA": 1, + "BCM2835_PAD_DRIVE_8mA": 1, + "BCM2835_PAD_DRIVE_10mA": 1, + "BCM2835_PAD_DRIVE_12mA": 1, + "BCM2835_PAD_DRIVE_14mA": 1, + "BCM2835_PAD_DRIVE_16mA": 1, + "bcm2835PadGroup": 4, + "specification": 1, + "bcm2835_gpio_pad": 2, + "BCM2835_PAD_GROUP_GPIO_0_27": 1, + "BCM2835_PAD_GROUP_GPIO_28_45": 1, + "BCM2835_PAD_GROUP_GPIO_46_53": 1, + "Numbers": 1, + "Here": 1, + "we": 4, + "terms": 4, + "numbers.": 1, + "These": 6, + "requiring": 1, + "bin": 1, + "connected": 1, + "adopt": 1, + "alternate": 7, + "function.": 3, + "slightly": 1, + "pinouts": 1, + "these": 1, + "RPI_V2_*.": 1, + "At": 1, + "bootup": 1, + "UART0_TXD": 3, + "UART0_RXD": 3, + "ie": 3, + "alt0": 1, + "respectively": 1, + "dedicated": 1, + "cant": 1, + "controlled": 1, + "independently": 1, + "RPI_GPIO_P1_03": 6, + "RPI_GPIO_P1_05": 6, + "RPI_GPIO_P1_07": 1, + "RPI_GPIO_P1_08": 1, + "defaults": 4, + "alt": 4, + "RPI_GPIO_P1_10": 1, + "RPI_GPIO_P1_11": 1, + "RPI_GPIO_P1_12": 1, + "RPI_GPIO_P1_13": 1, + "RPI_GPIO_P1_15": 1, + "RPI_GPIO_P1_16": 1, + "RPI_GPIO_P1_18": 1, + "RPI_GPIO_P1_19": 1, + "RPI_GPIO_P1_21": 1, + "RPI_GPIO_P1_22": 1, + "RPI_GPIO_P1_23": 1, + "RPI_GPIO_P1_24": 1, + "RPI_GPIO_P1_26": 1, + "RPI_V2_GPIO_P1_03": 1, + "RPI_V2_GPIO_P1_05": 1, + "RPI_V2_GPIO_P1_07": 1, + "RPI_V2_GPIO_P1_08": 1, + "RPI_V2_GPIO_P1_10": 1, + "RPI_V2_GPIO_P1_11": 1, + "RPI_V2_GPIO_P1_12": 1, + "RPI_V2_GPIO_P1_13": 1, + "RPI_V2_GPIO_P1_15": 1, + "RPI_V2_GPIO_P1_16": 1, + "RPI_V2_GPIO_P1_18": 1, + "RPI_V2_GPIO_P1_19": 1, + "RPI_V2_GPIO_P1_21": 1, + "RPI_V2_GPIO_P1_22": 1, + "RPI_V2_GPIO_P1_23": 1, + "RPI_V2_GPIO_P1_24": 1, + "RPI_V2_GPIO_P1_26": 1, + "RPI_V2_GPIO_P5_03": 1, + "RPI_V2_GPIO_P5_04": 1, + "RPI_V2_GPIO_P5_05": 1, + "RPI_V2_GPIO_P5_06": 1, + "RPiGPIOPin": 1, + "BCM2835_SPI0_CS": 1, + "Master": 12, + "BCM2835_SPI0_FIFO": 1, + "TX": 5, + "RX": 7, + "FIFOs": 1, + "BCM2835_SPI0_CLK": 1, + "Divider": 2, + "BCM2835_SPI0_DLEN": 1, + "Data": 9, + "Length": 2, + "BCM2835_SPI0_LTOH": 1, + "LOSSI": 1, + "mode": 24, + "TOH": 1, + "BCM2835_SPI0_DC": 1, + "DMA": 3, + "DREQ": 1, + "Controls": 1, + "BCM2835_SPI0_CS_LEN_LONG": 1, + "Long": 1, + "word": 7, + "Lossi": 2, + "DMA_LEN": 1, + "BCM2835_SPI0_CS_DMA_LEN": 1, + "BCM2835_SPI0_CS_CSPOL2": 1, + "Chip": 9, + "Polarity": 5, + "BCM2835_SPI0_CS_CSPOL1": 1, + "BCM2835_SPI0_CS_CSPOL0": 1, + "BCM2835_SPI0_CS_RXF": 1, + "RXF": 2, + "FIFO": 25, + "Full": 1, + "BCM2835_SPI0_CS_RXR": 1, + "RXR": 3, + "needs": 3, + "Reading": 1, + "full": 9, + "BCM2835_SPI0_CS_TXD": 1, + "TXD": 2, + "accept": 2, + "BCM2835_SPI0_CS_RXD": 1, + "RXD": 2, + "contains": 2, + "BCM2835_SPI0_CS_DONE": 1, + "Done": 3, + "transfer": 8, + "BCM2835_SPI0_CS_TE_EN": 1, + "Unused": 2, + "BCM2835_SPI0_CS_LMONO": 1, + "BCM2835_SPI0_CS_LEN": 1, + "LEN": 1, + "LoSSI": 1, + "BCM2835_SPI0_CS_REN": 1, + "REN": 1, + "Read": 3, + "BCM2835_SPI0_CS_ADCS": 1, + "ADCS": 1, + "Automatically": 1, + "Deassert": 1, + "BCM2835_SPI0_CS_INTR": 1, + "INTR": 1, + "Interrupt": 5, + "BCM2835_SPI0_CS_INTD": 1, + "INTD": 1, + "BCM2835_SPI0_CS_DMAEN": 1, + "DMAEN": 1, + "BCM2835_SPI0_CS_TA": 1, + "Transfer": 3, + "Active": 2, + "BCM2835_SPI0_CS_CSPOL": 1, + "BCM2835_SPI0_CS_CLEAR": 1, + "BCM2835_SPI0_CS_CLEAR_RX": 1, + "BCM2835_SPI0_CS_CLEAR_TX": 1, + "BCM2835_SPI0_CS_CPOL": 1, + "BCM2835_SPI0_CS_CPHA": 1, + "Phase": 1, + "BCM2835_SPI0_CS_CS": 1, + "bcm2835SPIBitOrder": 3, + "Bit": 1, + "Specifies": 5, + "ordering": 4, + "bcm2835_spi_setBitOrder": 2, + "BCM2835_SPI_BIT_ORDER_LSBFIRST": 1, + "LSB": 1, + "First": 2, + "BCM2835_SPI_BIT_ORDER_MSBFIRST": 1, + "MSB": 1, + "Specify": 2, + "bcm2835_spi_setDataMode": 2, + "BCM2835_SPI_MODE0": 1, + "CPOL": 4, + "CPHA": 4, + "BCM2835_SPI_MODE1": 1, + "BCM2835_SPI_MODE2": 1, + "BCM2835_SPI_MODE3": 1, + "bcm2835SPIMode": 2, + "bcm2835SPIChipSelect": 3, + "BCM2835_SPI_CS0": 1, + "BCM2835_SPI_CS1": 1, + "BCM2835_SPI_CS2": 1, + "CS1": 1, + "CS2": 1, + "asserted": 3, + "BCM2835_SPI_CS_NONE": 1, + "CS": 5, + "yourself": 1, + "bcm2835SPIClockDivider": 3, + "generate": 2, + "Figures": 1, + "below": 1, + "period": 1, + "frequency.": 1, + "divided": 2, + "nominal": 2, + "reported": 2, + "contrary": 1, + "may": 9, + "shown": 1, + "have": 4, + "confirmed": 1, + "measurement": 2, + "BCM2835_SPI_CLOCK_DIVIDER_65536": 1, + "us": 12, + "kHz": 10, + "BCM2835_SPI_CLOCK_DIVIDER_32768": 1, + "BCM2835_SPI_CLOCK_DIVIDER_16384": 1, + "BCM2835_SPI_CLOCK_DIVIDER_8192": 1, + "/51757813kHz": 1, + "BCM2835_SPI_CLOCK_DIVIDER_4096": 1, + "BCM2835_SPI_CLOCK_DIVIDER_2048": 1, + "BCM2835_SPI_CLOCK_DIVIDER_1024": 1, + "BCM2835_SPI_CLOCK_DIVIDER_512": 1, + "BCM2835_SPI_CLOCK_DIVIDER_256": 1, + "BCM2835_SPI_CLOCK_DIVIDER_128": 1, + "ns": 9, + "BCM2835_SPI_CLOCK_DIVIDER_64": 1, + "BCM2835_SPI_CLOCK_DIVIDER_32": 1, + "BCM2835_SPI_CLOCK_DIVIDER_16": 1, + "BCM2835_SPI_CLOCK_DIVIDER_8": 1, + "BCM2835_SPI_CLOCK_DIVIDER_4": 1, + "BCM2835_SPI_CLOCK_DIVIDER_2": 1, + "fastest": 1, + "BCM2835_SPI_CLOCK_DIVIDER_1": 1, + "same": 3, + "/65536": 1, + "BCM2835_BSC_C": 1, + "BCM2835_BSC_S": 1, + "BCM2835_BSC_DLEN": 1, + "BCM2835_BSC_A": 1, + "Slave": 1, + "BCM2835_BSC_FIFO": 1, + "BCM2835_BSC_DIV": 1, + "BCM2835_BSC_DEL": 1, + "Delay": 4, + "BCM2835_BSC_CLKT": 1, + "Stretch": 2, + "Timeout": 2, + "BCM2835_BSC_C_I2CEN": 1, + "BCM2835_BSC_C_INTR": 1, + "BCM2835_BSC_C_INTT": 1, + "BCM2835_BSC_C_INTD": 1, + "DONE": 2, + "BCM2835_BSC_C_ST": 1, + "Start": 4, + "new": 13, + "BCM2835_BSC_C_CLEAR_1": 1, + "BCM2835_BSC_C_CLEAR_2": 1, + "BCM2835_BSC_C_READ": 1, + "BCM2835_BSC_S_CLKT": 1, + "stretch": 1, + "timeout": 1, + "BCM2835_BSC_S_ERR": 1, + "ACK": 1, + "error": 2, + "BCM2835_BSC_S_RXF": 1, + "BCM2835_BSC_S_TXE": 1, + "TXE": 1, + "BCM2835_BSC_S_RXD": 1, + "BCM2835_BSC_S_TXD": 1, + "BCM2835_BSC_S_RXR": 1, + "BCM2835_BSC_S_TXW": 1, + "TXW": 1, + "writing": 2, + "BCM2835_BSC_S_DONE": 1, + "BCM2835_BSC_S_TA": 1, + "BCM2835_BSC_FIFO_SIZE": 1, + "size": 13, + "bcm2835I2CClockDivider": 3, + "BCM2835_I2C_CLOCK_DIVIDER_2500": 1, + "BCM2835_I2C_CLOCK_DIVIDER_626": 1, + "BCM2835_I2C_CLOCK_DIVIDER_150": 1, + "reset": 1, + "BCM2835_I2C_CLOCK_DIVIDER_148": 1, + "bcm2835I2CReasonCodes": 5, + "reason": 4, + "codes": 1, + "BCM2835_I2C_REASON_OK": 1, + "Success": 1, + "BCM2835_I2C_REASON_ERROR_NACK": 1, + "Received": 4, + "NACK": 1, + "BCM2835_I2C_REASON_ERROR_CLKT": 1, + "BCM2835_I2C_REASON_ERROR_DATA": 1, + "sent": 1, + "/": 14, + "BCM2835_ST_CS": 1, + "Control/Status": 1, + "BCM2835_ST_CLO": 1, + "Counter": 4, + "Lower": 2, + "BCM2835_ST_CHI": 1, + "Upper": 1, + "BCM2835_PWM_CONTROL": 1, + "BCM2835_PWM_STATUS": 1, + "BCM2835_PWM0_RANGE": 1, + "BCM2835_PWM0_DATA": 1, + "BCM2835_PWM1_RANGE": 1, + "BCM2835_PWM1_DATA": 1, + "BCM2835_PWMCLK_CNTL": 1, + "BCM2835_PWMCLK_DIV": 1, + "BCM2835_PWM1_MS_MODE": 1, + "Run": 4, + "MS": 2, + "BCM2835_PWM1_USEFIFO": 1, + "BCM2835_PWM1_REVPOLAR": 1, + "Reverse": 2, + "polarity": 3, + "BCM2835_PWM1_OFFSTATE": 1, + "Ouput": 2, + "BCM2835_PWM1_REPEATFF": 1, + "Repeat": 2, + "last": 6, + "empty": 2, + "BCM2835_PWM1_SERIAL": 1, + "serial": 2, + "BCM2835_PWM1_ENABLE": 1, + "Channel": 2, + "BCM2835_PWM0_MS_MODE": 1, + "BCM2835_PWM0_USEFIFO": 1, + "BCM2835_PWM0_REVPOLAR": 1, + "BCM2835_PWM0_OFFSTATE": 1, + "BCM2835_PWM0_REPEATFF": 1, + "BCM2835_PWM0_SERIAL": 1, + "BCM2835_PWM0_ENABLE": 1, + "x": 48, + "#endif": 89, + "#ifdef": 19, + "__cplusplus": 12, + "init": 2, + "Library": 1, + "management": 1, + "intialise": 1, + "Initialise": 1, + "opening": 1, + "getting": 1, + "internal": 47, + "device": 7, + "call": 4, + "successfully": 1, + "before": 7, + "bcm2835_set_debug": 2, + "fails": 1, + "returning": 1, + "result": 2, + "crashes": 1, + "failures.": 1, + "Prints": 1, + "messages": 1, + "stderr": 1, + "case": 34, + "errors.": 1, + "successful": 2, + "else": 48, + "int": 161, + "Close": 1, + "deallocating": 1, + "allocated": 2, + "closing": 1, + "Sets": 24, + "debug": 6, + "prevents": 1, + "makes": 1, + "print": 5, + "out": 5, + "what": 2, + "would": 2, + "do": 9, + "rather": 2, + "causes": 1, + "normal": 1, + "operation.": 2, + "Call": 2, + "param": 72, + "]": 273, + "level.": 3, + "uint8_t": 43, + "lowlevel": 2, + "provide": 1, + "generally": 1, + "Reads": 5, + "done": 3, + "twice": 3, + "therefore": 6, + "always": 3, + "safe": 4, + "precautions": 3, + "correct": 3, + "paddr": 10, + "from.": 6, + "etc.": 5, + "sa": 30, + "uint32_t*": 7, + "without": 3, + "within": 4, + "occurred": 2, + "since.": 2, + "bcm2835_peri_read_nb": 1, + "Writes": 2, + "write": 8, + "bcm2835_peri_write_nb": 1, + "Alters": 1, + "regsiter.": 1, + "valu": 1, + "alters": 1, + "deines": 1, + "according": 1, + "value.": 2, + "All": 1, + "unaffected.": 1, + "Use": 8, + "alter": 2, + "subset": 1, + "register.": 3, + "masked": 2, + "mask.": 1, + "Bitmask": 1, + "altered": 1, + "gpio": 1, + "interface.": 3, + "input": 12, + "output": 21, + "state.": 1, + "given": 16, + "configures": 1, + "RPI_GPIO_P1_*": 21, + "Mode": 1, + "BCM2835_GPIO_FSEL_*": 1, + "specified": 27, + "HIGH.": 2, + "bcm2835_gpio_write": 3, + "bcm2835_gpio_set": 1, + "LOW.": 5, + "bcm2835_gpio_clr": 1, + "first": 13, + "Mask": 6, + "affect.": 4, + "eg": 5, + "returns": 4, + "either": 4, + "Works": 1, + "whether": 4, + "output.": 1, + "bcm2835_gpio_lev": 1, + "Status.": 7, + "Tests": 1, + "detected": 7, + "requested": 1, + "flag": 1, + "bcm2835_gpio_set_eds": 2, + "status": 1, + "th": 1, + "true.": 2, + "bcm2835_gpio_eds": 1, + "effect": 3, + "clearing": 1, + "flag.": 1, + "afer": 1, + "seeing": 1, + "rising": 3, + "sets": 8, + "GPRENn": 2, + "synchronous": 2, + "detection.": 2, + "signal": 4, + "sampled": 6, + "looking": 2, + "pattern": 2, + "signal.": 2, + "suppressing": 2, + "glitches.": 2, + "Disable": 6, + "Asynchronous": 6, + "incoming": 2, + "As": 2, + "edges": 2, + "very": 2, + "short": 5, + "duration": 2, + "detected.": 2, + "bcm2835_gpio_pudclk": 3, + "resistor": 1, + "However": 3, + "convenient": 2, + "bcm2835_gpio_set_pud": 4, + "pud": 4, + "desired": 7, + "mode.": 4, + "One": 3, + "BCM2835_GPIO_PUD_*": 2, + "Clocks": 3, + "earlier": 1, + "remove": 2, + "group.": 2, + "BCM2835_PAD_GROUP_GPIO_*": 2, + "BCM2835_PAD_*": 2, + "bcm2835_gpio_set_pad": 1, + "Delays": 3, + "milliseconds.": 1, + "Uses": 4, + "CPU": 5, + "until": 1, + "up.": 1, + "mercy": 2, + "From": 2, + "interval": 4, + "req": 2, + "exact": 2, + "multiple": 2, + "granularity": 2, + "rounded": 2, + "next": 9, + "multiple.": 2, + "Furthermore": 2, + "sleep": 2, + "completes": 2, + "still": 3, + "becomes": 2, + "free": 4, + "once": 5, + "again": 2, + "execute": 3, + "thread.": 2, + "millis": 2, + "milliseconds": 1, + "unsigned": 22, + "microseconds.": 2, + "combination": 2, + "busy": 2, + "wait": 2, + "timers": 1, + "less": 1, + "microseconds": 6, + "Timer.": 1, + "RaspberryPi": 1, + "Your": 1, + "mileage": 1, + "vary.": 1, + "micros": 5, + "uint64_t": 8, + "required": 2, + "bcm2835_gpio_write_mask": 1, + "clocking": 1, + "spi": 1, + "let": 2, + "device.": 2, + "operations.": 4, + "Forces": 2, + "ALT0": 2, + "funcitons": 1, + "complete": 2, + "End": 2, + "returned": 5, + "INPUT": 2, + "behaviour.": 2, + "NOTE": 1, + "effect.": 1, + "SPI0.": 1, + "Defaults": 1, + "BCM2835_SPI_BIT_ORDER_*": 1, + "speed.": 2, + "BCM2835_SPI_CLOCK_DIVIDER_*": 1, + "bcm2835_spi_setClockDivider": 1, + "uint16_t": 2, + "polariy": 1, + "phase": 1, + "BCM2835_SPI_MODE*": 1, + "bcm2835_spi_transfer": 5, + "made": 1, + "selected": 13, + "during": 4, + "transfer.": 4, + "cs": 4, + "activate": 1, + "slave.": 7, + "BCM2835_SPI_CS*": 1, + "bcm2835_spi_chipSelect": 4, + "occurs": 1, + "currently": 12, + "active.": 1, + "transfers": 1, + "happening": 1, + "complement": 1, + "inactive": 1, + "affect": 1, + "active": 3, + "Whether": 1, + "bcm2835_spi_setChipSelectPolarity": 1, + "Transfers": 6, + "byte": 6, + "Asserts": 3, + "simultaneously": 3, + "clocks": 2, + "MISO.": 2, + "Returns": 2, + "polled": 2, + "Peripherls": 2, + "len": 15, + "slave": 8, + "placed": 1, + "rbuf.": 1, + "rbuf": 3, + "long": 11, + "tbuf": 4, + "Buffer": 10, + "send.": 5, + "put": 1, + "buffer": 9, + "Number": 8, + "send/received": 2, + "char*": 24, + "bcm2835_spi_transfernb.": 1, + "replaces": 1, + "transmitted": 1, + "buffer.": 1, + "buf": 14, + "replace": 1, + "contents": 3, + "eh": 2, + "bcm2835_spi_writenb": 1, + "i2c": 1, + "Philips": 1, + "bus/interface": 1, + "January": 1, + "SCL": 2, + "bcm2835_i2c_end": 3, + "bcm2835_i2c_begin": 1, + "address.": 2, + "addr": 2, + "bcm2835_i2c_setSlaveAddress": 4, + "BCM2835_I2C_CLOCK_DIVIDER_*": 1, + "bcm2835_i2c_setClockDivider": 2, + "converting": 1, + "baudrate": 4, + "parameter": 1, + "equivalent": 1, + "divider.": 1, + "standard": 2, + "khz": 1, + "corresponds": 1, + "its": 1, + "driver.": 1, + "Of": 1, + "course": 2, + "nothing": 1, + "driver": 1, + "const": 170, + "*": 161, + "receive.": 2, + "received.": 2, + "Allows": 2, + "slaves": 1, + "require": 3, + "repeated": 1, + "start": 12, + "prior": 1, + "stop": 1, + "set.": 1, + "popular": 1, + "MPL3115A2": 1, + "pressure": 1, + "temperature": 1, + "sensor.": 1, + "Note": 1, + "combined": 1, + "better": 1, + "choice.": 1, + "Will": 1, + "regaddr": 2, + "containing": 2, + "bcm2835_i2c_read_register_rs": 1, + "st": 1, + "delays": 1, + "Counter.": 1, + "bcm2835_st_read": 1, + "offset.": 1, + "offset_micros": 2, + "Offset": 1, + "bcm2835_st_delay": 1, + "@example": 5, + "blink.c": 1, + "Blinks": 1, + "off": 1, + "input.c": 1, + "event.c": 1, + "Shows": 3, + "how": 3, + "spi.c": 1, + "spin.c": 1, + "#pragma": 3, "": 4, "": 4, "": 2, - "using": 4, "namespace": 31, "std": 52, "DEFAULT_DELIMITER": 1, @@ -9736,8 +11276,10 @@ "wrapMode": 2, "wmode.": 1, "wmode": 1, - "": 1, + "": 2, "Gui": 1, + "rpc_init": 1, + "rpc_server_loop": 1, "v8": 9, "Scanner": 16, "UnicodeCache*": 4, @@ -10033,7 +11575,6 @@ "desc": 2, "look": 1, "ahead": 1, - "": 1, "smallPrime_t": 1, "UTILS_H": 3, "": 1, @@ -44802,7 +46343,7 @@ "Bluespec": 1298, "Brightscript": 579, "C": 58858, - "C++": 22671, + "C++": 31181, "Ceylon": 50, "Clojure": 510, "COBOL": 90, @@ -44938,7 +46479,7 @@ "Bluespec": 2, "Brightscript": 1, "C": 26, - "C++": 24, + "C++": 27, "Ceylon": 1, "Clojure": 7, "COBOL": 4, @@ -45060,5 +46601,5 @@ "Xtend": 2, "YAML": 1 }, - "md5": "1b96eb81ded03f57c14ee681d73d5db6" + "md5": "4bd97c3aa060155c82b903fea0fecc57" } \ No newline at end of file diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 80bf687a..6a5a748c 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -30,7 +30,7 @@ class TestHeuristcs < Test::Unit::TestCase def test_cpp_by_heuristics languages = ["C++", "Objective-C"] - results = Heuristics.find_by_heuristics(fixture("C++/render_adapter.cpp"), languages) + results = Heuristics.disambiguate_h(fixture("C++/render_adapter.cpp"), languages) assert_equal Language["C++"], results.first end