{"action":"created","comment":{"url":"https://api.github.com/repos/exercism/xc/pulls/comments/81583256","pull_request_review_id":2552699,"id":81583256,"diff_hunk":"@@ -0,0 +1,54 @@\n+#include <string.h>\n+#include <stdbool.h>\n+#include \"largest_series_product.h\"\n+\n+#define MAX(x, y) (x) > (y) ? (x) : (y)\n+\n+static int to_int(char c)\n+{\n+   return c - '0';\n+}\n+\n+static bool is_digit(char c)\n+{\n+   return (c >= '0') && (c <= '9');\n+}\n+\n+long largest_series_product(char *digits, size_t span)\n+{\n+   size_t digit_count = strlen(digits);\n+   size_t zeros = 0;\n+   long product = 1;\n+   long largest_product = 0;\n+\n+   if (span > digit_count)\n+      return -1;\n+\n+   if (!span && !digit_count)\n+      return 1;\n+\n+   for (size_t i = 0; i < digit_count; i++) {\n+      if (!is_digit(digits[i]))\n+         return -1;\n+\n+      int to_add = to_int(digits[i]);","path":"exercises/largest-series-product/src/example.c","position":34,"original_position":34,"commit_id":"c4eb6afa4959a9eb9564de572bc6cb9dabf6ed5a","original_commit_id":"c4eb6afa4959a9eb9564de572bc6cb9dabf6ed5a","user":{"login":"palisaide","id":1630335,"avatar_url":"https://avatars.githubusercontent.com/u/1630335?v=3","gravatar_id":"","url":"https://api.github.com/users/palisaide","html_url":"https://github.com/palisaide","followers_url":"https://api.github.com/users/palisaide/followers","following_url":"https://api.github.com/users/palisaide/following{/other_user}","gists_url":"https://api.github.com/users/palisaide/gists{/gist_id}","starred_url":"https://api.github.com/users/palisaide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palisaide/subscriptions","organizations_url":"https://api.github.com/users/palisaide/orgs","repos_url":"https://api.github.com/users/palisaide/repos","events_url":"https://api.github.com/users/palisaide/events{/privacy}","received_events_url":"https://api.github.com/users/palisaide/received_events","type":"User","site_admin":false},"body":"You could also use the stdlib `atoi()` here, which has the added benefit of returning 0 for any non-numeric char passed.","created_at":"2016-10-03T16:11:58Z","updated_at":"2016-10-03T16:11:58Z","html_url":"https://github.com/exercism/xc/pull/81#discussion_r81583256","pull_request_url":"https://api.github.com/repos/exercism/xc/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/exercism/xc/pulls/comments/81583256"},"html":{"href":"https://github.com/exercism/xc/pull/81#discussion_r81583256"},"pull_request":{"href":"https://api.github.com/repos/exercism/xc/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/exercism/xc/pulls/81","id":87613090,"html_url":"https://github.com/exercism/xc/pull/81","diff_url":"https://github.com/exercism/xc/pull/81.diff","patch_url":"https://github.com/exercism/xc/pull/81.patch","issue_url":"https://api.github.com/repos/exercism/xc/issues/81","number":81,"state":"open","locked":false,"title":"Add largest-series-product","user":{"login":"ryanplusplus","id":2488333,"avatar_url":"https://avatars.githubusercontent.com/u/2488333?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanplusplus","html_url":"https://github.com/ryanplusplus","followers_url":"https://api.github.com/users/ryanplusplus/followers","following_url":"https://api.github.com/users/ryanplusplus/following{/other_user}","gists_url":"https://api.github.com/users/ryanplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanplusplus/subscriptions","organizations_url":"https://api.github.com/users/ryanplusplus/orgs","repos_url":"https://api.github.com/users/ryanplusplus/repos","events_url":"https://api.github.com/users/ryanplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/ryanplusplus/received_events","type":"User","site_admin":false},"body":"See https://github.com/exercism/x-common/blob/master/exercises/largest-series-product/canonical-data.json","created_at":"2016-10-01T19:53:56Z","updated_at":"2016-10-03T16:11:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9a5d2e407130795c7c0c472f52000df69b27244","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/exercism/xc/pulls/81/commits","review_comments_url":"https://api.github.com/repos/exercism/xc/pulls/81/comments","review_comment_url":"https://api.github.com/repos/exercism/xc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/xc/issues/81/comments","statuses_url":"https://api.github.com/repos/exercism/xc/statuses/c4eb6afa4959a9eb9564de572bc6cb9dabf6ed5a","head":{"label":"ryanplusplus:AddLargestSeriesProduct","ref":"AddLargestSeriesProduct","sha":"c4eb6afa4959a9eb9564de572bc6cb9dabf6ed5a","user":{"login":"ryanplusplus","id":2488333,"avatar_url":"https://avatars.githubusercontent.com/u/2488333?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanplusplus","html_url":"https://github.com/ryanplusplus","followers_url":"https://api.github.com/users/ryanplusplus/followers","following_url":"https://api.github.com/users/ryanplusplus/following{/other_user}","gists_url":"https://api.github.com/users/ryanplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanplusplus/subscriptions","organizations_url":"https://api.github.com/users/ryanplusplus/orgs","repos_url":"https://api.github.com/users/ryanplusplus/repos","events_url":"https://api.github.com/users/ryanplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/ryanplusplus/received_events","type":"User","site_admin":false},"repo":{"id":66596711,"name":"xc","full_name":"ryanplusplus/xc","owner":{"login":"ryanplusplus","id":2488333,"avatar_url":"https://avatars.githubusercontent.com/u/2488333?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanplusplus","html_url":"https://github.com/ryanplusplus","followers_url":"https://api.github.com/users/ryanplusplus/followers","following_url":"https://api.github.com/users/ryanplusplus/following{/other_user}","gists_url":"https://api.github.com/users/ryanplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanplusplus/subscriptions","organizations_url":"https://api.github.com/users/ryanplusplus/orgs","repos_url":"https://api.github.com/users/ryanplusplus/repos","events_url":"https://api.github.com/users/ryanplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/ryanplusplus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryanplusplus/xc","description":"Exercism problems in C","fork":true,"url":"https://api.github.com/repos/ryanplusplus/xc","forks_url":"https://api.github.com/repos/ryanplusplus/xc/forks","keys_url":"https://api.github.com/repos/ryanplusplus/xc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryanplusplus/xc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryanplusplus/xc/teams","hooks_url":"https://api.github.com/repos/ryanplusplus/xc/hooks","issue_events_url":"https://api.github.com/repos/ryanplusplus/xc/issues/events{/number}","events_url":"https://api.github.com/repos/ryanplusplus/xc/events","assignees_url":"https://api.github.com/repos/ryanplusplus/xc/assignees{/user}","branches_url":"https://api.github.com/repos/ryanplusplus/xc/branches{/branch}","tags_url":"https://api.github.com/repos/ryanplusplus/xc/tags","blobs_url":"https://api.github.com/repos/ryanplusplus/xc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryanplusplus/xc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryanplusplus/xc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryanplusplus/xc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryanplusplus/xc/statuses/{sha}","languages_url":"https://api.github.com/repos/ryanplusplus/xc/languages","stargazers_url":"https://api.github.com/repos/ryanplusplus/xc/stargazers","contributors_url":"https://api.github.com/repos/ryanplusplus/xc/contributors","subscribers_url":"https://api.github.com/repos/ryanplusplus/xc/subscribers","subscription_url":"https://api.github.com/repos/ryanplusplus/xc/subscription","commits_url":"https://api.github.com/repos/ryanplusplus/xc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryanplusplus/xc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryanplusplus/xc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryanplusplus/xc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryanplusplus/xc/contents/{+path}","compare_url":"https://api.github.com/repos/ryanplusplus/xc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryanplusplus/xc/merges","archive_url":"https://api.github.com/repos/ryanplusplus/xc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryanplusplus/xc/downloads","issues_url":"https://api.github.com/repos/ryanplusplus/xc/issues{/number}","pulls_url":"https://api.github.com/repos/ryanplusplus/xc/pulls{/number}","milestones_url":"https://api.github.com/repos/ryanplusplus/xc/milestones{/number}","notifications_url":"https://api.github.com/repos/ryanplusplus/xc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryanplusplus/xc/labels{/name}","releases_url":"https://api.github.com/repos/ryanplusplus/xc/releases{/id}","deployments_url":"https://api.github.com/repos/ryanplusplus/xc/deployments","created_at":"2016-08-25T22:10:10Z","updated_at":"2016-08-25T22:10:11Z","pushed_at":"2016-10-02T16:00:28Z","git_url":"git://github.com/ryanplusplus/xc.git","ssh_url":"git@github.com:ryanplusplus/xc.git","clone_url":"https://github.com/ryanplusplus/xc.git","svn_url":"https://github.com/ryanplusplus/xc","homepage":null,"size":273,"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":"exercism:master","ref":"master","sha":"771c6b22a1d59e97b02f6ff39ca4f0989eb17db8","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":24443186,"name":"xc","full_name":"exercism/xc","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/xc","description":"Exercism problems in C","fork":false,"url":"https://api.github.com/repos/exercism/xc","forks_url":"https://api.github.com/repos/exercism/xc/forks","keys_url":"https://api.github.com/repos/exercism/xc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/xc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/xc/teams","hooks_url":"https://api.github.com/repos/exercism/xc/hooks","issue_events_url":"https://api.github.com/repos/exercism/xc/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/xc/events","assignees_url":"https://api.github.com/repos/exercism/xc/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/xc/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/xc/tags","blobs_url":"https://api.github.com/repos/exercism/xc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/xc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/xc/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/xc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/xc/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/xc/languages","stargazers_url":"https://api.github.com/repos/exercism/xc/stargazers","contributors_url":"https://api.github.com/repos/exercism/xc/contributors","subscribers_url":"https://api.github.com/repos/exercism/xc/subscribers","subscription_url":"https://api.github.com/repos/exercism/xc/subscription","commits_url":"https://api.github.com/repos/exercism/xc/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/xc/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/xc/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/xc/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/xc/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/xc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/xc/merges","archive_url":"https://api.github.com/repos/exercism/xc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/xc/downloads","issues_url":"https://api.github.com/repos/exercism/xc/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/xc/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/xc/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/xc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/xc/labels{/name}","releases_url":"https://api.github.com/repos/exercism/xc/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/xc/deployments","created_at":"2014-09-25T04:07:05Z","updated_at":"2016-08-17T02:10:53Z","pushed_at":"2016-10-02T16:00:28Z","git_url":"git://github.com/exercism/xc.git","ssh_url":"git@github.com:exercism/xc.git","clone_url":"https://github.com/exercism/xc.git","svn_url":"https://github.com/exercism/xc","homepage":null,"size":301,"stargazers_count":15,"watchers_count":15,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":10,"forks":15,"open_issues":10,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/xc/pulls/81"},"html":{"href":"https://github.com/exercism/xc/pull/81"},"issue":{"href":"https://api.github.com/repos/exercism/xc/issues/81"},"comments":{"href":"https://api.github.com/repos/exercism/xc/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/xc/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/xc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/xc/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/xc/statuses/c4eb6afa4959a9eb9564de572bc6cb9dabf6ed5a"}}}}
{"actor":{"display_login":"palisaide"}}