{"action":"created","comment":{"url":"https://api.github.com/repos/brijohn/libexword/pulls/comments/225737798","pull_request_review_id":165404482,"id":225737798,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTczNzc5OA==","diff_hunk":"@@ -534,11 +534,29 @@ void dict(struct state *s)\n \t\t\t}\n \t\t} else if (strcmp(subfunc, \"auth\") == 0) {\n \t\t\tif (peek_arg(&(s->cmd_list)) == NULL) {\n-\t\t\t\tprintf(\"No username specified.\\n\");\n-\t\t\t} else {\n+\t\t\t\tchar filename[] = \"user.inf\";\n+\t\t\t\tFILE*f;\n+\t\t\t\tint len;\n+\t\t\t\trsp = exword_get_file(s->device, basename(filename), &buffer, &len);\n+\t\t\t\tif (rsp == 0x20)\n+\t\t\t\t\trsp = write_file(filename, buffer, len);\n+\t\t\t\tfree(buffer);\n+\t\t\t\tif ((f = fopen(\"user.inf\", \"r\")) == NULL){\n+\t\t\t\t\tuser = NULL;\n+\t\t\t\t\tprintf(\"No username specified.\\n\");\n+\t\t\t\t}\n+\t\t\t\telse{\n+\t\t\t\t\tuser = xmalloc(32);\n+\t\t\t\t\tfscanf(f, \"%s\\n\", user);\n+\t\t\t\t\tfclose(f);\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\telse {\n \t\t\t\tuser = xmalloc(strlen(peek_arg(&(s->cmd_list)) + 1));\n \t\t\t\tstrcpy(user, peek_arg(&(s->cmd_list)));\n \t\t\t\tdequeue_arg(&(s->cmd_list));\n+\t\t\t}\n+\t\t\tif(user != NULL){","path":"src/main.c","position":28,"original_position":28,"commit_id":"93c1eef6b1c3888ae661ff6895fea47153773bda","original_commit_id":"93c1eef6b1c3888ae661ff6895fea47153773bda","user":{"login":"brijohn","id":776,"node_id":"MDQ6VXNlcjc3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/776?v=4","gravatar_id":"","url":"https://api.github.com/users/brijohn","html_url":"https://github.com/brijohn","followers_url":"https://api.github.com/users/brijohn/followers","following_url":"https://api.github.com/users/brijohn/following{/other_user}","gists_url":"https://api.github.com/users/brijohn/gists{/gist_id}","starred_url":"https://api.github.com/users/brijohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brijohn/subscriptions","organizations_url":"https://api.github.com/users/brijohn/orgs","repos_url":"https://api.github.com/users/brijohn/repos","events_url":"https://api.github.com/users/brijohn/events{/privacy}","received_events_url":"https://api.github.com/users/brijohn/received_events","type":"User","site_admin":false},"body":"Please add a space between the if and opening paren and the closing paren and opening curly brace\r\n\r\n> if (user != NULL) {","created_at":"2018-10-16T23:14:23Z","updated_at":"2018-10-16T23:30:57Z","html_url":"https://github.com/brijohn/libexword/pull/1#discussion_r225737798","pull_request_url":"https://api.github.com/repos/brijohn/libexword/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/brijohn/libexword/pulls/comments/225737798"},"html":{"href":"https://github.com/brijohn/libexword/pull/1#discussion_r225737798"},"pull_request":{"href":"https://api.github.com/repos/brijohn/libexword/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/brijohn/libexword/pulls/1","id":223254501,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMjU0NTAx","html_url":"https://github.com/brijohn/libexword/pull/1","diff_url":"https://github.com/brijohn/libexword/pull/1.diff","patch_url":"https://github.com/brijohn/libexword/pull/1.patch","issue_url":"https://api.github.com/repos/brijohn/libexword/issues/1","number":1,"state":"open","locked":false,"title":"Infer auth user name from user.inf in current directory.","user":{"login":"Waynefn","id":31786852,"node_id":"MDQ6VXNlcjMxNzg2ODUy","avatar_url":"https://avatars2.githubusercontent.com/u/31786852?v=4","gravatar_id":"","url":"https://api.github.com/users/Waynefn","html_url":"https://github.com/Waynefn","followers_url":"https://api.github.com/users/Waynefn/followers","following_url":"https://api.github.com/users/Waynefn/following{/other_user}","gists_url":"https://api.github.com/users/Waynefn/gists{/gist_id}","starred_url":"https://api.github.com/users/Waynefn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waynefn/subscriptions","organizations_url":"https://api.github.com/users/Waynefn/orgs","repos_url":"https://api.github.com/users/Waynefn/repos","events_url":"https://api.github.com/users/Waynefn/events{/privacy}","received_events_url":"https://api.github.com/users/Waynefn/received_events","type":"User","site_admin":false},"body":"User name for authentication can be acquired from user.inf.\r\nRevise `dict auth` method to find this name first when no name is given.","created_at":"2018-10-16T13:40:26Z","updated_at":"2018-10-16T23:30:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4356a6771874efbf03f611dea8aefa995840b500","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/brijohn/libexword/pulls/1/commits","review_comments_url":"https://api.github.com/repos/brijohn/libexword/pulls/1/comments","review_comment_url":"https://api.github.com/repos/brijohn/libexword/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brijohn/libexword/issues/1/comments","statuses_url":"https://api.github.com/repos/brijohn/libexword/statuses/93c1eef6b1c3888ae661ff6895fea47153773bda","head":{"label":"Waynefn:Infer-user-name-from-user-inf","ref":"Infer-user-name-from-user-inf","sha":"93c1eef6b1c3888ae661ff6895fea47153773bda","user":{"login":"Waynefn","id":31786852,"node_id":"MDQ6VXNlcjMxNzg2ODUy","avatar_url":"https://avatars2.githubusercontent.com/u/31786852?v=4","gravatar_id":"","url":"https://api.github.com/users/Waynefn","html_url":"https://github.com/Waynefn","followers_url":"https://api.github.com/users/Waynefn/followers","following_url":"https://api.github.com/users/Waynefn/following{/other_user}","gists_url":"https://api.github.com/users/Waynefn/gists{/gist_id}","starred_url":"https://api.github.com/users/Waynefn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waynefn/subscriptions","organizations_url":"https://api.github.com/users/Waynefn/orgs","repos_url":"https://api.github.com/users/Waynefn/repos","events_url":"https://api.github.com/users/Waynefn/events{/privacy}","received_events_url":"https://api.github.com/users/Waynefn/received_events","type":"User","site_admin":false},"repo":{"id":153281644,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMyODE2NDQ=","name":"libexword","full_name":"Waynefn/libexword","private":false,"owner":{"login":"Waynefn","id":31786852,"node_id":"MDQ6VXNlcjMxNzg2ODUy","avatar_url":"https://avatars2.githubusercontent.com/u/31786852?v=4","gravatar_id":"","url":"https://api.github.com/users/Waynefn","html_url":"https://github.com/Waynefn","followers_url":"https://api.github.com/users/Waynefn/followers","following_url":"https://api.github.com/users/Waynefn/following{/other_user}","gists_url":"https://api.github.com/users/Waynefn/gists{/gist_id}","starred_url":"https://api.github.com/users/Waynefn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waynefn/subscriptions","organizations_url":"https://api.github.com/users/Waynefn/orgs","repos_url":"https://api.github.com/users/Waynefn/repos","events_url":"https://api.github.com/users/Waynefn/events{/privacy}","received_events_url":"https://api.github.com/users/Waynefn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Waynefn/libexword","description":"library for transfering files over USB to casio EX-word electronic dictionaries","fork":true,"url":"https://api.github.com/repos/Waynefn/libexword","forks_url":"https://api.github.com/repos/Waynefn/libexword/forks","keys_url":"https://api.github.com/repos/Waynefn/libexword/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Waynefn/libexword/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Waynefn/libexword/teams","hooks_url":"https://api.github.com/repos/Waynefn/libexword/hooks","issue_events_url":"https://api.github.com/repos/Waynefn/libexword/issues/events{/number}","events_url":"https://api.github.com/repos/Waynefn/libexword/events","assignees_url":"https://api.github.com/repos/Waynefn/libexword/assignees{/user}","branches_url":"https://api.github.com/repos/Waynefn/libexword/branches{/branch}","tags_url":"https://api.github.com/repos/Waynefn/libexword/tags","blobs_url":"https://api.github.com/repos/Waynefn/libexword/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Waynefn/libexword/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Waynefn/libexword/git/refs{/sha}","trees_url":"https://api.github.com/repos/Waynefn/libexword/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Waynefn/libexword/statuses/{sha}","languages_url":"https://api.github.com/repos/Waynefn/libexword/languages","stargazers_url":"https://api.github.com/repos/Waynefn/libexword/stargazers","contributors_url":"https://api.github.com/repos/Waynefn/libexword/contributors","subscribers_url":"https://api.github.com/repos/Waynefn/libexword/subscribers","subscription_url":"https://api.github.com/repos/Waynefn/libexword/subscription","commits_url":"https://api.github.com/repos/Waynefn/libexword/commits{/sha}","git_commits_url":"https://api.github.com/repos/Waynefn/libexword/git/commits{/sha}","comments_url":"https://api.github.com/repos/Waynefn/libexword/comments{/number}","issue_comment_url":"https://api.github.com/repos/Waynefn/libexword/issues/comments{/number}","contents_url":"https://api.github.com/repos/Waynefn/libexword/contents/{+path}","compare_url":"https://api.github.com/repos/Waynefn/libexword/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Waynefn/libexword/merges","archive_url":"https://api.github.com/repos/Waynefn/libexword/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Waynefn/libexword/downloads","issues_url":"https://api.github.com/repos/Waynefn/libexword/issues{/number}","pulls_url":"https://api.github.com/repos/Waynefn/libexword/pulls{/number}","milestones_url":"https://api.github.com/repos/Waynefn/libexword/milestones{/number}","notifications_url":"https://api.github.com/repos/Waynefn/libexword/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Waynefn/libexword/labels{/name}","releases_url":"https://api.github.com/repos/Waynefn/libexword/releases{/id}","deployments_url":"https://api.github.com/repos/Waynefn/libexword/deployments","created_at":"2018-10-16T12:28:22Z","updated_at":"2018-10-16T12:28:24Z","pushed_at":"2018-10-16T13:37:51Z","git_url":"git://github.com/Waynefn/libexword.git","ssh_url":"git@github.com:Waynefn/libexword.git","clone_url":"https://github.com/Waynefn/libexword.git","svn_url":"https://github.com/Waynefn/libexword","homepage":"http://projects.emich.edu/~bjohns27/exword/","size":454,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"brijohn:master","ref":"master","sha":"f2a57ae32828c5da74cc328e9fdd76df0bb85d54","user":{"login":"brijohn","id":776,"node_id":"MDQ6VXNlcjc3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/776?v=4","gravatar_id":"","url":"https://api.github.com/users/brijohn","html_url":"https://github.com/brijohn","followers_url":"https://api.github.com/users/brijohn/followers","following_url":"https://api.github.com/users/brijohn/following{/other_user}","gists_url":"https://api.github.com/users/brijohn/gists{/gist_id}","starred_url":"https://api.github.com/users/brijohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brijohn/subscriptions","organizations_url":"https://api.github.com/users/brijohn/orgs","repos_url":"https://api.github.com/users/brijohn/repos","events_url":"https://api.github.com/users/brijohn/events{/privacy}","received_events_url":"https://api.github.com/users/brijohn/received_events","type":"User","site_admin":false},"repo":{"id":655788,"node_id":"MDEwOlJlcG9zaXRvcnk2NTU3ODg=","name":"libexword","full_name":"brijohn/libexword","private":false,"owner":{"login":"brijohn","id":776,"node_id":"MDQ6VXNlcjc3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/776?v=4","gravatar_id":"","url":"https://api.github.com/users/brijohn","html_url":"https://github.com/brijohn","followers_url":"https://api.github.com/users/brijohn/followers","following_url":"https://api.github.com/users/brijohn/following{/other_user}","gists_url":"https://api.github.com/users/brijohn/gists{/gist_id}","starred_url":"https://api.github.com/users/brijohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brijohn/subscriptions","organizations_url":"https://api.github.com/users/brijohn/orgs","repos_url":"https://api.github.com/users/brijohn/repos","events_url":"https://api.github.com/users/brijohn/events{/privacy}","received_events_url":"https://api.github.com/users/brijohn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/brijohn/libexword","description":"library for transfering files over USB to casio EX-word electronic dictionaries","fork":false,"url":"https://api.github.com/repos/brijohn/libexword","forks_url":"https://api.github.com/repos/brijohn/libexword/forks","keys_url":"https://api.github.com/repos/brijohn/libexword/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brijohn/libexword/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brijohn/libexword/teams","hooks_url":"https://api.github.com/repos/brijohn/libexword/hooks","issue_events_url":"https://api.github.com/repos/brijohn/libexword/issues/events{/number}","events_url":"https://api.github.com/repos/brijohn/libexword/events","assignees_url":"https://api.github.com/repos/brijohn/libexword/assignees{/user}","branches_url":"https://api.github.com/repos/brijohn/libexword/branches{/branch}","tags_url":"https://api.github.com/repos/brijohn/libexword/tags","blobs_url":"https://api.github.com/repos/brijohn/libexword/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brijohn/libexword/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brijohn/libexword/git/refs{/sha}","trees_url":"https://api.github.com/repos/brijohn/libexword/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brijohn/libexword/statuses/{sha}","languages_url":"https://api.github.com/repos/brijohn/libexword/languages","stargazers_url":"https://api.github.com/repos/brijohn/libexword/stargazers","contributors_url":"https://api.github.com/repos/brijohn/libexword/contributors","subscribers_url":"https://api.github.com/repos/brijohn/libexword/subscribers","subscription_url":"https://api.github.com/repos/brijohn/libexword/subscription","commits_url":"https://api.github.com/repos/brijohn/libexword/commits{/sha}","git_commits_url":"https://api.github.com/repos/brijohn/libexword/git/commits{/sha}","comments_url":"https://api.github.com/repos/brijohn/libexword/comments{/number}","issue_comment_url":"https://api.github.com/repos/brijohn/libexword/issues/comments{/number}","contents_url":"https://api.github.com/repos/brijohn/libexword/contents/{+path}","compare_url":"https://api.github.com/repos/brijohn/libexword/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brijohn/libexword/merges","archive_url":"https://api.github.com/repos/brijohn/libexword/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brijohn/libexword/downloads","issues_url":"https://api.github.com/repos/brijohn/libexword/issues{/number}","pulls_url":"https://api.github.com/repos/brijohn/libexword/pulls{/number}","milestones_url":"https://api.github.com/repos/brijohn/libexword/milestones{/number}","notifications_url":"https://api.github.com/repos/brijohn/libexword/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brijohn/libexword/labels{/name}","releases_url":"https://api.github.com/repos/brijohn/libexword/releases{/id}","deployments_url":"https://api.github.com/repos/brijohn/libexword/deployments","created_at":"2010-05-07T23:06:44Z","updated_at":"2018-10-15T02:07:43Z","pushed_at":"2018-10-16T13:40:27Z","git_url":"git://github.com/brijohn/libexword.git","ssh_url":"git@github.com:brijohn/libexword.git","clone_url":"https://github.com/brijohn/libexword.git","svn_url":"https://github.com/brijohn/libexword","homepage":"http://projects.emich.edu/~bjohns27/exword/","size":588,"stargazers_count":16,"watchers_count":16,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":4,"open_issues":1,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brijohn/libexword/pulls/1"},"html":{"href":"https://github.com/brijohn/libexword/pull/1"},"issue":{"href":"https://api.github.com/repos/brijohn/libexword/issues/1"},"comments":{"href":"https://api.github.com/repos/brijohn/libexword/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/brijohn/libexword/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/brijohn/libexword/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brijohn/libexword/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/brijohn/libexword/statuses/93c1eef6b1c3888ae661ff6895fea47153773bda"}},"author_association":"NONE"}}
{"actor":{"display_login":"brijohn"}}