Also, if you didn't want to break them up between multiple keywords, but
you did want to break them up between multiple lines like this or
something:

Stat1  3 5 2 7 8
       9 2 1 7 4

you could do something like this:

Case 'S':
            if (!str_cmp(word,"Stat1"))
            {
                ch->stat1                = fread_number(fp);
                ch->stat2                = fread_number(fp);
                ch->stat3                = fread_number(fp);
                ch->stat4                = fread_number(fp);
                ch->stat5                = fread_number(fp);
                /* ------------> */        fread_to_eol(fp);
                ch->stat6                = fread_number(fp);
                ch->stat7                = fread_number(fp);
                ch->stat8                = fread_number(fp);
                ch->stat9                = fread_number(fp);
                ch->stat10               = fread_number(fp);
                fMatch = TRUE;
                break;
            }

at least, I think something like that should work... in theory...

Richard Lindsey
Network Administrator
Intera, Inc.
9111-A Research Blvd.
Austin, TX  78758
(512) 425-2006
[EMAIL PROTECTED] 

-----Original Message-----
From: Mervine, Keith [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 27, 2004 11:52 AM
To: [EMAIL PROTECTED]; [email protected]
Subject: RE: Files

Why not do just that.

 fprintf( fp, "Stat1  %d %d %d %d %d\n",stat1,stat2,stat3,stat4,stat5);
 fprintf( fp, "Stat2  %d %d %d %d %d\n",stat6,stat7,stat8,stat9,stat10);

And in the read....

Case 'S':
            if (!str_cmp(word,"Stat1"))
            {
                ch->stat1                = fread_number(fp);
                ch->stat2                = fread_number(fp);
                ch->stat3                = fread_number(fp);
                ch->stat4                = fread_number(fp);
                ch->stat5                = fread_number(fp);
                fMatch = TRUE;
                break;
            }
            if (!str_cmp(word,"Stat2"))
            {
                ch->stat6                 = fread_number(fp);
                ch->stat7                 = fread_number(fp);
                ch->stat8                 = fread_number(fp);
                ch->stat9                 = fread_number(fp);
                ch->stat10                = fread_number(fp);
                fMatch = TRUE;
                break;
            }
                break;


This breaks them up under different keywords though.  I'm not sure that
if this is what you mean but it does break them down nicely

-K


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 11:46 PM
To: [email protected]
Subject: Re:Files


I just realized I explained my previous email very badly.

Here I go again!

I had:

Stat %d x10
I wanted to make it like this:
Stat1 %dx5
Stat2 %dx5

However, it was deleting all of the stats and all the infornmation was
lost so I
couldn't break it up in two lines...that is why I want to place a \n in
the
middle of the single line lol.


-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom
-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to