ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/readable.C
(Generate patch)

Comparing deliantra/server/common/readable.C (file contents):
Revision 1.38 by root, Sat Dec 27 02:31:19 2008 UTC vs.
Revision 1.39 by root, Wed Dec 31 17:35:37 2008 UTC

932 */ 932 */
933 933
934static int 934static int
935unique_book (const object *book, int msgtype) 935unique_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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines