Re: I3

From: Mike Stilson (mike@velgarin.sytes.net)
Date: 11/26/01


On Sun, Nov 25, 2001 at 11:27:59PM -0600, John C. A. Bambenek wrote:
>From:    George Greer <greerga@circlemud.org>
>
>>On Sat, 24 Nov 2001, John C. A. Bambenek wrote:
>
>>>I3 is version 3 of the intermud (imc) gossip code.
>
>>It has instructions for installation in the 'i3circle.txt' file.  You'll
>>have to think about the player file parts if you have the binary player
>>files of stock code but that's all I see that needs any sort of
>>interpretation. You should really use the ASCII player files anyway.
>
>Ok, let me try once again.  I know where the code is, I know what it is, I
>know where the installation instructions are.  Has anyone put it in?
>Namely, my problem is compile-time parse errors that I have been unable to
>diagnose.

Out of curiosity, I threw it into a copy of my mud.  Following
i3circle.txt it took about 10 or 15 minutes.

What odd parse errors are you getting?  (I hope something like
changing LEVEL_IMMORTAL to LVL_IMMORT isn't what you mean.)

>
>So if you HAVE successfully ported it, can I get your copies of the
>i3cfg.h, i3.c, and i3.h files so I can compile those files cleanly in my
>MUD.

I doubt my copy would help you much.  My mud is not your mud, nor is
anyone else's.  If I give you mine you'd have the same problems.

No need to touch i3.h, i3cfg.h.
The only changes I made in i3.c (except stuff very specific to my mud)
were:

s/LEVEL_IMMORTAL/LVL_IMMORT/g
to match how I define it.

and:
add: #define current_time time(0)
at the beginning since it seems to use it to expire something that might
be important.


>Obnoxious comments about how I should find the parse errors myself need
>not respond.  It's a matter of control characters I can't see in a crappy
>download, not a missing semicolon.

Since you seem hard pressed to fine one of the ctrl-stripping programs,
here.

personally I'd just download it again though, the zip file's only 68,148
bytes.

[Mailer code, usual disclaimer applies]

--- 8< --- cut here --- >8 ---
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>

int main(int ac, char **av)
{
        FILE *fp_in, *fp_out;
        char c;
        int in = 0, out = 0, dropped = 0;

        if(ac<2) exit(-1);

        if(!(fp_in=fopen(*(av + 1), "r"))) exit(-1);
        if(!(fp_out=fopen(*(av + 2), "w"))) exit(-1);

        for(;;) {
                if((c = getc(fp_in)) == EOF) break;
                else in++;
                if(!iscntrl(c)) { putc(c, fp_out); out++; }
                else if(c == '\n') { putc(c, fp_out); out++; }
                else dropped++;
        }

        fflush(fp_out);
        fclose(fp_out);

        fprintf(stderr, "Chars in: %d out: %d dropped: %d\n", in, out, dropped);
        exit(0);
}

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST