MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: register_function line
On Thu, 30 May 1996, Diana L Harris wrote:
> ****** Wouldn't I need a { here?
> > dist += (start[i]-stop[i])*(start[i]-stop[i]);
> And } here?
No you don't :-) Because you only have one line after the if(), you can
skip the 'block'. This has been part of C since K&R i think :)
> extensions.c: In function `bf_distance':
> extensions.c:190: structure has no member named `num'
> extensions.c:210: warning: implicit declaration of function `newfloat'
> extensions.c:211: incompatible type for argument 1 of `make_var_pack'
> *** Error code 1
> Then it stopped...What's wrong with it?
Well, like hpa said, this was off the top of his head. Which means it's
in essence good code, and it'll work, but it might not be the
fastest/most efficient way to do it, and the code was not checked against
the rest of the MOO source (i.e. there might be conflicting function
names, the most annoying C problem IMHO) You should check through the
code, see what's wrong, change it, recompile, record the errors, see
whats wrong, change it, etc etc etc :-)
> ALSO: When I compiled another MOO, the version of GCC didn't support the '-g'
> option. I got hundreds of warnings - I mean lots of 'em. It still
> compiled and is running fine so far, but will this have any effect on the
> moo's operation or anything else? Is there a way around it (besides getting
> a new version of GCC, of which I have no control over)?
Just remove the '-g' flag from the Makefiles (I'm not sure where it
should be removed, but as long as it says 'CCFLAGS' or something in the
same line, it should work... the -g flag means 'produce debugging info'
and not all versions (i think it depends on the host-type, not sure
though) don'tt have it. Unfortunately, it does spam you with a warning,
everytime you (or the Makefile) executes GCC...
Regards,
Thomas.
Thomas Wouters | Visit The Digitale City (DDS) | Forever an Addict to
zonny@moo.dds.nl | The Dutch Digital Community | Virtual, Digital,
Ynnoz @ MOOs | http://www.dds.nl/plein/centraal/ | Unconventional Rubbish
Jay_* @ MUS[HE]s | WWW -- World Wide Wackos :) | (Except for Windows)
References:
Home |
Subject Index |
Thread Index