{"action":"created","comment":{"url":"https://api.github.com/repos/radare/radare2/pulls/comments/24058305","id":24058305,"diff_hunk":"@@ -53,6 +53,46 @@ R_API RSearchKeyword* r_search_keyword_new_str(const char *kwbuf, const char *bm\n \treturn kw;\n }\n \n+R_API RSearchKeyword* r_search_keyword_new_wide(const char *kwbuf, const char *bmstr, const char *data, int ignore_case)\n+{\n+\tRSearchKeyword *kw;\n+\tint len;\n+\tconst char *p2;\n+\tchar *p, *str;\n+\tut8 *bmbuf = NULL;\n+\tint bmlen = 0;\n+\n+\tif (bmstr) {\n+\t\tbmbuf = malloc (strlen (bmstr)+1);\n+\t\tif (!bmbuf) return NULL;\n+\t\tbmlen = r_hex_str2bin (bmstr, bmbuf);\n+\t\tif (bmlen < 1) {\n+\t\t\tfree(bmbuf);\n+\t\t\tbmbuf = NULL;\n+\t\t}\n+\t}\n+\n+\tlen = strlen(kwbuf);\n+\tstr = malloc((len+1)*2);\n+\tfor (p2=kwbuf, p=str; *p2; p+=2, p2++)\n+\t{\n+\t\tif (ignore_case)\n+\t\t\tp[0] = tolower((const unsigned char)*p2);\n+\t\telse\n+\t\t\tp[0] = *p2;\n+\t\tp[1] = 0;\n+\t}\n+\n+\tkw = r_search_keyword_new ((ut8 *)str, len*2, bmbuf,","path":"libr/search/keyword.c","position":34,"original_position":34,"commit_id":"a9703726ae1a930bba229604fe91aebc16879eb2","original_commit_id":"a9703726ae1a930bba229604fe91aebc16879eb2","user":{"login":"crowell","id":616288,"avatar_url":"https://avatars.githubusercontent.com/u/616288?v=3","gravatar_id":"","url":"https://api.github.com/users/crowell","html_url":"https://github.com/crowell","followers_url":"https://api.github.com/users/crowell/followers","following_url":"https://api.github.com/users/crowell/following{/other_user}","gists_url":"https://api.github.com/users/crowell/gists{/gist_id}","starred_url":"https://api.github.com/users/crowell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowell/subscriptions","organizations_url":"https://api.github.com/users/crowell/orgs","repos_url":"https://api.github.com/users/crowell/repos","events_url":"https://api.github.com/users/crowell/events{/privacy}","received_events_url":"https://api.github.com/users/crowell/received_events","type":"User","site_admin":false},"body":"can this all fit on one line?","created_at":"2015-02-04T02:11:58Z","updated_at":"2015-02-04T02:11:58Z","html_url":"https://github.com/radare/radare2/pull/2035#discussion_r24058305","pull_request_url":"https://api.github.com/repos/radare/radare2/pulls/2035","_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments/24058305"},"html":{"href":"https://github.com/radare/radare2/pull/2035#discussion_r24058305"},"pull_request":{"href":"https://api.github.com/repos/radare/radare2/pulls/2035"}}},"pull_request":{"url":"https://api.github.com/repos/radare/radare2/pulls/2035","id":28607848,"html_url":"https://github.com/radare/radare2/pull/2035","diff_url":"https://github.com/radare/radare2/pull/2035.diff","patch_url":"https://github.com/radare/radare2/pull/2035.patch","issue_url":"https://api.github.com/repos/radare/radare2/issues/2035","number":2035,"state":"open","locked":false,"title":"Add wide string search to rafind2","user":{"login":"NickStephens","id":1915867,"avatar_url":"https://avatars.githubusercontent.com/u/1915867?v=3","gravatar_id":"","url":"https://api.github.com/users/NickStephens","html_url":"https://github.com/NickStephens","followers_url":"https://api.github.com/users/NickStephens/followers","following_url":"https://api.github.com/users/NickStephens/following{/other_user}","gists_url":"https://api.github.com/users/NickStephens/gists{/gist_id}","starred_url":"https://api.github.com/users/NickStephens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickStephens/subscriptions","organizations_url":"https://api.github.com/users/NickStephens/orgs","repos_url":"https://api.github.com/users/NickStephens/repos","events_url":"https://api.github.com/users/NickStephens/events{/privacy}","received_events_url":"https://api.github.com/users/NickStephens/received_events","type":"User","site_admin":false},"body":"closes #1945","created_at":"2015-02-04T02:08:53Z","updated_at":"2015-02-04T02:11:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cb4bc0913f3179edc26b8fd0639c6d88b3efc20","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/radare/radare2/pulls/2035/commits","review_comments_url":"https://api.github.com/repos/radare/radare2/pulls/2035/comments","review_comment_url":"https://api.github.com/repos/radare/radare2/pulls/comments/{number}","comments_url":"https://api.github.com/repos/radare/radare2/issues/2035/comments","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/a9703726ae1a930bba229604fe91aebc16879eb2","head":{"label":"NickStephens:master","ref":"master","sha":"a9703726ae1a930bba229604fe91aebc16879eb2","user":{"login":"NickStephens","id":1915867,"avatar_url":"https://avatars.githubusercontent.com/u/1915867?v=3","gravatar_id":"","url":"https://api.github.com/users/NickStephens","html_url":"https://github.com/NickStephens","followers_url":"https://api.github.com/users/NickStephens/followers","following_url":"https://api.github.com/users/NickStephens/following{/other_user}","gists_url":"https://api.github.com/users/NickStephens/gists{/gist_id}","starred_url":"https://api.github.com/users/NickStephens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickStephens/subscriptions","organizations_url":"https://api.github.com/users/NickStephens/orgs","repos_url":"https://api.github.com/users/NickStephens/repos","events_url":"https://api.github.com/users/NickStephens/events{/privacy}","received_events_url":"https://api.github.com/users/NickStephens/received_events","type":"User","site_admin":false},"repo":{"id":30275462,"name":"radare2","full_name":"NickStephens/radare2","owner":{"login":"NickStephens","id":1915867,"avatar_url":"https://avatars.githubusercontent.com/u/1915867?v=3","gravatar_id":"","url":"https://api.github.com/users/NickStephens","html_url":"https://github.com/NickStephens","followers_url":"https://api.github.com/users/NickStephens/followers","following_url":"https://api.github.com/users/NickStephens/following{/other_user}","gists_url":"https://api.github.com/users/NickStephens/gists{/gist_id}","starred_url":"https://api.github.com/users/NickStephens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickStephens/subscriptions","organizations_url":"https://api.github.com/users/NickStephens/orgs","repos_url":"https://api.github.com/users/NickStephens/repos","events_url":"https://api.github.com/users/NickStephens/events{/privacy}","received_events_url":"https://api.github.com/users/NickStephens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NickStephens/radare2","description":"unix-like reverse engineering framework and commandline tools","fork":true,"url":"https://api.github.com/repos/NickStephens/radare2","forks_url":"https://api.github.com/repos/NickStephens/radare2/forks","keys_url":"https://api.github.com/repos/NickStephens/radare2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NickStephens/radare2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NickStephens/radare2/teams","hooks_url":"https://api.github.com/repos/NickStephens/radare2/hooks","issue_events_url":"https://api.github.com/repos/NickStephens/radare2/issues/events{/number}","events_url":"https://api.github.com/repos/NickStephens/radare2/events","assignees_url":"https://api.github.com/repos/NickStephens/radare2/assignees{/user}","branches_url":"https://api.github.com/repos/NickStephens/radare2/branches{/branch}","tags_url":"https://api.github.com/repos/NickStephens/radare2/tags","blobs_url":"https://api.github.com/repos/NickStephens/radare2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NickStephens/radare2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NickStephens/radare2/git/refs{/sha}","trees_url":"https://api.github.com/repos/NickStephens/radare2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NickStephens/radare2/statuses/{sha}","languages_url":"https://api.github.com/repos/NickStephens/radare2/languages","stargazers_url":"https://api.github.com/repos/NickStephens/radare2/stargazers","contributors_url":"https://api.github.com/repos/NickStephens/radare2/contributors","subscribers_url":"https://api.github.com/repos/NickStephens/radare2/subscribers","subscription_url":"https://api.github.com/repos/NickStephens/radare2/subscription","commits_url":"https://api.github.com/repos/NickStephens/radare2/commits{/sha}","git_commits_url":"https://api.github.com/repos/NickStephens/radare2/git/commits{/sha}","comments_url":"https://api.github.com/repos/NickStephens/radare2/comments{/number}","issue_comment_url":"https://api.github.com/repos/NickStephens/radare2/issues/comments/{number}","contents_url":"https://api.github.com/repos/NickStephens/radare2/contents/{+path}","compare_url":"https://api.github.com/repos/NickStephens/radare2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NickStephens/radare2/merges","archive_url":"https://api.github.com/repos/NickStephens/radare2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NickStephens/radare2/downloads","issues_url":"https://api.github.com/repos/NickStephens/radare2/issues{/number}","pulls_url":"https://api.github.com/repos/NickStephens/radare2/pulls{/number}","milestones_url":"https://api.github.com/repos/NickStephens/radare2/milestones{/number}","notifications_url":"https://api.github.com/repos/NickStephens/radare2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NickStephens/radare2/labels{/name}","releases_url":"https://api.github.com/repos/NickStephens/radare2/releases{/id}","created_at":"2015-02-04T01:49:28Z","updated_at":"2015-02-04T02:05:38Z","pushed_at":"2015-02-04T02:05:38Z","git_url":"git://github.com/NickStephens/radare2.git","ssh_url":"git@github.com:NickStephens/radare2.git","clone_url":"https://github.com/NickStephens/radare2.git","svn_url":"https://github.com/NickStephens/radare2","homepage":"http://www.radare.org/","size":64379,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"radare:master","ref":"master","sha":"1ea6a79d81b22df81382821f448d2c18b7109fca","user":{"login":"radare","id":917142,"avatar_url":"https://avatars.githubusercontent.com/u/917142?v=3","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"repo":{"id":4869294,"name":"radare2","full_name":"radare/radare2","owner":{"login":"radare","id":917142,"avatar_url":"https://avatars.githubusercontent.com/u/917142?v=3","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/radare/radare2","description":"unix-like reverse engineering framework and commandline tools","fork":false,"url":"https://api.github.com/repos/radare/radare2","forks_url":"https://api.github.com/repos/radare/radare2/forks","keys_url":"https://api.github.com/repos/radare/radare2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radare/radare2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radare/radare2/teams","hooks_url":"https://api.github.com/repos/radare/radare2/hooks","issue_events_url":"https://api.github.com/repos/radare/radare2/issues/events{/number}","events_url":"https://api.github.com/repos/radare/radare2/events","assignees_url":"https://api.github.com/repos/radare/radare2/assignees{/user}","branches_url":"https://api.github.com/repos/radare/radare2/branches{/branch}","tags_url":"https://api.github.com/repos/radare/radare2/tags","blobs_url":"https://api.github.com/repos/radare/radare2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radare/radare2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radare/radare2/git/refs{/sha}","trees_url":"https://api.github.com/repos/radare/radare2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/{sha}","languages_url":"https://api.github.com/repos/radare/radare2/languages","stargazers_url":"https://api.github.com/repos/radare/radare2/stargazers","contributors_url":"https://api.github.com/repos/radare/radare2/contributors","subscribers_url":"https://api.github.com/repos/radare/radare2/subscribers","subscription_url":"https://api.github.com/repos/radare/radare2/subscription","commits_url":"https://api.github.com/repos/radare/radare2/commits{/sha}","git_commits_url":"https://api.github.com/repos/radare/radare2/git/commits{/sha}","comments_url":"https://api.github.com/repos/radare/radare2/comments{/number}","issue_comment_url":"https://api.github.com/repos/radare/radare2/issues/comments/{number}","contents_url":"https://api.github.com/repos/radare/radare2/contents/{+path}","compare_url":"https://api.github.com/repos/radare/radare2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radare/radare2/merges","archive_url":"https://api.github.com/repos/radare/radare2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radare/radare2/downloads","issues_url":"https://api.github.com/repos/radare/radare2/issues{/number}","pulls_url":"https://api.github.com/repos/radare/radare2/pulls{/number}","milestones_url":"https://api.github.com/repos/radare/radare2/milestones{/number}","notifications_url":"https://api.github.com/repos/radare/radare2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radare/radare2/labels{/name}","releases_url":"https://api.github.com/repos/radare/radare2/releases{/id}","created_at":"2012-07-03T07:42:26Z","updated_at":"2015-02-04T01:47:10Z","pushed_at":"2015-02-04T01:47:09Z","git_url":"git://github.com/radare/radare2.git","ssh_url":"git@github.com:radare/radare2.git","clone_url":"https://github.com/radare/radare2.git","svn_url":"https://github.com/radare/radare2","homepage":"http://www.radare.org/","size":64379,"stargazers_count":922,"watchers_count":922,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":185,"mirror_url":null,"open_issues_count":321,"forks":185,"open_issues":321,"watchers":922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/2035"},"html":{"href":"https://github.com/radare/radare2/pull/2035"},"issue":{"href":"https://api.github.com/repos/radare/radare2/issues/2035"},"comments":{"href":"https://api.github.com/repos/radare/radare2/issues/2035/comments"},"review_comments":{"href":"https://api.github.com/repos/radare/radare2/pulls/2035/comments"},"review_comment":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/radare/radare2/pulls/2035/commits"},"statuses":{"href":"https://api.github.com/repos/radare/radare2/statuses/a9703726ae1a930bba229604fe91aebc16879eb2"}}}}