Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Google, Yandex, Bing, Sogou, Yahoo!

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Nanny cleanup for SWR (repost)
Forum Rules | Mark all | Recent Posts

Nanny cleanup for SWR (repost)
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 9, 2008, 6:11 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

A while back I posted the nanny cleanup that went into SmaugFuss. I also did a SWR version. Seems that post was lost in the server failure that occured last year (or was it this year?). So I thought I'd repost it so that it could be included in SWR Fuss as well.

The files are at this link.

Could either just drop them in as per the included instructions, or incorporate it into comm.c like was done on SmaugFuss. I considered changing the string arguments in the functions to const char*, but this would require a const fix for more or less the whole codebase, so it's just char* for now.
       
Post is unread #2 Dec 9, 2008, 11:25 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Oh, I'll probably get stuck doing a const fix for SWRFUSS and SWFotEFUSS here soon anyway. :P But thanks for the repost. :)
       
Post is unread #3 Dec 11, 2008, 6:52 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

I've discovered a bug in my code if you type a non-existing class name. This has now been fixed. I've also updated the files to compile cleanly as C++ under gcc 4.3.2. All the functions now take const char* as argument.

The files has been updated on the link posted above.
       
Post is unread #4 Dec 14, 2009, 11:11 pm
Go to the top of the page
Go to the bottom of the page

Xerix
Fledgling
GroupMembers
Posts15
JoinedDec 2, 2009

Well naturally by the time I get around to this post, its a year later, heh. But was this fix incorporated into 1.3? I would check but obviously the link is no longer any good. first post btw, i normally just troll. ;p
       
Post is unread #5 Dec 15, 2009, 10:49 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Try this link instead.

The nanny cleanup was incorporated into Smaug, but not SWR.
       
Post is unread #6 Dec 15, 2009, 5:12 pm
Go to the top of the page
Go to the bottom of the page

Xerix
Fledgling
GroupMembers
Posts15
JoinedDec 2, 2009

Thanks for the repost Caius!

Looks good, this will definately give me something to do later. :)

       
Post is unread #7 Dec 17, 2009, 8:51 am
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts144
JoinedJan 24, 2008

Isn't this something that should make it's way into SWRFUSS? Just curious.
       
Post is unread #8 Dec 22, 2009, 7:00 am
Go to the top of the page
Go to the bottom of the page

Lorden
Fledgling
GroupMembers
Posts1
JoinedDec 22, 2009

Not to hijack a thread Caius, but I've got a few questions about your SWR2.0 cleanup.

lorden@kodezone:~/mud/swr-2.0/src$ make
make -C swr_support
make[1]: Entering directory `/home/lorden/mud/swr-2.0/src/swr_support'
cc -c -o obj/bet.o bet.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
cc -c -o obj/file_io.o file_io.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
cc -c -o obj/hashstr.o hashstr.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
hashstr.c: In function âcheck_hashâ:
hashstr.c:211: warning: implicit declaration of function âsnprintfâ
cc -c -o obj/misc.o misc.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
cc -c -o obj/os_unix.o os_unix.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
os_unix.c: In function âget_next_filenameâ:
os_unix.c:34: warning: implicit declaration of function âsnprintfâ
cc -c -o obj/sha256.o sha256.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
sha256.c: In function âsha256_cryptâ:
sha256.c:337: warning: implicit declaration of function âsnprintfâ
cc -c -o obj/string_handling.o string_handling.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
string_handling.c: In function ânumber_argumentâ:
string_handling.c:415: warning: implicit declaration of function âsnprintfâ
cc -c -o obj/time_fun.o time_fun.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
cc -c -o obj/vector3.o vector3.c -O2 -MMD -pedantic -ansi  -Wall -Wshadow -Wformat-security -Winline -Wpointer-arith -Wcast-align -Wredundant-decls  -Wwrite-strings -I. -fPIC
cc -shared -Wl,-soname,libswr_support.so -o libswr_support.so obj/bet.o obj/file_io.o obj/hashstr.o obj/misc.o obj/os_unix.o obj/sha256.o obj/string_handling.o obj/time_fun.o obj/vector3.o
make[1]: Leaving directory `/home/lorden/mud/swr-2.0/src/swr_support'
Compiling act_comm.c
Compiling act_info.c
Compiling act_move.c


What compiler are you using to build the source? I've been able to build by removing the stop on warning flag, but in my log:

Wed Dec 16 15:31:02 2009 :: Loading commands
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_say': ./swr: undefined symbol: do_say
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_emote': ./swr: undefined symbol: do_emote
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_ooc': ./swr: undefined symbol: do_ooc
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_gtell': ./swr: undefined symbol: do_gtell
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_accelerate': ./swr: undefined symbol: do_accelerate
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_addpilot': ./swr: undefined symbol: do_addpilot
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_auction': ./swr: undefined symbol: do_auction
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_ammo': ./swr: undefined symbol: do_ammo
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_allships': ./swr: undefined symbol: do_allships
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_appoint': ./swr: undefined symbol: do_appoint
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_autorecharge': ./swr: undefined symbol: do_autorecharge
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_autotrack': ./swr: undefined symbol: do_autotrack
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_at': ./swr: undefined symbol: do_at
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_affected': ./swr: undefined symbol: do_affected
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_afk': ./swr: undefined symbol: do_afk
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_ansi': ./swr: undefined symbol: do_ansi
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_aassign': ./swr: undefined symbol: do_aassign
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_use': ./swr: undefined symbol: do_use
Wed Dec 16 15:31:02 2009 :: [*****] BUG: Could not find symbol 'do_allow': ./swr: undefined symbol: do_allow


None of the commands, spells, etc work in-game. Nothing related to symbols. Got any ideas? If possible, we could move this post to a new thread, and regroup all the posts related to your work on SWR2.0 there. :smile:
       
Post is unread #9 Dec 22, 2009, 11:54 am   Last edited Dec 22, 2009, 11:55 am by Caius
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Lorden said:

What compiler are you using to build the source?

I've compiled and run this with about 3-4 different versions of GCC (all 4.x and above). What compiler and OS are you using? I'll take a look at this shortly.
       
Post is unread #10 Dec 22, 2009, 12:16 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

That appears to be the result of compiling on Cygwin without uncommenting the Cygwin support in the Makefile.
       
Post is unread #11 Dec 22, 2009, 12:23 pm   Last edited Dec 22, 2009, 12:23 pm by Caius
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Samson said:

That appears to be the result of compiling on Cygwin without uncommenting the Cygwin support in the Makefile.

Could be that, yeah. But I also seem to have made a couple of silly mistakes in the last version of the Makefile, which I didn't test properly. Easy to fix:

In the Makefile in the src directory add -rdynamic to the LFLAGS variable. This will fix the unresolved symbols with dlsym().

In the library Makefile in src/swr_support remove -ansi from the CFLAGS variable. This will take care of snprintf(), as it's not a part of the ANSI C standard.

Thanks for reporting these problems, I'll upload the fixed version shortly.
       
Pages:<< prev 1 next >>