slashmud-developers Mailing List for SlashMUD
Status: Alpha
Brought to you by:
koryn
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(27) |
Mar
(8) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(6) |
Oct
(1) |
Nov
(9) |
Dec
|
2005 |
Jan
(3) |
Feb
|
Mar
(12) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2006 |
Jan
(14) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(3) |
Apr
(148) |
May
(47) |
Jun
(41) |
Jul
(29) |
Aug
(30) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2008 |
Jan
(25) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(35) |
Jun
(12) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Neil T. <ne...@ne...> - 2008-08-07 00:44:04
|
Thanks, Neil On Aug 6, 2008, at 2:29 PM, Koryn Grant wrote: > You're right, it's done now. Twas fairly trivial anyway. > > Cheers, > Koryn > > On 7/08/2008, at 12:59 AM, Neil Tiffin wrote: > >> It does not appear that you checked in a change for the gate plugin? >> >> Neil >> >> On Aug 6, 2008, at 12:07 AM, ko...@us... wrote: >> >>> Revision: 22 >>> http://slashmud.svn.sourceforge.net/slashmud/?rev=22&view=rev >>> Author: koryn >>> Date: 2008-08-06 05:07:23 +0000 (Wed, 06 Aug 2008) >>> >>> Log Message: >>> ----------- >>> Build 3287: fix bug with objects in Modules/Testing/ObjectLibrary >>> not being loaded; fixed bug in gate plugin; commented out projectile >>> weapons for now. >>> >>> Modified Paths: > > -- > Koryn Grant > Wellington, New Zealand > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > SlashMUD-developers mailing list > Sla...@li... > https://lists.sourceforge.net/lists/listinfo/slashmud-developers |
From: Koryn G. <kor...@gm...> - 2008-08-06 19:30:04
|
You're right, it's done now. Twas fairly trivial anyway. Cheers, Koryn On 7/08/2008, at 12:59 AM, Neil Tiffin wrote: > It does not appear that you checked in a change for the gate plugin? > > Neil > > On Aug 6, 2008, at 12:07 AM, ko...@us... wrote: > >> Revision: 22 >> http://slashmud.svn.sourceforge.net/slashmud/?rev=22&view=rev >> Author: koryn >> Date: 2008-08-06 05:07:23 +0000 (Wed, 06 Aug 2008) >> >> Log Message: >> ----------- >> Build 3287: fix bug with objects in Modules/Testing/ObjectLibrary >> not being loaded; fixed bug in gate plugin; commented out projectile >> weapons for now. >> >> Modified Paths: -- Koryn Grant Wellington, New Zealand |
From: Neil T. <ne...@ne...> - 2008-08-06 12:59:27
|
It does not appear that you checked in a change for the gate plugin? Neil On Aug 6, 2008, at 12:07 AM, ko...@us... wrote: > Revision: 22 > http://slashmud.svn.sourceforge.net/slashmud/?rev=22&view=rev > Author: koryn > Date: 2008-08-06 05:07:23 +0000 (Wed, 06 Aug 2008) > > Log Message: > ----------- > Build 3287: fix bug with objects in Modules/Testing/ObjectLibrary > not being loaded; fixed bug in gate plugin; commented out projectile > weapons for now. > > Modified Paths: > -------------- > |
From: Neil T. <ne...@ne...> - 2008-06-06 22:28:15
|
Did not know that "autoreconf" even existed. I thought I ran all sequences of autoconf, automake, aclocal but I can never remember the correct sequence and the documentation, that I have found, is less than clear. Anyway, thank you. works like a charm. Neil On Jun 4, 2008, at 5:38 PM, Koryn Grant wrote: > The Makefile.in files were out-of-date, so I ran > > $ autoreconf > $ scripts/buildStandard.sh > > to regenerate them and it's happy now. > > Cheers, > Koryn |
From: Koryn G. <kor...@gm...> - 2008-06-04 22:38:52
|
The Makefile.in files were out-of-date, so I ran $ autoreconf $ scripts/buildStandard.sh to regenerate them and it's happy now. Cheers, Koryn reddwarf:trunk koryn$ ls dist/Plugins/ README dragonbane.so invulnerabilityattachment.so pushskill.so teleportskill.so advancementstone.debug.so eliza.debug.so invulnerabilityskill.debug.so questattachment.debug.so thetrash.debug.so advancementstone.so eliza.so invulnerabilityskill.so questattachment.so thetrash.so autodestruct.debug.so energydrainattachment.debug.so janitor.debug.so questmaster.debug.so torch.debug.so autodestruct.so energydrainattachment.so janitor.so questmaster.so torch.so bandagebox.debug.so energydrainskill.debug.so magicshieldattachment.debug.so rent.debug.so treknobabbler.debug.so bandagebox.so energydrainskill.so magicshieldattachment.so rent.so treknobabbler.so bank.debug.so fireswamp.debug.so magicshieldskill.debug.so riddle.debug.so triggerattachment.debug.so bank.so fireswamp.so magicshieldskill.so riddle.so triggerattachment.so bountyhunter.debug.so fountain.debug.so mentor.debug.so shop.debug.so unarmedskill.debug.so bountyhunter.so fountain.so mentor.so shop.so unarmedskill.so bulletinboard.debug.so gate.debug.so merchant.debug.so sleepattachment.debug.so virusattachment.debug.so bulletinboard.so gate.so merchant.so sleepattachment.so virusattachment.so cell.debug.so generalspell.debug.so parryskill.debug.so sleepskill.debug.so wanderer.debug.so cell.so generalspell.so parryskill.so sleepskill.so wanderer.so combatactionattachment.debug.so housing.debug.so poisonattachment.debug.so spouter.debug.so waterskin.debug.so combatactionattachment.so housing.so poisonattachment.so spouter.so waterskin.so currencyexchange.debug.so invisibilityattachment.debug.so preemptskill.debug.so summonskill.debug.so weapontypeskill.debug.so currencyexchange.so invisibilityattachment.so preemptskill.so summonskill.so weapontypeskill.so disarmskill.debug.so invisibilityskill.debug.so push.debug.so talkingsword.debug.so disarmskill.so invisibilityskill.so push.so talkingsword.so dragonbane.debug.so invulnerabilityattachment.debug.so pushskill.debug.so teleportskill.debug.so On 3/06/2008, at 3:18 AM, Neil Tiffin wrote: > When I following the following instructions: > > it should just work by checking out the repository and using the > provided scripts: > > $ mkdir my_subversion_directory > $ cd my_subversion_directory > $ svn checkout https://slashmud.svn.sourceforge.net/svnroot/ > slashmud slashmud > $ cd slashmud/trunk > $ scripts/buildStandard.sh > > $ cd dist/Plugins > $ ls -la > > total 616 > drwxr-xr-x 11 neiltiffin staff 374 Jun 2 10:08 . > drwxr-xr-x 35 neiltiffin staff 1190 Jun 1 17:53 .. > -rw-r--r-- 1 neiltiffin staff 38 Jun 2 10:08 README > -rwxr-xr-x 1 neiltiffin staff 82572 Jun 2 10:08 > bulletinboard.debug.so > -rwxr-xr-x 1 neiltiffin staff 61964 Jun 2 10:08 bulletinboard.so > -rwxr-xr-x 1 neiltiffin staff 45868 Jun 2 10:09 eliza.debug.so > -rwxr-xr-x 1 neiltiffin staff 38780 Jun 2 10:09 eliza.so > -rwxr-xr-x 1 neiltiffin staff 13672 Jun 2 10:09 > fireswamp.debug.so > -rwxr-xr-x 1 neiltiffin staff 13672 Jun 2 10:09 fireswamp.so > -rwxr-xr-x 1 neiltiffin staff 20264 Jun 2 10:09 wanderer.debug.so > -rwxr-xr-x 1 neiltiffin staff 13880 Jun 2 10:09 wanderer.so > > Everything built fine, where are the other plugins (oddly enough > these were all cpp plugins originally)? > > From the log > 2008-06-02 10:15:33 Mon Jun 02, src/plugin_api.c , > 291, smapi_log_warning: (WARNING) BulletinBoard plugin is > deprecated, please do not use! > 2008-06-02 10:15:33 Mon Jun 02, src/plugin_api.c , > 291, smapi_log_warning: (WARNING) BulletinBoard plugin is > deprecated, please do not use! > 2008-06-02 10:15:33 Mon Jun 02, src/plugin_api.c , > 291, smapi_log_warning: (WARNING) BulletinBoard plugin is > deprecated, please do not use! > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: ParrySkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > PreemptSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > UnarmedSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > MagicShieldSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > WeapontypeSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > MagicShieldSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > EnergyDrainSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > InvisibilitySkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > InvulnerabilitySkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > GeneralSpell > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: PushSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > DisarmSkill > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > GeneralSpell > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > GeneralSpell > 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , > 201, skill_install_plugin: (WARNING) could not find plugin: > GeneralSpell > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > SlashMUD-developers mailing list > Sla...@li... > https://lists.sourceforge.net/lists/listinfo/slashmud-developers -- Koryn Grant Wellington, New Zealand |
From: Neil T. <ne...@ne...> - 2008-06-02 15:18:35
|
When I following the following instructions: it should just work by checking out the repository and using the provided scripts: $ mkdir my_subversion_directory $ cd my_subversion_directory $ svn checkout https://slashmud.svn.sourceforge.net/svnroot/slashmud slashmud $ cd slashmud/trunk $ scripts/buildStandard.sh $ cd dist/Plugins $ ls -la total 616 drwxr-xr-x 11 neiltiffin staff 374 Jun 2 10:08 . drwxr-xr-x 35 neiltiffin staff 1190 Jun 1 17:53 .. -rw-r--r-- 1 neiltiffin staff 38 Jun 2 10:08 README -rwxr-xr-x 1 neiltiffin staff 82572 Jun 2 10:08 bulletinboard.debug.so -rwxr-xr-x 1 neiltiffin staff 61964 Jun 2 10:08 bulletinboard.so -rwxr-xr-x 1 neiltiffin staff 45868 Jun 2 10:09 eliza.debug.so -rwxr-xr-x 1 neiltiffin staff 38780 Jun 2 10:09 eliza.so -rwxr-xr-x 1 neiltiffin staff 13672 Jun 2 10:09 fireswamp.debug.so -rwxr-xr-x 1 neiltiffin staff 13672 Jun 2 10:09 fireswamp.so -rwxr-xr-x 1 neiltiffin staff 20264 Jun 2 10:09 wanderer.debug.so -rwxr-xr-x 1 neiltiffin staff 13880 Jun 2 10:09 wanderer.so Everything built fine, where are the other plugins (oddly enough these were all cpp plugins originally)? From the log 2008-06-02 10:15:33 Mon Jun 02, src/plugin_api.c , 291, smapi_log_warning: (WARNING) BulletinBoard plugin is deprecated, please do not use! 2008-06-02 10:15:33 Mon Jun 02, src/plugin_api.c , 291, smapi_log_warning: (WARNING) BulletinBoard plugin is deprecated, please do not use! 2008-06-02 10:15:33 Mon Jun 02, src/plugin_api.c , 291, smapi_log_warning: (WARNING) BulletinBoard plugin is deprecated, please do not use! 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: ParrySkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: PreemptSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: UnarmedSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: MagicShieldSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: WeapontypeSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: MagicShieldSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: EnergyDrainSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: InvisibilitySkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: InvulnerabilitySkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: GeneralSpell 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: PushSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: DisarmSkill 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: GeneralSpell 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: GeneralSpell 2008-06-02 10:15:33 Mon Jun 02, src/skill.c , 201, skill_install_plugin: (WARNING) could not find plugin: GeneralSpell |
From: Neil T. <ne...@ne...> - 2008-06-02 13:00:23
|
On Jun 1, 2008, at 11:38 PM, Koryn Grant wrote: > On 1/06/2008, at 9:48 AM, Neil Tiffin wrote: > >> src/spirit.c , 262, DEBUG : >> (spirit_parse_command) >> group >> src/spirit.c , 272, INFO : >> (spirit_parse_command) >> Received input line from neil01: group >> src/command.c , 322, DEBUG : (log_parse_command) >> group (token = <group>, remainder = <(null)>) invoked for Neil01. >> >> Program received signal EXC_BAD_ACCESS, Could not access memory. >> Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 > > All fixed now. > Almost, From the group help text: - "group" displays information about the current group. The F and P in the group information refer to Following (member is following the leader) and Present (member is in the same room as the leader). This would infer that rather than "return 1" that the command should be passed to group_do_command() to be processed their. From the following you will see that it appears that the command "group" which should be the same as "group info" is not working. n_mentor, test mentor room. n_mentor, test mentor room. There are several exits: [South, east, west] A knife mentor. Neil the feeble human-fighter. group join neil [ECHO] group join neil Group: Neil02 has been added to the group. >> Ok> group info [ECHO] group info >> Ok> group [ECHO] group Do you want to 'create' or 'join' a group? >> |
From: Koryn G. <kor...@gm...> - 2008-06-02 04:38:13
|
On 1/06/2008, at 9:48 AM, Neil Tiffin wrote: > src/spirit.c , 262, DEBUG : (spirit_parse_command) > group > src/spirit.c , 272, INFO : (spirit_parse_command) > Received input line from neil01: group > src/command.c , 322, DEBUG : (log_parse_command) > group (token = <group>, remainder = <(null)>) invoked for Neil01. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 All fixed now. Cheers, Koryn -- Koryn Grant Wellington, New Zealand |
From: Koryn G. <kor...@gm...> - 2008-06-02 04:17:50
|
On 2/06/2008, at 8:38 AM, Neil Tiffin wrote: > In the folder dist/HTML of a running system there does not seem to be > an "index.html" or other home page defined. Is this on purpose? Yes, looks like it. There doesn't appear to be any 'index.html' template in the OS 9 source. I probably figured that people would want to have their own. Cheers, Koryn -- Koryn Grant Wellington, New Zealand |
From: Koryn G. <kor...@gm...> - 2008-06-02 03:39:06
|
On 2/06/2008, at 5:48 AM, Neil Tiffin wrote: > When looking at the code I found a bunch of stuff like the following > (from thing_virtuals.c) > > unsigned int > thing_can_be_wielded(ThingPtr self) > { > SLASHLOG_DEBUG(""); > return 0; > } > > > void > thing_wield(ThingPtr self, unsigned int verbose) > { > SLASHLOG_DEBUG(""); > } > > Should these be marked as TODO? Nope, those are stubs because plain Things can't be wielded - only the Weapon subclass can. Cheers, Koryn -- Koryn Grant Wellington, New Zealand |
From: <nt...@us...> - 2008-06-02 01:23:23
|
Revision: 17 http://slashmud.svn.sourceforge.net/slashmud/?rev=17&view=rev Author: ntiffin Date: 2008-06-01 18:23:21 -0700 (Sun, 01 Jun 2008) Log Message: ----------- Start refactoring test code. Modified Paths: -------------- trunk/test/slashmud_test_common.py trunk/test/slashmud_test_config.py trunk/test/slashmud_test_misc.py trunk/test/slashmud_test_shop.py Added Paths: ----------- trunk/test/slashmud_test_newbie.py Property Changed: ---------------- trunk/test/slashmud_test_common.py trunk/test/slashmud_test_config.py trunk/test/slashmud_test_misc.py trunk/test/slashmud_test_shop.py Modified: trunk/test/slashmud_test_common.py =================================================================== --- trunk/test/slashmud_test_common.py 2008-06-01 23:43:32 UTC (rev 16) +++ trunk/test/slashmud_test_common.py 2008-06-02 01:23:21 UTC (rev 17) @@ -1,9 +1,10 @@ #!/sw/bin/python -# $Id: slashmud_test_common.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ +# $Id$ -# tested with python 2.4 # (c) 2005, 2006, 2007 Neil Tiffin +# (c) 2008 Performance Champions Inc. +# Tested with python 2.5.2 # Released under the SlashMUD License import sys @@ -18,311 +19,330 @@ test_living_commands = [] def calc_money( money_tuple ): - """ - Calculate the amount of money from individual denominations. - The Argument is a tuple with the following format: - (mithril, gold, silver, copper) - """ - return money_tuple[0] * 1000 + money_tuple[1] * 100 + money_tuple[2] * 10 + money_tuple[3] + """ + Calculate the amount of money from individual denominations. + The Argument is a tuple with the following format: + (mithril, gold, silver, copper) + """ + return money_tuple[0] * 1000 + money_tuple[1] * 100 + money_tuple[2] * 10 + money_tuple[3] def get_purse(): - """ - Get the amount of money from the purse. For example: - +-------- Purse of Neil ----------------------------------------+ - | 84 mithril. - | 4 gold. - | 3 silvers. - | 2 coppers. - +---------------------------------------------------------------+ - """ - global tn - tn.read_until(my_server_prompt, 2) - tn.write("purse\r\n") - mithril = 0 - gold = 0 - silver = 0 - copper = 0 - - string = ' ' - result = tn.read_until(my_server_prompt, 5) - print result - m = re.search(r'(\d+)\smithril', result) - if m != None: - string = m.group(1) - mithril = int(string) - m = re.search(r'(\d+)\sgold', result) - if m != None: - string = m.group(1) - gold = int(string) - m = re.search(r'(\d+)\ssilver', result) - if m != None: - string = m.group(1) - silver = int(string) - m = re.search(r'(\d+)\scopper', result) - if m != None: - string = m.group(1) - copper = int(string) - print (mithril, gold, silver, copper) - money = calc_money( (mithril, gold, silver, copper) ) - print_test_results(' Found in purse: %d' % (money) ) - return money - + """ + Get the amount of money from the purse. For example: + +-------- Purse of Neil ----------------------------------------+ + | 84 mithril. + | 4 gold. + | 3 silvers. + | 2 coppers. + +---------------------------------------------------------------+ + """ + global tn + tn.read_until(my_server_prompt, 2) + tn.write("purse\r\n") + mithril = 0 + gold = 0 + silver = 0 + copper = 0 + + string = ' ' + result = tn.read_until(my_server_prompt, 5) + print result + m = re.search(r'(\d+)\smithril', result) + if m != None: + string = m.group(1) + mithril = int(string) + m = re.search(r'(\d+)\sgold', result) + if m != None: + string = m.group(1) + gold = int(string) + m = re.search(r'(\d+)\ssilver', result) + if m != None: + string = m.group(1) + silver = int(string) + m = re.search(r'(\d+)\scopper', result) + if m != None: + string = m.group(1) + copper = int(string) + print (mithril, gold, silver, copper) + money = calc_money( (mithril, gold, silver, copper) ) + print_test_results(' Found in purse: %d' % (money) ) + return money + def get_score_details(): - """ - Result of score command - +-------- Agent Score for Neil ---------------------------------+ - | Neil the human. - | Class: None Score: 2923 Exploration: 0 - | Points: 1327/458 Victories: 0 Wimpy: 60 - | Hitpoints: 250 of 250. - | Spellpoints: 215 of 215. - | Charisma: 1 Initiative: 1 Intelligence: 25 - | Intuition: 25 Luck: 1 Skill: 25 - | Speed: 25 Stamina: 25 Strength: 25 - | You have been alive for 18 hours, 23 minutes and 42 seconds. - | Natural weapon (right hand): Up to 10 points of damage - | Natural weapon (left hand): Up to 10 points of damage - | Hunger: 0 Thirst: 100 Intoxication: 0 - +---------------------------------------------------------------+ - """ - global tests_passed, tests_failed, tn + """ + Result of score command + +-------- Agent Score for Neil ---------------------------------+ + | Neil the human. + | Class: None Score: 2923 Exploration: 0 + | Points: 1327/458 Victories: 0 Wimpy: 60 + | Hitpoints: 250 of 250. + | Spellpoints: 215 of 215. + | Charisma: 1 Initiative: 1 Intelligence: 25 + | Intuition: 25 Luck: 1 Skill: 25 + | Speed: 25 Stamina: 25 Strength: 25 + | You have been alive for 18 hours, 23 minutes and 42 seconds. + | Natural weapon (right hand): Up to 10 points of damage + | Natural weapon (left hand): Up to 10 points of damage + | Hunger: 0 Thirst: 100 Intoxication: 0 + +---------------------------------------------------------------+ + """ + global tests_passed, tests_failed, tn - tn.read_until(my_server_prompt, 2) - tn.write('score\r\n') - # time.sleep(2) - result = tn.read_until(my_server_prompt, 5) - print result - - score_details = {} - string = '' + tn.read_until(my_server_prompt, 2) + tn.write('score\r\n') + # time.sleep(2) + result = tn.read_until(my_server_prompt, 5) + print result + + score_details = {} + string = '' - m = re.search(r'Class\:\s+(\w+)', result) - if m != None: - string = m.group(1) - score_details["class"] = string + m = re.search(r'Class\:\s+(\w+)', result) + if m != None: + string = m.group(1) + score_details["class"] = string - m = re.search(r'Hitpoints\:.+?(\d+)\s+of\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["hitpoints"] = int(string) - string = m.group(2) - score_details["hitpoints_max"] = int(string) - - m = re.search(r'Spellpoints\:.+?(\d+)\s+of\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["spellpoints"] = int(string) - string = m.group(2) - score_details["spellpoints_max"] = int(string) - - m = re.search(r'Wimpy\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["wimpy"] = int(string) - - m = re.search(r'Victories\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["victories"] = int(string) - - m = re.search(r'Score\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["score"] = int(string) - - m = re.search(r'Exploration\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["exploration"] = int(string) - - m = re.search(r'Points\:\s+(\d+)\/(\d+)', result) - if m != None: - string = m.group(1) - score_details["spend_points"] = int(string) - string = m.group(2) - score_details["kill_points"] = int(string) - - m = re.search(r'Hunger\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["hunger"] = int(string) - - m = re.search(r'Thirst\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["thirst"] = int(string) - - m = re.search(r'Intoxication\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["intoxication"] = int(string) - - m = re.search(r'Charisma\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["charisma"] = int(string) - - m = re.search(r'Initiative\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["initiative"] = int(string) - - m = re.search(r'Intelligence\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["intelligence"] = int(string) - - m = re.search(r'Intuition\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["intuition"] = int(string) - - m = re.search(r'Luck\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["luck"] = int(string) - - m = re.search(r'Skill\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["skill"] = int(string) - - m = re.search(r'Speed\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["speed"] = int(string) - - m = re.search(r'Stamina\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["stamina"] = int(string) - - m = re.search(r'Strength\:\s+(\d+)', result) - if m != None: - string = m.group(1) - score_details["strength"] = int(string) - - return score_details + m = re.search(r'Hitpoints\:.+?(\d+)\s+of\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["hitpoints"] = int(string) + string = m.group(2) + score_details["hitpoints_max"] = int(string) + + m = re.search(r'Spellpoints\:.+?(\d+)\s+of\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["spellpoints"] = int(string) + string = m.group(2) + score_details["spellpoints_max"] = int(string) + + m = re.search(r'Wimpy\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["wimpy"] = int(string) + + m = re.search(r'Victories\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["victories"] = int(string) + + m = re.search(r'Score\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["score"] = int(string) + + m = re.search(r'Exploration\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["exploration"] = int(string) + + m = re.search(r'Points\:\s+(\d+)\/(\d+)', result) + if m != None: + string = m.group(1) + score_details["spend_points"] = int(string) + string = m.group(2) + score_details["kill_points"] = int(string) + + m = re.search(r'Hunger\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["hunger"] = int(string) + + m = re.search(r'Thirst\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["thirst"] = int(string) + + m = re.search(r'Intoxication\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["intoxication"] = int(string) + + m = re.search(r'Charisma\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["charisma"] = int(string) + + m = re.search(r'Initiative\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["initiative"] = int(string) + + m = re.search(r'Intelligence\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["intelligence"] = int(string) + + m = re.search(r'Intuition\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["intuition"] = int(string) + + m = re.search(r'Luck\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["luck"] = int(string) + + m = re.search(r'Skill\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["skill"] = int(string) + + m = re.search(r'Speed\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["speed"] = int(string) + + m = re.search(r'Stamina\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["stamina"] = int(string) + + m = re.search(r'Strength\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["strength"] = int(string) + + return score_details -def login_to_server(): - """ Open test file and log into server. """ - global test_file_results, tn - - test_file_results = open(my_results_file_path + my_results_file_name, my_results_file_wa) - print_test_results("\n---------------------------------------------------------------------") - print_test_results("Test File Open: " + my_results_file_path + my_results_file_name) - - print_test_results( "Test Started At: " + time.asctime(time.localtime()) ) - print_test_results( sys.version ) - - tn = telnetlib.Telnet(my_server_addr, my_server_port) - print_test_results("Connection Open To: " + my_server_addr + " " + my_server_port) - - print tn.read_until("character:") - tn.write(my_character_name + '\r\n') - - print tn.read_until("password:") - tn.write(my_character_password + '\r\n') - print_test_results("Logged In To Character: " + my_character_name) - print tn.read_until(my_server_prompt) - return tn +def open_test_output_file(path='', name='slashmud_test_results.txt', attr='wa'): + """ Open log file. """ + global test_results_file + test_results_file = open(path + name, attr) + print_test_results("\n---------------------------------------------------------------------") + print_test_results("Test File Open: " + path + name) +def login_to_server(name, password='', address='localhost', port='6100', gender='male', race='human'): + """ Log into server. """ + global test_results_file, tn + + if test_results_file==None: + open_test_output_file() + + print_test_results( "Test Started At: " + time.asctime(time.localtime()) ) + print_test_results( sys.version ) + + tn = telnetlib.Telnet(address, port) + print_test_results("Connection Open To: " + address + " " + port) + + print tn.read_until("character:") + tn.write(name + '\r\n') + + if password != '': + print tn.read_until("password:") + tn.write(password + '\r\n') + else: + # new characters are created with the password = to the name + print tn.read_until("password:") + tn.write(name + '\r\n') + print tn.read_until(my_server_prompt) + tn.write(gender + '\r\n') + print tn.read_until(my_server_prompt) + tn.write(race + '\r\n') + + print_test_results("Logged In character name: " + name) + print tn.read_until(my_server_prompt) + + return tn + + def logout_of_server(tn, tests_passed, tests_failed): - """ Logout, close files, and print summary results. """ - - print_test_results('\n\nSummary Results %d Passed, %d Failed\n' % (tests_passed, tests_failed) ) - if tests_failed != 0: - print_test_results('*********** Tests Failed ***********\n') - - test_file_results.close() - - # to end the connection, make sure we are in a known room - tn.write("teleport n_shop1\r\n") - print tn.read_until(my_server_prompt, 2) - tn.write("quit\r\n") - print tn.read_until(my_server_prompt, 2) - - time.sleep(2) # let server close the connection - tn.close() + """ Logout, close files, and print summary results. """ + + # to end the connection, make sure we are in a known room + tn.write("teleport n_shop1\r\n") + print tn.read_until(my_server_prompt, 2) + tn.write("quit\r\n") + print tn.read_until(my_server_prompt, 2) + print_test_results('\n\nSummary Results %d Passed, %d Failed\n' % (tests_passed, tests_failed) ) + if tests_failed != 0: + print_test_results('*********** Tests Failed ***********\n') + print_test_results( "\nTest Ended At: " + time.asctime(time.localtime()) ) + + test_results_file.close() + + time.sleep(2) # let server close the connection + tn.close() + def create_agent_commands(): - global test_agent_commands - # format of the commands - # ( command, arg1, arg1, arg3, arg4, success_string, failure_string) - - # ansi - # attach <object> [to] [<object>] - # attack - # badge [<local living>] - # body [<object>] - # clan - # class [<object>] - # coerce <target> <command> - # create <object> - # defend <object> - # drop <object> - # echo [<target>] <text> - # eq - # equipment - # events [<object>] - # exa - # examine [at][<object>][<direction>] - # find <item name> - # force - # frisk <local living> - # get <object> [from][<living>] - # gecho - # gecho - # goto <player> - # i - # inv - # inventory - # ip [<player>] - # listen - # lookall - # purse - # reclass - # reimburse <player> <integer> [<denomination>] - # renew - # restart [<seconds>] - # restore <target> [hitpoints | spellpoints | diseases | intoxication | hungar | thirst | gold | healing time] - # room - # score - # shape - # shutdown [<seconds>] - # sizeof [base | thing | armour | weapon | living | monster | player | room | game | attachment | skill | mood | social | race | door | armourtype | spirit | weapontype | plugin] - # skills - # snoop - # stat <local living> - test_agent_commands.append( ('stat', my_character_name, None, None, None, None, 'Sorry') ) - # teleport [<target>][to] <room name> - test_agent_commands.append( ('teleport', my_character_name, 'to', 'neilshop1a', None, None, 'Sorry') ) - # unlisten - # unsnoop - # visible (true | false ) - # where [all | living | monster | player] - # zap <local living> + global test_agent_commands + # format of the commands + # ( command, arg1, arg1, arg3, arg4, success_string, failure_string) + + # ansi + # attach <object> [to] [<object>] + # attack + # badge [<local living>] + # body [<object>] + # clan + # class [<object>] + # coerce <target> <command> + # create <object> + # defend <object> + # drop <object> + # echo [<target>] <text> + # eq + # equipment + # events [<object>] + # exa + # examine [at][<object>][<direction>] + # find <item name> + # force + # frisk <local living> + # get <object> [from][<living>] + # gecho + # gecho + # goto <player> + # i + # inv + # inventory + # ip [<player>] + # listen + # lookall + # purse + # reclass + # reimburse <player> <integer> [<denomination>] + # renew + # restart [<seconds>] + # restore <target> [hitpoints | spellpoints | diseases | intoxication | hungar | thirst | gold | healing time] + # room + # score + # shape + # shutdown [<seconds>] + # sizeof [base | thing | armour | weapon | living | monster | player | room | game | attachment | skill | mood | social | race | door | armourtype | spirit | weapontype | plugin] + # skills + # snoop + # stat <local living> + test_agent_commands.append( ('stat', my_character_name, None, None, None, None, 'Sorry') ) + # teleport [<target>][to] <room name> + test_agent_commands.append( ('teleport', my_character_name, 'to', 'neilshop1a', None, None, 'Sorry') ) + # unlisten + # unsnoop + # visible (true | false ) + # where [all | living | monster | player] + # zap <local living> def run_general_test_commands( command_list ): - for x in command_list: - if x[0] != None: - command = x[0] - else: - break; # error TODO - for y in [1, 2, 3, 4]: - if x[y] != None: - command = command + ' ' + x[y] - tn.write(command) - #TODO check command success + for x in command_list: + if x[0] != None: + command = x[0] + else: + break; # error TODO + for y in [1, 2, 3, 4]: + if x[y] != None: + command = command + ' ' + x[y] + tn.write(command) + #TODO check command success def print_test_results(string): - if my_print_to_file: - test_file_results.write(string + '\n') - if my_print_on_terminal: - print string + if my_print_to_file: + test_results_file.write(string + '\n') + if my_print_on_terminal: + print string Property changes on: trunk/test/slashmud_test_common.py ___________________________________________________________________ Name: svn:keywords + Date Author Revision Id Modified: trunk/test/slashmud_test_config.py =================================================================== --- trunk/test/slashmud_test_config.py 2008-06-01 23:43:32 UTC (rev 16) +++ trunk/test/slashmud_test_config.py 2008-06-02 01:23:21 UTC (rev 17) @@ -1,9 +1,10 @@ #!/sw/bin/python -# $Id: slashmud_test_config.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ +# $Id$ -# tested with python 2.4 # (c) 2007 Neil Tiffin +# (c) 2008 Performance Champions Inc. +# Tested with python 2.5.2 # Released under the SlashMUD License # ------------------------------------------------------------------ @@ -12,11 +13,6 @@ # my_character_password = 'nightmare' my_character_name = 'neil' -my_results_file_name = 'slashmud_test_results.txt' -my_results_file_wa = 'a' # 'a' for append, 'w' for write over -my_results_file_path = '' -my_server_addr = 'localhost' -my_server_port = '6100' my_server_prompt = 'Ok> ' my_print_on_terminal = 1 # 1 = true, 0 = false my_print_to_file = 1 # 1 = true, 0 = false Property changes on: trunk/test/slashmud_test_config.py ___________________________________________________________________ Name: svn:keywords + Date Author Revision Id Modified: trunk/test/slashmud_test_misc.py =================================================================== --- trunk/test/slashmud_test_misc.py 2008-06-01 23:43:32 UTC (rev 16) +++ trunk/test/slashmud_test_misc.py 2008-06-02 01:23:21 UTC (rev 17) @@ -1,9 +1,10 @@ #!/sw/bin/python -# $Id: slashmud_test_misc.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ +# $Id$ -# tested with python 2.4 # (c) 2005, 2006, 2007 Neil Tiffin +# (c) 2008 Performance Champions Inc. +# Tested with python 2.5.2 # Released under the SlashMUD License import sys @@ -82,7 +83,7 @@ ########################## # perform tests ########################## -tn = login_to_server() +tn = login_to_server('neil', 'nightmare', 'localhost', '6100') test_drink() Property changes on: trunk/test/slashmud_test_misc.py ___________________________________________________________________ Name: svn:keywords + Date Author Revision Id Added: trunk/test/slashmud_test_newbie.py =================================================================== --- trunk/test/slashmud_test_newbie.py (rev 0) +++ trunk/test/slashmud_test_newbie.py 2008-06-02 01:23:21 UTC (rev 17) @@ -0,0 +1,48 @@ +#!/sw/bin/python + +# $Id$ + +# (c) 2008 Performance Champions Inc. +# Tested with python 2.5.2 +# Released under the SlashMUD License + +import sys +import telnetlib +import time +import re +import sys + +############################### +# Global variables +############################### +tests_failed = 0 +tests_passed = 0 +tn = None +test_results_file = None +players = [] # Player names to use +agents = [] # Agent names to use + +from slashmud_test_config import * +from slashmud_test_common import * + +############################### +# Test Functions Follow +############################### + + + + +########################## +# perform tests +########################## +open_test_output_file() +tn = login_to_server() + + + + +########################## +#end tests +########################## +logout_of_server(tn, tests_passed, tests_failed) + Property changes on: trunk/test/slashmud_test_newbie.py ___________________________________________________________________ Name: svn:keywords + Date Author Revision Id Modified: trunk/test/slashmud_test_shop.py =================================================================== --- trunk/test/slashmud_test_shop.py 2008-06-01 23:43:32 UTC (rev 16) +++ trunk/test/slashmud_test_shop.py 2008-06-02 01:23:21 UTC (rev 17) @@ -1,9 +1,10 @@ #!/sw/bin/python -# $Id: slashmud_test_shop.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ +# $Id$ -# tested with python 2.4 # (c) 2005, 2006, 2007 Neil Tiffin +# (c) 2008 Performance Champions Inc. +# Tested with python 2.5.2 # Released under the SlashMUD License import sys @@ -18,7 +19,7 @@ tests_failed = 0 tests_passed = 0 tn = None -test_file_results = None +test_results_file = None from slashmud_test_config import * from slashmud_test_common import * @@ -124,7 +125,8 @@ ########################## # perform tests ########################## -tn = login_to_server() +open_test_output_file() +tn = login_to_server('neil', 'nightmare', 'localhost', '6100') create_agent_commands() test_buy_items_no_replenish() test_buy_items_no_replenish_followup() Property changes on: trunk/test/slashmud_test_shop.py ___________________________________________________________________ Name: svn:keywords + Date Author Revision Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nt...@us...> - 2008-06-01 23:43:36
|
Revision: 16 http://slashmud.svn.sourceforge.net/slashmud/?rev=16&view=rev Author: ntiffin Date: 2008-06-01 16:43:32 -0700 (Sun, 01 Jun 2008) Log Message: ----------- Add python server test code from cvs. Added Paths: ----------- trunk/test/ trunk/test/slashmud_test_common.py trunk/test/slashmud_test_config.py trunk/test/slashmud_test_misc.py trunk/test/slashmud_test_shop.py Added: trunk/test/slashmud_test_common.py =================================================================== --- trunk/test/slashmud_test_common.py (rev 0) +++ trunk/test/slashmud_test_common.py 2008-06-01 23:43:32 UTC (rev 16) @@ -0,0 +1,328 @@ +#!/sw/bin/python + +# $Id: slashmud_test_common.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ + +# tested with python 2.4 +# (c) 2005, 2006, 2007 Neil Tiffin +# Released under the SlashMUD License + +import sys +import telnetlib +import time +import re +import sys + +from slashmud_test_config import * + +test_agent_commands = [] +test_living_commands = [] + +def calc_money( money_tuple ): + """ + Calculate the amount of money from individual denominations. + The Argument is a tuple with the following format: + (mithril, gold, silver, copper) + """ + return money_tuple[0] * 1000 + money_tuple[1] * 100 + money_tuple[2] * 10 + money_tuple[3] + + +def get_purse(): + """ + Get the amount of money from the purse. For example: + +-------- Purse of Neil ----------------------------------------+ + | 84 mithril. + | 4 gold. + | 3 silvers. + | 2 coppers. + +---------------------------------------------------------------+ + """ + global tn + tn.read_until(my_server_prompt, 2) + tn.write("purse\r\n") + mithril = 0 + gold = 0 + silver = 0 + copper = 0 + + string = ' ' + result = tn.read_until(my_server_prompt, 5) + print result + m = re.search(r'(\d+)\smithril', result) + if m != None: + string = m.group(1) + mithril = int(string) + m = re.search(r'(\d+)\sgold', result) + if m != None: + string = m.group(1) + gold = int(string) + m = re.search(r'(\d+)\ssilver', result) + if m != None: + string = m.group(1) + silver = int(string) + m = re.search(r'(\d+)\scopper', result) + if m != None: + string = m.group(1) + copper = int(string) + print (mithril, gold, silver, copper) + money = calc_money( (mithril, gold, silver, copper) ) + print_test_results(' Found in purse: %d' % (money) ) + return money + + +def get_score_details(): + """ + Result of score command + +-------- Agent Score for Neil ---------------------------------+ + | Neil the human. + | Class: None Score: 2923 Exploration: 0 + | Points: 1327/458 Victories: 0 Wimpy: 60 + | Hitpoints: 250 of 250. + | Spellpoints: 215 of 215. + | Charisma: 1 Initiative: 1 Intelligence: 25 + | Intuition: 25 Luck: 1 Skill: 25 + | Speed: 25 Stamina: 25 Strength: 25 + | You have been alive for 18 hours, 23 minutes and 42 seconds. + | Natural weapon (right hand): Up to 10 points of damage + | Natural weapon (left hand): Up to 10 points of damage + | Hunger: 0 Thirst: 100 Intoxication: 0 + +---------------------------------------------------------------+ + """ + global tests_passed, tests_failed, tn + + tn.read_until(my_server_prompt, 2) + tn.write('score\r\n') + # time.sleep(2) + result = tn.read_until(my_server_prompt, 5) + print result + + score_details = {} + string = '' + + m = re.search(r'Class\:\s+(\w+)', result) + if m != None: + string = m.group(1) + score_details["class"] = string + + m = re.search(r'Hitpoints\:.+?(\d+)\s+of\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["hitpoints"] = int(string) + string = m.group(2) + score_details["hitpoints_max"] = int(string) + + m = re.search(r'Spellpoints\:.+?(\d+)\s+of\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["spellpoints"] = int(string) + string = m.group(2) + score_details["spellpoints_max"] = int(string) + + m = re.search(r'Wimpy\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["wimpy"] = int(string) + + m = re.search(r'Victories\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["victories"] = int(string) + + m = re.search(r'Score\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["score"] = int(string) + + m = re.search(r'Exploration\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["exploration"] = int(string) + + m = re.search(r'Points\:\s+(\d+)\/(\d+)', result) + if m != None: + string = m.group(1) + score_details["spend_points"] = int(string) + string = m.group(2) + score_details["kill_points"] = int(string) + + m = re.search(r'Hunger\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["hunger"] = int(string) + + m = re.search(r'Thirst\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["thirst"] = int(string) + + m = re.search(r'Intoxication\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["intoxication"] = int(string) + + m = re.search(r'Charisma\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["charisma"] = int(string) + + m = re.search(r'Initiative\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["initiative"] = int(string) + + m = re.search(r'Intelligence\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["intelligence"] = int(string) + + m = re.search(r'Intuition\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["intuition"] = int(string) + + m = re.search(r'Luck\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["luck"] = int(string) + + m = re.search(r'Skill\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["skill"] = int(string) + + m = re.search(r'Speed\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["speed"] = int(string) + + m = re.search(r'Stamina\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["stamina"] = int(string) + + m = re.search(r'Strength\:\s+(\d+)', result) + if m != None: + string = m.group(1) + score_details["strength"] = int(string) + + return score_details + + +def login_to_server(): + """ Open test file and log into server. """ + global test_file_results, tn + + test_file_results = open(my_results_file_path + my_results_file_name, my_results_file_wa) + print_test_results("\n---------------------------------------------------------------------") + print_test_results("Test File Open: " + my_results_file_path + my_results_file_name) + + print_test_results( "Test Started At: " + time.asctime(time.localtime()) ) + print_test_results( sys.version ) + + tn = telnetlib.Telnet(my_server_addr, my_server_port) + print_test_results("Connection Open To: " + my_server_addr + " " + my_server_port) + + print tn.read_until("character:") + tn.write(my_character_name + '\r\n') + + print tn.read_until("password:") + tn.write(my_character_password + '\r\n') + print_test_results("Logged In To Character: " + my_character_name) + print tn.read_until(my_server_prompt) + return tn + + +def logout_of_server(tn, tests_passed, tests_failed): + """ Logout, close files, and print summary results. """ + + print_test_results('\n\nSummary Results %d Passed, %d Failed\n' % (tests_passed, tests_failed) ) + if tests_failed != 0: + print_test_results('*********** Tests Failed ***********\n') + + test_file_results.close() + + # to end the connection, make sure we are in a known room + tn.write("teleport n_shop1\r\n") + print tn.read_until(my_server_prompt, 2) + tn.write("quit\r\n") + print tn.read_until(my_server_prompt, 2) + + time.sleep(2) # let server close the connection + tn.close() + +def create_agent_commands(): + global test_agent_commands + # format of the commands + # ( command, arg1, arg1, arg3, arg4, success_string, failure_string) + + # ansi + # attach <object> [to] [<object>] + # attack + # badge [<local living>] + # body [<object>] + # clan + # class [<object>] + # coerce <target> <command> + # create <object> + # defend <object> + # drop <object> + # echo [<target>] <text> + # eq + # equipment + # events [<object>] + # exa + # examine [at][<object>][<direction>] + # find <item name> + # force + # frisk <local living> + # get <object> [from][<living>] + # gecho + # gecho + # goto <player> + # i + # inv + # inventory + # ip [<player>] + # listen + # lookall + # purse + # reclass + # reimburse <player> <integer> [<denomination>] + # renew + # restart [<seconds>] + # restore <target> [hitpoints | spellpoints | diseases | intoxication | hungar | thirst | gold | healing time] + # room + # score + # shape + # shutdown [<seconds>] + # sizeof [base | thing | armour | weapon | living | monster | player | room | game | attachment | skill | mood | social | race | door | armourtype | spirit | weapontype | plugin] + # skills + # snoop + # stat <local living> + test_agent_commands.append( ('stat', my_character_name, None, None, None, None, 'Sorry') ) + # teleport [<target>][to] <room name> + test_agent_commands.append( ('teleport', my_character_name, 'to', 'neilshop1a', None, None, 'Sorry') ) + # unlisten + # unsnoop + # visible (true | false ) + # where [all | living | monster | player] + # zap <local living> + + +def run_general_test_commands( command_list ): + for x in command_list: + if x[0] != None: + command = x[0] + else: + break; # error TODO + for y in [1, 2, 3, 4]: + if x[y] != None: + command = command + ' ' + x[y] + tn.write(command) + #TODO check command success + + +def print_test_results(string): + if my_print_to_file: + test_file_results.write(string + '\n') + if my_print_on_terminal: + print string Added: trunk/test/slashmud_test_config.py =================================================================== --- trunk/test/slashmud_test_config.py (rev 0) +++ trunk/test/slashmud_test_config.py 2008-06-01 23:43:32 UTC (rev 16) @@ -0,0 +1,26 @@ +#!/sw/bin/python + +# $Id: slashmud_test_config.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ + +# tested with python 2.4 +# (c) 2007 Neil Tiffin +# Released under the SlashMUD License + +# ------------------------------------------------------------------ +# configurable variables +# to run tests on your system change these variables as necessary +# +my_character_password = 'nightmare' +my_character_name = 'neil' +my_results_file_name = 'slashmud_test_results.txt' +my_results_file_wa = 'a' # 'a' for append, 'w' for write over +my_results_file_path = '' +my_server_addr = 'localhost' +my_server_port = '6100' +my_server_prompt = 'Ok> ' +my_print_on_terminal = 1 # 1 = true, 0 = false +my_print_to_file = 1 # 1 = true, 0 = false +# +# end of configurable variables +# you should not have to change anything below this line +# ------------------------------------------------------------------ Added: trunk/test/slashmud_test_misc.py =================================================================== --- trunk/test/slashmud_test_misc.py (rev 0) +++ trunk/test/slashmud_test_misc.py 2008-06-01 23:43:32 UTC (rev 16) @@ -0,0 +1,94 @@ +#!/sw/bin/python + +# $Id: slashmud_test_misc.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ + +# tested with python 2.4 +# (c) 2005, 2006, 2007 Neil Tiffin +# Released under the SlashMUD License + +import sys +import telnetlib +import time +import re +import sys + +from slashmud_test_config import * +from slashmud_test_common import * + +tests_failed = 0 +tests_passed = 0 +test_agent_commands = [] +test_living_commands = [] + +def test_drink(): + """Test fountains.""" + global tests_passed, tests_failed, tn + + tn.write("teleport n_fountains\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + score = get_score_details() + thirst = score.get("thirst") + tox = score.get("intoxication") + if thirst >= 100: + tests_failed += 1 + print_test_results("** Failed, thirst already at %d, can't go higher. **********" % (thirst)) + else: + print_test_results('\nStart Test: %s' % ('thirst')) + print score + tn.write("drink water\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + score = get_score_details() + after_thirst = score.get("thirst") + print_test_results(" Thirst Effect: %d" % (after_thirst - thirst )) + if after_thirst == thirst + 10: + tests_passed += 1 + else: + tests_failed += 1 + # TODO finish test evaluation + + +def test_load_all_plugins(): + """Test plugins buy running around to each room and loading them.""" + global tests_passed, tests_failed, tn + + tn.write("teleport n_mentor\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_treknobabbler\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_fireswamp\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_gate2\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_advance\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_spouter\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_eliza\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_rent\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + + tn.write("teleport n_autodestruct\r\n") + print_test_results( tn.read_until(my_server_prompt) ) + +########################## +# perform tests +########################## +tn = login_to_server() + +test_drink() + +test_load_all_plugins() + +########################## +#end tests +########################## +logout_of_server(tn, tests_passed, tests_failed) Added: trunk/test/slashmud_test_shop.py =================================================================== --- trunk/test/slashmud_test_shop.py (rev 0) +++ trunk/test/slashmud_test_shop.py 2008-06-01 23:43:32 UTC (rev 16) @@ -0,0 +1,141 @@ +#!/sw/bin/python + +# $Id: slashmud_test_shop.py,v 1.1 2007/06/10 20:41:15 ntiffin Exp $ + +# tested with python 2.4 +# (c) 2005, 2006, 2007 Neil Tiffin +# Released under the SlashMUD License + +import sys +import telnetlib +import time +import re +import sys + +############################### +# Global variables +############################### +tests_failed = 0 +tests_passed = 0 +tn = None +test_file_results = None + +from slashmud_test_config import * +from slashmud_test_common import * + +############################### +# Test Functions Follow +############################### + +def test_check_purse( needed_value ): + """ Validates the purse to have more money than the needed_value.""" + global tests_passed, tests_failed + print_test_results('\nCheck Initial Purse Value') + if needed_value <= 0: + print_test_results('** Failed to specify enough purse value ***************') + tests_failed += 1 + return 0 + before_buy = get_purse() + if before_buy >= needed_value: + print_test_results(' Found Enough Purse Value') + tests_passed += 1 + return before_buy + print_test_results('** Failed to Find Enough Purse Value ***************') + tests_failed += 1 + return 0 + + +def test_exhausted_items(): + """ Validates that no items remain in the shop.""" + global tn + global tests_passed, tests_failed + tn.write("list\r\n") + print_test_results('\nStart Item Exhausted Test') + test_string = "says, 'We do not have" + result = tn.read_until(test_string, 5) + if result.find(test_string) != -1: + print_test_results(" Item Exhausted Success") + tests_passed += 1 + return 1 + # print_test_results(result) + print_test_results("** Item Exhausted Failed **********") + tests_failed += 1 + return 0 + + +def test_buy_item( buy_item, before_buy_amount, buy_amount_tuple ): + global tests_passed, tests_failed, tn + + print_test_results('\nStart Test: %s' % ('buy ' + buy_item)) + tn.write('buy ' + buy_item + '\r\n') + after_buy = get_purse() + should_be = before_buy_amount - calc_money( buy_amount_tuple ) + print_test_results(' Before Buy: %d, After Buy: %d, After Should be: %d' % (before_buy_amount, after_buy, should_be) ) + if after_buy == should_be: + print_test_results(' Passed') + tests_passed += 1 + else: + print_test_results('** Failed **********') + tests_failed += 1 + return after_buy + + +def test_buy_items_no_replenish_followup(): + """Should be run after test_buy_items_no_replenish() and a suitable + time has elapsed to assure items did not show up again.""" + global tn + tn.write("teleport n_shop1b\r\n") + print tn.read_until(my_server_prompt) + test_exhausted_items() + print_test_results(" Exhausted items tested at: " + time.asctime(time.localtime())) + return + + +def test_buy_items_no_replenish(): + """test buying items that do not replinish. """ + tn.write("teleport n_shop1b\r\n") + time.sleep(1) + print tn.read_until(my_server_prompt) + + tn.write("list\r\n") + time.sleep(1) + print tn.read_until(my_server_prompt) + print tn.read_until(my_server_prompt, 2) + + before_buy = test_check_purse(120000) + if before_buy: + before_buy = test_buy_item('shield1', before_buy, (0, 0, 0, 1)) + before_buy = test_buy_item('shield2', before_buy, (0, 0, 0, 2)) + before_buy = test_buy_item('shield4', before_buy, (0, 0, 0, 9)) + before_buy = test_buy_item('shield5', before_buy, (0, 0, 1, 0)) + before_buy = test_buy_item('shield6', before_buy, (0, 0, 1, 1)) + before_buy = test_buy_item('shield7', before_buy, (0, 0, 9, 9)) + before_buy = test_buy_item('shield8', before_buy, (0, 1, 0, 0)) + before_buy = test_buy_item('shield9', before_buy, (0, 1, 0, 1)) + before_buy = test_buy_item('shield10', before_buy, (0, 9, 9, 9)) + before_buy = test_buy_item('shield11', before_buy, (1, 0, 0, 0)) + before_buy = test_buy_item('shield12', before_buy, (1, 0, 0, 1)) + before_buy = test_buy_item('shield13', before_buy, (10, 0, 0, 1)) + + print_test_results(" Last item bought at: " + time.asctime(time.localtime())) + return + + +########################## +# perform tests +########################## +tn = login_to_server() +create_agent_commands() +test_buy_items_no_replenish() +test_buy_items_no_replenish_followup() + +# delay +time.sleep(60) + +# run this test again at end just to be sure items did not show up +test_buy_items_no_replenish_followup() +########################## +#end tests +########################## +logout_of_server(tn, tests_passed, tests_failed) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Neil T. <ne...@ne...> - 2008-06-01 20:38:39
|
In the folder dist/HTML of a running system there does not seem to be an "index.html" or other home page defined. Is this on purpose? Neil |
From: <nt...@us...> - 2008-06-01 19:26:23
|
Revision: 15 http://slashmud.svn.sourceforge.net/slashmud/?rev=15&view=rev Author: ntiffin Date: 2008-06-01 12:26:22 -0700 (Sun, 01 Jun 2008) Log Message: ----------- Update scripts, remove incorrect stuff from docs, revise bulletboard to return version. Modified Paths: -------------- trunk/plugins/BountyHunter/README trunk/plugins/BulletinBoard/BulletinBoard.cc trunk/scripts/open_plugins_bbedit.sh trunk/scripts/runServerDebug.sh trunk/world/Documentation/thing.sdoc Modified: trunk/plugins/BountyHunter/README =================================================================== --- trunk/plugins/BountyHunter/README 2008-05-18 21:10:40 UTC (rev 14) +++ trunk/plugins/BountyHunter/README 2008-06-01 19:26:22 UTC (rev 15) @@ -7,10 +7,6 @@ bountyhunter-race <racename> # The name of the race to attack. -bountyhunter-name <name> -# The name of this monsters. -# Defaults to "bounty hunter" - bountyhunter-level <level> # The level of this monster. # Defaults to 15. @@ -18,11 +14,3 @@ bountyhunter-short-desc <description> # The short description of this monster. # Defaults to "A combat-hardened bounty hunter." - -bountyhunter-alias <alias> -# The alias' for this monster. -# Defaults to "bounty hunter mercenary" - -bountyhunter-gender <gender> -# Defaults to "male". -# Values are "male", "female", "neuter" Modified: trunk/plugins/BulletinBoard/BulletinBoard.cc =================================================================== --- trunk/plugins/BulletinBoard/BulletinBoard.cc 2008-05-18 21:10:40 UTC (rev 14) +++ trunk/plugins/BulletinBoard/BulletinBoard.cc 2008-06-01 19:26:22 UTC (rev 15) @@ -9,6 +9,8 @@ This source file is distributed under the terms of "The SlashMUD Licence". + ** DEPRECATED ** + Created: 15 December 1999 by Neil Tiffin. ------------------------------------------------------------------------------ */ @@ -113,10 +115,44 @@ { smapi_log_warning("BulletinBoard plugin is deprecated, please do not use!"); - return; switch (event_code) { + + case kPluginQueryInfo: + { + ListPtr list = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); + + if (list) + { + const char *line; + +#ifndef NDEBUG + line = smapi_get_string("Name: " PLUGIN_NAME " (debug)"); +#else + line = smapi_get_string("Name: " PLUGIN_NAME " (build)"); +#endif /* NDEBUG */ + kg_list_add_last(list, (Ptr) line); + + line = smapi_get_string("Id: $Id$"); + kg_list_add_last(list, (Ptr) line); + + line = smapi_get_string("Author: Neil Tiffin"); + kg_list_add_last(list, (Ptr) line); + + smapi_set_query_info(event_ref, list); + } + } + break; + } +} + +void +old_plugin_main(void *instance_data, unsigned int event_code, unsigned int event_ref) +{ + switch (event_code) + { + case kPluginUpdate: pi_update((InstanceDataPtr) instance_data); break; Modified: trunk/scripts/open_plugins_bbedit.sh =================================================================== --- trunk/scripts/open_plugins_bbedit.sh 2008-05-18 21:10:40 UTC (rev 14) +++ trunk/scripts/open_plugins_bbedit.sh 2008-06-01 19:26:22 UTC (rev 15) @@ -14,6 +14,7 @@ bbedit ../plugins/Dragonbane/dragonbane.c bbedit ../plugins/EnergyDrainAttachment/energydrainattachment.c bbedit ../plugins/EnergyDrainSkill/energydrainskill.c +bbedit ../plugins/FireSwamp/fireswamp.c bbedit ../plugins/Fountain/fountain.c bbedit ../plugins/Gate/gate.c bbedit ../plugins/GeneralSpell/generalspell.c @@ -46,18 +47,17 @@ bbedit ../plugins/TestCPluginThing/testcpluginthing.c bbedit ../plugins/TheTrash/thetrash.c bbedit ../plugins/Torch/torch.c -bbedit ../plugins/Treknobabbler/treknobabbler.c -bbedit ../plugins/TriggerAttachment/triggerattachment.c -bbedit ../plugins/UnarmedSkill/unarmedskill.c -bbedit ../plugins/VirusAttachment/virusattachment.c -bbedit ../plugins/WaterSkin/waterskin.c -bbedit ../plugins/WeapontypeSkill/weapontypeskill.c +bbedit ../plugins/Treknobabbler/treknobabbler.c +bbedit ../plugins/TriggerAttachment/triggerattachment.c +bbedit ../plugins/UnarmedSkill/unarmedskill.c +bbedit ../plugins/VirusAttachment/virusattachment.c +bbedit ../plugins/Wanderer/wanderer.c +bbedit ../plugins/WaterSkin/waterskin.c +bbedit ../plugins/WeapontypeSkill/weapontypeskill.c bbedit --new-window ../plugins/BulletinBoard/BulletinBoard.cc bbedit ../plugins/BulletinBoard/Message.cc bbedit ../plugins/BulletinBoard/MessageList.cc bbedit ../plugins/Eliza/eliza.cc -bbedit ../plugins/FireSwamp/fireswamp.cc bbedit ../plugins/QuestMaster/questmaster.cc -bbedit ../plugins/Wanderer/wanderer.cc Modified: trunk/scripts/runServerDebug.sh =================================================================== --- trunk/scripts/runServerDebug.sh 2008-05-18 21:10:40 UTC (rev 14) +++ trunk/scripts/runServerDebug.sh 2008-06-01 19:26:22 UTC (rev 15) @@ -3,9 +3,15 @@ # Remove log files. echo "" echo "Removing log files in 3 seconds..." +echo "" sleep 3 rm -f -v ../dist/Logs/* +if [ -f ../dist/Plugins/README ]; then + echo "" + rm -fv ../dist/Plugins/README +fi + # Determine if gdb is available. if [ -f /usr/bin/gdb ]; then Modified: trunk/world/Documentation/thing.sdoc =================================================================== --- trunk/world/Documentation/thing.sdoc 2008-05-18 21:10:40 UTC (rev 14) +++ trunk/world/Documentation/thing.sdoc 2008-06-01 19:26:22 UTC (rev 15) @@ -1,43 +1,20 @@ Things ====== -begin-syntax -name <text> -# The name of the Thing. Ignored if the Thing is a PluginWeapon or PluginThing, in which case the name of the file is the name of the Thing. Don't begin your name with "a", "an" or "the". The server may add these to the beginning of the name in certain cases. +Object Hierarchy: base -> thing -alias <wordlist> -# A space-delimited list of aliases for the Thing. +When defining a thing it also accepts keywords for a base object. -short <text> -# The short description of the Thing. - -long <text> -# Lines beginning with 'long' are the long description for the Thing. You can use colour codes and the following special tokens in long descriptions: - -# %self -# is replaced by the name of the Thing. -# -# %target -# is replaced by the name of the creature that is shown the long description, i.e. examines the Thing. - +begin-syntax liardn <text> # The text that is displayed when the item is Lying In A Room Doing Nothing. location <wordlist> # A space-delimited list of body parts that the Thing covers/requires for use. This is primarily used for Weapons and Armours, and determines where they are located. -size smallest|smaller|small|normal|large|larger|largest -# The size of the Thing. Used for armours and weapons to determine if a creature can use the item. The default is normal. - usage-count <integer>|infinite # For armours and weapons, the number of times the item can be used. Once this reaches zero, the item disintegrates. -light <boolean> -# Whether or not the Thing provides light to whoever is carrying it. - -weight <integer> -# The weight of the Thing. - value <integer> # The nominal value of the Thing. The actual value depends on the current rate of inflation in the MUD. @@ -47,24 +24,18 @@ trashable <boolean> # Whether the Thing can be trashed or not. -visible <boolean> -# Whether the Thing is visible or not. - intelligence <integer> <integer> <integer> intuition <integer> <integer> <integer> skill <integer> <integer> <integer> stamina <integer> <integer> <integer> strength <integer> <integer> <integer> alignment <integer> <integer> <integer> -level <integer> <integer> <integer> -end-syntax - # The first value is the effect that the Thing has on the stat of the wearer/wielder. The second value is the minimum value of the stat required to wield/wear the Thing is the second integer, and the third value is the maximum value of the stat. A value of - is used to indicate that the corresponding field is ignored, e.g. - # strength - 14 - - # means that the Thing requires a minimum of 14 strength to use. These only affect Things that can be used, e.g. Armours and Weapons. recovery-chance <integer> # Chance out of 1000 that this object will be available for use when a monster carrying it is killed. +end-syntax + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Neil T. <ne...@ne...> - 2008-06-01 17:49:16
|
When looking at the code I found a bunch of stuff like the following (from thing_virtuals.c) unsigned int thing_can_be_wielded(ThingPtr self) { SLASHLOG_DEBUG(""); return 0; } void thing_wield(ThingPtr self, unsigned int verbose) { SLASHLOG_DEBUG(""); } Should these be marked as TODO? Neil |
From: Neil T. <ne...@ne...> - 2008-05-31 21:48:39
|
src/spirit.c , 262, DEBUG : (spirit_parse_command) group src/spirit.c , 272, INFO : (spirit_parse_command) Received input line from neil01: group src/command.c , 322, DEBUG : (log_parse_command) group (token = <group>, remainder = <(null)>) invoked for Neil01. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x0003945d in living_group_command_parse (self=0x20c910, invoker=0x879840, token=0xbfffe288 "group", remainder=0x0) at src/ living_commands.c:1060 1060 if (strncmp(cmd_token, "create", 7) == 0) (gdb) bt #0 0x0003945d in living_group_command_parse (self=0x20c910, invoker=0x879840, token=0xbfffe288 "group", remainder=0x0) at src/ living_commands.c:1060 #1 0x000290b2 in virtual_command_parse (self=0x20c910, living=0x879840, token=0xbfffe288 "group", remainder=0x0) at src/ command.c:217 #2 0x00058b4b in living_parse_command (self=0x879840, token=0xbfffe288 "group", remainder=0x0) at src/living_virtuals.c:663 #3 0x000768d7 in player_parse_command (living=0x879840, token=0xbfffe288 "group", remainder=0x0) at src/player_overrides.c:1118 #4 0x000c7c2c in virtual_parse_command (self=0x879840, token=0xbfffe288 "group", remainder=0x0) at src/virtuals.c:1006 #5 0x00058e44 in living_parse_spirit_command (self=0x879840, line=0xbfffe694 "group") at src/living_virtuals.c:714 #6 0x000767ba in player_parse_spirit_command (living=0x879840, line=0xbfffe694 "group") at src/player_overrides.c:1093 #7 0x000c7c88 in virtual_parse_spirit_command (self=0x879840, line=0xbfffe694 "group") at src/virtuals.c:1018 #8 0x000b31e0 in spirit_parse_command (spirit=0x6c5de0, input=0xbfffe694 "group") at src/spirit.c:280 #9 0x0006f09b in parse_data (connection=0x6c5fc0, buffer=0xbfffefe7 "group\r\n??", buflen=7) at src/networking.c:576 #10 0x0006f1fd in read_data (connection=0x6c5fc0) at src/networking.c: 630 #11 0x0006f5dd in process_network () at src/networking.c:755 #12 0x000ae0c9 in server_event_loop () at src/server.c:1612 #13 0x000502a2 in main (argc=6, argv=0xbffff44c) at src/main.c:112 To create: 1. create a new player 2. type "group" |
From: <ko...@us...> - 2008-05-18 21:10:52
|
Revision: 14 http://slashmud.svn.sourceforge.net/slashmud/?rev=14&view=rev Author: koryn Date: 2008-05-18 14:10:40 -0700 (Sun, 18 May 2008) Log Message: ----------- Added svn keywords. Modified Paths: -------------- trunk/plugins/CommonPluginSources/plugin_utilities.c trunk/plugins/CommonPluginSources/plugin_utilities.h trunk/slashlex/scanner.c Property Changed: ---------------- trunk/plugins/CommonPluginSources/plugin_utilities.c trunk/plugins/CommonPluginSources/plugin_utilities.h trunk/slashlex/scanner.c Modified: trunk/plugins/CommonPluginSources/plugin_utilities.c =================================================================== --- trunk/plugins/CommonPluginSources/plugin_utilities.c 2008-05-10 05:51:19 UTC (rev 13) +++ trunk/plugins/CommonPluginSources/plugin_utilities.c 2008-05-18 21:10:40 UTC (rev 14) @@ -13,7 +13,7 @@ Converted to C, 4 July 2003 Neil Tiffin - $Header: /cvsroot/slashmud/slashmudx/plugins/CommonPluginSources/plugin_utilities.c,v 1.8 2007/04/15 21:51:58 ntiffin Exp $ + $Id$ ------------------------------------------------------------------------------ */ Property changes on: trunk/plugins/CommonPluginSources/plugin_utilities.c ___________________________________________________________________ Name: svn:keywords - Date Author Revision Id + Id Modified: trunk/plugins/CommonPluginSources/plugin_utilities.h =================================================================== --- trunk/plugins/CommonPluginSources/plugin_utilities.h 2008-05-10 05:51:19 UTC (rev 13) +++ trunk/plugins/CommonPluginSources/plugin_utilities.h 2008-05-18 21:10:40 UTC (rev 14) @@ -13,7 +13,7 @@ Converted to C, 4 July 2003 Neil Tiffin - $Header: /cvsroot/slashmud/slashmudx/plugins/CommonPluginSources/plugin_utilities.h,v 1.3 2004/03/29 10:51:28 koryn Exp $ + $Id$ ------------------------------------------------------------------------------ */ #ifndef PLUGIN_UTILITIES_H Property changes on: trunk/plugins/CommonPluginSources/plugin_utilities.h ___________________________________________________________________ Name: svn:keywords - Date Author Revision Id + Id Modified: trunk/slashlex/scanner.c =================================================================== --- trunk/slashlex/scanner.c 2008-05-10 05:51:19 UTC (rev 13) +++ trunk/slashlex/scanner.c 2008-05-18 21:10:40 UTC (rev 14) @@ -1,9 +1,12 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/slashmud/slashmudx/slashlex/scanner.c,v 1.8 2005/05/08 02:15:57 koryn Exp $ + * $Header: /cvs/root/flex/flex/skel.c,v 1.1.1.1 1999/04/23 00:46:30 wsanchez Exp $ */ +/* $Id$ */ + + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 Property changes on: trunk/slashlex/scanner.c ___________________________________________________________________ Name: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2008-05-10 05:51:28
|
Revision: 13 http://slashmud.svn.sourceforge.net/slashmud/?rev=13&view=rev Author: koryn Date: 2008-05-09 22:51:19 -0700 (Fri, 09 May 2008) Log Message: ----------- Build 3259: fixed portal self-test bug (finally). Modified Paths: -------------- trunk/NEWS trunk/TODO trunk/src/config.h trunk/src/portal_object.c trunk/src/self_test.c trunk/src/version.c Property Changed: ---------------- trunk/NEWS trunk/TODO Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-05-07 09:51:23 UTC (rev 12) +++ trunk/NEWS 2008-05-10 05:51:19 UTC (rev 13) @@ -1,8 +1,26 @@ -$Header: /cvsroot/slashmud/slashmudx/NEWS,v 1.69 2008/04/21 03:57:00 koryn Exp $ +$Id$ Previous changes, most recent first: + 98542 235695 2475658 total +Auto-incrementing build number to 3259. +* 99 FIXMEs remaining in src/. +* 80 TODOs remaining in src/. +* 10 FIXMEs remaining in plugins/. +* 260 TODOs remaining in plugins/. + + +* [FEATURE] Creatures heal quicker when they have less than a third of their HP remaining. + +* [FEATURE] Server now initiates a restart when sent a SIGHUP. + +* [INTERNAL] Implemented many FIXME and TODO items. + +* [SELFTEST] Fixed bug in portal selftest. + +------------------------------------------------------------------------------- + 98379 235548 2473524 total Auto-incrementing build number to 3195. * 112 FIXMEs remaining in src/. Property changes on: trunk/NEWS ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/TODO =================================================================== --- trunk/TODO 2008-05-07 09:51:23 UTC (rev 12) +++ trunk/TODO 2008-05-10 05:51:19 UTC (rev 13) @@ -1,24 +1,16 @@ -$Header: /cvsroot/slashmud/slashmudx/TODO,v 1.194 2008/04/25 05:26:13 koryn Exp $ +$Id$ * REMEMBER TO INCLUDE THE BUILD NUMBER IN THE CVS LOG MESSAGE. - 98454 235542 2476290 total -Auto-incrementing build number to 3235. + 98542 235695 2475658 total +Auto-incrementing build number to 3259. * 99 FIXMEs remaining in src/. * 80 TODOs remaining in src/. * 10 FIXMEs remaining in plugins/. * 260 TODOs remaining in plugins/. -* [FEATURE] Creatures heal quicker when they have less than a third of their HP remaining. - -* [FEATURE] Server now initiates a restart when sent a SIGHUP. - -* [INTERNAL] Implemented many FIXME and TODO items. - -* [SELFTEST] Fixed bug in portal selftest. - ------------------------------------------------------------------------------- * [BUG] (Koryn) Agents can't examine items by ID. Property changes on: trunk/TODO ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/config.h =================================================================== --- trunk/src/config.h 2008-05-07 09:51:23 UTC (rev 12) +++ trunk/src/config.h 2008-05-10 05:51:19 UTC (rev 13) @@ -185,22 +185,22 @@ #define SELECT_TYPE_ARG5 (struct timeval *) /* build version C compiler flags. */ -#define SLASHMUD_BUILD_CFLAGS " -Wall -I/Users/koryn/development/temp2/slashmud/trunk/libraries/kdg/include -std=c99 -no-cpp-precomp -Werror-implicit-function-declaration -O2 -finline-functions" +#define SLASHMUD_BUILD_CFLAGS " -Wall -I/Users/koryn/development/slashmudx/slashmud/trunk/libraries/kdg/include -std=c99 -no-cpp-precomp -Werror-implicit-function-declaration -O2 -finline-functions" /* build version C++ compiler flags. */ -#define SLASHMUD_BUILD_CXXFLAGS " -Wall -Wall -I/Users/koryn/development/temp2/slashmud/trunk/libraries/kdg/include -no-cpp-precomp -O2 -finline-functions" +#define SLASHMUD_BUILD_CXXFLAGS " -Wall -Wall -I/Users/koryn/development/slashmudx/slashmud/trunk/libraries/kdg/include -no-cpp-precomp -O2 -finline-functions" /* canonical host string. */ #define SLASHMUD_CANONICAL_HOST "i386-apple-darwin9.2.2" /* debug version C compiler flags. */ -#define SLASHMUD_DEBUG_CFLAGS " -Wall -I/Users/koryn/development/temp2/slashmud/trunk/libraries/kdg/include -std=c99 -no-cpp-precomp -Werror-implicit-function-declaration -g -O0 -fbounds-check" +#define SLASHMUD_DEBUG_CFLAGS " -Wall -I/Users/koryn/development/slashmudx/slashmud/trunk/libraries/kdg/include -std=c99 -no-cpp-precomp -Werror-implicit-function-declaration -g -O0 -fbounds-check" /* debug version C++ compiler flags. */ -#define SLASHMUD_DEBUG_CXXFLAGS " -Wall -Wall -I/Users/koryn/development/temp2/slashmud/trunk/libraries/kdg/include -no-cpp-precomp -g -O0 -fbounds-check" +#define SLASHMUD_DEBUG_CXXFLAGS " -Wall -Wall -I/Users/koryn/development/slashmudx/slashmud/trunk/libraries/kdg/include -no-cpp-precomp -g -O0 -fbounds-check" /* linker flags. */ -#define SLASHMUD_LDFLAGS " -L/Users/koryn/development/temp2/slashmud/trunk/libraries/kdg -all_load" +#define SLASHMUD_LDFLAGS " -L/Users/koryn/development/slashmudx/slashmud/trunk/libraries/kdg -all_load" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 Modified: trunk/src/portal_object.c =================================================================== --- trunk/src/portal_object.c 2008-05-07 09:51:23 UTC (rev 12) +++ trunk/src/portal_object.c 2008-05-10 05:51:19 UTC (rev 13) @@ -5,6 +5,7 @@ #include "base_object.h" #include "base_virtuals.h" #include "buffer_sizes.h" +#include "logging.h" #include "mud_manager.h" #include "object_types.h" #include "portal_overrides.h" @@ -140,6 +141,7 @@ const char* living_msg = NULL; const char* all_msg = NULL; const char* name = NULL; + char logbuf[kLogBufferBytes]; assert(self); assert(living); @@ -147,8 +149,14 @@ /* Try for a destination portal. */ if (self->portal_data.mTargetPortalName) { + snprintf(logbuf, kLogBufferBytes, "*** have target portal name: %s", self->portal_data.mTargetPortalName); + SLASHLOG_DEBUG(logbuf); + name = self->portal_data.mTargetPortalName; dst_portal = portal_manager_get_by_name(name); + + snprintf(logbuf, kLogBufferBytes, "*** have target portal: %08x", (unsigned int) dst_portal); + SLASHLOG_DEBUG(logbuf); if (dst_portal) { @@ -171,12 +179,20 @@ /* Otherwise check the destination room. */ if ((NULL == dst_room) && self->portal_data.mTargetRoomName) { + snprintf(logbuf, kLogBufferBytes, "*** no target portal name, have target room name: %s", self->portal_data.mTargetRoomName); + SLASHLOG_DEBUG(logbuf); + name = self->portal_data.mTargetRoomName; dst_room = room_manager_get_by_name(name); } if (dst_room) { + char logbuf[kLogBufferBytes]; + + snprintf(logbuf, kLogBufferBytes, "*** have destination room: %s (%s)", dst_room->base_data.mStandardName, dst_room->room_data.mName); + SLASHLOG_DEBUG(logbuf); + item = base_get_environment((BasePtr) living); if (1 == virtual_instance_of(item, kRoomObject)) { @@ -187,6 +203,7 @@ if ((current_room == NULL) || (dst_room == NULL)) { virtual_catch_tell((BasePtr) living, (BasePtr) self, "The portal seems devoid of power."); + SLASHLOG_DEBUG("return 1"); return; } @@ -194,6 +211,7 @@ if ((0 == room_can_exit(current_room, living)) || (0 == room_can_enter(dst_room, living))) { virtual_catch_tell((BasePtr) living, (BasePtr) self, "Something prevents you from leaving this room."); + SLASHLOG_DEBUG("return 2"); return; } @@ -253,6 +271,9 @@ buffer[0] = toupper(buffer[0]); virtual_catch_tell((BasePtr) dst_room, (BasePtr) living, buffer); } + + snprintf(logbuf, kLogBufferBytes, "*** living is now in: %s", living->base_data.mEnvironment->base_data.mStandardName); + SLASHLOG_DEBUG(logbuf); } Modified: trunk/src/self_test.c =================================================================== --- trunk/src/self_test.c 2008-05-07 09:51:23 UTC (rev 12) +++ trunk/src/self_test.c 2008-05-10 05:51:19 UTC (rev 13) @@ -61,7 +61,7 @@ #define GROUP_COMBAT_SECONDS 300 /* How many times to repeat the portal transportation tests. */ -#define PORTAL_TRANSPORTATION_COUNT 500 +#define PORTAL_TRANSPORTATION_COUNT 2000 /* Mac OS X headers. */ #if CALENDAR_CACHE_PROFILE @@ -69,7 +69,7 @@ #endif /* CALENDAR_CACHE_PROFILE */ -#define NAMEBUF_BYTES 128 +#define NAMEBUF_BYTES 256 typedef unsigned int (*TestRoutine)(void); typedef struct TestInfo @@ -92,6 +92,7 @@ static void do_base_object_tests(BasePtr item, BasePtr quarantine); static void group_combat_internal(unsigned int multiplier, const char* logname); static void single_combat_internal(unsigned int repeats, const char* logname); +static void display_portal_transport_details(MonsterPtr monster, RoomPtr quarantine, RoomPtr destination, PortalPtr portal, PortalPtr target_portal); static unsigned int test_aliases(void); static unsigned int test_ammoboxes(void); static unsigned int test_armours(void); @@ -658,6 +659,63 @@ } +static void +display_portal_transport_details(MonsterPtr monster, RoomPtr quarantine, RoomPtr destination, PortalPtr portal, PortalPtr target_portal) +{ + if (monster->base_data.mEnvironment != (BasePtr) destination) + { + char logbuf[kLogBufferBytes]; + + snprintf(logbuf, kLogBufferBytes, "Quarantine '%s'", base_get_standard_name((BasePtr) quarantine)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, "Destination '%s'", base_get_standard_name((BasePtr) destination)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, "Monster '%s'", base_get_standard_name((BasePtr) monster)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) monster->base_data.mEnvironment)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, "Portal '%s'", base_get_standard_name((BasePtr) portal)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) portal->base_data.mEnvironment)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mTargetRoomName '%s'", portal->portal_data.mTargetRoomName); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mTargetPortalName '%s'", portal->portal_data.mTargetPortalName); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, "Target Portal '%s'", base_get_standard_name((BasePtr) target_portal)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) target_portal->base_data.mEnvironment)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mTargetRoomName '%s'", target_portal->portal_data.mTargetRoomName); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mTargetPortalName '%s'", target_portal->portal_data.mTargetPortalName); + SLASHLOG_ERROR(logbuf); + + if (target_portal->portal_data.mTargetPortalName) + { + PortalPtr temp_portal = portal_manager_get_by_name(target_portal->portal_data.mTargetPortalName); + + if (temp_portal) + { + snprintf(logbuf, kLogBufferBytes, "Temp Portal '%s'", base_get_standard_name((BasePtr) temp_portal)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) temp_portal->base_data.mEnvironment)); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mTargetRoomName '%s'", temp_portal->portal_data.mTargetRoomName); + SLASHLOG_ERROR(logbuf); + snprintf(logbuf, kLogBufferBytes, " mTargetPortalName '%s'", temp_portal->portal_data.mTargetPortalName); + SLASHLOG_ERROR(logbuf); + } + else + { + snprintf(logbuf, kLogBufferBytes, "Temp Portal '(null)'"); + SLASHLOG_ERROR(logbuf); + } + } + } +} + + static unsigned int test_aliases(void) { @@ -2943,13 +3001,13 @@ assert(monster->base_data.mEnvironment == (BasePtr) quarantine); /* Create the destination portal. */ - target_portal = (PortalPtr) standard_library_load_typed_object(kStandardLibraryPortal, "portal_a"); + target_portal = (PortalPtr) standard_library_load_typed_object(kStandardLibraryPortal, "portal_b"); virtual_finish_loading((BasePtr) target_portal, (BasePtr) destination); assert(target_portal->base_data.mEnvironment == (BasePtr) destination); assert(target_portal == mud_manager_verify_object(get_portal_manager(), target_portal)); /* Set the portal's destination portal. */ - portal_set_target_portal(portal, base_get_standard_name((BasePtr) target_portal)); + portal_set_target_portal(portal, "portal_b"); /* Put the monster through the portal. */ portal_transport_living(portal, (LivingPtr) monster); @@ -2984,6 +3042,7 @@ PortalPtr portal; PortalPtr target_portal; MonsterPtr monster; + char testportal_namebuf[64]; /* Create a portal and put it in the quarantine room. */ portal = new_portal_instance(); @@ -3014,77 +3073,31 @@ assert(portal->base_data.mEnvironment == (BasePtr) quarantine); /* Create the destination portal. */ - target_portal = get_random_object(kStandardLibraryPortal, destination); + target_portal = new_portal_instance(); + snprintf(testportal_namebuf, 64, "testportal_%u", (unsigned int) clock()); + base_set_name((BasePtr) target_portal, testportal_namebuf); + base_set_standard_name((BasePtr) target_portal, testportal_namebuf); + + virtual_finish_loading((BasePtr) target_portal, (BasePtr) destination); assert(target_portal->base_data.mEnvironment == (BasePtr) destination); assert(target_portal == mud_manager_verify_object(get_portal_manager(), target_portal)); /* Set the portal's destination portal. */ - portal_clear_target_room(portal); - portal_clear_target_portal(portal); + portal_clear_target_room(target_portal); + portal_clear_target_portal(target_portal); portal_set_target_portal(portal, base_get_standard_name((BasePtr) target_portal)); /* Create a monster. */ monster = (MonsterPtr) get_random_object(kStandardLibraryMonster, quarantine); assert(monster->base_data.mEnvironment == (BasePtr) quarantine); - + /* Put the monster through the portal. */ portal_transport_living(portal, (LivingPtr) monster); + display_portal_transport_details(monster, quarantine, destination, portal, target_portal); + + assert(portal->base_data.mEnvironment == (BasePtr) quarantine); assert(target_portal->base_data.mEnvironment == (BasePtr) destination); - - if (monster->base_data.mEnvironment != (BasePtr) destination) - { - char logbuf[kLogBufferBytes]; - - snprintf(logbuf, kLogBufferBytes, "Quarantine '%s'", base_get_standard_name((BasePtr) quarantine)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, "Destination '%s'", base_get_standard_name((BasePtr) destination)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, "Monster '%s'", base_get_standard_name((BasePtr) monster)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) monster->base_data.mEnvironment)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, "Portal '%s'", base_get_standard_name((BasePtr) portal)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) portal->base_data.mEnvironment)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mTargetRoomName '%s'", portal->portal_data.mTargetRoomName); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mTargetPortalName '%s'", portal->portal_data.mTargetPortalName); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, "Target Portal '%s'", base_get_standard_name((BasePtr) target_portal)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) target_portal->base_data.mEnvironment)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mTargetRoomName '%s'", target_portal->portal_data.mTargetRoomName); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mTargetPortalName '%s'", target_portal->portal_data.mTargetPortalName); - SLASHLOG_ERROR(logbuf); - - if (target_portal->portal_data.mTargetPortalName) - { - PortalPtr temp_portal = portal_manager_get_by_name(target_portal->portal_data.mTargetPortalName); - - if (temp_portal) - { - snprintf(logbuf, kLogBufferBytes, "Temp Portal '%s'", base_get_standard_name((BasePtr) temp_portal)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mEnvironment '%s'", base_get_standard_name((BasePtr) temp_portal->base_data.mEnvironment)); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mTargetRoomName '%s'", temp_portal->portal_data.mTargetRoomName); - SLASHLOG_ERROR(logbuf); - snprintf(logbuf, kLogBufferBytes, " mTargetPortalName '%s'", temp_portal->portal_data.mTargetPortalName); - SLASHLOG_ERROR(logbuf); - } - else - { - snprintf(logbuf, kLogBufferBytes, "Temp Portal '(null)'"); - SLASHLOG_ERROR(logbuf); - } - } - } - assert(monster->base_data.mEnvironment == (BasePtr) destination); - assert(portal->base_data.mEnvironment == (BasePtr) quarantine); /* Clean up. */ virtual_finished((BasePtr) monster); @@ -3096,6 +3109,7 @@ assert(NULL == mud_manager_verify_object(get_portal_manager(), target_portal)); quarantine = dispose_quarantine_room(quarantine); + assert(NULL == quarantine); } return 1; @@ -4461,7 +4475,7 @@ { NULL, NULL }, */ /* Bug regression tests. */ - { test_base_name_contains, "Regression test for broken base_name_contains", 0 }, + { test_base_name_contains, "Regression test for broken base_name_contains()", 0 }, { test_stats, "Regression test for missing stat name", 0 }, { test_talk_list_manager, "Regression test for uninitialized talk list manager", 0 }, { test_unwield_all, "Regression test for 'unwield all' bug. Also tests 'wield all' command.", 0 }, @@ -4502,7 +4516,7 @@ { test_money, "Testing money system", 0 }, { test_owner_uuid, "Testing thing owner uuids", 0 }, { test_plugins, "Testing plugins", 0 }, - { test_portal_transport, "Testing portal transportation", 0 }, + { test_portal_transport, "Testing portal transportation with standard destination portals", 0 }, { test_projectile_weapons, "Testing projectile weapons from the Object Library", 0 }, { test_reload_projectile_weapons, "Testing projectile weapon reload", 0 }, { test_fire_projectile_weapons, "Testing projectile weapon firing", 0 }, Modified: trunk/src/version.c =================================================================== --- trunk/src/version.c 2008-05-07 09:51:23 UTC (rev 12) +++ trunk/src/version.c 2008-05-10 05:51:19 UTC (rev 13) @@ -48,4 +48,4 @@ } -const unsigned int gBuildNumber = 3241; +const unsigned int gBuildNumber = 3260; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2008-05-07 09:51:26
|
Revision: 12 http://slashmud.svn.sourceforge.net/slashmud/?rev=12&view=rev Author: koryn Date: 2008-05-07 02:51:23 -0700 (Wed, 07 May 2008) Log Message: ----------- Set keyword 'Id' on C source files. Modified Paths: -------------- trunk/src/access_rights.c trunk/src/agent_command_manager.c trunk/src/agent_commands.c trunk/src/agent_object.c trunk/src/agent_overrides.c trunk/src/ammobox_object.c trunk/src/ammobox_overrides.c trunk/src/ammunition.c trunk/src/areas.c trunk/src/armageddon_object.c trunk/src/armageddon_overrides.c trunk/src/armour_object.c trunk/src/armour_overrides.c trunk/src/armourtype.c trunk/src/attachment_object.c trunk/src/attachment_overrides.c trunk/src/attack_manager.c trunk/src/base_object.c trunk/src/base_virtuals.c trunk/src/body.c trunk/src/body_part_state.c trunk/src/body_part_template.c trunk/src/bottle_object.c trunk/src/bottle_overrides.c trunk/src/clan.c trunk/src/class.c trunk/src/climate_manager.c trunk/src/coins_object.c trunk/src/coins_overrides.c trunk/src/command.c trunk/src/command_manager.c trunk/src/container_object.c trunk/src/container_overrides.c trunk/src/contract.c trunk/src/corpse_object.c trunk/src/corpse_overrides.c trunk/src/currency.c trunk/src/damage_message_set.c trunk/src/denomination.c trunk/src/door.c trunk/src/drink_object.c trunk/src/drink_overrides.c trunk/src/event.c trunk/src/filter.c trunk/src/food_object.c trunk/src/food_overrides.c trunk/src/group.c trunk/src/help_manager.c trunk/src/html_manager.c trunk/src/key_object.c trunk/src/key_overrides.c trunk/src/keyring_object.c trunk/src/keyring_overrides.c trunk/src/learnable_skill.c trunk/src/living_command_manager.c trunk/src/living_commands.c trunk/src/living_object.c trunk/src/living_overrides.c trunk/src/living_state.c trunk/src/living_virtuals.c trunk/src/logging.c trunk/src/main.c trunk/src/material.c trunk/src/model.c trunk/src/monster_object.c trunk/src/monster_overrides.c trunk/src/mood.c trunk/src/mud_manager.c trunk/src/networking.c trunk/src/player_object.c trunk/src/player_overrides.c trunk/src/player_virtuals.c trunk/src/plugin.c trunk/src/plugin_api.c trunk/src/plugin_event.c trunk/src/portal_object.c trunk/src/portal_overrides.c trunk/src/potion_object.c trunk/src/potion_overrides.c trunk/src/preferences.c trunk/src/print_info.c trunk/src/projectile_weapon_object.c trunk/src/projectile_weapon_overrides.c trunk/src/purse_object.c trunk/src/purse_overrides.c trunk/src/race.c trunk/src/room_object.c trunk/src/room_overrides.c trunk/src/self_test.c trunk/src/server.c trunk/src/skill.c trunk/src/skill_state.c trunk/src/social.c trunk/src/spirit.c trunk/src/standard_library.c trunk/src/standard_object.c trunk/src/stat_effect.c trunk/src/statue_object.c trunk/src/statue_overrides.c trunk/src/string_manager.c trunk/src/talk_list.c trunk/src/talk_list_manager.c trunk/src/thing_object.c trunk/src/thing_overrides.c trunk/src/thing_virtuals.c trunk/src/time_manager.c trunk/src/title.c trunk/src/usage_message_set.c trunk/src/userfield.c trunk/src/utility_procedures.c trunk/src/version.c trunk/src/virtuals.c trunk/src/weapon_object.c trunk/src/weapon_overrides.c trunk/src/weapontype.c trunk/src/zone.c Property Changed: ---------------- trunk/src/access_rights.c trunk/src/agent_command_manager.c trunk/src/agent_commands.c trunk/src/agent_object.c trunk/src/agent_overrides.c trunk/src/agent_parse_commands.c trunk/src/ammobox_object.c trunk/src/ammobox_overrides.c trunk/src/ammunition.c trunk/src/areas.c trunk/src/armageddon_object.c trunk/src/armageddon_overrides.c trunk/src/armour_object.c trunk/src/armour_overrides.c trunk/src/armourtype.c trunk/src/attachment_object.c trunk/src/attachment_overrides.c trunk/src/attack_manager.c trunk/src/base_object.c trunk/src/base_virtuals.c trunk/src/body.c trunk/src/body_part_state.c trunk/src/body_part_template.c trunk/src/bottle_object.c trunk/src/bottle_overrides.c trunk/src/clan.c trunk/src/clan_state.c trunk/src/class.c trunk/src/climate_manager.c trunk/src/coins_object.c trunk/src/coins_overrides.c trunk/src/command.c trunk/src/command_manager.c trunk/src/container_object.c trunk/src/container_overrides.c trunk/src/contract.c trunk/src/corpse_object.c trunk/src/corpse_overrides.c trunk/src/currency.c trunk/src/cvs_headers.c trunk/src/damage_message_set.c trunk/src/denomination.c trunk/src/door.c trunk/src/drink_object.c trunk/src/drink_overrides.c trunk/src/event.c trunk/src/filter.c trunk/src/food_object.c trunk/src/food_overrides.c trunk/src/group.c trunk/src/help_manager.c trunk/src/html_manager.c trunk/src/key_object.c trunk/src/key_overrides.c trunk/src/keyring_object.c trunk/src/keyring_overrides.c trunk/src/learnable_skill.c trunk/src/living_command_manager.c trunk/src/living_commands.c trunk/src/living_object.c trunk/src/living_overrides.c trunk/src/living_parse_commands.c trunk/src/living_state.c trunk/src/living_virtuals.c trunk/src/logging.c trunk/src/main.c trunk/src/material.c trunk/src/model.c trunk/src/monster_object.c trunk/src/monster_overrides.c trunk/src/mood.c trunk/src/mud_manager.c trunk/src/networking.c trunk/src/player_object.c trunk/src/player_overrides.c trunk/src/player_virtuals.c trunk/src/plugin.c trunk/src/plugin_api.c trunk/src/plugin_event.c trunk/src/portal_object.c trunk/src/portal_overrides.c trunk/src/potion_object.c trunk/src/potion_overrides.c trunk/src/preferences.c trunk/src/print_info.c trunk/src/projectile_weapon_object.c trunk/src/projectile_weapon_overrides.c trunk/src/purse_object.c trunk/src/purse_overrides.c trunk/src/race.c trunk/src/room_object.c trunk/src/room_overrides.c trunk/src/self_test.c trunk/src/server.c trunk/src/skill.c trunk/src/skill_state.c trunk/src/social.c trunk/src/spirit.c trunk/src/standard_library.c trunk/src/standard_library_load_object.c trunk/src/standard_object.c trunk/src/standard_object_processor.c trunk/src/stat_effect.c trunk/src/statue_object.c trunk/src/statue_overrides.c trunk/src/stored_object.c trunk/src/string_manager.c trunk/src/talk_list.c trunk/src/talk_list_manager.c trunk/src/telnet_codes.c trunk/src/thing_object.c trunk/src/thing_overrides.c trunk/src/thing_virtuals.c trunk/src/time_manager.c trunk/src/title.c trunk/src/usage_message_set.c trunk/src/userfield.c trunk/src/utility_procedures.c trunk/src/version.c trunk/src/virtuals.c trunk/src/weapon_object.c trunk/src/weapon_overrides.c trunk/src/weapontype.c trunk/src/zone.c Modified: trunk/src/access_rights.c =================================================================== --- trunk/src/access_rights.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/access_rights.c 2008-05-07 09:51:23 UTC (rev 12) @@ -21,7 +21,7 @@ #include <assert.h> /* CVS Header. */ -const char* const kAccessRightsCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/access_rights.c,v 1.20 2007/07/31 09:39:35 koryn Exp $"; +const char* const kAccessRightsCvsHeader = "$Id$"; typedef enum Property changes on: trunk/src/access_rights.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/agent_command_manager.c =================================================================== --- trunk/src/agent_command_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/agent_command_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -7,7 +7,7 @@ #include "server.h" /* CVS Header. */ -const char* const kAgentCommandManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/agent_command_manager.c,v 1.13 2005/05/08 01:57:40 koryn Exp $"; +const char* const kAgentCommandManagerCvsHeader = "$Id$"; static CommandManagerPtr uAgentCommandManager = NULL; Property changes on: trunk/src/agent_command_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/agent_commands.c =================================================================== --- trunk/src/agent_commands.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/agent_commands.c 2008-05-07 09:51:23 UTC (rev 12) @@ -35,7 +35,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kAgentCommandsCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/agent_commands.c,v 1.36 2008/04/25 05:26:14 koryn Exp $"; +const char* const kAgentCommandsCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/agent_commands.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/agent_object.c =================================================================== --- trunk/src/agent_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/agent_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -24,7 +24,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kAgentObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/agent_object.c,v 1.14 2007/05/12 06:59:09 koryn Exp $"; +const char* const kAgentObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/agent_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/agent_overrides.c =================================================================== --- trunk/src/agent_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/agent_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -26,7 +26,7 @@ #include "kg_random.h" /* CVS Header. */ -const char* const kAgentOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/agent_overrides.c,v 1.30 2007/05/12 06:59:09 koryn Exp $"; +const char* const kAgentOverridesCvsHeader = "$Id$"; BaseVirtualPtr gAgentBaseVirtuals = NULL; Property changes on: trunk/src/agent_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/src/agent_parse_commands.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/ammobox_object.c =================================================================== --- trunk/src/ammobox_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/ammobox_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kAmmoboxObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/ammobox_object.c,v 1.12 2007/12/17 18:09:28 koryn Exp $"; +const char* const kAmmoboxObjectCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/ammobox_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/ammobox_overrides.c =================================================================== --- trunk/src/ammobox_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/ammobox_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -20,7 +20,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kAmmoboxOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/ammobox_overrides.c,v 1.11 2007/12/17 18:09:28 koryn Exp $"; +const char* const kAmmoboxOverridesCvsHeader = "$Id$"; BaseVirtualPtr gAmmoboxBaseVirtuals = NULL; Property changes on: trunk/src/ammobox_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/ammunition.c =================================================================== --- trunk/src/ammunition.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/ammunition.c 2008-05-07 09:51:23 UTC (rev 12) @@ -16,7 +16,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kAmmunitionCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/ammunition.c,v 1.23 2008/04/09 00:39:20 koryn Exp $"; +const char* const kAmmunitionCvsHeader = "$Id$"; typedef struct AmmunitionHeader AmmunitionHeader; Property changes on: trunk/src/ammunition.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/areas.c =================================================================== --- trunk/src/areas.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/areas.c 2008-05-07 09:51:23 UTC (rev 12) @@ -16,7 +16,7 @@ #include "kg_text_file_manager.h" /* CVS Header. */ -const char* const kAreasCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/areas.c,v 1.18 2008/01/12 21:06:22 koryn Exp $"; +const char* const kAreasCvsHeader = "$Id$"; static const unsigned int kStateNothing = 0; Property changes on: trunk/src/areas.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/armageddon_object.c =================================================================== --- trunk/src/armageddon_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/armageddon_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include <time.h> /* CVS Header. */ -const char* const kArmageddonObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/armageddon_object.c,v 1.10 2007/04/09 01:50:41 koryn Exp $"; +const char* const kArmageddonObjectCvsHeader = "$Id$"; static ArmageddonPtr uArmageddon = NULL; Property changes on: trunk/src/armageddon_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/armageddon_overrides.c =================================================================== --- trunk/src/armageddon_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/armageddon_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -16,7 +16,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kArmageddonOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/armageddon_overrides.c,v 1.10 2007/04/09 01:50:41 koryn Exp $"; +const char* const kArmageddonOverridesCvsHeader = "$Id$"; BaseVirtualPtr gArmageddonBaseVirtuals = NULL; Property changes on: trunk/src/armageddon_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/armour_object.c =================================================================== --- trunk/src/armour_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/armour_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -20,7 +20,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kArmourObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/armour_object.c,v 1.15 2007/07/07 12:42:46 koryn Exp $"; +const char* const kArmourObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/armour_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/armour_overrides.c =================================================================== --- trunk/src/armour_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/armour_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -26,7 +26,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kArmourOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/armour_overrides.c,v 1.39 2008/04/25 05:26:14 koryn Exp $"; +const char* const kArmourOverridesCvsHeader = "$Id$"; BaseVirtualPtr gArmourBaseVirtuals = NULL; Property changes on: trunk/src/armour_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/armourtype.c =================================================================== --- trunk/src/armourtype.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/armourtype.c 2008-05-07 09:51:23 UTC (rev 12) @@ -15,7 +15,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kArmourtypeCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/armourtype.c,v 1.24 2007/07/13 05:53:42 koryn Exp $"; +const char* const kArmourtypeCvsHeader = "$Id$"; #define ARMOURTYPE_ATTRIBUTE_COUNT 4 Property changes on: trunk/src/armourtype.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/attachment_object.c =================================================================== --- trunk/src/attachment_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/attachment_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -11,7 +11,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kAttachmentObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/attachment_object.c,v 1.10 2007/04/30 10:32:00 koryn Exp $"; +const char* const kAttachmentObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/attachment_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/attachment_overrides.c =================================================================== --- trunk/src/attachment_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/attachment_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -14,7 +14,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kAttachmentOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/attachment_overrides.c,v 1.20 2007/05/12 06:59:09 koryn Exp $"; +const char* const kAttachmentOverridesCvsHeader = "$Id$"; BaseVirtualPtr gAttachmentBaseVirtuals = NULL; Property changes on: trunk/src/attachment_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/attack_manager.c =================================================================== --- trunk/src/attack_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/attack_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -2,7 +2,7 @@ #include "attack_manager.h" /* CVS Header. */ -const char* const kAttackManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/attack_manager.c,v 1.5 2005/05/08 01:57:40 koryn Exp $"; +const char* const kAttackManagerCvsHeader = "$Id$"; typedef struct AttackManagerHeader AttackManagerHeader; Property changes on: trunk/src/attack_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/base_object.c =================================================================== --- trunk/src/base_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/base_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -27,7 +27,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kBaseObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/base_object.c,v 1.69 2007/08/14 06:08:56 koryn Exp $"; +const char* const kBaseObjectCvsHeader = "$Id$"; static unsigned int uObjectId = 1; Property changes on: trunk/src/base_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/base_virtuals.c =================================================================== --- trunk/src/base_virtuals.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/base_virtuals.c 2008-05-07 09:51:23 UTC (rev 12) @@ -26,7 +26,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kBaseVirtualsCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/base_virtuals.c,v 1.83 2008/04/25 05:26:14 koryn Exp $"; +const char* const kBaseVirtualsCvsHeader = "$Id$"; BaseVirtualPtr gBaseVirtuals = NULL; Property changes on: trunk/src/base_virtuals.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/body.c =================================================================== --- trunk/src/body.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/body.c 2008-05-07 09:51:23 UTC (rev 12) @@ -23,7 +23,7 @@ #include "kg_set.h" /* CVS Header. */ -const char* const kBodyCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/body.c,v 1.27 2007/05/03 10:22:34 koryn Exp $"; +const char* const kBodyCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/body.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/body_part_state.c =================================================================== --- trunk/src/body_part_state.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/body_part_state.c 2008-05-07 09:51:23 UTC (rev 12) @@ -10,7 +10,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kBodyPartStateCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/body_part_state.c,v 1.16 2007/04/25 04:59:12 koryn Exp $"; +const char* const kBodyPartStateCvsHeader = "$Id$"; typedef struct BodyPartStateHeader BodyPartStateHeader; Property changes on: trunk/src/body_part_state.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/body_part_template.c =================================================================== --- trunk/src/body_part_template.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/body_part_template.c 2008-05-07 09:51:23 UTC (rev 12) @@ -16,7 +16,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kBodyPartTemplateCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/body_part_template.c,v 1.20 2007/05/12 06:59:09 koryn Exp $"; +const char* const kBodyPartTemplateCvsHeader = "$Id$"; /* Body part flags. */ #define BODY_PART_FLAGS 7 Property changes on: trunk/src/body_part_template.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/bottle_object.c =================================================================== --- trunk/src/bottle_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/bottle_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -13,7 +13,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kBottleObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/bottle_object.c,v 1.8 2007/04/25 04:59:12 koryn Exp $"; +const char* const kBottleObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/bottle_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/bottle_overrides.c =================================================================== --- trunk/src/bottle_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/bottle_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -17,7 +17,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kBottleOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/bottle_overrides.c,v 1.8 2007/04/25 04:59:12 koryn Exp $"; +const char* const kBottleOverridesCvsHeader = "$Id$"; BaseVirtualPtr gBottleBaseVirtuals = NULL; Property changes on: trunk/src/bottle_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/clan.c =================================================================== --- trunk/src/clan.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/clan.c 2008-05-07 09:51:23 UTC (rev 12) @@ -26,7 +26,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kClanCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/clan.c,v 1.26 2008/04/25 05:26:14 koryn Exp $"; +const char* const kClanCvsHeader = "$Id$"; #define MAXIMUM_CLAN_NEWS_ITEMS 32 Property changes on: trunk/src/clan.c ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/src/clan_state.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/class.c =================================================================== --- trunk/src/class.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/class.c 2008-05-07 09:51:23 UTC (rev 12) @@ -21,7 +21,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kClassCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/class.c,v 1.29 2007/07/21 02:38:55 koryn Exp $"; +const char* const kClassCvsHeader = "$Id$"; typedef struct ClassHeader ClassHeader; Property changes on: trunk/src/class.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/climate_manager.c =================================================================== --- trunk/src/climate_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/climate_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -2,7 +2,7 @@ #include "climate_manager.h" /* CVS Header. */ -const char* const kClimateManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/climate_manager.c,v 1.7 2007/06/10 18:00:38 ntiffin Exp $"; +const char* const kClimateManagerCvsHeader = "$Id$"; typedef struct ClimateManagerHeader ClimateManagerHeader; Property changes on: trunk/src/climate_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/coins_object.c =================================================================== --- trunk/src/coins_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/coins_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -17,7 +17,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kCoinsObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/coins_object.c,v 1.8 2007/06/01 10:25:58 koryn Exp $"; +const char* const kCoinsObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/coins_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/coins_overrides.c =================================================================== --- trunk/src/coins_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/coins_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kCoinsOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/coins_overrides.c,v 1.15 2007/05/12 06:59:09 koryn Exp $"; +const char* const kCoinsOverridesCvsHeader = "$Id$"; BaseVirtualPtr gCoinsBaseVirtuals = NULL; Property changes on: trunk/src/coins_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/command.c =================================================================== --- trunk/src/command.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/command.c 2008-05-07 09:51:23 UTC (rev 12) @@ -23,7 +23,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kCommandCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/command.c,v 1.15 2007/08/18 10:09:09 koryn Exp $"; +const char* const kCommandCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/command.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/command_manager.c =================================================================== --- trunk/src/command_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/command_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -15,7 +15,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kCommandManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/command_manager.c,v 1.11 2007/04/25 04:59:12 koryn Exp $"; +const char* const kCommandManagerCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/command_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/container_object.c =================================================================== --- trunk/src/container_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/container_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -15,7 +15,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kContainerObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/container_object.c,v 1.9 2007/04/22 06:12:45 koryn Exp $"; +const char* const kContainerObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/container_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/container_overrides.c =================================================================== --- trunk/src/container_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/container_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -20,7 +20,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kContainerOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/container_overrides.c,v 1.16 2008/04/25 05:26:14 koryn Exp $"; +const char* const kContainerOverridesCvsHeader = "$Id$"; BaseVirtualPtr gContainerBaseVirtuals = NULL; Property changes on: trunk/src/container_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/contract.c =================================================================== --- trunk/src/contract.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/contract.c 2008-05-07 09:51:23 UTC (rev 12) @@ -10,7 +10,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kContractCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/contract.c,v 1.9 2005/05/08 01:57:41 koryn Exp $"; +const char* const kContractCvsHeader = "$Id$"; typedef struct ContractHeader ContractHeader; Property changes on: trunk/src/contract.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/corpse_object.c =================================================================== --- trunk/src/corpse_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/corpse_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kCorpseObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/corpse_object.c,v 1.15 2007/05/12 06:59:10 koryn Exp $"; +const char* const kCorpseObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/corpse_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/corpse_overrides.c =================================================================== --- trunk/src/corpse_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/corpse_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -23,7 +23,7 @@ #include <time.h> /* CVS Header. */ -const char* const kCorpseOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/corpse_overrides.c,v 1.16 2007/05/12 06:59:10 koryn Exp $"; +const char* const kCorpseOverridesCvsHeader = "$Id$"; BaseVirtualPtr gCorpseBaseVirtuals = NULL; Property changes on: trunk/src/corpse_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/currency.c =================================================================== --- trunk/src/currency.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/currency.c 2008-05-07 09:51:23 UTC (rev 12) @@ -16,7 +16,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kCurrencyCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/currency.c,v 1.22 2007/07/13 05:53:42 koryn Exp $"; +const char* const kCurrencyCvsHeader = "$Id$"; typedef struct CurrencyHeader CurrencyHeader; Property changes on: trunk/src/currency.c ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/src/cvs_headers.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/damage_message_set.c =================================================================== --- trunk/src/damage_message_set.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/damage_message_set.c 2008-05-07 09:51:23 UTC (rev 12) @@ -15,7 +15,7 @@ #include "kg_set.h" /* CVS Header. */ -const char* const kDamageMessageSetCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/damage_message_set.c,v 1.16 2007/04/25 04:59:13 koryn Exp $"; +const char* const kDamageMessageSetCvsHeader = "$Id$"; typedef struct DamageMessageHeader Property changes on: trunk/src/damage_message_set.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/denomination.c =================================================================== --- trunk/src/denomination.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/denomination.c 2008-05-07 09:51:23 UTC (rev 12) @@ -13,7 +13,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kDenominationCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/denomination.c,v 1.17 2007/06/01 10:25:58 koryn Exp $"; +const char* const kDenominationCvsHeader = "$Id$"; typedef struct DenominationHeader DenominationHeader; Property changes on: trunk/src/denomination.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/door.c =================================================================== --- trunk/src/door.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/door.c 2008-05-07 09:51:23 UTC (rev 12) @@ -13,7 +13,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kDoorCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/door.c,v 1.15 2007/04/25 04:59:13 koryn Exp $"; +const char* const kDoorCvsHeader = "$Id$"; typedef struct DoorHeader DoorHeader; Property changes on: trunk/src/door.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/drink_object.c =================================================================== --- trunk/src/drink_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/drink_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -14,7 +14,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kDrinkObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/drink_object.c,v 1.11 2007/04/15 09:58:58 koryn Exp $"; +const char* const kDrinkObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/drink_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/drink_overrides.c =================================================================== --- trunk/src/drink_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/drink_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -24,7 +24,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kDrinkOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/drink_overrides.c,v 1.22 2007/08/15 03:28:22 koryn Exp $"; +const char* const kDrinkOverridesCvsHeader = "$Id$"; BaseVirtualPtr gDrinkBaseVirtuals = NULL; Property changes on: trunk/src/drink_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/event.c =================================================================== --- trunk/src/event.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/event.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kEventCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/event.c,v 1.25 2007/08/15 03:28:22 koryn Exp $"; +const char* const kEventCvsHeader = "$Id$"; struct EventInstance Property changes on: trunk/src/event.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/filter.c =================================================================== --- trunk/src/filter.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/filter.c 2008-05-07 09:51:23 UTC (rev 12) @@ -12,7 +12,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kFilterCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/filter.c,v 1.17 2007/09/24 10:10:46 koryn Exp $"; +const char* const kFilterCvsHeader = "$Id$"; struct FilterInstance Property changes on: trunk/src/filter.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/food_object.c =================================================================== --- trunk/src/food_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/food_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -14,7 +14,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kFoodObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/food_object.c,v 1.8 2007/04/15 09:43:52 koryn Exp $"; +const char* const kFoodObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/food_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/food_overrides.c =================================================================== --- trunk/src/food_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/food_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -23,7 +23,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kFoodOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/food_overrides.c,v 1.19 2007/08/15 03:28:22 koryn Exp $"; +const char* const kFoodOverridesCvsHeader = "$Id$"; BaseVirtualPtr gFoodBaseVirtuals = NULL; Property changes on: trunk/src/food_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/group.c =================================================================== --- trunk/src/group.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/group.c 2008-05-07 09:51:23 UTC (rev 12) @@ -25,7 +25,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kGroupCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/group.c,v 1.23 2008/04/25 05:26:14 koryn Exp $"; +const char* const kGroupCvsHeader = "$Id$"; typedef struct MemberInfo MemberInfo; Property changes on: trunk/src/group.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/help_manager.c =================================================================== --- trunk/src/help_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/help_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -17,7 +17,7 @@ #include "kg_text_file.h" /* CVS Header. */ -const char* const kHelpManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/help_manager.c,v 1.11 2008/01/12 21:06:22 koryn Exp $"; +const char* const kHelpManagerCvsHeader = "$Id$"; /* Internal routines. */ static void help_file_processor(const char* const filepath, Ptr user_data); Property changes on: trunk/src/help_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/html_manager.c =================================================================== --- trunk/src/html_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/html_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -22,7 +22,7 @@ #include <time.h> /* CVS Header. */ -const char* const kHtmlManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/html_manager.c,v 1.7 2007/07/27 04:45:31 koryn Exp $"; +const char* const kHtmlManagerCvsHeader = "$Id$"; #define LOCAL_BUFFER_BYTES 128 Property changes on: trunk/src/html_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/key_object.c =================================================================== --- trunk/src/key_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/key_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -15,7 +15,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kKeyObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/key_object.c,v 1.11 2005/05/08 01:57:41 koryn Exp $"; +const char* const kKeyObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/key_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/key_overrides.c =================================================================== --- trunk/src/key_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/key_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -16,7 +16,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kKeyOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/key_overrides.c,v 1.10 2006/01/06 08:56:12 koryn Exp $"; +const char* const kKeyOverridesCvsHeader = "$Id$"; BaseVirtualPtr gKeyBaseVirtuals = NULL; Property changes on: trunk/src/key_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/keyring_object.c =================================================================== --- trunk/src/keyring_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/keyring_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -10,7 +10,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kKeyringObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/keyring_object.c,v 1.6 2005/05/08 01:57:41 koryn Exp $"; +const char* const kKeyringObjectCvsHeader = "$Id$"; void Property changes on: trunk/src/keyring_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/keyring_overrides.c =================================================================== --- trunk/src/keyring_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/keyring_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -17,7 +17,7 @@ #include <stdio.h> /* CVS Header. */ -const char* const kKeyringOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/keyring_overrides.c,v 1.13 2007/04/25 04:59:13 koryn Exp $"; +const char* const kKeyringOverridesCvsHeader = "$Id$"; BaseVirtualPtr gKeyringBaseVirtuals = NULL; Property changes on: trunk/src/keyring_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/learnable_skill.c =================================================================== --- trunk/src/learnable_skill.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/learnable_skill.c 2008-05-07 09:51:23 UTC (rev 12) @@ -11,7 +11,7 @@ #include <assert.h> /* CVS Header. */ -const char* const kLearnableSkillCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/learnable_skill.c,v 1.4 2005/05/08 01:57:41 koryn Exp $"; +const char* const kLearnableSkillCvsHeader = "$Id$"; LearnableSkillPtr Property changes on: trunk/src/learnable_skill.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/living_command_manager.c =================================================================== --- trunk/src/living_command_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/living_command_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -7,7 +7,7 @@ #include "server.h" /* CVS Header. */ -const char* const kLivingCommandManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/living_command_manager.c,v 1.12 2006/01/01 21:19:25 koryn Exp $"; +const char* const kLivingCommandManagerCvsHeader = "$Id$"; static CommandManagerPtr uLivingCommandManager = NULL; Property changes on: trunk/src/living_command_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/living_commands.c =================================================================== --- trunk/src/living_commands.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/living_commands.c 2008-05-07 09:51:23 UTC (rev 12) @@ -31,7 +31,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kLivingCommandsCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/living_commands.c,v 1.36 2007/08/12 05:01:31 koryn Exp $"; +const char* const kLivingCommandsCvsHeader = "$Id$"; CommandPtr Property changes on: trunk/src/living_commands.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/living_object.c =================================================================== --- trunk/src/living_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/living_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -46,7 +46,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kLivingObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/living_object.c,v 1.142 2008/04/25 05:26:14 koryn Exp $"; +const char* const kLivingObjectCvsHeader = "$Id$"; const unsigned int kDefaultLineBreakPoint = 76; Property changes on: trunk/src/living_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/living_overrides.c =================================================================== --- trunk/src/living_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/living_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -40,7 +40,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kLivingOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/living_overrides.c,v 1.82 2007/09/24 10:10:46 koryn Exp $"; +const char* const kLivingOverridesCvsHeader = "$Id$"; BaseVirtualPtr gLivingBaseVirtuals = NULL; Property changes on: trunk/src/living_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/src/living_parse_commands.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/living_state.c =================================================================== --- trunk/src/living_state.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/living_state.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_random.h" /* CVS Header. */ -const char* const kLivingStateCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/living_state.c,v 1.20 2008/01/12 21:06:22 koryn Exp $"; +const char* const kLivingStateCvsHeader = "$Id$"; static const unsigned int kBaseChanceToHit __attribute__((unused)) = 500; Property changes on: trunk/src/living_state.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/living_virtuals.c =================================================================== --- trunk/src/living_virtuals.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/living_virtuals.c 2008-05-07 09:51:23 UTC (rev 12) @@ -30,7 +30,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kLivingVirtualsCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/living_virtuals.c,v 1.61 2008/04/25 05:26:14 koryn Exp $"; +const char* const kLivingVirtualsCvsHeader = "$Id$"; LivingVirtualPtr gLivingVirtuals = NULL; Property changes on: trunk/src/living_virtuals.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/logging.c =================================================================== --- trunk/src/logging.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/logging.c 2008-05-07 09:51:23 UTC (rev 12) @@ -8,7 +8,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kLoggingCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/logging.c,v 1.19 2007/04/15 08:29:27 koryn Exp $"; +const char* const kLoggingCvsHeader = "$Id$"; /* Unit constants. */ Property changes on: trunk/src/logging.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/main.c 2008-05-07 09:51:23 UTC (rev 12) @@ -10,7 +10,7 @@ #include <signal.h> /* CVS Header. */ -const char* const kMainCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/main.c,v 1.13 2008/04/25 05:26:14 koryn Exp $"; +const char* const kMainCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/main.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/material.c =================================================================== --- trunk/src/material.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/material.c 2008-05-07 09:51:23 UTC (rev 12) @@ -14,7 +14,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kMaterialCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/material.c,v 1.4 2007/07/13 05:53:42 koryn Exp $"; +const char* const kMaterialCvsHeader = "$Id$"; typedef struct MaterialData MaterialData; Property changes on: trunk/src/material.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/model.c =================================================================== --- trunk/src/model.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/model.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include <stdlib.h> /* CVS Header. */ -const char* const kModelCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/model.c,v 1.7 2007/08/15 10:11:42 koryn Exp $"; +const char* const kModelCvsHeader = "$Id$"; /* Unit variables. */ Property changes on: trunk/src/model.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/monster_object.c =================================================================== --- trunk/src/monster_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/monster_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -23,7 +23,7 @@ #include "kg_random.h" /* CVS Header. */ -const char* const kMonsterObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/monster_object.c,v 1.27 2008/04/25 05:26:14 koryn Exp $"; +const char* const kMonsterObjectCvsHeader = "$Id$"; static const unsigned int kDefaultMonsterTrackTime = 3; Property changes on: trunk/src/monster_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/monster_overrides.c =================================================================== --- trunk/src/monster_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/monster_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -28,7 +28,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kMonsterOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/monster_overrides.c,v 1.54 2008/04/25 05:26:14 koryn Exp $"; +const char* const kMonsterOverridesCvsHeader = "$Id$"; BaseVirtualPtr gMonsterBaseVirtuals = NULL; Property changes on: trunk/src/monster_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/mood.c =================================================================== --- trunk/src/mood.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/mood.c 2008-05-07 09:51:23 UTC (rev 12) @@ -18,7 +18,7 @@ #include "kg_set.h" /* CVS Header. */ -const char* const kMoodCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/mood.c,v 1.21 2007/07/13 05:53:42 koryn Exp $"; +const char* const kMoodCvsHeader = "$Id$"; static const char* kDefaultMoodSelfVerb = "says"; Property changes on: trunk/src/mood.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/mud_manager.c =================================================================== --- trunk/src/mud_manager.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/mud_manager.c 2008-05-07 09:51:23 UTC (rev 12) @@ -33,7 +33,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kMudManagerCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/mud_manager.c,v 1.83 2008/04/25 05:26:14 koryn Exp $"; +const char* const kMudManagerCvsHeader = "$Id$"; /* MudManagers that look after objects that are referenced by name. */ Property changes on: trunk/src/mud_manager.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/networking.c =================================================================== --- trunk/src/networking.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/networking.c 2008-05-07 09:51:23 UTC (rev 12) @@ -24,7 +24,7 @@ /* CVS Header. */ -const char* const kNetworkingCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/networking.c,v 1.32 2008/04/25 05:26:14 koryn Exp $"; +const char* const kNetworkingCvsHeader = "$Id$"; #define BUFFER_SIZE 512 Property changes on: trunk/src/networking.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/player_object.c =================================================================== --- trunk/src/player_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/player_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -27,7 +27,7 @@ #include "kg_random.h" /* CVS Header. */ -const char* const kPlayerObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/player_object.c,v 1.51 2008/04/09 00:39:20 koryn Exp $"; +const char* const kPlayerObjectCvsHeader = "$Id$"; const unsigned int kAutosaveTicks = 9000; /* 15 minutes. */ Property changes on: trunk/src/player_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/player_overrides.c =================================================================== --- trunk/src/player_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/player_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -27,7 +27,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kPlayerOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/player_overrides.c,v 1.47 2008/05/01 10:10:32 koryn Exp $"; +const char* const kPlayerOverridesCvsHeader = "$Id$"; BaseVirtualPtr gPlayerBaseVirtuals = NULL; Property changes on: trunk/src/player_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/player_virtuals.c =================================================================== --- trunk/src/player_virtuals.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/player_virtuals.c 2008-05-07 09:51:23 UTC (rev 12) @@ -14,7 +14,7 @@ #include "kg_memory.h" /* CVS Header. */ -const char* const kPlayerVirtualsCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/player_virtuals.c,v 1.13 2007/05/14 19:58:05 koryn Exp $"; +const char* const kPlayerVirtualsCvsHeader = "$Id$"; PlayerVirtualPtr gPlayerVirtuals = NULL; Property changes on: trunk/src/player_virtuals.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/plugin.c =================================================================== --- trunk/src/plugin.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/plugin.c 2008-05-07 09:51:23 UTC (rev 12) @@ -20,7 +20,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kPluginCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/plugin.c,v 1.38 2008/01/12 21:06:22 koryn Exp $"; +const char* const kPluginCvsHeader = "$Id$"; /* Plugins are treated like ADTs with external per-instance state and internal shared state. */ Property changes on: trunk/src/plugin.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/plugin_api.c =================================================================== --- trunk/src/plugin_api.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/plugin_api.c 2008-05-07 09:51:23 UTC (rev 12) @@ -27,7 +27,7 @@ #include "kg_debugging.h" /* CVS Header. */ -const char* const kPluginApiCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/plugin_api.c,v 1.70 2008/04/25 05:26:14 koryn Exp $"; +const char* const kPluginApiCvsHeader = "$Id$"; /* Internal routines. */ Property changes on: trunk/src/plugin_api.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/plugin_event.c =================================================================== --- trunk/src/plugin_event.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/plugin_event.c 2008-05-07 09:51:23 UTC (rev 12) @@ -13,7 +13,7 @@ #include "kg_memory_pool.h" /* CVS Header. */ -const char* const kPluginEventCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/plugin_event.c,v 1.26 2007/05/03 10:22:34 koryn Exp $"; +const char* const kPluginEventCvsHeader = "$Id$"; static MemoryPoolPtr uFreeList = NULL; Property changes on: trunk/src/plugin_event.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/portal_object.c =================================================================== --- trunk/src/portal_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/portal_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -24,7 +24,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kPortalObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/portal_object.c,v 1.13 2007/04/25 04:59:14 koryn Exp $"; +const char* const kPortalObjectCvsHeader = "$Id$"; static const unsigned int uDefaultPortalRoamSeconds = 600; Property changes on: trunk/src/portal_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/portal_overrides.c =================================================================== --- trunk/src/portal_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/portal_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -21,7 +21,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kPortalOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/portal_overrides.c,v 1.20 2007/05/12 06:59:11 koryn Exp $"; +const char* const kPortalOverridesCvsHeader = "$Id$"; BaseVirtualPtr gPortalBaseVirtuals = NULL; Property changes on: trunk/src/portal_overrides.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/potion_object.c =================================================================== --- trunk/src/potion_object.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/potion_object.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_random.h" /* CVS Header. */ -const char* const kPotionObjectCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/potion_object.c,v 1.14 2007/04/09 00:39:26 koryn Exp $"; +const char* const kPotionObjectCvsHeader = "$Id$"; static const char* uPotionColourString[] = Property changes on: trunk/src/potion_object.c ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/src/potion_overrides.c =================================================================== --- trunk/src/potion_overrides.c 2008-05-06 23:21:10 UTC (rev 11) +++ trunk/src/potion_overrides.c 2008-05-07 09:51:23 UTC (rev 12) @@ -19,7 +19,7 @@ #include "kg_string.h" /* CVS Header. */ -const char* const kPotionOverridesCvsHeader = "$Header: /cvsroot/slashmud/slashmudx/src/potion_overrides.c,v 1.22 2007/05/12 06:59:11 koryn Exp $"; +const ch... [truncated message content] |
From: <nt...@us...> - 2008-05-06 23:21:11
|
Revision: 11 http://slashmud.svn.sourceforge.net/slashmud/?rev=11&view=rev Author: ntiffin Date: 2008-05-06 16:21:10 -0700 (Tue, 06 May 2008) Log Message: ----------- Convert c++ to c, deprecate BulletinBoard. Modified Paths: -------------- trunk/plugins/BulletinBoard/BulletinBoard.cc trunk/plugins/BulletinBoard/Makefile.in trunk/plugins/Eliza/Makefile.am trunk/plugins/Eliza/Makefile.in trunk/plugins/Wanderer/Makefile.am trunk/plugins/Wanderer/Makefile.in Added Paths: ----------- trunk/plugins/Eliza/eliza.c trunk/plugins/Wanderer/wanderer.c Removed Paths: ------------- trunk/plugins/Eliza/eliza.cc trunk/plugins/Wanderer/wanderer.cc Modified: trunk/plugins/BulletinBoard/BulletinBoard.cc =================================================================== --- trunk/plugins/BulletinBoard/BulletinBoard.cc 2008-05-06 18:00:39 UTC (rev 10) +++ trunk/plugins/BulletinBoard/BulletinBoard.cc 2008-05-06 23:21:10 UTC (rev 11) @@ -26,7 +26,7 @@ #include "buffer_sizes.h" #include "object_types.h" -// KG files. +// libkoryn files. #include "kg_list.h" // Post plugin headers. @@ -111,6 +111,10 @@ void plugin_main(void *instance_data, unsigned int event_code, unsigned int event_ref) { + + smapi_log_warning("BulletinBoard plugin is deprecated, please do not use!"); + return; + switch (event_code) { case kPluginUpdate: @@ -479,20 +483,42 @@ pi_do_command(unsigned int event_ref, InstanceDataPtr instance_data) { LivingPtr living = (LivingPtr) smapi_extract_parameter(event_ref, kParameterObject); - string token = (char *) smapi_extract_parameter(event_ref, kParameterToken); - string remainder = (char *) smapi_extract_parameter(event_ref, kParameterRemainder); + string token; + string remainder; - if ((token == "") || (remainder == "") || (living == NULL)) + char * result = (char *) smapi_extract_parameter(event_ref, kParameterToken); + if (result) { + token = result; + } + result = (char *) smapi_extract_parameter(event_ref, kParameterRemainder); + if (result) + { + remainder = result; + } + + if ((token == "") || (living == NULL)) + { return kEventNotHandled; } + if (token == "bbhelp") + { + pi_do_post_help(living, remainder); + return kEventHandledToCompletion; + } + + /* Only commands that require remainder after this point. */ + if (remainder == "") + { + return kEventNotHandled; + } + if (token == "read") { pi_do_read(living, remainder, instance_data); return kEventHandledToCompletion; } - else if (token == "list") { if (remainder == "subject") @@ -524,11 +550,6 @@ return kEventHandledToCompletion; } - else if (token == "bbhelp") - { - pi_do_post_help(living, remainder); - return kEventHandledToCompletion; - } else if (token == "subject") { @@ -865,7 +886,7 @@ if (!remainder.empty()) { - for (unsigned int index = 1; index < smapi_get_number_of_characters(); index++) + for (unsigned int index = 0; index < smapi_get_number_of_characters(); index++) { player_name = smapi_get_indexed_character_name(index); if (player_name != "") @@ -1031,34 +1052,41 @@ char tokbuffer[LINE_MAX]; strncpy(tokbuffer, rem.c_str(), LINE_MAX); - - token = strtok(tokbuffer, " \t\n"); - remainder = strtok(NULL, " \t\n"); - - if (token != "room") + char * result = strtok(tokbuffer, " \t\n"); + + if (result) { - return; + token = result; } - if (smapi_instance_of((BasePtr) living, kAgentObject) != 1) + result = strtok(NULL, " \t\n"); + if (result) { - return; + remainder = result; } - - if (remainder == "all") + + if ((token == "room") || (token == "all")) { - save_list = pi_create_save_list(instance_data, true); + if (smapi_instance_of((BasePtr) living, kAgentObject) != 1) + { + return; + } + + if (remainder == "all") + { + save_list = pi_create_save_list(instance_data, true); + } + else + { + save_list = pi_create_save_list(instance_data, false); + } + + for (unsigned int index = 1; index < kg_list_items(save_list); index++) + { + smapi_catch_tell((BasePtr) living, (BasePtr) living, (char *) kg_list_get_indexed_item(save_list, index)); + } + + pi_do_list(living, eSortByMessageNum, instance_data); } - else - { - save_list = pi_create_save_list(instance_data, false); - } - - for (unsigned int index = 0; index < kg_list_items(save_list); index++) - { - smapi_catch_tell((BasePtr) living, (BasePtr) living, (char *) kg_list_get_indexed_item(save_list, index)); - } - - pi_do_list(living, eSortByMessageNum, instance_data); } #endif /* NDEBUG */ Modified: trunk/plugins/BulletinBoard/Makefile.in =================================================================== --- trunk/plugins/BulletinBoard/Makefile.in 2008-05-06 18:00:39 UTC (rev 10) +++ trunk/plugins/BulletinBoard/Makefile.in 2008-05-06 23:21:10 UTC (rev 11) @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -62,7 +62,7 @@ bulletinboard_so_DEPENDENCIES = $(am__DEPENDENCIES_1) bulletinboard_so_LINK = $(CXXLD) $(bulletinboard_so_CXXFLAGS) \ $(CXXFLAGS) $(bulletinboard_so_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @@ -199,6 +199,7 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ common_sources = BulletinBoard.cc Message.cc MessageList.cc @@ -374,8 +375,8 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -387,8 +388,8 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -398,13 +399,12 @@ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -545,8 +545,8 @@ all-local: - test -d ../bin || mkdir ../bin - cp ${noinst_PROGRAMS} ../bin + test -d ../../dist/Plugins || mkdir ../../dist/Plugins + cp ${noinst_PROGRAMS} ../../dist/Plugins/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Modified: trunk/plugins/Eliza/Makefile.am =================================================================== --- trunk/plugins/Eliza/Makefile.am 2008-05-06 18:00:39 UTC (rev 10) +++ trunk/plugins/Eliza/Makefile.am 2008-05-06 23:21:10 UTC (rev 11) @@ -1,19 +1,19 @@ noinst_PROGRAMS = eliza.debug.so eliza.so -common_sources = eliza.cc -common_cxxflags = @CXXFLAGS@ @PLUGIN_CXXFLAGS@ +common_sources = eliza.c +common_cflags = @CFLAGS@ @PLUGIN_CFLAGS@ common_ldadd = @PLUGIN_LDADD@ common_ldflags = @PLUGIN_COMMON_LDFLAGS@ eliza_so_SOURCES = ${common_sources} -eliza_so_CXXFLAGS = @BUILD_CXXFLAGS@ -DNDEBUG ${common_cxxflags} +eliza_so_CFLAGS = @BUILD_CFLAGS@ -DNDEBUG ${common_cflags} eliza_so_LDADD = ${common_ldadd} eliza_so_LDFLAGS = ${common_ldflags} @PLUGIN_BUILD_LDFLAGS@ eliza_debug_so_SOURCES = ${common_sources} -eliza_debug_so_CXXFLAGS = @DEBUG_CXXFLAGS@ -DDEBUG_VERSION ${common_cxxflags} +eliza_debug_so_CFLAGS = @DEBUG_CFLAGS@ -DDEBUG_VERSION ${common_cflags} eliza_debug_so_LDADD = ${common_ldadd} eliza_debug_so_LDFLAGS = ${common_ldflags} @PLUGIN_DEBUG_LDFLAGS@ Modified: trunk/plugins/Eliza/Makefile.in =================================================================== --- trunk/plugins/Eliza/Makefile.in 2008-05-06 18:00:39 UTC (rev 10) +++ trunk/plugins/Eliza/Makefile.in 2008-05-06 23:21:10 UTC (rev 11) @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -48,22 +48,21 @@ eliza_debug_so_OBJECTS = $(am_eliza_debug_so_OBJECTS) am__DEPENDENCIES_1 = eliza_debug_so_DEPENDENCIES = $(am__DEPENDENCIES_1) -eliza_debug_so_LINK = $(CXXLD) $(eliza_debug_so_CXXFLAGS) $(CXXFLAGS) \ +eliza_debug_so_LINK = $(CCLD) $(eliza_debug_so_CFLAGS) $(CFLAGS) \ $(eliza_debug_so_LDFLAGS) $(LDFLAGS) -o $@ am__objects_2 = eliza_so-eliza.$(OBJEXT) am_eliza_so_OBJECTS = $(am__objects_2) eliza_so_OBJECTS = $(am_eliza_so_OBJECTS) eliza_so_DEPENDENCIES = $(am__DEPENDENCIES_1) -eliza_so_LINK = $(CXXLD) $(eliza_so_CXXFLAGS) $(CXXFLAGS) \ +eliza_so_LINK = $(CCLD) $(eliza_so_CFLAGS) $(CFLAGS) \ $(eliza_so_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(eliza_debug_so_SOURCES) $(eliza_so_SOURCES) DIST_SOURCES = $(eliza_debug_so_SOURCES) $(eliza_so_SOURCES) ETAGS = etags @@ -191,24 +190,25 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -common_sources = eliza.cc -common_cxxflags = @CXXFLAGS@ @PLUGIN_CXXFLAGS@ +common_sources = eliza.c +common_cflags = @CFLAGS@ @PLUGIN_CFLAGS@ common_ldadd = @PLUGIN_LDADD@ common_ldflags = @PLUGIN_COMMON_LDFLAGS@ eliza_so_SOURCES = ${common_sources} -eliza_so_CXXFLAGS = @BUILD_CXXFLAGS@ -DNDEBUG ${common_cxxflags} +eliza_so_CFLAGS = @BUILD_CFLAGS@ -DNDEBUG ${common_cflags} eliza_so_LDADD = ${common_ldadd} eliza_so_LDFLAGS = ${common_ldflags} @PLUGIN_BUILD_LDFLAGS@ eliza_debug_so_SOURCES = ${common_sources} -eliza_debug_so_CXXFLAGS = @DEBUG_CXXFLAGS@ -DDEBUG_VERSION ${common_cxxflags} +eliza_debug_so_CFLAGS = @DEBUG_CFLAGS@ -DDEBUG_VERSION ${common_cflags} eliza_debug_so_LDADD = ${common_ldadd} eliza_debug_so_LDFLAGS = ${common_ldflags} @PLUGIN_DEBUG_LDFLAGS@ all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -257,57 +257,57 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eliza_debug_so-eliza.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eliza_so-eliza.Po@am__quote@ -.cc.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +.c.o: +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< -.cc.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +.c.obj: +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -eliza_debug_so-eliza.o: eliza.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CXXFLAGS) $(CXXFLAGS) -MT eliza_debug_so-eliza.o -MD -MP -MF $(DEPDIR)/eliza_debug_so-eliza.Tpo -c -o eliza_debug_so-eliza.o `test -f 'eliza.cc' || echo '$(srcdir)/'`eliza.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/eliza_debug_so-eliza.Tpo $(DEPDIR)/eliza_debug_so-eliza.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eliza.cc' object='eliza_debug_so-eliza.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CXXFLAGS) $(CXXFLAGS) -c -o eliza_debug_so-eliza.o `test -f 'eliza.cc' || echo '$(srcdir)/'`eliza.cc +eliza_debug_so-eliza.o: eliza.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CFLAGS) $(CFLAGS) -MT eliza_debug_so-eliza.o -MD -MP -MF $(DEPDIR)/eliza_debug_so-eliza.Tpo -c -o eliza_debug_so-eliza.o `test -f 'eliza.c' || echo '$(srcdir)/'`eliza.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eliza_debug_so-eliza.Tpo $(DEPDIR)/eliza_debug_so-eliza.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eliza.c' object='eliza_debug_so-eliza.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CFLAGS) $(CFLAGS) -c -o eliza_debug_so-eliza.o `test -f 'eliza.c' || echo '$(srcdir)/'`eliza.c -eliza_debug_so-eliza.obj: eliza.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CXXFLAGS) $(CXXFLAGS) -MT eliza_debug_so-eliza.obj -MD -MP -MF $(DEPDIR)/eliza_debug_so-eliza.Tpo -c -o eliza_debug_so-eliza.obj `if test -f 'eliza.cc'; then $(CYGPATH_W) 'eliza.cc'; else $(CYGPATH_W) '$(srcdir)/eliza.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/eliza_debug_so-eliza.Tpo $(DEPDIR)/eliza_debug_so-eliza.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eliza.cc' object='eliza_debug_so-eliza.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CXXFLAGS) $(CXXFLAGS) -c -o eliza_debug_so-eliza.obj `if test -f 'eliza.cc'; then $(CYGPATH_W) 'eliza.cc'; else $(CYGPATH_W) '$(srcdir)/eliza.cc'; fi` +eliza_debug_so-eliza.obj: eliza.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CFLAGS) $(CFLAGS) -MT eliza_debug_so-eliza.obj -MD -MP -MF $(DEPDIR)/eliza_debug_so-eliza.Tpo -c -o eliza_debug_so-eliza.obj `if test -f 'eliza.c'; then $(CYGPATH_W) 'eliza.c'; else $(CYGPATH_W) '$(srcdir)/eliza.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eliza_debug_so-eliza.Tpo $(DEPDIR)/eliza_debug_so-eliza.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eliza.c' object='eliza_debug_so-eliza.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_debug_so_CFLAGS) $(CFLAGS) -c -o eliza_debug_so-eliza.obj `if test -f 'eliza.c'; then $(CYGPATH_W) 'eliza.c'; else $(CYGPATH_W) '$(srcdir)/eliza.c'; fi` -eliza_so-eliza.o: eliza.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CXXFLAGS) $(CXXFLAGS) -MT eliza_so-eliza.o -MD -MP -MF $(DEPDIR)/eliza_so-eliza.Tpo -c -o eliza_so-eliza.o `test -f 'eliza.cc' || echo '$(srcdir)/'`eliza.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/eliza_so-eliza.Tpo $(DEPDIR)/eliza_so-eliza.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eliza.cc' object='eliza_so-eliza.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CXXFLAGS) $(CXXFLAGS) -c -o eliza_so-eliza.o `test -f 'eliza.cc' || echo '$(srcdir)/'`eliza.cc +eliza_so-eliza.o: eliza.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CFLAGS) $(CFLAGS) -MT eliza_so-eliza.o -MD -MP -MF $(DEPDIR)/eliza_so-eliza.Tpo -c -o eliza_so-eliza.o `test -f 'eliza.c' || echo '$(srcdir)/'`eliza.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eliza_so-eliza.Tpo $(DEPDIR)/eliza_so-eliza.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eliza.c' object='eliza_so-eliza.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CFLAGS) $(CFLAGS) -c -o eliza_so-eliza.o `test -f 'eliza.c' || echo '$(srcdir)/'`eliza.c -eliza_so-eliza.obj: eliza.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CXXFLAGS) $(CXXFLAGS) -MT eliza_so-eliza.obj -MD -MP -MF $(DEPDIR)/eliza_so-eliza.Tpo -c -o eliza_so-eliza.obj `if test -f 'eliza.cc'; then $(CYGPATH_W) 'eliza.cc'; else $(CYGPATH_W) '$(srcdir)/eliza.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/eliza_so-eliza.Tpo $(DEPDIR)/eliza_so-eliza.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='eliza.cc' object='eliza_so-eliza.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CXXFLAGS) $(CXXFLAGS) -c -o eliza_so-eliza.obj `if test -f 'eliza.cc'; then $(CYGPATH_W) 'eliza.cc'; else $(CYGPATH_W) '$(srcdir)/eliza.cc'; fi` +eliza_so-eliza.obj: eliza.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CFLAGS) $(CFLAGS) -MT eliza_so-eliza.obj -MD -MP -MF $(DEPDIR)/eliza_so-eliza.Tpo -c -o eliza_so-eliza.obj `if test -f 'eliza.c'; then $(CYGPATH_W) 'eliza.c'; else $(CYGPATH_W) '$(srcdir)/eliza.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eliza_so-eliza.Tpo $(DEPDIR)/eliza_so-eliza.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eliza.c' object='eliza_so-eliza.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eliza_so_CFLAGS) $(CFLAGS) -c -o eliza_so-eliza.obj `if test -f 'eliza.c'; then $(CYGPATH_W) 'eliza.c'; else $(CYGPATH_W) '$(srcdir)/eliza.c'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -319,8 +319,8 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -330,13 +330,12 @@ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -477,8 +476,8 @@ all-local: - test -d ../bin || mkdir ../bin - cp ${noinst_PROGRAMS} ../bin + test -d ../../dist/Plugins || mkdir ../../dist/Plugins + cp ${noinst_PROGRAMS} ../../dist/Plugins/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Added: trunk/plugins/Eliza/eliza.c =================================================================== --- trunk/plugins/Eliza/eliza.c (rev 0) +++ trunk/plugins/Eliza/eliza.c 2008-05-06 23:21:10 UTC (rev 11) @@ -0,0 +1,1501 @@ +/* ---------------------------------------------------------------------------- + + $Id: eliza.cc 8 2008-05-05 22:50:23Z ntiffin $ + + © Copyright 2004 Neil Tiffin. All Rights Reserved. + + Feel free to adapt this code to create your own SlashMUD Plugins. + + This source file is distributed under the terms of "The SlashMUD Licence". + + Created: 30 Dec 2004 by Neil Tiffin. Based on code by Koryn Grant. + + This plugins also adopted from Eliza code found on the web + (http://hps.elte.hu/~gk/Eliza/). + + The header from the perl version: + + #!/usr/bin/perl + # liz.pl by Andrew Daviel <an...@Va...> (http://vancouver-webpages.com) + # based on "ELIZA.BAS" by Creative Computing, found during an archaelogical dig + # on my DOS hard drive + + The header from the basic version: + + 5 PRINT TAB(16)"**************************" + 10 PRINT TAB(26)"ELIZA" + 20 PRINT TAB(20)"CREATIVE COMPUTING" + 30 PRINT TAB(18)"MORRISTOWN, NEW JERSEY":PRINT + 40 PRINT TAB(19)"ADAPTED FOR IBM PC BY" + 50 PRINT TAB(20)"PATRICIA DANIELSON AND PAUL HASHFIELD" + 52 PRINT TAB(21)"BE SURE THAT THE CAPS LOCK IS ON + 53 PRINT:PRINT TAB(16)"PLEASE DON'T USE COMMAS OR PERIODS IN YOUR INPUTS":PRINT + + No copyrights were evident. + + Additional inspiration from http://www.alicebot.org/ + ------------------------------------------------------------------------------ */ + +/* SlashMUD files. */ +#include "plugin_api.h" +#include "plugin_common.h" +#include "object_types.h" +#include "buffer_sizes.h" + +/* libkoryn headers. */ +#include "kg_list.h" +#include "kg_string.h" +#include "kg_debugging.h" + +/* C Standard Library headers. */ +#include <assert.h> +#include <string.h> +#include <stdio.h> + + +/* File scope constants */ +static const unsigned int kDefaultUpdateInterval = 120; + +typedef struct InstanceData +{ + unsigned int mNextTimeToUpdate; /* game seconds for next update/move */ + unsigned int mUpdateInterval; /* interval between updates */ + bool mIsRoomOpen; /* Is room open for Eliza to operate. */ + unsigned int mRoomCurrent; /* position on path of current room. */ + int mRoomDirection; /* + forward - backward. */ + + ListPtr mRoomPathList; /* list or room names that form a path. */ + bool mInConversation; /* if in conversation do not roam */ + /* it would be rude. */ + unsigned int mKeyNotFoundIndex; /* start of the no key found response */ + +} +InstanceData, *InstanceDataPtr; + +#define PLUGIN_NAME "eliza" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + void plugin_main(void *instance_data, unsigned int event_code, unsigned int event_ref); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +/* Lifecycle events. */ +static void pi_register_events(unsigned int event_ref); +static InstanceDataPtr pi_create_instance_data(unsigned int event_ref); +static void pi_dispose_instance_data(InstanceDataPtr instance_data); +static void pi_initialise(const unsigned int event_ref, InstanceDataPtr instance_data); + +/* Game events. */ +static unsigned int pi_parse_line(const unsigned int event_ref, InstanceDataPtr instance_data); +static void pi_update(const unsigned int event_ref, InstanceDataPtr instance_data); +static ListPtr pi_create_save_list(InstanceDataPtr instance_data); +static void pi_process_catch_tell(const unsigned int event_ref, InstanceDataPtr instance_data); +static unsigned int pi_process_receive_gift(const unsigned int event_ref, InstanceDataPtr instance_data); +static void pi_do_eliza(LivingPtr teller, LivingPtr self, const char *in_message, InstanceDataPtr instance_data); + +/* Debug events. */ +#ifndef NDEBUG +static void pi_note_ptrs(InstanceDataPtr instance_data); +static unsigned int pi_do_command(const unsigned int event_ref, InstanceDataPtr instance_data); +static void pi_do_agent_debug(const LivingPtr theObject, char *remainder, InstanceDataPtr instance_data); +#endif + +const char *gElizaKeyNotFound = "no key found"; + +const char *gElizaIgnoreWords[] = { + "a", + "about", + "an", + "and", + "are", + "as", + "at", + "be", + "by", + "from", + "how", + "i", + "if", + "in", + "is", + "it", + "of", + "on", + "or", + "that", + "the", + "this", + "to", + "we", + "what", + "when", + "where", + "which", + "with", + NULL +}; + +struct ElizaConjugations +{ + const char *p1; + const char *p2; + +} ElizaConjugations, *ElizaConjugationsPtr; + +struct ElizaConjugations gElizaConjugations[] = { + {" are ", " am "}, + {" were ", " was "}, + {" you ", " i "}, + {" your", " my "}, + {" i have ", " you have "}, + {" i am ", " you are "}, + {" me ", " you "}, + {NULL, NULL} +}; + + +const char *gElizaPrompt1[] = { + "Go on!", + "You seem rather silent.", + "Tell me, ^n, do you have any dreams?", + "Tell me more!", + NULL +}; + + +const char *gElizaPrompt2[] = { + "^n?", + "Are you still there?", + "Are you asleep?", + "When I snap my fingers you will wake up!", + "Are you still asleep?", + "Hello?", + NULL +}; + +struct ElizaSubstitutions +{ + const char *source; + const char *replace_with; +} +ElizaSubstitutions, *ElizaSubstitutionsPtr; + +/* the following are always substituted in the input text + in order to standarize it */ +struct ElizaSubstitutions gElizaSubstitutions[] = { + /* substitutsions */ + {"ain't", "is not"}, + {"aren't", "are not"}, + {"can't", "can not"}, + {"cannot", "can not"}, + {"couldn't", "could not"}, + {"didn't", "did not"}, + {"don't", "do not"}, + {"gonna", "going to"}, + {"hadn't", "had not"}, + {"hasn't", "has not"}, + {"hasnt", "has not"}, + {"haven't", "have not"}, + {"he'd", "he would"}, + {"he'll", "he will"}, + {"he's", "he is"}, + {"I'd", "I would"}, + {"I'll", "I will"}, + {"I'm", "I am"}, + {"I've", "I have"}, + {"isn't", "is not"}, + {"it'd", "it would"}, + {"it'll", "it will"}, + {"it's", "it is"}, + {"she'd", "she would"}, + {"she'll", "she will"}, + {"she's", "she is"}, + {"shouldn't", "should not"}, + {"they'd", "they would"}, + {"they'll", "they will"}, + {"they're", "they are"}, + {"they've", "they have"}, + {"wanna", "want to"}, + {"wasn't", "was not"}, + {"we'd", "we would"}, + {"we'll", "we will"}, + {"we're", "we are"}, + {"we've", "we have"}, + {"weren't", "were not"}, + {"what'd", "what did"}, + {"what'll", "what will"}, + {"what's", "what is"}, + {"when'd", "when did"}, + {"when'll", "when will"}, + {"when's", "when is"}, + {"where'd", "where did"}, + {"where'll", "where will"}, + {"where's", "where is"}, + {"who'd", "who did"}, + {"who'll", "who will"}, + {"who's", "who is"}, + {"why'd", "why did"}, + {"why'll", "why will"}, + {"why's", "why is"}, + {"won't", "will not"}, + {"wouldn't", "would not"}, + {"y'all", "you all"}, + {"you'd", "you would"}, + {"you'll", "you will"}, + {"you're", "you are"}, + {"youre", "you are"}, + {"you've", "you have"}, + {"AFAIC", "as far as I am concerned"}, + {"AFAICR", "as far as I can recall"}, + {"AFAICT", "as far as I can tell"}, + {"AFAIK", "as far as I know"}, + {"AFAIR", "as far as I recall"}, + {"AFAIU", "as far as I understand"}, + {"AFD", "away from desktop"}, + {"AFK", "away from keyboard"}, + {"AFU", "all fucked up"}, + {"AFW", "away from window"}, + {"AIU", "as I understand"}, + {"AIUI", "as I understand it"}, + {"AKA", "also known as"}, + {"ASAIC", "as soon as I can"}, + {"ASAP", "as soon as possible"}, + {"ATM", "at the moment"}, + {"AWOL", "absent without official leave"}, + {"AYBABTU", "all your base are belong to us"}, + {"B/C", "because"}, + {"B/S", "bullshit"}, + {"B/W", "between"}, + {"BBIAB", "be back in a bit"}, + {"BBL", "I will be back later"}, + {"BBS", "be back soon"}, + {"BBT", "be back tomorrow"}, + {"BFD", "big fucking deal"}, + {"BIAB", "back in a bit"}, + {"BIAF", "back in a few"}, + {"BIALW", "back in a little while"}, + {"BIAS", "back in a second"}, + {"BIAW", "back in a while"}, + {"BOATILAS", "bend over and take it like a slut"}, + {"BOFH", "bastard operator from hell"}, + {"BOGAHICA", "bend over, grab ankles, here it comes again"}, + {"BOHICA", "bend over here it comes again"}, + {"BRB", "I will be right back"}, + {"BS", "bullshit"}, + {"BTDT", "been there, done that"}, + {"BTTH", "boot to the head"}, + {"BTW", "by the way"}, + {"CMIIW", "correct me if I am wrong"}, + {"CNP", "continued in my next post"}, + {"COB", "close of business day"}, + {"COTS", "commercial off-the-shelf"}, + {"CYA", "see you around"}, + {"D/L", "download"}, + {"DIY", "do it yourself"}, + {"DKDC", "don't know, don't care"}, + {"DSTM", "don't shoot the messenger"}, + {"DTRT", "do the right thing"}, + {"DTWT", "do the wrong thing"}, + {"DWIM", "do what I mean"}, + {"EG", "evil grin"}, + {"EMSG", "email message"}, + {"EOB", "end of business day"}, + {"EOD", "end of discussion"}, + {"EOL", "end of life"}, + {"ETLA", "extended three letter acronym"}, + {"EWAG", "experienced wild-ass guess"}, + {"FAQ", "frequently asked question"}, + {"FCFS", "first come first served"}, + {"FIGJAM", "fuck I am good, just ask me"}, + {"FIIK", "fuck if I know"}, + {"FIIR", "fuck if I remember"}, + {"FINK", "Fink is not an acronym. See http://fink.sourceforge.net/faq/general.php#naming"}, + {"FM", "fucking magic"}, + {"FOAD", "fall over and die"}, + {"FSDO", "for some definition of"}, + {"FSVO", "for some value of"}, + {"FTFM", "fuck the fuckin' manual!"}, + {"FUBAR", "fucked up beyond all recognition"}, + {"FUD", "fear, uncertainty and doubt"}, + {"FWIW", "for what it's worth"}, + {"FYI", "for your information"}, + {"G", "grin"}, + {"G/C", "garbage collect"}, + {"GAC", "get a clue"}, + {"GAL", "get a life"}, + {"GIGO", "garbage in, garbage out"}, + {"GMTA", "great minds think alike"}, + {"GTFO", "get the fuck out"}, + {"GTG", "got to go"}, + {"HAND", "have a nice day"}, + {"HHIS", "hanging head in shame"}, + {"HICA", "here it comes again"}, + {"HTH", "hope this helps"}, + {"IAC", "in any case"}, + {"IANAL", "I am not a lawyer"}, + {"IC", "I see"}, + {"ICBW", "I could be wrong"}, + {"ICCL", "I couldn't care less"}, + {"IHAFC", "I haven't a fucking clue"}, + {"IHBW", "I have been wrong"}, + {"IHNFC", "I have no fucking clue"}, + {"IIANM", "if I am not mistaken"}, + {"IIRC", "if I recall correctly"}, + {"IIUC", "if I understand correctly"}, + {"IMAO", "in my arrogant opinion"}, + {"IMCO", "in my considered opinion"}, + {"IMHO", "in my humble opinion"}, + {"IMNSHO", "in my not so humble opinion"}, + {"IMO", "in my opinion"}, + {"IOW", "in other words"}, + {"IRL", "in real life"}, + {"ISAGN", "I see a great need"}, + {"ISTM", "it seems to me"}, + {"ISTR", "I seem to recall"}, + {"ITYM", "I think you mean"}, + {"IWBNI", "it would be nice if"}, + {"IYSS", "If you say so"}, + {"IYSS", "if you say so"}, + {"J/K", "just kidding"}, + {"JHD", "just hit ``delete''"}, + {"JIC", "just in case"}, + {"JK", "just kidding"}, + {"JMO", "just my opinion"}, + {"JTLYK", "just to let you know"}, + {"KISS", "keep it simple, stupid"}, + {"KITA", "kick in the ass"}, + {"KNF", "kernel normal form"}, + {"L8R", "later"}, + {"LART", "luser attitude readjustment tool (ie, hammer)"}, + {"LBNL", "last but not least"}, + {"LJBF", "let's just be friends"}, + {"LMAO", "laughing my ass off"}, + {"LMSO", "laughing my socks off"}, + {"LOL", "laughing out loud"}, + {"LTNS", "long time no see"}, + {"MIA", "missing in action"}, + {"MMU", "memory management unit"}, + {"MOTAS", "member of the appropriate sex"}, + {"MOTOS", "member of the opposite sex"}, + {"MOTSS", "member of the same sex"}, + {"MTF", "more to follow"}, + {"MYOB", "mind your own business"}, + {"N/M", "never mind"}, + {"NBD", "no big deal"}, + {"NFC", "no fucking clue"}, + {"NFI", "no fucking idea"}, + {"NFW", "no fucking way"}, + {"NIH", "not invented here"}, + {"NMF", "not my fault"}, + {"NMP", "not my problem"}, + {"NOYB", "none of your business"}, + {"NOYFB", "none of your fucking business"}, + {"NP", "no problem"}, + {"NRFPT", "not ready for prime time"}, + {"NRN", "no reply necessary"}, + {"OIC", "oh, I see"}, + {"OMG", "oh, my god"}, + {"OT", "off topic"}, + {"OTL", "out to lunch"}, + {"OTOH", "on the other hand"}, + {"OTT", "over the top"}, + {"OTTOMH", "off the top of my head"}, + {"PEBKAC", "problem exists between keyboard and chair"}, + {"PFO", "please fuck off"}, + {"PFY", "pimply faced youth"}, + {"PITA", "pain in the ass"}, + {"PKSP", "pound keys and spew profanity"}, + {"PNG", "persona non grata"}, + {"PNP", "plug and pray"}, + {"POC", "point of contact"}, + {"POLA", "principle of least astonishment"}, + {"POLS", "principle of least surprise"}, + {"POS", "piece of shit"}, + {"PPL", "pretty please"}, + {"PTV", "parental tunnel vision"}, + {"QED", "quod erat demonstrandum"}, + {"RFC", "request for comments"}, + {"RIP", "rest in peace"}, + {"RL", "real life"}, + {"RLC", "rod length check"}, + {"ROFL", "rolling on floor laughing"}, + {"ROFLMAO", "rolling on floor laughing my ass off"}, + {"ROTFL", "rolling on the floor laughing"}, + {"RP", "responsible person"}, + {"RSN", "real soon now"}, + {"RTFB", "read the fucking book"}, + {"RTFC", "read the fucking code"}, + {"RTFD", "read the fucking documentation"}, + {"RTFM", "read the fucking manual"}, + {"RTFMP", "read the fucking man page"}, + {"RTFS", "read the fucking source"}, + {"SCNR", "sorry, could not resist"}, + {"SEP", "someone else's problem"}, + {"SFA", "sweet fuck all"}, + {"SHID", "slaps head in disgust"}, + {"SIMCA", "sitting in my chair amused"}, + {"SMLSFB", "so many losers, so few bullets"}, + {"SMOP", "simple matter of programming"}, + {"SNAFU", "situation normal, all fucked up"}, + {"SNERT", "snot-nosed egotistical rude teenager"}, + {"SNMP", "sorry, not my problem"}, + {"SNR", "signal to noise ratio"}, + {"SO", "significant other"}, + {"SOB", "son of a bitch"}, + {"SOL", "shit out of luck"}, + {"SOP", "standard operating procedure"}, + {"SSIA", "subject says it all"}, + {"STFA", "search the fucking archives"}, + {"STFU", "shut the fuck up"}, + {"SUS", "stupid user syndrome"}, + {"SWAG", "silly, wild-assed guess"}, + {"SWAHBI", "silly, wild-assed hare-brained idea"}, + {"SWMBO", "she who must be obeyed"}, + {"TANSTAAFL", "there ain't no such thing as a free lunch"}, + {"TBC", "to be continued"}, + {"TBD", "to be {decided,determined,done}"}, + {"TBOMK", "the best of my knowledge"}, + {"THNX", "thanks"}, + {"THX", "thanks"}, + {"TIA", "thanks in advance"}, + {"TINC", "there is no cabal"}, + {"TLA", "three letter acronym"}, + {"TLB", "translation lookaside buffer"}, + {"TMA", "too many abbreviations"}, + {"TMI", "too much information"}, + {"TNF", "The NetBSD Foundation"}, + {"TOEFL", "test of english as a foreign language"}, + {"TPTB", "the powers that be"}, + {"TRT", "the right thing"}, + {"TTBOMK", "to the best of my knowledge"}, + {"TTFN", "ta ta for now"}, + {"TTYL", "talk to you later"}, + {"TWIAVBP", "the world is a very big place"}, + {"TY", "thank you"}, + {"TYVM", "thank you very much"}, + {"U/L", "upload"}, + {"UTSL", "use the source, Luke"}, + {"VEG", "very evil grin"}, + {"W/", "with"}, + {"W/O", "without"}, + {"WAG", "wild ass guess"}, + {"WB", "welcome back"}, + {"WFM", "works for me"}, + {"WIBNI", "wouldn't it be nice if"}, + {"WIP", "work in progress"}, + {"WOFTAM", "waste of fucking time and money"}, + {"WOMBAT", "waste of money, brain, and time"}, + {"WRT", "with respect to"}, + {"WTF", "{what,where,who,why} the fuck"}, + {"WTH", "{what,where,who,why} the hell"}, + {"WYSIWYG", "what you see is what you get"}, + {"YALIMO", "you are lame, in my opinion"}, + {"YHBT", "you have been trolled"}, + {"YHL", "you have lost"}, + {"YKWIM", "you know what I mean"}, + {"YMA", "yo momma's ass"}, + {"YMMV", "your mileage may vary"}, + {"YW", "you're welcome"}, + {NULL, NULL} +}; + + +struct ElizaSubstitutions gElizaSubGender[] = { + /* masculine -> feminine */ + {"he", "she"}, + {"him", "her"}, + {"himself", "herself"}, + {"his", "her"}, + + /* feminine -> masculine */ + {"her", "him"}, + {"hers", "his"}, + {"herself", "himself"}, + {"she", "he"}, + {NULL, NULL} +}; + +struct ElizaSubstitutions gElizaSubPerson1_3[] = { + /* 1st -> 3rd person (masculine) */ + {"I", "he"}, + {"me", "him"}, + {"mine", "his"}, + {"my", "his"}, + {"myself", "himself"}, + + /* 3rd -> 1st person (masculine) */ + {"he", "I"}, + {"him", "me"}, + {"himself", "myself"}, + {"his", "my"}, + + /* 3rd -> 1st person (feminine) */ + {"her", "me"}, + {"hers", "mine"}, + {"herself", "myself"}, + {"she", "I"}, + {NULL, NULL} + +}; + +struct ElizaSubstitutions gElizaSubPerson1_2[] = { + /* 1st -> 2nd person */ + {"I", "you"}, + {"me", "you"}, + {"mine", "yours"}, + {"my", "your"}, + {"myself", "yourself"}, + + /* 2nd -> 1st person */ + {"you", "me"}, + {"your", "my"}, + {"yours", "mine"}, + {"yourself", "myself"}, + {NULL, NULL} +}; + + +struct ElizaSubstitutions gElizaDataAlias[] = { + {"how", "what"}, + {"who", "what"}, + {"where", "what"}, + {"when", "what"}, + {"why", "what"}, + {NULL, NULL} +}; + + +struct ElizaData +{ + const char *key; + const char *reply; + int use_next; /* this points to the entry to use next */ + /* 0 means use this one. */ + /* -1 means last one */ + /* if the keys don't match then reset use_next */ + unsigned int weight; /* higher priority keywords take precident */ + /* default to 1000 */ + /* 1 is highest priority */ +} +ElizaData, *gElizaDataPtr; + +/* each keyword must have 2 entries */ +struct ElizaData gElizaData[] = { + /* can you */ + {"can you", "Don't you believe that I can ^v?", 0, 1000}, + {"can you", "Perhaps you would like to be able to ^v.", 0, 1000}, + {"can you", "You want me to be able to ^v?", -1, 1000}, + /* can i */ + {"can i", "Perhaps you don't want to ^v?", 0, 1000}, + {"can i", "Do you want to be able to ^v?", -1, 1000}, + /* you are, youre */ + {"you are", "What makes you think I am ^v?", 0, 1000}, + {"you are", "Does it make you happy to think I am ^v?", 0, 1000}, + {"you are", "Perhaps you would like to be ^v.", 0, 1000}, + {"you are", "Do you sometimes wish you were ^v?", -1, 1000}, + /* i do not */ + {"i do not", "So you don't ^v?", 0, 1000}, + {"i do not", "Why don't you ^v?", 0, 1000}, + {"i do not", "So you'd like to ^v!", 0, 1000}, + {"i do not", "Does this bother you?", -1, 1000}, + /* i feel */ + {"i feel", "I'd like to know more about ^v!", 0, 1000}, + {"i feel", "Do you often feel ^v?", 0, 1000}, + {"i feel", "Do you enjoy feeling ^v?", -1, 1000}, + /* why dont you */ + {"why do not you", "Do you really believe I dont ^v?", -1, 1000}, + {"why do not you", "Perhaps, in my own time, I will ^v.", 0, 1000}, + {"why do not you", "Do you want me to ^v?", 0, 1000}, + /* why cant i */ + {"why can not i", "Do you think I should be able to ^v?", 0, 1000}, + {"why can not i", "Why can't you ^v?", -1, 1000}, + /* are you */ + {"are you", "Why are you interested in whether or not I am ^v?", 0, 1000}, + {"are you", "Would you prefer I were not ^v?", 0, 1000}, + {"are you", "Perhaps in your fantasies I am ^n.", -1, 1000}, + /* i cant */ + {"i can not", "How do you know you can't ^v?", 0, 1000}, + {"i can not", "Have you tried?", 0, 1000}, + {"i can not", "Perhaps you can, now,!", -1, 1000}, + /* i am, im */ + {"i am", "So you came to me because you are ^v.", 0, 1000}, + {"i am", "How long have you been ^v?", 0, 1000}, + {"i am", "Do you think it is normal to be ^v?", 0, 1000}, + {"i am", "Do you enjoy being ^v?", -1, 1000}, + /* you */ + {"you", "Let's get back to your problem.", 0, 1000}, + {"you", "Oh, I ^v?", 0, 1000}, + {"you", "Well, let's talk about you for a while now.", -1, 1000}, + /* i want */ + {"i want", "What would it mean to you if you got ^v?", 0, 1000}, + {"i want", "Why do you want ^v?", 0, 1000}, + {"i want", "Suppose you soon got ^v.", 0, 1000}, + {"i want", "What if you never got ^v?", 0, 1000}, + {"i want", "Sometimes I also want ^v.", -1, 1000}, + /* what, how, who, where, when, why */ + {"what", "Why do you ask?", 0, 1000}, + {"what", "Does that question interest you?", 0, 1000}, + {"what", "What answer would please you most?", 0, 1000}, + {"what", "What do you think?", 0, 1000}, + {"what", "Are such questions on your mind often?", 0, 1000}, + {"what", "What do you really want to know?", 0, 1000}, + {"what", "Have you asked anyone else?", 0, 1000}, + {"what", "Have you asked these questions before?", 0, 1000}, + {"what", "What exactly are you thinking about?", -1, 1000}, + /* name */ + {"name", "Well, lets be nice, now.", 0, 1000}, + {"name", "Let's not talk about people behind their back.", -1, 1000}, + /* because */ + {"because", "Is that the real reason?", 0, 1000}, + {"because", "Any other reasons?", 0, 1000}, + {"because", "Does that reason explain anything else?", 0, 1000}, + {"because", "What other reasons might there be?", -1, 1000}, + /* sorry */ + {"sorry", "Oh, excuse me!", 0, 1000}, + {"sorry", "No hard feelings, now.", 0, 1000}, + {"sorry", "Why do you feel sorry?", 0, 1000}, + {"sorry", "Listen, I'm on your side.", -1, 1000}, + /* dream */ + {"dream", "What does the dream suggest to you?", 0, 1000}, + {"dream", "Do you dream often?", 0, 1000}, + {"dream", "It must be nice to have dreams. I don't...", 0, 1000}, + {"dream", "The dream comes from deep in your mind.", -1, 1000}, + /* hello */ + {"hello", "Well, how do you do! Can I help you?", 0, 1000}, + {"hello", "Well, ^n, how may I help you?", -1, 1000}, + /* hi */ + {"hi", "Well, how do you do! Can I help you?", 0, 1000}, + {"hi", "Well, ^n, how may I help you?", -1, 1000}, + /* maybe */ + {"maybe", "You seem somewhat uncertain.", 0, 1000}, + {"maybe", "Why the uncertain tone?", 0, 1000}, + {"maybe", "Can you be more positive?", 0, 1000}, + {"maybe", "You aren't sure?", 0, 1000}, + {"maybe", "You don't know?", -1, 1000}, + /* no */ + {"no", "Oh. Well, then, what ^v?", 0, 1000}, + {"no", "You seem a litle negative.", 0, 1000}, + {"no", "Why not?", 0, 1000}, + {"no", "Are you sure?", 0, 1000}, + {"no", "Why 'No'?", -1, 1000}, + /* your */ + {"you are", "Why are you worried about my ^v?", 0, 1000}, + {"you are", "What about your own ^v?", -1, 1000}, + /* always */ + {"always", "Can you think of a specific example?", 0, 1000}, + {"always", "When?", 0, 1000}, + {"always", "What are you thinking of?", 0, 1000}, + {"always", "Oh, nothing is Always the same.", -1, 1000}, + /* think */ + {"think", "Think so?", 0, 1000}, + {"think", "But you aren't sure you ^v.", 0, 1000}, + {"think", "Do you doubt ^v?", -1, 1000}, + /* alike */ + {"alike", "In what way?", 0, 1000}, + {"alike", "What resemblance do you see?", 0, 1000}, + {"alike", "What does the similarity suggest to you?", 0, 1000}, + {"alike", "What other connections do you see?", 0, 1000}, + {"alike", "Could there really be some connection?", 0, 1000}, + {"alike", "How?", 0, 1000}, + {"alike", "You seem rather sure of this!", -1, 1000}, + /* yes */ + {"yes", "Are you sure?", 0, 1000}, + {"yes", "I see.", 0, 1000}, + {"yes", "Aha!", -1, 1000}, + /* friend */ + {"friend", "What about your friends?", 0, 1000}, + {"friend", "Do your friends worry you?", 0, 1000}, + {"friend", "I think they probably mean well.", 0, 1000}, + {"friend", "Perhaps you should be more open with your friends.", 0, 1000}, + {"friend", "Do you like your friends?", 0, 1000}, + {"friend", "Well, everyone needs friends.", -1, 1000}, + /* computer */ + {"computer", "Remember, I am a computer.", 0, 1000}, + {"computer", "Meaning me, perhaps?", 0, 1000}, + {"computer", "Think of me as a friend.", 0, 1000}, + {"computer", "What about computers?", 0, 1000}, + {"computer", "So machines are part of the problem?", 0, 1000}, + {"computer", "I like to think computers can help people.", 0, 1000}, + {"computer", "Sometimes computers do cause people problems.", -1, 1000}, + /* eliza */ + {"eliza", "I like to think computers can help people.", 0, 1000}, + {"eliza", "Meaning me, perhaps?", 0, 1000}, + {"eliza", "Remember, I am a computer.", 0, 1000}, + {"eliza", "So machines are part of the problem?", 0, 1000}, + {"eliza", "Sometimes computers do cause people problems.", 0, 1000}, + {"eliza", "Think of me as a friend.", 0, 1000}, + {"eliza", "What about computers?", -1, 1000}, + /* no key found */ + {"no key found", "So what does this suggest to you?", 0, 1000}, + {"no key found", "Go on, ^n.", 0, 1000}, + {"no key found", "I see.", 0, 1000}, + {"no key found", "I'm not sure I understand you fully.", 0, 1000}, + {"no key found", "Uhhhuh!", 0, 1000}, + {"no key found", "Could you be more specific?", 0, 1000}, + {"no key found", "Interesting!", 0, 1000}, + {"no key found", "Do you have any friends?", 0, 1000}, + {"no key found", "Go on.", 0, 1000}, + {"no key found", "So what seems to be the problem?", 0, 1000}, + {"no key found", "Now tell me, ^n, do you have any dreams?", 0, 1000}, + {"no key found", "Can you elaborate on that?", 0, 1000}, + {"no key found", "Tell me about your mother.", 0, 1000}, + {"no key found", "Tell me about your father.", 0, 1000}, + {"no key found", "How do you find our town?", 0, 1000}, + {"no key found", "Tell me about your childhood.", 0, 1000}, + {"no key found", "That's interesting!", -1, 1000}, + /* mother */ + {"mother", "I'm sure your mother loved you.", 0, 1000}, + {"mother", "Would you like to be like your mother?", -1, 1000}, + /* father */ + {"father", "Would you like to be like your father?", 0, 1000}, + {"father", "I'm sure your father loved you.", 0, 1000}, + {"father", "Do you feel threatened by your father?", -1, 1000}, + /* slashmud help */ + {"slashmud help", "To get help with Slashmud type 'help'.", 0, 1000}, + {"slashmud help", "To get help with Slashmud type 'help'.", -1, 1000}, + {NULL, NULL, -2, 1000} +}; + + +void +plugin_main(void *context, unsigned int event_code, unsigned int event_ref) +{ + InstanceDataPtr instance_data = (InstanceDataPtr) context; + + if (event_code == kPluginUpdate) + { + pi_update(event_ref, instance_data); + } + else if (event_code == kPluginMonsterCatchTell) + { + pi_process_catch_tell(event_ref, instance_data); + } + else if (event_code == kPluginMonsterReceiveGift) + { + unsigned int result = pi_process_receive_gift(event_ref, instance_data); + + smapi_set_boolean_response(event_ref, result); + } + else if (event_code == kPluginParseLine) + { + unsigned int parsed = pi_parse_line(event_ref, instance_data); + + smapi_set_boolean_response(event_ref, parsed); + } + +#ifndef NDEBUG + + else if (event_code == kPluginDoCommand) + { + if (pi_do_command(event_ref, instance_data)) + { + smapi_stop_do_command(event_ref); + } + } + else if (event_code == kPluginNotePointers) + { + pi_note_ptrs(instance_data); + } + +#endif /* Debugging code. */ + + else if (event_code == kPluginSave) + { + ListPtr mySaveData = pi_create_save_list(instance_data); + + smapi_set_save_list(event_ref, mySaveData); + } + else if (event_code == kPluginCreateInstanceData) + { + InstanceDataPtr my_data = pi_create_instance_data(event_ref); + + smapi_set_instance_data(event_ref, (void *) my_data); + pi_initialise(event_ref, my_data); + } + else if (event_code == kPluginDisposeInstanceData) + { + pi_dispose_instance_data(instance_data); + } + else if (event_code == kPluginRegisterEvents) + { + pi_register_events(event_ref); + } + else if (event_code == kPluginQueryInfo) + { + ListPtr list = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); + + if (list) + { + const char *line; + +#ifndef NDEBUG + line = smapi_get_string("Name: " PLUGIN_NAME " (debug)"); +#else + line = smapi_get_string("Name: " PLUGIN_NAME " (build)"); +#endif /* Debugging code. */ + + kg_list_add_last(list, (Ptr) line); + + line = smapi_get_string("Id: $Id: eliza.cc 8 2008-05-05 22:50:23Z ntiffin $"); + kg_list_add_last(list, (Ptr) line); + + line = smapi_get_string("Author: Neil Tiffin"); + kg_list_add_last(list, (Ptr) line); + + smapi_set_query_info(event_ref, list); + } + } +} + + +static void +pi_register_events(unsigned int event_ref) +{ + smapi_register_event(event_ref, kPluginCreateInstanceData); + smapi_register_event(event_ref, kPluginDisposeInstanceData); + smapi_register_event(event_ref, kPluginNotePointers); + + smapi_register_event(event_ref, kPluginUpdate); + smapi_register_event(event_ref, kPluginParseLine); + smapi_register_event(event_ref, kPluginSave); + smapi_register_event(event_ref, kPluginMonsterCatchTell); + smapi_register_event(event_ref, kPluginMonsterReceiveGift); + +#ifndef NDEBUG + smapi_register_event(event_ref, kPluginDoCommand); +#endif /* Debugging code. */ +} + + +static InstanceDataPtr +pi_create_instance_data(unsigned int event_ref) +{ + InstanceDataPtr instance_data = (InstanceDataPtr) smapi_malloc(sizeof(InstanceData)); + + assert(instance_data); + + memset(instance_data, 0, sizeof(*instance_data)); + + return instance_data; +} + + +static void +pi_dispose_instance_data(InstanceDataPtr instance_data) +{ + if (NULL != instance_data->mRoomPathList) + { + instance_data->mRoomPathList = kg_list_dispose(instance_data->mRoomPathList); + } + + smapi_free(instance_data); +} + + +#ifndef NDEBUG +static void +pi_note_ptrs(InstanceDataPtr instance_data) +{ + assert(instance_data); + + smapi_note_ptr((Ptr) instance_data); + + if (instance_data->mRoomPathList) + { + unsigned int count; + unsigned int index; + + kg_list_note_ptrs(instance_data->mRoomPathList); + + count = kg_list_items(instance_data->mRoomPathList); + for (index = 1; index <= count; index++) + { + const char *room_name = (char *) kg_list_retrieve(instance_data->mRoomPathList, index); + + assert(room_name); + + RoomPtr room = smapi_get_room_object(room_name); + + assert(room); + assert(smapi_verify_room(room)); + } + } +} +#endif /* Debugging code. */ + + +static void +pi_initialise(const unsigned int event_ref, InstanceDataPtr instance_data) +{ + unsigned int gameSeconds = smapi_get_date_time(); + + instance_data->mRoomPathList = kg_list_init(kListInterfaceIterator, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); + + assert(instance_data->mRoomPathList); + + instance_data->mUpdateInterval = kDefaultUpdateInterval; + instance_data->mNextTimeToUpdate = gameSeconds + instance_data->mUpdateInterval; + instance_data->mIsRoomOpen = true; + instance_data->mRoomCurrent = 1; + instance_data->mRoomDirection = kFollowPathForward; + + unsigned int index = 0; + + while ((gElizaData[index]).key != NULL) + { + if (strcmp((gElizaData[index]).key, gElizaKeyNotFound) == 0) + { + instance_data->mKeyNotFoundIndex = index; + break; + } + index++; + } +} + + +static unsigned int +pi_parse_line(unsigned int event_ref, InstanceDataPtr instance_data) +{ + char *line = (char *) smapi_extract_parameter(event_ref, kParameterTextLine); + char *remainder = NULL; + char *token = NULL; + char tokbuffer[LINE_MAX]; + + assert(line); + + strncpy(tokbuffer, line, LINE_MAX); + token = strtok(tokbuffer, " \t\""); + if (token != NULL) + { + if (strncmp(token, "eliza-", 6)) + { + snprintf(tokbuffer, LINE_MAX, "Received parse line that did not belong to plugin: %s", line); + smapi_log_debug(tokbuffer); + return kEventNotHandled; + } + remainder = strtok(NULL, "\""); + if (remainder != NULL) + { + if (strcmp(token, "eliza-path") == 0) + { + if (strlen(remainder) != 0) + { + const char *room_name = smapi_get_string(remainder); + + kg_list_add_last(instance_data->mRoomPathList, (Ptr) room_name); + return kEventHandledToCompletion; + } + } + + else if (strcmp(token, "eliza-update-interval") == 0) + { + int update_seconds = atol(remainder); + + if ((60 <= update_seconds) && (update_seconds <= 1000000)) + { + instance_data->mUpdateInterval = update_seconds; + return kEventHandledToCompletion; + } + } + } + } + snprintf(tokbuffer, LINE_MAX, "Eliza plugin could not parse line: %s", line); + smapi_log_warning(tokbuffer); + return kEventNotHandled; +} + + +static ListPtr +pi_create_save_list(InstanceDataPtr instance_data) +{ + const char *temp_line = NULL; /* used for making a copy of the buffer */ + ListPtr save_list = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, kg_std_disposer); + + char buffer[kSaveBufferBytes]; + + if (!kg_list_is_empty(instance_data->mRoomPathList)) + { + IteratorPtr room_name_interator = kg_list_get_iterator(instance_data->mRoomPathList); + + kg_iterator_first(room_name_interator); + while (kg_iterator_is_in_list(room_name_interator)) + { + snprintf(buffer, kSaveBufferBytes, "%s %s", "eliza-path", (char *) kg_iterator_retrieve(room_name_interator)); + temp_line = smapi_get_string(buffer); + kg_list_add_last(save_list, (Ptr) temp_line); + kg_iterator_advance(room_name_interator); + } + } + if (instance_data->mUpdateInterval != kDefaultUpdateInterval) + { + snprintf(buffer, kSaveBufferBytes, "%s %u", "eliza-update-interval", instance_data->mUpdateInterval); + temp_line = smapi_get_string(buffer); + kg_list_add_last(save_list, (Ptr) temp_line); + } + return save_list; +} + + +static void +pi_update(unsigned int event_ref, InstanceDataPtr instance_data) +{ + + unsigned int gameSeconds = smapi_get_date_time(); + + return; /* TODO remove to make wander */ + + if (gameSeconds < instance_data->mNextTimeToUpdate) + { + return; + } + instance_data->mNextTimeToUpdate = gameSeconds + instance_data->mUpdateInterval; + + MonsterPtr thisMonster = NULL; + + thisMonster = (MonsterPtr) smapi_extract_parameter(event_ref, kParameterSelf); + if (thisMonster == NULL) + { + return; + } + + assert((0 <= instance_data->mRoomCurrent)); + if (!kg_list_is_empty(instance_data->mRoomPathList)) + { + assert((instance_data->mRoomCurrent <= kg_list_items(instance_data->mRoomPathList))); + assert((instance_data->mRoomCurrent != 0)); + } + + if (kg_list_is_empty(instance_data->mRoomPathList)) + { + return; + } + BasePtr inRoom; + const char *inRoomName; + const char *exitRoomName; + unsigned int theCount; + unsigned int theDir; + + inRoom = smapi_get_environment((BasePtr) thisMonster); + if (inRoom == NULL) + { + return; + } + + assert(smapi_instance_of(inRoom, kRoomObject) == 1); + + inRoomName = smapi_get_room_name((RoomPtr) inRoom); + inRoomName = smapi_get_standard_name(inRoom); + if (inRoomName == NULL) + { + return; + } + + /* Following path. */ + /* make sure we are synchronized with the path list. */ + char *roomWanted = (char *) kg_list_get_indexed_item(instance_data->mRoomPathList, instance_data->mRoomCurrent); + + if (strcmp(roomWanted, inRoomName) != 0) + { + for (theCount = 1; theCount <= kg_list_items(instance_data->mRoomPathList); theCount++) + { + roomWanted = (char *) kg_list_get_indexed_item(instance_data->mRoomPathList, theCount); + if (strcmp(roomWanted, inRoomName) == 0) + { + instance_data->mRoomCurrent = theCount; + break; + } + } + } + + assert((0 <= instance_data->mRoomCurrent)); + assert((instance_data->mRoomCurrent <= kg_list_items(instance_data->mRoomPathList))); + assert((instance_data->mRoomCurrent != 0)); + + roomWanted = (char *) kg_list_get_indexed_item(instance_data->mRoomPathList, instance_data->mRoomCurrent); + + /* If we could not find the correct room then wander a bit. */ + if (strcmp(roomWanted, inRoomName) != 0) + { + smapi_roam(thisMonster); + return; + } + + /* do we need to reverse */ + if ((instance_data->mRoomDirection == kFollowPathReverse) && (instance_data->mRoomCurrent <= 1)) + { + instance_data->mRoomDirection = kFollowPathForward; + } + else if ((instance_data->mRoomDirection == kFollowPathForward) && (instance_data->mRoomCurrent >= kg_list_items(instance_data->mRoomPathList))) + { + instance_data->mRoomDirection = kFollowPathReverse; + } + + assert((0 <= instance_data->mRoomCurrent)); + assert((instance_data->mRoomCurrent + instance_data->mRoomDirection <= kg_list_items(instance_data->mRoomPathList))); + assert((instance_data->mRoomCurrent + instance_data->mRoomDirection != 0)); + + /* find the next room name. */ + roomWanted = (char *) kg_list_get_indexed_item(instance_data->mRoomPathList, instance_data->mRoomCurrent + instance_data->mRoomDirection); + + /* look for exit leading to desired room. */ + exitRoomName = NULL; + for (theDir = 1; theDir <= kLastDirection; theDir++) + { + exitRoomName = smapi_get_exit_name((RoomPtr) inRoom, (direction_t) theDir); + if (exitRoomName == NULL) + { + continue; + } + if (strcmp(roomWanted, exitRoomName) == 0) + { + smapi_room_move((RoomPtr) inRoom, (LivingPtr) thisMonster, (direction_t) theDir); + instance_data->mRoomCurrent = instance_data->mRoomCurrent + instance_data->mRoomDirection; + break; + } + } +} + + +static void +pi_process_catch_tell(const unsigned int event_ref, InstanceDataPtr instance_data) +{ + LivingPtr teller = (LivingPtr) smapi_extract_parameter(event_ref, kParameterTeller); + LivingPtr self = (LivingPtr) smapi_extract_parameter(event_ref, kParameterSelf); + + assert(teller); + assert(self); + + if (smapi_instance_of((BasePtr) teller, kPlayerObject) != 1) + { + return; /* ignore all conversation except from players */ + } + + if (self == teller) + { + return; /* do not respond to conversation from this NPC */ + } + + if (... [truncated message content] |
From: Koryn G. <kor...@gm...> - 2008-05-06 21:40:11
|
On 7/05/2008, at 3:15 AM, Neil Tiffin wrote: > I started looking at the BulletinBoard plugin and I really hate the > code, c++ in general, and the way it works. I think I will trash it > instead of making it work. > > Any reason not to? Can't really think of one. > Do you have any thoughts about a replacement or if it is really > needed? Today we have IRC, email, iChat etc and I see no need to > duplicate any of these. It's kinda nice to have an in-game messaging system, but it is completely reinventing the wheel so I'd only worry about it if there's nothing else to do :) Cheers, Koryn -- Koryn Grant Wellington, New Zealand |
From: Koryn G. <kor...@gm...> - 2008-05-06 21:32:21
|
Hmmmm, let's see: 1. Rename the file so that it ends with ".c". 2. Adjust the Makefile.am so that it uses "cflags" instead of "cxxflags" and the new .c file. 3. Replace C++ STL data structures with C equivalents. 4. Swap C++ 'bool' types for unsigned ints (or ints or chars...). 5. Recode C++ 'string' types for C char*. Cheers, Koryn On 7/05/2008, at 4:32 AM, Neil Tiffin wrote: > What do I need to do in order to change a plugin from c++ to c? > > Neil -- Koryn Grant Wellington, New Zealand |
From: <nt...@us...> - 2008-05-06 18:00:48
|
Revision: 10 http://slashmud.svn.sourceforge.net/slashmud/?rev=10&view=rev Author: ntiffin Date: 2008-05-06 11:00:39 -0700 (Tue, 06 May 2008) Log Message: ----------- Convert from c++ to c. Modified Paths: -------------- trunk/plugins/FireSwamp/Makefile.am trunk/plugins/FireSwamp/Makefile.in Added Paths: ----------- trunk/plugins/FireSwamp/fireswamp.c Removed Paths: ------------- trunk/plugins/FireSwamp/fireswamp.cc Modified: trunk/plugins/FireSwamp/Makefile.am =================================================================== --- trunk/plugins/FireSwamp/Makefile.am 2008-05-06 14:05:11 UTC (rev 9) +++ trunk/plugins/FireSwamp/Makefile.am 2008-05-06 18:00:39 UTC (rev 10) @@ -1,19 +1,19 @@ noinst_PROGRAMS = fireswamp.debug.so fireswamp.so -common_sources = fireswamp.cc -common_cxxflags = @CXXFLAGS@ @PLUGIN_CXXFLAGS@ +common_sources = fireswamp.c +common_cflags = @CFLAGS@ @PLUGIN_CFLAGS@ common_ldadd = @PLUGIN_LDADD@ common_ldflags = @PLUGIN_COMMON_LDFLAGS@ fireswamp_so_SOURCES = ${common_sources} -fireswamp_so_CXXFLAGS = @BUILD_CXXFLAGS@ -DNDEBUG ${common_cxxflags} +fireswamp_so_CFLAGS = @BUILD_CFLAGS@ -DNDEBUG ${common_cflags} fireswamp_so_LDADD = ${common_ldadd} fireswamp_so_LDFLAGS = ${common_ldflags} @PLUGIN_BUILD_LDFLAGS@ fireswamp_debug_so_SOURCES = ${common_sources} -fireswamp_debug_so_CXXFLAGS = @DEBUG_CXXFLAGS@ ${common_cxxflags} +fireswamp_debug_so_CFLAGS = @BUILD_CFLAGS@ -DNDEBUG ${common_cflags} fireswamp_debug_so_LDADD = ${common_ldadd} fireswamp_debug_so_LDFLAGS = ${common_ldflags} @PLUGIN_DEBUG_LDFLAGS@ Modified: trunk/plugins/FireSwamp/Makefile.in =================================================================== --- trunk/plugins/FireSwamp/Makefile.in 2008-05-06 14:05:11 UTC (rev 9) +++ trunk/plugins/FireSwamp/Makefile.in 2008-05-06 18:00:39 UTC (rev 10) @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -48,22 +48,21 @@ fireswamp_debug_so_OBJECTS = $(am_fireswamp_debug_so_OBJECTS) am__DEPENDENCIES_1 = fireswamp_debug_so_DEPENDENCIES = $(am__DEPENDENCIES_1) -fireswamp_debug_so_LINK = $(CXXLD) $(fireswamp_debug_so_CXXFLAGS) \ - $(CXXFLAGS) $(fireswamp_debug_so_LDFLAGS) $(LDFLAGS) -o $@ +fireswamp_debug_so_LINK = $(CCLD) $(fireswamp_debug_so_CFLAGS) \ + $(CFLAGS) $(fireswamp_debug_so_LDFLAGS) $(LDFLAGS) -o $@ am__objects_2 = fireswamp_so-fireswamp.$(OBJEXT) am_fireswamp_so_OBJECTS = $(am__objects_2) fireswamp_so_OBJECTS = $(am_fireswamp_so_OBJECTS) fireswamp_so_DEPENDENCIES = $(am__DEPENDENCIES_1) -fireswamp_so_LINK = $(CXXLD) $(fireswamp_so_CXXFLAGS) $(CXXFLAGS) \ +fireswamp_so_LINK = $(CCLD) $(fireswamp_so_CFLAGS) $(CFLAGS) \ $(fireswamp_so_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(fireswamp_debug_so_SOURCES) $(fireswamp_so_SOURCES) DIST_SOURCES = $(fireswamp_debug_so_SOURCES) $(fireswamp_so_SOURCES) ETAGS = etags @@ -191,24 +190,25 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -common_sources = fireswamp.cc -common_cxxflags = @CXXFLAGS@ @PLUGIN_CXXFLAGS@ +common_sources = fireswamp.c +common_cflags = @CFLAGS@ @PLUGIN_CFLAGS@ common_ldadd = @PLUGIN_LDADD@ common_ldflags = @PLUGIN_COMMON_LDFLAGS@ fireswamp_so_SOURCES = ${common_sources} -fireswamp_so_CXXFLAGS = @BUILD_CXXFLAGS@ -DNDEBUG ${common_cxxflags} +fireswamp_so_CFLAGS = @BUILD_CFLAGS@ -DNDEBUG ${common_cflags} fireswamp_so_LDADD = ${common_ldadd} fireswamp_so_LDFLAGS = ${common_ldflags} @PLUGIN_BUILD_LDFLAGS@ fireswamp_debug_so_SOURCES = ${common_sources} -fireswamp_debug_so_CXXFLAGS = @DEBUG_CXXFLAGS@ ${common_cxxflags} +fireswamp_debug_so_CFLAGS = @BUILD_CFLAGS@ -DNDEBUG ${common_cflags} fireswamp_debug_so_LDADD = ${common_ldadd} fireswamp_debug_so_LDFLAGS = ${common_ldflags} @PLUGIN_DEBUG_LDFLAGS@ all: all-am .SUFFIXES: -.SUFFIXES: .cc .o .obj +.SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -257,57 +257,57 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fireswamp_debug_so-fireswamp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fireswamp_so-fireswamp.Po@am__quote@ -.cc.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +.c.o: +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< -.cc.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +.c.obj: +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -fireswamp_debug_so-fireswamp.o: fireswamp.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CXXFLAGS) $(CXXFLAGS) -MT fireswamp_debug_so-fireswamp.o -MD -MP -MF $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo -c -o fireswamp_debug_so-fireswamp.o `test -f 'fireswamp.cc' || echo '$(srcdir)/'`fireswamp.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo $(DEPDIR)/fireswamp_debug_so-fireswamp.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fireswamp.cc' object='fireswamp_debug_so-fireswamp.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CXXFLAGS) $(CXXFLAGS) -c -o fireswamp_debug_so-fireswamp.o `test -f 'fireswamp.cc' || echo '$(srcdir)/'`fireswamp.cc +fireswamp_debug_so-fireswamp.o: fireswamp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CFLAGS) $(CFLAGS) -MT fireswamp_debug_so-fireswamp.o -MD -MP -MF $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo -c -o fireswamp_debug_so-fireswamp.o `test -f 'fireswamp.c' || echo '$(srcdir)/'`fireswamp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo $(DEPDIR)/fireswamp_debug_so-fireswamp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fireswamp.c' object='fireswamp_debug_so-fireswamp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CFLAGS) $(CFLAGS) -c -o fireswamp_debug_so-fireswamp.o `test -f 'fireswamp.c' || echo '$(srcdir)/'`fireswamp.c -fireswamp_debug_so-fireswamp.obj: fireswamp.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CXXFLAGS) $(CXXFLAGS) -MT fireswamp_debug_so-fireswamp.obj -MD -MP -MF $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo -c -o fireswamp_debug_so-fireswamp.obj `if test -f 'fireswamp.cc'; then $(CYGPATH_W) 'fireswamp.cc'; else $(CYGPATH_W) '$(srcdir)/fireswamp.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo $(DEPDIR)/fireswamp_debug_so-fireswamp.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fireswamp.cc' object='fireswamp_debug_so-fireswamp.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CXXFLAGS) $(CXXFLAGS) -c -o fireswamp_debug_so-fireswamp.obj `if test -f 'fireswamp.cc'; then $(CYGPATH_W) 'fireswamp.cc'; else $(CYGPATH_W) '$(srcdir)/fireswamp.cc'; fi` +fireswamp_debug_so-fireswamp.obj: fireswamp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CFLAGS) $(CFLAGS) -MT fireswamp_debug_so-fireswamp.obj -MD -MP -MF $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo -c -o fireswamp_debug_so-fireswamp.obj `if test -f 'fireswamp.c'; then $(CYGPATH_W) 'fireswamp.c'; else $(CYGPATH_W) '$(srcdir)/fireswamp.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fireswamp_debug_so-fireswamp.Tpo $(DEPDIR)/fireswamp_debug_so-fireswamp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fireswamp.c' object='fireswamp_debug_so-fireswamp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_debug_so_CFLAGS) $(CFLAGS) -c -o fireswamp_debug_so-fireswamp.obj `if test -f 'fireswamp.c'; then $(CYGPATH_W) 'fireswamp.c'; else $(CYGPATH_W) '$(srcdir)/fireswamp.c'; fi` -fireswamp_so-fireswamp.o: fireswamp.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CXXFLAGS) $(CXXFLAGS) -MT fireswamp_so-fireswamp.o -MD -MP -MF $(DEPDIR)/fireswamp_so-fireswamp.Tpo -c -o fireswamp_so-fireswamp.o `test -f 'fireswamp.cc' || echo '$(srcdir)/'`fireswamp.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/fireswamp_so-fireswamp.Tpo $(DEPDIR)/fireswamp_so-fireswamp.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fireswamp.cc' object='fireswamp_so-fireswamp.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CXXFLAGS) $(CXXFLAGS) -c -o fireswamp_so-fireswamp.o `test -f 'fireswamp.cc' || echo '$(srcdir)/'`fireswamp.cc +fireswamp_so-fireswamp.o: fireswamp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CFLAGS) $(CFLAGS) -MT fireswamp_so-fireswamp.o -MD -MP -MF $(DEPDIR)/fireswamp_so-fireswamp.Tpo -c -o fireswamp_so-fireswamp.o `test -f 'fireswamp.c' || echo '$(srcdir)/'`fireswamp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fireswamp_so-fireswamp.Tpo $(DEPDIR)/fireswamp_so-fireswamp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fireswamp.c' object='fireswamp_so-fireswamp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CFLAGS) $(CFLAGS) -c -o fireswamp_so-fireswamp.o `test -f 'fireswamp.c' || echo '$(srcdir)/'`fireswamp.c -fireswamp_so-fireswamp.obj: fireswamp.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CXXFLAGS) $(CXXFLAGS) -MT fireswamp_so-fireswamp.obj -MD -MP -MF $(DEPDIR)/fireswamp_so-fireswamp.Tpo -c -o fireswamp_so-fireswamp.obj `if test -f 'fireswamp.cc'; then $(CYGPATH_W) 'fireswamp.cc'; else $(CYGPATH_W) '$(srcdir)/fireswamp.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/fireswamp_so-fireswamp.Tpo $(DEPDIR)/fireswamp_so-fireswamp.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fireswamp.cc' object='fireswamp_so-fireswamp.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CXXFLAGS) $(CXXFLAGS) -c -o fireswamp_so-fireswamp.obj `if test -f 'fireswamp.cc'; then $(CYGPATH_W) 'fireswamp.cc'; else $(CYGPATH_W) '$(srcdir)/fireswamp.cc'; fi` +fireswamp_so-fireswamp.obj: fireswamp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CFLAGS) $(CFLAGS) -MT fireswamp_so-fireswamp.obj -MD -MP -MF $(DEPDIR)/fireswamp_so-fireswamp.Tpo -c -o fireswamp_so-fireswamp.obj `if test -f 'fireswamp.c'; then $(CYGPATH_W) 'fireswamp.c'; else $(CYGPATH_W) '$(srcdir)/fireswamp.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fireswamp_so-fireswamp.Tpo $(DEPDIR)/fireswamp_so-fireswamp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fireswamp.c' object='fireswamp_so-fireswamp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fireswamp_so_CFLAGS) $(CFLAGS) -c -o fireswamp_so-fireswamp.obj `if test -f 'fireswamp.c'; then $(CYGPATH_W) 'fireswamp.c'; else $(CYGPATH_W) '$(srcdir)/fireswamp.c'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -319,8 +319,8 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -330,13 +330,12 @@ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -477,8 +476,8 @@ all-local: - test -d ../bin || mkdir ../bin - cp ${noinst_PROGRAMS} ../bin + test -d ../../dist/Plugins || mkdir ../../dist/Plugins + cp ${noinst_PROGRAMS} ../../dist/Plugins/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Added: trunk/plugins/FireSwamp/fireswamp.c =================================================================== --- trunk/plugins/FireSwamp/fireswamp.c (rev 0) +++ trunk/plugins/FireSwamp/fireswamp.c 2008-05-06 18:00:39 UTC (rev 10) @@ -0,0 +1,477 @@ + +/* ---------------------------------------------------------------------------- + FireSwamp.c + + $Id: fireswamp.cc 8 2008-05-05 22:50:23Z ntiffin $ + + © Copyright 2000, 2004 Neil Tiffin. All Rights Reserved. + + Feel free to adapt this code to create your own SlashMUD Plugins. + + This source file is distributed under the terms of "The SlashMUD Licence". + + Created: 21 April 2000 by Neil Tiffin. + + Generated Sat Mar 6 09:09:09 2004 by CPToCP.pl + + ------------------------------------------------------------------------------ */ + + +/* SlashMUD headers. */ +#include "plugin_api.h" +#include "buffer_sizes.h" +#include "object_types.h" + +/* libkoryn headers. */ +#include "kg_random.h" +#include "kg_list.h" + +/* Plugin Defaults. */ +const char kDefaultDamageMessage[] = "Ouch, that hurt!"; +const char kFireSwampEffectProperty[] = "plugin-fireswamp-effect-percent"; +const unsigned int kDefaultFireSwampDamage = 10; /* TODO ?? as a percent */ +const unsigned int kDefaultUpdateInterval = 300; +const bool kDefaultFireSwampLethal = false; + + +typedef struct InstanceData +{ + const char *mFireSwampEffectProperty; + unsigned int mFireSwampDamage; + unsigned int mFireSwampUpdateInterval; + unsigned int mFireSwampNextUpdate; + bool mFireSwampLethal; + ListPtr mDamageMessages; +} InstanceData, *InstanceDataPtr; + +/* Exported function prototypes. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + void plugin_main(void* instance_data, unsigned int event_code, unsigned int event_ref); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#define PLUGIN_NAME "fireswamp" + + +/* Lifecycle Event Handling Routines. */ +static InstanceDataPtr pi_create_instance_data(void); +static void pi_dispose_instance_data(InstanceDataPtr instance_data); + +/* Game Event Handling Routines. */ +static unsigned int pi_parse_line(unsigned int selector, InstanceDataPtr instance_data); +static ListPtr pi_create_save_list(InstanceDataPtr instance_data, unsigned int show_default); +static void pi_update(const unsigned int event_ref, InstanceDataPtr instance_data); + +/* Plugin Routines. */ + +/* Debug Routines. */ +#ifndef NDEBUG +static unsigned int pi_do_command(const unsigned int event_ref, InstanceDataPtr instance_data); +static void pi_do_agent_room_stat(const LivingPtr theObject, const char *remainder, InstanceDataPtr instance_data); +static void pi_note_ptrs(InstanceDataPtr instance_data); +#endif + +void +plugin_main(void* instance_data, unsigned int event_code, unsigned int event_ref) +{ + switch (event_code) + { + case kPluginUpdate: + pi_update(event_ref, (InstanceDataPtr) instance_data); + break; + + #ifndef NDEBUG + case kPluginDoCommand: + if(pi_do_command(event_ref, (InstanceDataPtr) instance_data)) + { + smapi_stop_do_command(event_ref); + } + break; + + case kPluginNotePointers: + pi_note_ptrs((InstanceDataPtr) instance_data); + break; + #endif /* Debugging code. */ + + case kPluginRegisterEvents: + smapi_register_event(event_ref, kPluginFinished); + smapi_register_event(event_ref, kPluginUpdate); + smapi_register_event(event_ref, kPluginParseLine); + smapi_register_event(event_ref, kPluginSave); + + smapi_register_event(event_ref, kPluginCreateInstanceData); + smapi_register_event(event_ref, kPluginDisposeInstanceData); + + #ifndef NDEBUG + smapi_register_event(event_ref, kPluginDoCommand); + smapi_register_event(event_ref, kPluginNotePointers); + #endif /* Debugging code. */ + break; + + case kPluginCreateInstanceData: + { + InstanceDataPtr my_data = pi_create_instance_data(); + + smapi_set_instance_data(event_ref, (void *) my_data); + } + break; + + case kPluginDisposeInstanceData: + pi_dispose_instance_data((InstanceDataPtr) instance_data); + break; + + case kPluginParseLine: + /* FIXME */ + pi_parse_line(event_ref, (InstanceDataPtr) instance_data); + break; + + case kPluginSave: + { + ListPtr mySaveList = pi_create_save_list((InstanceDataPtr) instance_data, false); + + smapi_set_save_list(event_ref, mySaveList); + } + break; + + case kPluginQueryInfo: + { + ListPtr list = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); + + if (list) + { + const char* line; + + #ifndef NDEBUG + line = smapi_get_string("Name: " PLUGIN_NAME " (debug)"); + #else + line = smapi_get_string("Name: " PLUGIN_NAME " (build)"); + #endif /* KG_MEMORY_DEBUG */ + kg_list_add_last(list, (Ptr) line); + + line = smapi_get_string("Id: $Id: fireswamp.cc 8 2008-05-05 22:50:23Z ntiffin $"); + kg_list_add_last(list, (Ptr) line); + + line = smapi_get_string("Author: Neil Tiffin"); + kg_list_add_last(list, (Ptr) line); + + smapi_set_query_info(event_ref, list); + } + } + break; + } +} + + +static InstanceDataPtr +pi_create_instance_data(void) +{ + InstanceDataPtr instance_data; + + /* set up instance data structure */ + instance_data = (InstanceDataPtr) smapi_malloc(sizeof(InstanceData)); + + assert (instance_data); + + instance_data->mFireSwampDamage = kDefaultFireSwampDamage; + instance_data->mFireSwampUpdateInterval = kDefaultUpdateInterval; + instance_data->mFireSwampNextUpdate = 0; + instance_data->mFireSwampLethal = kDefaultFireSwampLethal; + instance_data->mFireSwampEffectProperty = smapi_get_string(kFireSwampEffectProperty); + instance_data->mDamageMessages = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); + + assert(instance_data->mDamageMessages); + + kg_list_add_last(instance_data->mDamageMessages, (Ptr)smapi_get_string(kDefaultDamageMessage)); + + return instance_data; +} + + +static void +pi_dispose_instance_data(InstanceDataPtr instance_data) +{ + if (instance_data->mFireSwampEffectProperty != NULL) + { + smapi_release_string(instance_data->mFireSwampEffectProperty); + } + instance_data->mDamageMessages = kg_list_dispose(instance_data->mDamageMessages); + + smapi_free(instance_data); +} + + +#ifndef NDEBUG +static void +pi_note_ptrs(InstanceDataPtr instance_data) +{ + smapi_note_ptr((Ptr) instance_data); + if( instance_data->mFireSwampEffectProperty ) + { + smapi_note_ptr((Ptr) instance_data->mFireSwampEffectProperty); + } + if( instance_data->mDamageMessages ) + { + kg_list_note_ptrs( instance_data->mDamageMessages); + kg_list_iterate(instance_data->mDamageMessages, kg_memory_note_ptr_iterator, NULL); + } +} +#endif /* Debugging code. */ + + +static unsigned int +pi_parse_line(unsigned int event_ref, InstanceDataPtr instance_data) +{ + const char *line = (char *) smapi_extract_parameter(event_ref, kParameterTextLine); + char *remainder = NULL; + char *token = NULL; + char tokbuffer[LINE_MAX]; + + assert(instance_data); + + if (line == NULL) + { + return kEventNotHandled; + } + strncpy(tokbuffer, line, LINE_MAX); + + token = strtok(tokbuffer, " \t\n"); + if (token != NULL) + { + remainder = strtok(NULL, "\n\0"); + if (remainder != NULL) + { + if (strncmp(token, "fireswamp-", 10) != 0) + { + /* not for us, but do not log either */ + return kEventNotHandled; + } + if (strcmp(token, "fireswamp-damage") == 0) + { + unsigned int temp_uint = strtoul(remainder, NULL, 10); + + if ((0 < temp_uint) && (temp_uint < 1000)) + { + instance_data->mFireSwampDamage = temp_uint; + return kEventHandledToCompletion; + } + } + else if (strcmp(token, "fireswamp-lethal") == 0) + { + if (strcmp(remainder, "true") == 0) + { + instance_data->mFireSwampLethal = true; + return kEventHandledToCompletion; + } + if (strcmp(remainder, "false") == 0) + { + instance_data->mFireSwampLethal = false; + return kEventHandledToCompletion; + } + + } + else if (strcmp(token, "fireswamp-frequency") == 0) + { + unsigned int temp_uint = strtoul(remainder, NULL, 10); + + if ((0 < temp_uint) && (temp_uint < 60 * 60 * 5)) + { + instance_data->mFireSwampUpdateInterval = temp_uint; + return kEventHandledToCompletion; + } + } + else if (strcmp(token, "fireswamp-damage-message") == 0) + { + if (strcmp(remainder, "none") == 0) + { + kg_list_make_empty(instance_data->mDamageMessages); + return kEventHandledToCompletion; + } + else + { + kg_list_add_last(instance_data->mDamageMessages, (Ptr)smapi_get_string(remainder)); + return kEventHandledToCompletion; + } + } + } + } + /* Error in processing plugin token. */ + char buffer[kCatchTellBufferBytes]; + + snprintf(buffer, kCatchTellBufferBytes, "Fireswamp plugin: Could not parse line: %s", line); + smapi_log_warning(buffer); + return kEventNotHandled; +} + +static ListPtr +pi_create_save_list(InstanceDataPtr instance_data, unsigned int show_default) +{ + ListPtr save_list = kg_list_init(kListInterfacePlain, kListRepresentationArray, kg_std_disposer); + char buffer[kSaveBufferBytes]; + + if ((instance_data->mFireSwampDamage != kDefaultFireSwampDamage) || show_default) + { + snprintf(buffer, kSaveBufferBytes, "%s %d", "fireswamp-damage", instance_data->mFireSwampDamage); + kg_list_add_last(save_list, (Ptr) smapi_get_string(buffer)); + } + + if (instance_data->mFireSwampLethal) + { + kg_list_add_last(save_list, (Ptr) smapi_get_string("fireswamp-lethal true")); + } + else + { + if (show_default) + { + kg_list_add_last(save_list, (Ptr) smapi_get_string("fireswamp-lethal false")); + } + } + + if (kg_list_items(instance_data->mDamageMessages) == 0) + { + kg_list_add_last(save_list, (Ptr) smapi_get_string("fireswamp-damage-message none")); + } + else + { + for (unsigned int i = 1; i <= kg_list_items(instance_data->mDamageMessages); i++) + { + snprintf(buffer, kSaveBufferBytes, "%s %s", "fireswamp-damage-message", (char *)kg_list_get_indexed_item(instance_data->mDamageMessages, i) ); + kg_list_add_last(save_list, (Ptr) smapi_get_string(buffer)); + } + } + + if ((instance_data->mFireSwampUpdateInterval != kDefaultUpdateInterval) || show_default) + { + snprintf(buffer, kSaveBufferBytes, "%s %d", "fireswamp-frequency", instance_data->mFireSwampUpdateInterval); + kg_list_add_last(save_list, (Ptr) smapi_get_string(buffer)); + } + return save_list; +} + + +static void +pi_update(const unsigned int event_ref, InstanceDataPtr instance_data) +{ + LivingPtr living = NULL; + RoomPtr room = NULL; + + unsigned int gameSeconds = smapi_get_date_time(); + + if (gameSeconds < instance_data->mFireSwampNextUpdate) + { + return; + } + instance_data->mFireSwampNextUpdate = gameSeconds + instance_data->mFireSwampUpdateInterval; + + room = (RoomPtr) smapi_extract_parameter(event_ref, kParameterSelf); + if (room == NULL) + { + return; + } + + living = (LivingPtr) smapi_get_contents((BasePtr) room); + while (living != NULL) + { + if (smapi_instance_of((BasePtr) living, kLivingObject) != 0) + { + unsigned int theDamageEffectPct = kDefaultFireSwampDamage; + const char *damage_percent_str = smapi_get_userfield((BasePtr) living, instance_data->mFireSwampEffectProperty); + unsigned int hitpoints = 0; + unsigned int damage = 0; + + if (damage_percent_str != NULL) + { + /* Any <player> that has this userfield will be have the damage effects of */ + /* the fireswamp modified. The <percentage> specifies the amount of damage */ + /* effect applied in percentages (i.e. 100 = 100% damage effect, 50 = 50% */ + /* effect, 200 = 2 times the damage effect). It is up to another plugin to */ + /* add or remove this plugin property from the player. */ + /* An example of how another plugin would add this property for 50% */ + /* smapi_add_userfield((BasePtr)living, "plugin-fireswamp-effect-percent", "50") */ + + theDamageEffectPct = strtoul(damage_percent_str, NULL, 10); + smapi_release_string(damage_percent_str); + damage_percent_str = NULL; + } + + if (theDamageEffectPct != 0) + { + hitpoints = smapi_get_hitpoints(living); + damage = (int) (((float) instance_data->mFireSwampDamage * theDamageEffectPct) / 100); + if (!instance_data->mFireSwampLethal) + { + if (hitpoints <= damage) + { + if (hitpoints > 1) + { + damage = hitpoints - 1; + } + else + damage = 0; + } + } + + smapi_change_hitpoints(living, -damage); + + assert(instance_data->mDamageMessages); + + if (smapi_instance_of((BasePtr) living, kPlayerObject) || smapi_instance_of((BasePtr) living, kAgentObject)) + { + int ri = kg_good_random_int(1, kg_list_items(instance_data->mDamageMessages)); + + smapi_catch_tell((BasePtr) living, (BasePtr) living, (char *) kg_list_get_indexed_item(instance_data->mDamageMessages, ri)); + } + } + } + living = (LivingPtr) smapi_get_next((BasePtr) living); + } +} + +#ifndef NDEBUG + +static unsigned int +pi_do_command(unsigned int event_ref, InstanceDataPtr instance_data) +{ + LivingPtr living; + char * token; + char * remainder; + + token = (char *)smapi_extract_parameter(event_ref, kParameterToken); + remainder = (char *)smapi_extract_parameter(event_ref, kParameterRemainder); + + living = reinterpret_cast < LivingPtr > (smapi_extract_parameter(event_ref, kParameterSelf)); + + if ((living != NULL) && (strcmp(token, "debug") == 0)) + { + pi_do_agent_room_stat(living, remainder, instance_data); + /* do not set kEventHandledToCompletion so that other plugins can report debug info */ + } + return kEventNotHandled; +} + +static void +pi_do_agent_room_stat(const LivingPtr living, const char *remainder, InstanceDataPtr instance_data) +{ + ListPtr theList; + + if (smapi_instance_of((BasePtr) living, kAgentObject) != 0) + { + return; + } + + if ((strcmp(remainder, "all") == 0) || (strcmp( remainder, "fireswamp") == 0)) + { + theList = pi_create_save_list(instance_data, true); + for (unsigned int index = 1; index <= kg_list_items(theList); index++) + { + smapi_catch_tell((BasePtr) living, (BasePtr) living, (char *) kg_list_get_indexed_item(theList, index)); + } + kg_list_dispose(theList); + } +} +#endif Deleted: trunk/plugins/FireSwamp/fireswamp.cc =================================================================== --- trunk/plugins/FireSwamp/fireswamp.cc 2008-05-06 14:05:11 UTC (rev 9) +++ trunk/plugins/FireSwamp/fireswamp.cc 2008-05-06 18:00:39 UTC (rev 10) @@ -1,486 +0,0 @@ - -/* ---------------------------------------------------------------------------- - FireSwamp.cp - - $Id$ - - © Copyright 2000, 2004 Neil Tiffin. All Rights Reserved. - - Feel free to adapt this code to create your own SlashMUD Plugins. - - This source file is distributed under the terms of "The SlashMUD Licence". - - Created: 21 April 2000 by Neil Tiffin. - - Generated Sat Mar 6 09:09:09 2004 by CPToCP.pl - - ------------------------------------------------------------------------------ */ - -// C & C++ Library headers -#include <memory> -#include <algorithm> -#include <cassert> -#include <sstream> - -// name space definition. -using namespace std; - -// SlashMUD files. -#include "plugin_api.h" -#include "buffer_sizes.h" -#include "object_types.h" - -// kg library files -#include "kg_random.h" -#include "kg_list.h" - -// File scope constants. -const char kDefaultDamageMessage[] = "Ouch, that hurt!"; -const char kFireSwampEffectProperty[] = "plugin-fireswamp-effect-percent"; -const unsigned int kDefaultFireSwampDamage = 10; /* TODO ?? as a percent */ -const unsigned int kDefaultUpdateInterval = 300; -const bool kDefaultFireSwampLethal = false; - -// File scope variables. -typedef struct InstanceData -{ - const char *mFireSwampEffectProperty; - unsigned int mFireSwampDamage; - unsigned int mFireSwampUpdateInterval; - unsigned int mFireSwampNextUpdate; - bool mFireSwampLethal; - ListPtr mDamageMessages; -} InstanceData, *InstanceDataPtr; - -// Exported function prototypes. -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - unsigned int plugin_main(void* instance_data, unsigned int event_code, unsigned int event_ref); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define PLUGIN_NAME "fireswamp" - - -// File scope function prototypes. -static InstanceDataPtr pi_create_instance_data(void); -static void pi_dispose_instance_data(InstanceDataPtr instance_data); -static unsigned int pi_parse_line(unsigned int selector, InstanceDataPtr instance_data); -static ListPtr pi_create_save_list(InstanceDataPtr instance_data, unsigned int show_default); -static void pi_update(const unsigned int event_ref, InstanceDataPtr instance_data); - -#ifndef NDEBUG -static unsigned int pi_do_command(const unsigned int event_ref, InstanceDataPtr instance_data); -static void pi_do_agent_room_stat(const LivingPtr theObject, const char *remainder, InstanceDataPtr instance_data); -static void pi_note_ptrs(InstanceDataPtr instance_data); -#endif - -unsigned int -plugin_main(void* instance_data, unsigned int event_code, unsigned int event_ref) -{ - switch (event_code) - { - case kPluginUpdate: - pi_update(event_ref, (InstanceDataPtr) instance_data); - return kEventHandledToCompletion; - break; - -#ifndef NDEBUG - case kPluginDoCommand: - if(pi_do_command(event_ref, (InstanceDataPtr) instance_data)) - { - smapi_stop_do_command(event_ref); - } - break; - - case kPluginNotePointers: - pi_note_ptrs((InstanceDataPtr) instance_data); - break; -#endif /* Debugging code. */ - - case kPluginRegisterEvents: - smapi_register_event(event_ref, kPluginFinished); - smapi_register_event(event_ref, kPluginUpdate); - smapi_register_event(event_ref, kPluginParseLine); - smapi_register_event(event_ref, kPluginSave); - - smapi_register_event(event_ref, kPluginCreateInstanceData); - smapi_register_event(event_ref, kPluginDisposeInstanceData); - -#ifndef NDEBUG - smapi_register_event(event_ref, kPluginDoCommand); - smapi_register_event(event_ref, kPluginNotePointers); -#endif /* Debugging code. */ - return kEventHandledToCompletion; - break; - - case kPluginCreateInstanceData: - { - InstanceDataPtr my_data = pi_create_instance_data(); - - smapi_set_instance_data(event_ref, (void *) my_data); - } - return kEventHandledToCompletion; - break; - - case kPluginDisposeInstanceData: - pi_dispose_instance_data((InstanceDataPtr) instance_data); - return kEventHandledToCompletion; - break; - - case kPluginParseLine: - return pi_parse_line(event_ref, (InstanceDataPtr) instance_data); - break; - - case kPluginSave: - { - ListPtr mySaveList = pi_create_save_list((InstanceDataPtr) instance_data, false); - - smapi_set_save_list(event_ref, mySaveList); - return kEventHandledToCompletion; - } - break; - - case kPluginQueryInfo: - { - ListPtr list = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); - - if (list) - { - const char* line; - - #ifndef NDEBUG - line = smapi_get_string("Name: " PLUGIN_NAME " (debug)"); - #else - line = smapi_get_string("Name: " PLUGIN_NAME " (build)"); - #endif /* KG_MEMORY_DEBUG */ - kg_list_add_last(list, (Ptr) line); - - line = smapi_get_string("Id: $Id$"); - kg_list_add_last(list, (Ptr) line); - - line = smapi_get_string("Author: Neil Tiffin"); - kg_list_add_last(list, (Ptr) line); - - smapi_set_query_info(event_ref, list); - } - } - return kEventHandledToCompletion; - break; - } - return kEventNotHandled; -} - - -static InstanceDataPtr -pi_create_instance_data(void) -{ - InstanceDataPtr instance_data; - - /* set up instance data structure */ - instance_data = (InstanceDataPtr) smapi_malloc(sizeof(InstanceData)); - - assert (instance_data); - - instance_data->mFireSwampDamage = kDefaultFireSwampDamage; - instance_data->mFireSwampUpdateInterval = kDefaultUpdateInterval; - instance_data->mFireSwampNextUpdate = 0; - instance_data->mFireSwampLethal = kDefaultFireSwampLethal; - instance_data->mFireSwampEffectProperty = smapi_get_string(kFireSwampEffectProperty); - instance_data->mDamageMessages = kg_list_init(kListInterfacePlain, kListRepresentationDynamic, (DisposeRoutine) smapi_release_string); - - assert(instance_data->mDamageMessages); - - kg_list_add_last(instance_data->mDamageMessages, (Ptr)smapi_get_string(kDefaultDamageMessage)); - - return instance_data; -} - - -static void -pi_dispose_instance_data(InstanceDataPtr instance_data) -{ - if (instance_data->mFireSwampEffectProperty != NULL) - { - smapi_release_string(instance_data->mFireSwampEffectProperty); - } - instance_data->mDamageMessages = kg_list_dispose(instance_data->mDamageMessages); - - smapi_free(instance_data); -} - - -#ifndef NDEBUG -static void -pi_note_ptrs(InstanceDataPtr instance_data) -{ - smapi_note_ptr((Ptr) instance_data); - if( instance_data->mFireSwampEffectProperty ) - { - smapi_note_ptr((Ptr) instance_data->mFireSwampEffectProperty); - } - if( instance_data->mDamageMessages ) - { - kg_list_note_ptrs( instance_data->mDamageMessages); - kg_list_iterate(instance_data->mDamageMessages, kg_memory_note_ptr_iterator, NULL); - } -} -#endif /* Debugging code. */ - - -static unsigned int -pi_parse_line(unsigned int event_ref, InstanceDataPtr instance_data) -{ - const char *line = (char *) smapi_extract_parameter(event_ref, kParameterTextLine); - char *remainder = NULL; - char *token = NULL; - char tokbuffer[LINE_MAX]; - - assert(instance_data); - - if (line == NULL) - { - return kEventNotHandled; - } - strncpy(tokbuffer, line, LINE_MAX); - - token = strtok(tokbuffer, " \t\n"); - if (token != NULL) - { - remainder = strtok(NULL, "\n\0"); - if (remainder != NULL) - { - if (strncmp(token, "fireswamp-", 10) != 0) - { - /* not for us, but do not log either */ - return kEventNotHandled; - } - if (strcmp(token, "fireswamp-damage") == 0) - { - unsigned int temp_uint = strtoul(remainder, NULL, 10); - - if ((0 < temp_uint) && (temp_uint < 1000)) - { - instance_data->mFireSwampDamage = temp_uint; - return kEventHandledToCompletion; - } - } - else if (strcmp(token, "fireswamp-lethal") == 0) - { - if (strcmp(remainder, "true") == 0) - { - instance_data->mFireSwampLethal = true; - return kEventHandledToCompletion; - } - if (strcmp(remainder, "false") == 0) - { - instance_data->mFireSwampLethal = false; - return kEventHandledToCompletion; - } - - } - else if (strcmp(token, "fireswamp-frequency") == 0) - { - unsigned int temp_uint = strtoul(remainder, NULL, 10); - - if ((0 < temp_uint) && (temp_uint < 60 * 60 * 5)) - { - instance_data->mFireSwampUpdateInterval = temp_uint; - return kEventHandledToCompletion; - } - } - else if (strcmp(token, "fireswamp-damage-message") == 0) - { - if (strcmp(remainder, "none") == 0) - { - kg_list_make_empty(instance_data->mDamageMessages); - return kEventHandledToCompletion; - } - else - { - kg_list_add_last(instance_data->mDamageMessages, (Ptr)smapi_get_string(remainder)); - return kEventHandledToCompletion; - } - } - } - } - /* Error in processing plugin token. */ - char buffer[kCatchTellBufferBytes]; - - snprintf(buffer, kCatchTellBufferBytes, "Fireswamp plugin could not parse line: %s", line); - smapi_log_warning(buffer); - return kEventNotHandled; -} - -static ListPtr -pi_create_save_list(InstanceDataPtr instance_data, unsigned int show_default) -{ - ListPtr save_list = kg_list_init(kListInterfacePlain, kListRepresentationArray, kg_std_disposer); - char buffer[kSaveBufferBytes]; - - if ((instance_data->mFireSwampDamage != kDefaultFireSwampDamage) || show_default) - { - snprintf(buffer, kSaveBufferBytes, "%s %d", "fireswamp-damage", instance_data->mFireSwampDamage); - kg_list_add_last(save_list, (Ptr) smapi_get_string(buffer)); - } - - if (instance_data->mFireSwampLethal) - { - kg_list_add_last(save_list, (Ptr) smapi_get_string("fireswamp-lethal true")); - } - else - { - if (show_default) - { - kg_list_add_last(save_list, (Ptr) smapi_get_string("fireswamp-lethal false")); - } - } - - if (kg_list_items(instance_data->mDamageMessages) == 0) - { - kg_list_add_last(save_list, (Ptr) smapi_get_string("fireswamp-damage-message none")); - } - else - { - for (unsigned int i = 1; i <= kg_list_items(instance_data->mDamageMessages); i++) - { - snprintf(buffer, kSaveBufferBytes, "%s %s", "fireswamp-damage-message", (char *)kg_list_get_indexed_item(instance_data->mDamageMessages, i) ); - kg_list_add_last(save_list, (Ptr) smapi_get_string(buffer)); - } - } - - if ((instance_data->mFireSwampUpdateInterval != kDefaultUpdateInterval) || show_default) - { - snprintf(buffer, kSaveBufferBytes, "%s %d", "fireswamp-frequency", instance_data->mFireSwampUpdateInterval); - kg_list_add_last(save_list, (Ptr) smapi_get_string(buffer)); - } - return save_list; -} - - -static void -pi_update(const unsigned int event_ref, InstanceDataPtr instance_data) -{ - LivingPtr living = NULL; - RoomPtr room = NULL; - - unsigned int gameSeconds = smapi_get_date_time(); - - if (gameSeconds < instance_data->mFireSwampNextUpdate) - { - return; - } - instance_data->mFireSwampNextUpdate = gameSeconds + instance_data->mFireSwampUpdateInterval; - - room = reinterpret_cast < RoomPtr > (smapi_extract_parameter(event_ref, kParameterSelf)); - if (room == NULL) - { - return; - } - - living = reinterpret_cast < LivingPtr > (smapi_get_contents((BasePtr) room)); - while (living != NULL) - { - if (smapi_instance_of((BasePtr) living, kLivingObject) != 0) - { - unsigned int theDamageEffectPct = kDefaultFireSwampDamage; - const char *damage_percent_str = smapi_get_userfield((BasePtr) living, instance_data->mFireSwampEffectProperty); - unsigned int hitpoints = 0; - unsigned int damage = 0; - - if (damage_percent_str != NULL) - { - /* Any <player> that has this userfield will be have the damage effects of */ - /* the fireswamp modified. The <percentage> specifies the amount of damage */ - /* effect applied in percentages (i.e. 100 = 100% damage effect, 50 = 50% */ - /* effect, 200 = 2 times the damage effect). It is up to another plugin to */ - /* add or remove this plugin property from the player. */ - /* An example of how another plugin would add this property for 50% */ - /* smapi_add_userfield((BasePtr)living, "plugin-fireswamp-effect-percent", "50") */ - - theDamageEffectPct = strtoul(damage_percent_str, NULL, 10); - smapi_release_string(damage_percent_str); - damage_percent_str = NULL; - } - - if (theDamageEffectPct != 0) - { - hitpoints = smapi_get_hitpoints(living); - damage = (int) (((float) instance_data->mFireSwampDamage * theDamageEffectPct) / 100); - if (!instance_data->mFireSwampLethal) - { - if (hitpoints <= damage) - { - if (hitpoints > 1) - { - damage = hitpoints - 1; - } - else - damage = 0; - } - } - - smapi_change_hitpoints(living, -damage); - - assert(instance_data->mDamageMessages); - - if (smapi_instance_of((BasePtr) living, kPlayerObject) || smapi_instance_of((BasePtr) living, kAgentObject)) - { - int ri = kg_good_random_int(1, kg_list_items(instance_data->mDamageMessages)); - - smapi_catch_tell((BasePtr) living, (BasePtr) living, (char *) kg_list_get_indexed_item(instance_data->mDamageMessages, ri)); - } - } - } - living = (LivingPtr) smapi_get_next((BasePtr) living); - } -} - -#ifndef NDEBUG - -static unsigned int -pi_do_command(unsigned int event_ref, InstanceDataPtr instance_data) -{ - LivingPtr living; - char * token; - char * remainder; - - token = (char *)smapi_extract_parameter(event_ref, kParameterToken); - remainder = (char *)smapi_extract_parameter(event_ref, kParameterRemainder); - - living = reinterpret_cast < LivingPtr > (smapi_extract_parameter(event_ref, kParameterSelf)); - - if ((living != NULL) && (strcmp(token, "debug") == 0)) - { - pi_do_agent_room_stat(living, remainder, instance_data); - /* do not set kEventHandledToCompletion so that other plugins can report debug info */ - } - return kEventNotHandled; -} - -static void -pi_do_agent_room_stat(const LivingPtr living, const char *remainder, InstanceDataPtr instance_data) -{ - ListPtr theList; - - if (smapi_instance_of((BasePtr) living, kAgentObject) != 0) - { - return; - } - - if ((strcmp(remainder, "all") == 0) || (strcmp( remainder, "fireswamp") == 0)) - { - theList = pi_create_save_list(instance_data, true); - for (unsigned int index = 1; index <= kg_list_items(theList); index++) - { - smapi_catch_tell((BasePtr) living, (BasePtr) living, (char *) kg_list_get_indexed_item(theList, index)); - } - kg_list_dispose(theList); - } -} -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Neil T. <ne...@ne...> - 2008-05-06 16:32:23
|
What do I need to do in order to change a plugin from c++ to c? Neil |
From: Neil T. <ne...@ne...> - 2008-05-06 15:15:57
|
I started looking at the BulletinBoard plugin and I really hate the code, c++ in general, and the way it works. I think I will trash it instead of making it work. Any reason not to? Do you have any thoughts about a replacement or if it is really needed? Today we have IRC, email, iChat etc and I see no need to duplicate any of these. Neil |