=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Inroom Cleanup for CircleMUD 3.0b pl18 MAY-02-2001 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- PREFACE ~~~~~~~~ Being as the scope of this patch is very small, and it's nature utilitarian, I will keep this text as brief as possible. INTRODUCTION ~~~~~~~~~~~~~ It has always bothered me that there are places in the CircleMUD source code where, for example, "ch->in_room" is used and others where "IN_ROOM(ch)" is used. I feel there would not have been a macro defined if it were not intended to be used. Furthermore, if the in_room data member of the char_data and obj_data structures have an accessor macro, why don't the other locative data members? CHANGES ~~~~~~~~ Therefore, I've taken it upon myself to go through stock CircleMUD 3.0b pl18 and clean up these macros. I've replaced every occurance of "xxx->in_room" with the appropriate "IN_ROOM(xxx)" macro. I've added accessor macros for the other locative data members of the obj_data structure, as an extension of this effort. This patch makes the following changes: xxx->carried_by ==> CARRIED_BY(xxx) xxx->in_obj ==> IN_OBJ(xxx) xxx->in_room ==> IN_ROOM(xxx) xxx->worn_by ==> WORN_BY(xxx) xxx->worn_on ==> WORN_ON(xxx) ISSUES & SUPPORT ~~~~~~~~~~~~~~~~~ This should *theoretically* cause no problems, but, as I do not know all of the modifications made to every instance of CircleMUD out there, some may still arise. I will be happy to try to help out with any functional problems related to this patch. INSTALLATION ~~~~~~~~~~~~~ The inroom cleanup is provided in the standard diff/patch format, which is common for UNIX systems. The patch can be applied by copying it to your CircleMUD src directory and issuing the following command: % patch < gd_inroom.pl18.patch Rejected hunks (*.rej files) will need to be patched by hand. Be aware that any changes you have made to your code that utilize these data members will not be modified by this patch, and will therefore need to be modified at your own discretion. Not changing them *will not* break them. I will not, cannot, and do not support the patch program, nor any related ports of derivatives. If problems arise due to your specific version or port of the patch program, please patch by hand. The CircleMUD FAQ has an excellent section on hand patching. FEEDBACK ~~~~~~~~~ I've released patches and code to the CircleMUD community before, under the assumption that the request for feedback was implicit, and received little or no feedback at all. As a result, I've the following to say: IF YOU USE THIS PATCH, PLEASE DO LEAVE ME A NOTE AT THE EMAIL ADDRESS TO FOLLOW. ALSO, PLEASE INCLUDE MY NAME AND EMAIL ADDRESS IN YOUR CREDITS FILE. I am interested in knowing any of the following items: (a) How smoothly does the patch applies to existing source? (b) Does it causes problems in any popular packages or modules? (c) What is your opinion of the documentation and distribution? (d) What could be done to improve or enhance the documentation and distribution? (e) Any other "stuff"? -Geoff Davis/darwin@telocity.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-