--- deliantra/server/common/readable.C 2008/12/31 17:35:37 1.39
+++ deliantra/server/common/readable.C 2009/10/15 16:00:37 1.42
@@ -5,18 +5,19 @@
* Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Deliantra is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Deliantra is free software: you can redistribute it and/or modify it under
+ * the terms of the Affero GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the Affero GNU General Public License
+ * and the GNU General Public License along with this program. If not, see
+ * .
*
* The authors can be reached via e-mail to
*/
@@ -819,7 +820,7 @@
#ifdef ARCHIVE_DEBUG
if (t)
- LOG (llevDebug, "Found title match (list %d): %s %s (%d)\n", msgtype, t->name, t->authour, t->msg_index);
+ LOG (llevDebug, "Found title match (list %d): %s %s (%d)\n", msgtype, &t->name, &t->authour, t->msg_index);
#endif
return t;
@@ -977,7 +978,7 @@
need_to_write_bookarchive = 1;
#ifdef ARCHIVE_DEBUG
- LOG (llevDebug, "Archiving new title: %s %s (%d)\n", book->name, book->title, msgtype);
+ LOG (llevDebug, "Archiving new title: %s %s (%d)\n", &book->name, &book->title, msgtype);
#endif
}
@@ -1053,7 +1054,6 @@
#ifdef ARCHIVE_DEBUG
LOG (llevDebug, "titles for list %d full (%d possible).\n", msgtype, maxnames);
#endif
- break;
}
/* shouldnt change map-maker books */
else if (!book->title)
@@ -1078,7 +1078,7 @@
if (tries == MAX_TITLE_CHECK || numb == maxnames)
{ /* got to check maxnames again */
#ifdef ARCHIVE_DEBUG
- LOG (llevDebug, "Failed to obtain unique title for %s %s (names:%d/%d)\n", book->name, book->title, numb, maxnames);
+ LOG (llevDebug, "Failed to obtain unique title for %s %s (names:%d/%d)\n", &book->name, &book->title, numb, maxnames);
#endif
/* restore old book properties here */
book->title = old_title;
@@ -1272,8 +1272,8 @@
}
#ifdef BOOK_MSG_DEBUG
- LOG (llevDebug, "\n mon_info_msg() created strng: %d\n", strlen (retbuf));
- fprintf (logfile, " MADE THIS:\n%s\n", retbuf);
+ LOG (llevDebug, "\n mon_info_msg() created string: %d\n", strlen (retbuf));
+ LOG (llevDebug, " MADE THIS:\n%s\n", retbuf);
#endif
return retbuf;
@@ -1351,7 +1351,7 @@
strcpy (buf, "--- \n");
/* Name */
- if (art->allowed != NULL && strcmp (art->allowed->name, "All"))
+ if (art->allowed && art->allowed->name != shstr_All)
{
linked_char *temp, *next = art->allowed;
@@ -1407,8 +1407,8 @@
}
#ifdef BOOK_MSG_DEBUG
- LOG (llevDebug, "artifact_msg() created strng: %d\n", strlen (retbuf));
- fprintf (logfile, " MADE THIS:\n%s", retbuf);
+ LOG (llevDebug, "artifact_msg() created string: %d\n", strlen (retbuf));
+ LOG (llevDebug, " MADE THIS:\n%s", retbuf);
#endif
return retbuf;
}
@@ -1474,6 +1474,11 @@
{
strcat (retbuf, "\n");
}
+
+#ifdef BOOK_MSG_DEBUG
+ LOG (llevDebug, "spellpath_msg() created string: %d\n", strlen (retbuf));
+ LOG (llevDebug, " MADE THIS:\n%s", retbuf);
+#endif
return retbuf;
}
@@ -1538,7 +1543,7 @@
LOG (llevError, "formula_msg() can't find arch %s for formula.\n", op_name);
/* item name */
- if (strcmp (formula->title, "NONE"))
+ if (formula->title != shstr_NONE)
{
sprintf (retbuf, "%sThe %s of %s", retbuf, op_name, &formula->title);
/* This results in things like pile of philo. sulfur.
@@ -1561,6 +1566,7 @@
strcat (title, at->title);
}
}
+
/* Lets name the book something meaningful ! */
book->name = title;
book->title = NULL;
@@ -1806,8 +1812,8 @@
strcat (retbuf, " hopelessly garbled!]\n ---\n");
}
#ifdef BOOK_MSG_DEBUG
- LOG (llevDebug, "\n god_info_msg() created strng: %d\n", strlen (retbuf));
- fprintf (logfile, " MADE THIS:\n%s", retbuf);
+ LOG (llevDebug, "\n god_info_msg() created string: %d\n", strlen (retbuf));
+ LOG (llevDebug, " MADE THIS:\n%s", retbuf);
#endif
return retbuf;
}