> I got a backup i would like to use, but now something has caused > the code to give a bunch of stray \'s. The two places that I found messed up were the REMOVE_FROM_LIST() and CHECK_PLAYER_SPECIAL() macros in utils.h.. I replaced REMOVE_FROM_LIST() with the stock version as yours seemed to be incomplete. The other I simply removed the linefeed from the middle of the delcaration. (fyi: if you use a good editor with highlighing, like vim, you can quite easily detect these types of problems because the coloration of the macro definition is distinctive and you can see where it is broken) -2c With these changes, the code compiles.. if you have other problems give a yell. There were some other minor compile warnings but they were not related to this stuff. -alex Below is a patch which fixes your utils.h to a working version. --snip patch here-- --- utils.h Mon Aug 12 22:33:21 2002 +++ /home/ahdecker/utils.h Tue Aug 13 01:09:27 2002 @@ -152,11 +152,14 @@ void update_pos(struct char_data *victim * a great application for C++ templates but, alas, this is not C++. Maybe * CircleMUD 4.0 will be... */ -#define REMOVE_FROM_LIST(item, head, next) -if ((item) == (head))head(item)->next;else {temp = head; -while (temp && (temp->next != (item))) - temp = temp->next; - if (temp) +#define REMOVE_FROM_LIST(item, head, next) \ + if ((item) == (head)) \ + head = (item)->next; \ + else { \ + temp = head; \ + while (temp && (temp->next != (item))) \ + temp = temp->next; \ + if (temp) \ temp->next = (item)->next; \ } \ @@ -178,8 +182,7 @@ while (temp && (temp->next != (item))) */ #if 1 /* Subtle bug in the '#var', but works well for now. */ -#define CHECK_PLAYER_SPECIAL(ch, var) - (*(((ch)->player_specials == &dummy_mob) ? (log("SYSERR: Mob using '"#var"' at %s:%d.", __FILE__, __LINE__), &(var)) : &(var))) +#define CHECK_PLAYER_SPECIAL(ch, var) (*(((ch)->player_specials == &dummy_mob) ? (log("SYSERR: Mob using '"#var"' at %s:%d.", __FILE__, __LINE__), &(var)) : &(var))) #else #define CHECK_PLAYER_SPECIAL(ch, var) (var) #endif --snip patch here-- -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT