{"action":"created","comment":{"url":"https://api.github.com/repos/cfengine/core/pulls/comments/59417693","id":59417693,"diff_hunk":"@@ -548,6 +548,29 @@ static bool SelectProcRegexMatch(const char *name1, const char *name2,\n     return false;\n }\n \n+static void PrintStringIndexLine(int prefix_spaces, int len)\n+{\n+    char arrow_str[CF_BUFSIZE];\n+    arrow_str[0] = '^';\n+    arrow_str[1] = '\\0';\n+    char index_str[CF_BUFSIZE];\n+    index_str[0] = '0';\n+    index_str[1] = '\\0';\n+    for (int lineindex = 10; lineindex <= len; lineindex += 10)\n+    {\n+        char num[11];\n+        xsnprintf(num, sizeof(num), \"% 10d\", lineindex);\n+        strlcat(index_str, num, sizeof(index_str));\n+        strlcat(arrow_str, \"         ^\", sizeof(arrow_str));\n+    }\n+\n+    // Prefix the beginning of the indexes with the given number.\n+    char fmt[100];\n+    xsnprintf(fmt, sizeof(fmt), \"%% %ds%%s\", prefix_spaces);","path":"libpromises/processes_select.c","position":267,"original_position":22,"commit_id":"e876867be612ffee9b9859253ed50c147fa8222c","original_commit_id":"1dabf61255550fcc139ea26d5af140174dc9fe4a","user":{"login":"jimis","id":3584514,"avatar_url":"https://avatars.githubusercontent.com/u/3584514?v=3","gravatar_id":"","url":"https://api.github.com/users/jimis","html_url":"https://github.com/jimis","followers_url":"https://api.github.com/users/jimis/followers","following_url":"https://api.github.com/users/jimis/following{/other_user}","gists_url":"https://api.github.com/users/jimis/gists{/gist_id}","starred_url":"https://api.github.com/users/jimis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimis/subscriptions","organizations_url":"https://api.github.com/users/jimis/orgs","repos_url":"https://api.github.com/users/jimis/repos","events_url":"https://api.github.com/users/jimis/events{/privacy}","received_events_url":"https://api.github.com/users/jimis/received_events","type":"User","site_admin":false},"body":"Again, is the space after \"%%\" bogus?","created_at":"2016-04-12T17:30:25Z","updated_at":"2016-04-12T17:30:25Z","html_url":"https://github.com/cfengine/core/pull/2568#discussion_r59417693","pull_request_url":"https://api.github.com/repos/cfengine/core/pulls/2568","_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments/59417693"},"html":{"href":"https://github.com/cfengine/core/pull/2568#discussion_r59417693"},"pull_request":{"href":"https://api.github.com/repos/cfengine/core/pulls/2568"}}},"pull_request":{"url":"https://api.github.com/repos/cfengine/core/pulls/2568","id":65954005,"html_url":"https://github.com/cfengine/core/pull/2568","diff_url":"https://github.com/cfengine/core/pull/2568.diff","patch_url":"https://github.com/cfengine/core/pull/2568.patch","issue_url":"https://api.github.com/repos/cfengine/core/issues/2568","number":2568,"state":"open","locked":false,"title":"CFE-2161: Lots of ps parsing fixes.","user":{"login":"kacf","id":4037094,"avatar_url":"https://avatars.githubusercontent.com/u/4037094?v=3","gravatar_id":"","url":"https://api.github.com/users/kacf","html_url":"https://github.com/kacf","followers_url":"https://api.github.com/users/kacf/followers","following_url":"https://api.github.com/users/kacf/following{/other_user}","gists_url":"https://api.github.com/users/kacf/gists{/gist_id}","starred_url":"https://api.github.com/users/kacf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kacf/subscriptions","organizations_url":"https://api.github.com/users/kacf/orgs","repos_url":"https://api.github.com/users/kacf/repos","events_url":"https://api.github.com/users/kacf/events{/privacy}","received_events_url":"https://api.github.com/users/kacf/received_events","type":"User","site_admin":false},"body":"I recommend viewing commit by commit, and preferably locally with the `--histogram` option, it becomes much more readable then.","created_at":"2016-04-11T08:06:32Z","updated_at":"2016-04-12T17:30:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec842d3974cd8c99ccf0252ee4fd72b584ea04e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cfengine/core/pulls/2568/commits","review_comments_url":"https://api.github.com/repos/cfengine/core/pulls/2568/comments","review_comment_url":"https://api.github.com/repos/cfengine/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfengine/core/issues/2568/comments","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/e876867be612ffee9b9859253ed50c147fa8222c","head":{"label":"kacf:solaris_ps_fix","ref":"solaris_ps_fix","sha":"e876867be612ffee9b9859253ed50c147fa8222c","user":{"login":"kacf","id":4037094,"avatar_url":"https://avatars.githubusercontent.com/u/4037094?v=3","gravatar_id":"","url":"https://api.github.com/users/kacf","html_url":"https://github.com/kacf","followers_url":"https://api.github.com/users/kacf/followers","following_url":"https://api.github.com/users/kacf/following{/other_user}","gists_url":"https://api.github.com/users/kacf/gists{/gist_id}","starred_url":"https://api.github.com/users/kacf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kacf/subscriptions","organizations_url":"https://api.github.com/users/kacf/orgs","repos_url":"https://api.github.com/users/kacf/repos","events_url":"https://api.github.com/users/kacf/events{/privacy}","received_events_url":"https://api.github.com/users/kacf/received_events","type":"User","site_admin":false},"repo":{"id":9193738,"name":"core","full_name":"kacf/core","owner":{"login":"kacf","id":4037094,"avatar_url":"https://avatars.githubusercontent.com/u/4037094?v=3","gravatar_id":"","url":"https://api.github.com/users/kacf","html_url":"https://github.com/kacf","followers_url":"https://api.github.com/users/kacf/followers","following_url":"https://api.github.com/users/kacf/following{/other_user}","gists_url":"https://api.github.com/users/kacf/gists{/gist_id}","starred_url":"https://api.github.com/users/kacf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kacf/subscriptions","organizations_url":"https://api.github.com/users/kacf/orgs","repos_url":"https://api.github.com/users/kacf/repos","events_url":"https://api.github.com/users/kacf/events{/privacy}","received_events_url":"https://api.github.com/users/kacf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kacf/core","description":"CFEngine Community","fork":true,"url":"https://api.github.com/repos/kacf/core","forks_url":"https://api.github.com/repos/kacf/core/forks","keys_url":"https://api.github.com/repos/kacf/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kacf/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kacf/core/teams","hooks_url":"https://api.github.com/repos/kacf/core/hooks","issue_events_url":"https://api.github.com/repos/kacf/core/issues/events{/number}","events_url":"https://api.github.com/repos/kacf/core/events","assignees_url":"https://api.github.com/repos/kacf/core/assignees{/user}","branches_url":"https://api.github.com/repos/kacf/core/branches{/branch}","tags_url":"https://api.github.com/repos/kacf/core/tags","blobs_url":"https://api.github.com/repos/kacf/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kacf/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kacf/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/kacf/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kacf/core/statuses/{sha}","languages_url":"https://api.github.com/repos/kacf/core/languages","stargazers_url":"https://api.github.com/repos/kacf/core/stargazers","contributors_url":"https://api.github.com/repos/kacf/core/contributors","subscribers_url":"https://api.github.com/repos/kacf/core/subscribers","subscription_url":"https://api.github.com/repos/kacf/core/subscription","commits_url":"https://api.github.com/repos/kacf/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/kacf/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/kacf/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/kacf/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/kacf/core/contents/{+path}","compare_url":"https://api.github.com/repos/kacf/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kacf/core/merges","archive_url":"https://api.github.com/repos/kacf/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kacf/core/downloads","issues_url":"https://api.github.com/repos/kacf/core/issues{/number}","pulls_url":"https://api.github.com/repos/kacf/core/pulls{/number}","milestones_url":"https://api.github.com/repos/kacf/core/milestones{/number}","notifications_url":"https://api.github.com/repos/kacf/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kacf/core/labels{/name}","releases_url":"https://api.github.com/repos/kacf/core/releases{/id}","deployments_url":"https://api.github.com/repos/kacf/core/deployments","created_at":"2013-04-03T12:08:15Z","updated_at":"2015-04-23T06:38:36Z","pushed_at":"2016-04-12T13:20:51Z","git_url":"git://github.com/kacf/core.git","ssh_url":"git@github.com:kacf/core.git","clone_url":"https://github.com/kacf/core.git","svn_url":"https://github.com/kacf/core","homepage":"https://cfengine.com/community/","size":55131,"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":"cfengine:master","ref":"master","sha":"d260fa17d08a779a98f7dbc053ffb417ece9a4d1","user":{"login":"cfengine","id":1239823,"avatar_url":"https://avatars.githubusercontent.com/u/1239823?v=3","gravatar_id":"","url":"https://api.github.com/users/cfengine","html_url":"https://github.com/cfengine","followers_url":"https://api.github.com/users/cfengine/followers","following_url":"https://api.github.com/users/cfengine/following{/other_user}","gists_url":"https://api.github.com/users/cfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/cfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfengine/subscriptions","organizations_url":"https://api.github.com/users/cfengine/orgs","repos_url":"https://api.github.com/users/cfengine/repos","events_url":"https://api.github.com/users/cfengine/events{/privacy}","received_events_url":"https://api.github.com/users/cfengine/received_events","type":"Organization","site_admin":false},"repo":{"id":3543548,"name":"core","full_name":"cfengine/core","owner":{"login":"cfengine","id":1239823,"avatar_url":"https://avatars.githubusercontent.com/u/1239823?v=3","gravatar_id":"","url":"https://api.github.com/users/cfengine","html_url":"https://github.com/cfengine","followers_url":"https://api.github.com/users/cfengine/followers","following_url":"https://api.github.com/users/cfengine/following{/other_user}","gists_url":"https://api.github.com/users/cfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/cfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfengine/subscriptions","organizations_url":"https://api.github.com/users/cfengine/orgs","repos_url":"https://api.github.com/users/cfengine/repos","events_url":"https://api.github.com/users/cfengine/events{/privacy}","received_events_url":"https://api.github.com/users/cfengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfengine/core","description":"CFEngine Community","fork":false,"url":"https://api.github.com/repos/cfengine/core","forks_url":"https://api.github.com/repos/cfengine/core/forks","keys_url":"https://api.github.com/repos/cfengine/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfengine/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfengine/core/teams","hooks_url":"https://api.github.com/repos/cfengine/core/hooks","issue_events_url":"https://api.github.com/repos/cfengine/core/issues/events{/number}","events_url":"https://api.github.com/repos/cfengine/core/events","assignees_url":"https://api.github.com/repos/cfengine/core/assignees{/user}","branches_url":"https://api.github.com/repos/cfengine/core/branches{/branch}","tags_url":"https://api.github.com/repos/cfengine/core/tags","blobs_url":"https://api.github.com/repos/cfengine/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfengine/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfengine/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfengine/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/{sha}","languages_url":"https://api.github.com/repos/cfengine/core/languages","stargazers_url":"https://api.github.com/repos/cfengine/core/stargazers","contributors_url":"https://api.github.com/repos/cfengine/core/contributors","subscribers_url":"https://api.github.com/repos/cfengine/core/subscribers","subscription_url":"https://api.github.com/repos/cfengine/core/subscription","commits_url":"https://api.github.com/repos/cfengine/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfengine/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfengine/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfengine/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfengine/core/contents/{+path}","compare_url":"https://api.github.com/repos/cfengine/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfengine/core/merges","archive_url":"https://api.github.com/repos/cfengine/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfengine/core/downloads","issues_url":"https://api.github.com/repos/cfengine/core/issues{/number}","pulls_url":"https://api.github.com/repos/cfengine/core/pulls{/number}","milestones_url":"https://api.github.com/repos/cfengine/core/milestones{/number}","notifications_url":"https://api.github.com/repos/cfengine/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfengine/core/labels{/name}","releases_url":"https://api.github.com/repos/cfengine/core/releases{/id}","deployments_url":"https://api.github.com/repos/cfengine/core/deployments","created_at":"2012-02-25T09:19:05Z","updated_at":"2016-04-12T07:02:12Z","pushed_at":"2016-04-12T17:18:29Z","git_url":"git://github.com/cfengine/core.git","ssh_url":"git@github.com:cfengine/core.git","clone_url":"https://github.com/cfengine/core.git","svn_url":"https://github.com/cfengine/core","homepage":"https://cfengine.com/community/","size":70622,"stargazers_count":238,"watchers_count":238,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":144,"mirror_url":null,"open_issues_count":22,"forks":144,"open_issues":22,"watchers":238,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/2568"},"html":{"href":"https://github.com/cfengine/core/pull/2568"},"issue":{"href":"https://api.github.com/repos/cfengine/core/issues/2568"},"comments":{"href":"https://api.github.com/repos/cfengine/core/issues/2568/comments"},"review_comments":{"href":"https://api.github.com/repos/cfengine/core/pulls/2568/comments"},"review_comment":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfengine/core/pulls/2568/commits"},"statuses":{"href":"https://api.github.com/repos/cfengine/core/statuses/e876867be612ffee9b9859253ed50c147fa8222c"}}}}