Re: Boards

From: Patrick Dughi (dughi@imaxx.net)
Date: 11/16/98


> > OK, I've just finished patching in board-2_2.patch from the FTP site and
> > had a coupla quick questions/problems.
> > In my boards.c file, I've got 3 bad things :)
> > C:\Circle\src\boards.c(22) : warning C4013: 'scandir' undefined; assuming
> > extern returning int
>
> This happenes in c when you have a function defined below the actual
> function using it. To fix this put the declairation line with a
> semi-colan at the top of the file.
>

        This also happens when your compiler doesn't have that function at
all - for example, scandir exists under most *nix systems, but I'm not
sure about windows - which you're using.  You might try and find a similar
function.

> > C:\Circle\src\boards.c(22) : error C2065: 'alphasort' :
undeclared > > identifier
>
> This is undeclared find out where it is used. Where perhaps u or the
> patching prog missed a line and try and just define it as needed.
>
        Alphasort is a simple comparison method which is included with the
scandir function.  If it doesn't exist, and your scandir function needs a
sorting pattern, just write a quick alphasort function for yourself -
int (*compar)(const struct dirent **, const struct dirent **) -
  and you'll be okay.


> > C:\Circle\src\boards.c(88) : warning C4013: 'strcasecmp' undefined;
> > assuming extern returning int
> Same as above.

        Ah - this one I kow for sure.. vc5.0 does not have the strcasecmp
function. instead, it's something like _stricmp(), for string (case
insensitive) comparison. - you can also change it to use circle's built in
str_cmp, which should work on any system.

        I'm pretty sure the readme file says something about it not
necessarily working correctly for windows95.

                                                PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST