{"action":"created","comment":{"url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/comments/158267501","pull_request_review_id":85050024,"id":158267501,"diff_hunk":"@@ -0,0 +1,108 @@\n+#include <stdlib.h>\r\n+#include <stdio.h>\r\n+#include <string.h>\r\n+#include \"api.h\"\r\n+\r\n+// Создание структуры MusicalComposition\r\n+MusicalComposition* createMusicalComposition(char* name, char* author, int year){\r\n+    MusicalComposition* new_composition = (MusicalComposition*)malloc(sizeof(MusicalComposition));\r\n+    new_composition->name=(char*)malloc(81*sizeof(char));\r\n+    new_composition->author=(char*)malloc(81*sizeof(char));\r\n+    strncpy(new_composition->name, name, 80);\r\n+    strncpy(new_composition->author, author, 80);\r\n+    new_composition->year=year;\r\n+    new_composition->next = NULL;\r\n+    new_composition->prev = NULL;\r\n+    return new_composition;\r\n+}\r\n+\r\n+\r\n+// Функции для работы со списком MusicalComposition\r\n+//\r\n+// Создание списка музыкальных композиций\r\n+MusicalComposition* createMusicalCompositionList(char** array_names, char** array_authors, int* array_years, int n){\r\n+    MusicalComposition *head = createMusicalComposition(array_names[0], array_authors[0], array_years[0]);\r\n+    MusicalComposition *comp = head;\r\n+    int i=0;\r\n+    for (i=1;i<n;i++){\r\n+        comp->next = createMusicalComposition(array_names[i], array_authors[i], array_years[i]);\r\n+        comp->next->prev=comp;\r\n+        comp=comp->next;\r\n+    }\r\n+    return head;\r\n+}\r\n+\r\n+// Добавление новой композиции в конец списка\r\n+void push(MusicalComposition* head, MusicalComposition* element){\r\n+    MusicalComposition* comp = head;\r\n+    while (comp->next!=NULL)\r\n+        comp=comp->next;\r\n+    comp->next=element;\r\n+    element->prev=comp;\r\n+}\r\n+\r\n+\r\n+// Удаление элемента, у которого name равно name_for_remove\r\n+void removeEl(MusicalComposition **head, char* name_for_remove){\r\n+    MusicalComposition* comp;\r\n+    for (comp = *head; comp!=NULL; comp=comp->next)\r\n+        if (strcmp(comp->name,name_for_remove)==0){\r\n+            if (comp->prev == NULL){ // удаляется head\r\n+                if (comp->next == NULL){ // в списке всего 1 элемент\r\n+                    *head = NULL;\r\n+                } else{ // удаляется head, в списке больше 1 элемента\r\n+                    comp->next->prev=NULL;\r\n+                    *head = comp->next;\r\n+                }\r\n+            } else{\r\n+                if (comp->next == NULL){ // удаляется последний элемент\r\n+                    comp->prev->next = NULL;\r\n+                } else{ // остальные случаи\r\n+                    comp->next->prev = comp->prev;\r\n+                    comp->prev->next = comp->next;\r\n+                }\r\n+            }\r\n+            break;\r\n+        }\r\n+    free (comp->name);\r\n+    free (comp->author);\r\n+    free (comp);\r","path":"Yaroslav_Adamov_kursach/api.c","position":69,"original_position":69,"commit_id":"1bafc4232311610a4b6788cc9fd5825e1b61dc2f","original_commit_id":"1bafc4232311610a4b6788cc9fd5825e1b61dc2f","user":{"login":"mikhaylovv","id":31616710,"avatar_url":"https://avatars0.githubusercontent.com/u/31616710?v=4","gravatar_id":"","url":"https://api.github.com/users/mikhaylovv","html_url":"https://github.com/mikhaylovv","followers_url":"https://api.github.com/users/mikhaylovv/followers","following_url":"https://api.github.com/users/mikhaylovv/following{/other_user}","gists_url":"https://api.github.com/users/mikhaylovv/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhaylovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhaylovv/subscriptions","organizations_url":"https://api.github.com/users/mikhaylovv/orgs","repos_url":"https://api.github.com/users/mikhaylovv/repos","events_url":"https://api.github.com/users/mikhaylovv/events{/privacy}","received_events_url":"https://api.github.com/users/mikhaylovv/received_events","type":"User","site_admin":false},"body":"Если элемент не найден в списке, то выходит\r\nfree (NULL -> name)\r\n...\r\n\r\nчтот не так","created_at":"2017-12-21T12:41:09Z","updated_at":"2017-12-21T12:44:54Z","html_url":"https://github.com/moevm/pr1-2017-7381/pull/66#discussion_r158267501","pull_request_url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/comments/158267501"},"html":{"href":"https://github.com/moevm/pr1-2017-7381/pull/66#discussion_r158267501"},"pull_request":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66","id":158386419,"html_url":"https://github.com/moevm/pr1-2017-7381/pull/66","diff_url":"https://github.com/moevm/pr1-2017-7381/pull/66.diff","patch_url":"https://github.com/moevm/pr1-2017-7381/pull/66.patch","issue_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/66","number":66,"state":"open","locked":false,"title":"Yaroslav adamov kursach","user":{"login":"yaroslavadamov","id":32567078,"avatar_url":"https://avatars3.githubusercontent.com/u/32567078?v=4","gravatar_id":"","url":"https://api.github.com/users/yaroslavadamov","html_url":"https://github.com/yaroslavadamov","followers_url":"https://api.github.com/users/yaroslavadamov/followers","following_url":"https://api.github.com/users/yaroslavadamov/following{/other_user}","gists_url":"https://api.github.com/users/yaroslavadamov/gists{/gist_id}","starred_url":"https://api.github.com/users/yaroslavadamov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaroslavadamov/subscriptions","organizations_url":"https://api.github.com/users/yaroslavadamov/orgs","repos_url":"https://api.github.com/users/yaroslavadamov/repos","events_url":"https://api.github.com/users/yaroslavadamov/events{/privacy}","received_events_url":"https://api.github.com/users/yaroslavadamov/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-14T15:28:37Z","updated_at":"2017-12-21T12:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60d4b381d1a7a20b56d7fc4570137579e030a199","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66/commits","review_comments_url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66/comments","review_comment_url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/66/comments","statuses_url":"https://api.github.com/repos/moevm/pr1-2017-7381/statuses/1bafc4232311610a4b6788cc9fd5825e1b61dc2f","head":{"label":"moevm:Yaroslav_Adamov_kursach","ref":"Yaroslav_Adamov_kursach","sha":"1bafc4232311610a4b6788cc9fd5825e1b61dc2f","user":{"login":"moevm","id":22071663,"avatar_url":"https://avatars2.githubusercontent.com/u/22071663?v=4","gravatar_id":"","url":"https://api.github.com/users/moevm","html_url":"https://github.com/moevm","followers_url":"https://api.github.com/users/moevm/followers","following_url":"https://api.github.com/users/moevm/following{/other_user}","gists_url":"https://api.github.com/users/moevm/gists{/gist_id}","starred_url":"https://api.github.com/users/moevm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moevm/subscriptions","organizations_url":"https://api.github.com/users/moevm/orgs","repos_url":"https://api.github.com/users/moevm/repos","events_url":"https://api.github.com/users/moevm/events{/privacy}","received_events_url":"https://api.github.com/users/moevm/received_events","type":"Organization","site_admin":false},"repo":{"id":103118337,"name":"pr1-2017-7381","full_name":"moevm/pr1-2017-7381","owner":{"login":"moevm","id":22071663,"avatar_url":"https://avatars2.githubusercontent.com/u/22071663?v=4","gravatar_id":"","url":"https://api.github.com/users/moevm","html_url":"https://github.com/moevm","followers_url":"https://api.github.com/users/moevm/followers","following_url":"https://api.github.com/users/moevm/following{/other_user}","gists_url":"https://api.github.com/users/moevm/gists{/gist_id}","starred_url":"https://api.github.com/users/moevm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moevm/subscriptions","organizations_url":"https://api.github.com/users/moevm/orgs","repos_url":"https://api.github.com/users/moevm/repos","events_url":"https://api.github.com/users/moevm/events{/privacy}","received_events_url":"https://api.github.com/users/moevm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moevm/pr1-2017-7381","description":null,"fork":false,"url":"https://api.github.com/repos/moevm/pr1-2017-7381","forks_url":"https://api.github.com/repos/moevm/pr1-2017-7381/forks","keys_url":"https://api.github.com/repos/moevm/pr1-2017-7381/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moevm/pr1-2017-7381/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moevm/pr1-2017-7381/teams","hooks_url":"https://api.github.com/repos/moevm/pr1-2017-7381/hooks","issue_events_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/events{/number}","events_url":"https://api.github.com/repos/moevm/pr1-2017-7381/events","assignees_url":"https://api.github.com/repos/moevm/pr1-2017-7381/assignees{/user}","branches_url":"https://api.github.com/repos/moevm/pr1-2017-7381/branches{/branch}","tags_url":"https://api.github.com/repos/moevm/pr1-2017-7381/tags","blobs_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/refs{/sha}","trees_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moevm/pr1-2017-7381/statuses/{sha}","languages_url":"https://api.github.com/repos/moevm/pr1-2017-7381/languages","stargazers_url":"https://api.github.com/repos/moevm/pr1-2017-7381/stargazers","contributors_url":"https://api.github.com/repos/moevm/pr1-2017-7381/contributors","subscribers_url":"https://api.github.com/repos/moevm/pr1-2017-7381/subscribers","subscription_url":"https://api.github.com/repos/moevm/pr1-2017-7381/subscription","commits_url":"https://api.github.com/repos/moevm/pr1-2017-7381/commits{/sha}","git_commits_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/commits{/sha}","comments_url":"https://api.github.com/repos/moevm/pr1-2017-7381/comments{/number}","issue_comment_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/comments{/number}","contents_url":"https://api.github.com/repos/moevm/pr1-2017-7381/contents/{+path}","compare_url":"https://api.github.com/repos/moevm/pr1-2017-7381/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moevm/pr1-2017-7381/merges","archive_url":"https://api.github.com/repos/moevm/pr1-2017-7381/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moevm/pr1-2017-7381/downloads","issues_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues{/number}","pulls_url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls{/number}","milestones_url":"https://api.github.com/repos/moevm/pr1-2017-7381/milestones{/number}","notifications_url":"https://api.github.com/repos/moevm/pr1-2017-7381/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moevm/pr1-2017-7381/labels{/name}","releases_url":"https://api.github.com/repos/moevm/pr1-2017-7381/releases{/id}","deployments_url":"https://api.github.com/repos/moevm/pr1-2017-7381/deployments","created_at":"2017-09-11T09:44:22Z","updated_at":"2017-12-03T13:05:06Z","pushed_at":"2017-12-21T12:06:06Z","git_url":"git://github.com/moevm/pr1-2017-7381.git","ssh_url":"git@github.com:moevm/pr1-2017-7381.git","clone_url":"https://github.com/moevm/pr1-2017-7381.git","svn_url":"https://github.com/moevm/pr1-2017-7381","homepage":null,"size":27474,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":5,"open_issues":19,"watchers":2,"default_branch":"master"}},"base":{"label":"moevm:master","ref":"master","sha":"53b665ab58ea87ac5b4f28e3aa4e007a4333ae8b","user":{"login":"moevm","id":22071663,"avatar_url":"https://avatars2.githubusercontent.com/u/22071663?v=4","gravatar_id":"","url":"https://api.github.com/users/moevm","html_url":"https://github.com/moevm","followers_url":"https://api.github.com/users/moevm/followers","following_url":"https://api.github.com/users/moevm/following{/other_user}","gists_url":"https://api.github.com/users/moevm/gists{/gist_id}","starred_url":"https://api.github.com/users/moevm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moevm/subscriptions","organizations_url":"https://api.github.com/users/moevm/orgs","repos_url":"https://api.github.com/users/moevm/repos","events_url":"https://api.github.com/users/moevm/events{/privacy}","received_events_url":"https://api.github.com/users/moevm/received_events","type":"Organization","site_admin":false},"repo":{"id":103118337,"name":"pr1-2017-7381","full_name":"moevm/pr1-2017-7381","owner":{"login":"moevm","id":22071663,"avatar_url":"https://avatars2.githubusercontent.com/u/22071663?v=4","gravatar_id":"","url":"https://api.github.com/users/moevm","html_url":"https://github.com/moevm","followers_url":"https://api.github.com/users/moevm/followers","following_url":"https://api.github.com/users/moevm/following{/other_user}","gists_url":"https://api.github.com/users/moevm/gists{/gist_id}","starred_url":"https://api.github.com/users/moevm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moevm/subscriptions","organizations_url":"https://api.github.com/users/moevm/orgs","repos_url":"https://api.github.com/users/moevm/repos","events_url":"https://api.github.com/users/moevm/events{/privacy}","received_events_url":"https://api.github.com/users/moevm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moevm/pr1-2017-7381","description":null,"fork":false,"url":"https://api.github.com/repos/moevm/pr1-2017-7381","forks_url":"https://api.github.com/repos/moevm/pr1-2017-7381/forks","keys_url":"https://api.github.com/repos/moevm/pr1-2017-7381/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moevm/pr1-2017-7381/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moevm/pr1-2017-7381/teams","hooks_url":"https://api.github.com/repos/moevm/pr1-2017-7381/hooks","issue_events_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/events{/number}","events_url":"https://api.github.com/repos/moevm/pr1-2017-7381/events","assignees_url":"https://api.github.com/repos/moevm/pr1-2017-7381/assignees{/user}","branches_url":"https://api.github.com/repos/moevm/pr1-2017-7381/branches{/branch}","tags_url":"https://api.github.com/repos/moevm/pr1-2017-7381/tags","blobs_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/refs{/sha}","trees_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moevm/pr1-2017-7381/statuses/{sha}","languages_url":"https://api.github.com/repos/moevm/pr1-2017-7381/languages","stargazers_url":"https://api.github.com/repos/moevm/pr1-2017-7381/stargazers","contributors_url":"https://api.github.com/repos/moevm/pr1-2017-7381/contributors","subscribers_url":"https://api.github.com/repos/moevm/pr1-2017-7381/subscribers","subscription_url":"https://api.github.com/repos/moevm/pr1-2017-7381/subscription","commits_url":"https://api.github.com/repos/moevm/pr1-2017-7381/commits{/sha}","git_commits_url":"https://api.github.com/repos/moevm/pr1-2017-7381/git/commits{/sha}","comments_url":"https://api.github.com/repos/moevm/pr1-2017-7381/comments{/number}","issue_comment_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/comments{/number}","contents_url":"https://api.github.com/repos/moevm/pr1-2017-7381/contents/{+path}","compare_url":"https://api.github.com/repos/moevm/pr1-2017-7381/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moevm/pr1-2017-7381/merges","archive_url":"https://api.github.com/repos/moevm/pr1-2017-7381/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moevm/pr1-2017-7381/downloads","issues_url":"https://api.github.com/repos/moevm/pr1-2017-7381/issues{/number}","pulls_url":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls{/number}","milestones_url":"https://api.github.com/repos/moevm/pr1-2017-7381/milestones{/number}","notifications_url":"https://api.github.com/repos/moevm/pr1-2017-7381/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moevm/pr1-2017-7381/labels{/name}","releases_url":"https://api.github.com/repos/moevm/pr1-2017-7381/releases{/id}","deployments_url":"https://api.github.com/repos/moevm/pr1-2017-7381/deployments","created_at":"2017-09-11T09:44:22Z","updated_at":"2017-12-03T13:05:06Z","pushed_at":"2017-12-21T12:06:06Z","git_url":"git://github.com/moevm/pr1-2017-7381.git","ssh_url":"git@github.com:moevm/pr1-2017-7381.git","clone_url":"https://github.com/moevm/pr1-2017-7381.git","svn_url":"https://github.com/moevm/pr1-2017-7381","homepage":null,"size":27474,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":5,"open_issues":19,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66"},"html":{"href":"https://github.com/moevm/pr1-2017-7381/pull/66"},"issue":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/66"},"comments":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/moevm/pr1-2017-7381/statuses/1bafc4232311610a4b6788cc9fd5825e1b61dc2f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mikhaylovv"}}