… | |
… | |
932 | */ |
932 | */ |
933 | |
933 | |
934 | static int |
934 | static int |
935 | unique_book (const object *book, int msgtype) |
935 | unique_book (const object *book, int msgtype) |
936 | { |
936 | { |
937 | title *test; |
|
|
938 | |
|
|
939 | if (!booklist) |
937 | if (!booklist) |
940 | return 1; /* No archival entries! Must be unique! */ |
938 | return 1; /* No archival entries! Must be unique! */ |
941 | |
939 | |
942 | /* Go through the booklist. If the author and name match, not unique so |
940 | /* Go through the booklist. If the author and name match, not unique so |
943 | * return 0. |
941 | * return 0. |
944 | */ |
942 | */ |
945 | for (test = get_titlelist (msgtype)->first_book; test; test = test->next) |
943 | for (title *test = get_titlelist (msgtype)->first_book; test; test = test->next) |
946 | { |
|
|
947 | if (!strcmp (test->name, book->name) && !strcmp (book->title, test->authour)) |
944 | if (test->name == book->name && book->title == test->authour) |
948 | return 0; |
945 | return 0; |
949 | } |
946 | |
950 | return 1; |
947 | return 1; |
951 | } |
948 | } |
952 | |
949 | |
953 | /* add_book_to_list() */ |
950 | /* add_book_to_list() */ |
954 | |
951 | |