{"action":"opened","number":60,"pull_request":{"url":"https://api.github.com/repos/landley/toybox/pulls/60","id":99317924,"html_url":"https://github.com/landley/toybox/pull/60","diff_url":"https://github.com/landley/toybox/pull/60.diff","patch_url":"https://github.com/landley/toybox/pull/60.patch","issue_url":"https://api.github.com/repos/landley/toybox/issues/60","number":60,"state":"open","locked":false,"title":"Fix a bug for sort.","user":{"login":"eeewxj","id":1096016,"avatar_url":"https://avatars.githubusercontent.com/u/1096016?v=3","gravatar_id":"","url":"https://api.github.com/users/eeewxj","html_url":"https://github.com/eeewxj","followers_url":"https://api.github.com/users/eeewxj/followers","following_url":"https://api.github.com/users/eeewxj/following{/other_user}","gists_url":"https://api.github.com/users/eeewxj/gists{/gist_id}","starred_url":"https://api.github.com/users/eeewxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeewxj/subscriptions","organizations_url":"https://api.github.com/users/eeewxj/orgs","repos_url":"https://api.github.com/users/eeewxj/repos","events_url":"https://api.github.com/users/eeewxj/events{/privacy}","received_events_url":"https://api.github.com/users/eeewxj/received_events","type":"User","site_admin":false},"body":"When the key_separator is not space, the sort commandline tool fails to sort by the 3rd,4th,etc column.\r\nFor example:\r\n\twhen you exec\r\n\r\n\t  $ sort -t',' -k 3n\r\n\r\n\ton a file which cotains:\r\n\r\n\t1,2,3,4\r\n\t2,3,4,1\r\n\t4,1,2,3\r\n\t3,4,1,2\r\n\r\n\tyou got:\r\n\r\n\t4,1,2,3\r\n\t1,2,3,4\r\n\t2,3,4,1\r\n\t3,4,1,2\r\n\r\n\tbut the expected output should be:\r\n\r\n\t3,4,1,2\r\n\t4,1,2,3\r\n\t1,2,3,4\r\n\t2,3,4,1\r\n\r\nThe bug is due to the dependency of \"isspace(str[end])\" at line 113.\r\nWhen searching for the non-space key_separator, the search stopped just at the position of first key_separator it met.\r\nThe bug can be easily fixed by adding \"end++\" when the search have found one separator and exit the for loop.","created_at":"2016-12-25T08:25:53Z","updated_at":"2016-12-25T08:25:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/landley/toybox/pulls/60/commits","review_comments_url":"https://api.github.com/repos/landley/toybox/pulls/60/comments","review_comment_url":"https://api.github.com/repos/landley/toybox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/landley/toybox/issues/60/comments","statuses_url":"https://api.github.com/repos/landley/toybox/statuses/9536be2e2da6a5f3aba8a38a9f6fca68004114b3","head":{"label":"eeewxj:bugfix/modify_sort","ref":"bugfix/modify_sort","sha":"9536be2e2da6a5f3aba8a38a9f6fca68004114b3","user":{"login":"eeewxj","id":1096016,"avatar_url":"https://avatars.githubusercontent.com/u/1096016?v=3","gravatar_id":"","url":"https://api.github.com/users/eeewxj","html_url":"https://github.com/eeewxj","followers_url":"https://api.github.com/users/eeewxj/followers","following_url":"https://api.github.com/users/eeewxj/following{/other_user}","gists_url":"https://api.github.com/users/eeewxj/gists{/gist_id}","starred_url":"https://api.github.com/users/eeewxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeewxj/subscriptions","organizations_url":"https://api.github.com/users/eeewxj/orgs","repos_url":"https://api.github.com/users/eeewxj/repos","events_url":"https://api.github.com/users/eeewxj/events{/privacy}","received_events_url":"https://api.github.com/users/eeewxj/received_events","type":"User","site_admin":false},"repo":{"id":76912874,"name":"toybox","full_name":"eeewxj/toybox","owner":{"login":"eeewxj","id":1096016,"avatar_url":"https://avatars.githubusercontent.com/u/1096016?v=3","gravatar_id":"","url":"https://api.github.com/users/eeewxj","html_url":"https://github.com/eeewxj","followers_url":"https://api.github.com/users/eeewxj/followers","following_url":"https://api.github.com/users/eeewxj/following{/other_user}","gists_url":"https://api.github.com/users/eeewxj/gists{/gist_id}","starred_url":"https://api.github.com/users/eeewxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeewxj/subscriptions","organizations_url":"https://api.github.com/users/eeewxj/orgs","repos_url":"https://api.github.com/users/eeewxj/repos","events_url":"https://api.github.com/users/eeewxj/events{/privacy}","received_events_url":"https://api.github.com/users/eeewxj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eeewxj/toybox","description":"toybox","fork":true,"url":"https://api.github.com/repos/eeewxj/toybox","forks_url":"https://api.github.com/repos/eeewxj/toybox/forks","keys_url":"https://api.github.com/repos/eeewxj/toybox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eeewxj/toybox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eeewxj/toybox/teams","hooks_url":"https://api.github.com/repos/eeewxj/toybox/hooks","issue_events_url":"https://api.github.com/repos/eeewxj/toybox/issues/events{/number}","events_url":"https://api.github.com/repos/eeewxj/toybox/events","assignees_url":"https://api.github.com/repos/eeewxj/toybox/assignees{/user}","branches_url":"https://api.github.com/repos/eeewxj/toybox/branches{/branch}","tags_url":"https://api.github.com/repos/eeewxj/toybox/tags","blobs_url":"https://api.github.com/repos/eeewxj/toybox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eeewxj/toybox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eeewxj/toybox/git/refs{/sha}","trees_url":"https://api.github.com/repos/eeewxj/toybox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eeewxj/toybox/statuses/{sha}","languages_url":"https://api.github.com/repos/eeewxj/toybox/languages","stargazers_url":"https://api.github.com/repos/eeewxj/toybox/stargazers","contributors_url":"https://api.github.com/repos/eeewxj/toybox/contributors","subscribers_url":"https://api.github.com/repos/eeewxj/toybox/subscribers","subscription_url":"https://api.github.com/repos/eeewxj/toybox/subscription","commits_url":"https://api.github.com/repos/eeewxj/toybox/commits{/sha}","git_commits_url":"https://api.github.com/repos/eeewxj/toybox/git/commits{/sha}","comments_url":"https://api.github.com/repos/eeewxj/toybox/comments{/number}","issue_comment_url":"https://api.github.com/repos/eeewxj/toybox/issues/comments{/number}","contents_url":"https://api.github.com/repos/eeewxj/toybox/contents/{+path}","compare_url":"https://api.github.com/repos/eeewxj/toybox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eeewxj/toybox/merges","archive_url":"https://api.github.com/repos/eeewxj/toybox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eeewxj/toybox/downloads","issues_url":"https://api.github.com/repos/eeewxj/toybox/issues{/number}","pulls_url":"https://api.github.com/repos/eeewxj/toybox/pulls{/number}","milestones_url":"https://api.github.com/repos/eeewxj/toybox/milestones{/number}","notifications_url":"https://api.github.com/repos/eeewxj/toybox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eeewxj/toybox/labels{/name}","releases_url":"https://api.github.com/repos/eeewxj/toybox/releases{/id}","deployments_url":"https://api.github.com/repos/eeewxj/toybox/deployments","created_at":"2016-12-20T01:50:46Z","updated_at":"2016-12-20T01:50:49Z","pushed_at":"2016-12-25T08:22:52Z","git_url":"git://github.com/eeewxj/toybox.git","ssh_url":"git@github.com:eeewxj/toybox.git","clone_url":"https://github.com/eeewxj/toybox.git","svn_url":"https://github.com/eeewxj/toybox","homepage":"http://landley.net/toybox","size":4919,"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":"landley:master","ref":"master","sha":"86aca0458598bf68f3264b70b0eddb19ece7edd3","user":{"login":"landley","id":1414921,"avatar_url":"https://avatars.githubusercontent.com/u/1414921?v=3","gravatar_id":"","url":"https://api.github.com/users/landley","html_url":"https://github.com/landley","followers_url":"https://api.github.com/users/landley/followers","following_url":"https://api.github.com/users/landley/following{/other_user}","gists_url":"https://api.github.com/users/landley/gists{/gist_id}","starred_url":"https://api.github.com/users/landley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landley/subscriptions","organizations_url":"https://api.github.com/users/landley/orgs","repos_url":"https://api.github.com/users/landley/repos","events_url":"https://api.github.com/users/landley/events{/privacy}","received_events_url":"https://api.github.com/users/landley/received_events","type":"User","site_admin":false},"repo":{"id":3374554,"name":"toybox","full_name":"landley/toybox","owner":{"login":"landley","id":1414921,"avatar_url":"https://avatars.githubusercontent.com/u/1414921?v=3","gravatar_id":"","url":"https://api.github.com/users/landley","html_url":"https://github.com/landley","followers_url":"https://api.github.com/users/landley/followers","following_url":"https://api.github.com/users/landley/following{/other_user}","gists_url":"https://api.github.com/users/landley/gists{/gist_id}","starred_url":"https://api.github.com/users/landley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landley/subscriptions","organizations_url":"https://api.github.com/users/landley/orgs","repos_url":"https://api.github.com/users/landley/repos","events_url":"https://api.github.com/users/landley/events{/privacy}","received_events_url":"https://api.github.com/users/landley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/landley/toybox","description":"toybox","fork":false,"url":"https://api.github.com/repos/landley/toybox","forks_url":"https://api.github.com/repos/landley/toybox/forks","keys_url":"https://api.github.com/repos/landley/toybox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/landley/toybox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/landley/toybox/teams","hooks_url":"https://api.github.com/repos/landley/toybox/hooks","issue_events_url":"https://api.github.com/repos/landley/toybox/issues/events{/number}","events_url":"https://api.github.com/repos/landley/toybox/events","assignees_url":"https://api.github.com/repos/landley/toybox/assignees{/user}","branches_url":"https://api.github.com/repos/landley/toybox/branches{/branch}","tags_url":"https://api.github.com/repos/landley/toybox/tags","blobs_url":"https://api.github.com/repos/landley/toybox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/landley/toybox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/landley/toybox/git/refs{/sha}","trees_url":"https://api.github.com/repos/landley/toybox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/landley/toybox/statuses/{sha}","languages_url":"https://api.github.com/repos/landley/toybox/languages","stargazers_url":"https://api.github.com/repos/landley/toybox/stargazers","contributors_url":"https://api.github.com/repos/landley/toybox/contributors","subscribers_url":"https://api.github.com/repos/landley/toybox/subscribers","subscription_url":"https://api.github.com/repos/landley/toybox/subscription","commits_url":"https://api.github.com/repos/landley/toybox/commits{/sha}","git_commits_url":"https://api.github.com/repos/landley/toybox/git/commits{/sha}","comments_url":"https://api.github.com/repos/landley/toybox/comments{/number}","issue_comment_url":"https://api.github.com/repos/landley/toybox/issues/comments{/number}","contents_url":"https://api.github.com/repos/landley/toybox/contents/{+path}","compare_url":"https://api.github.com/repos/landley/toybox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/landley/toybox/merges","archive_url":"https://api.github.com/repos/landley/toybox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/landley/toybox/downloads","issues_url":"https://api.github.com/repos/landley/toybox/issues{/number}","pulls_url":"https://api.github.com/repos/landley/toybox/pulls{/number}","milestones_url":"https://api.github.com/repos/landley/toybox/milestones{/number}","notifications_url":"https://api.github.com/repos/landley/toybox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/landley/toybox/labels{/name}","releases_url":"https://api.github.com/repos/landley/toybox/releases{/id}","deployments_url":"https://api.github.com/repos/landley/toybox/deployments","created_at":"2012-02-07T05:15:15Z","updated_at":"2016-12-21T17:02:23Z","pushed_at":"2016-12-20T22:41:35Z","git_url":"git://github.com/landley/toybox.git","ssh_url":"git@github.com:landley/toybox.git","clone_url":"https://github.com/landley/toybox.git","svn_url":"https://github.com/landley/toybox","homepage":"http://landley.net/toybox","size":4877,"stargazers_count":215,"watchers_count":215,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":24,"forks":52,"open_issues":24,"watchers":215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/landley/toybox/pulls/60"},"html":{"href":"https://github.com/landley/toybox/pull/60"},"issue":{"href":"https://api.github.com/repos/landley/toybox/issues/60"},"comments":{"href":"https://api.github.com/repos/landley/toybox/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/landley/toybox/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/landley/toybox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/landley/toybox/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/landley/toybox/statuses/9536be2e2da6a5f3aba8a38a9f6fca68004114b3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":4,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"eeewxj"}}