TIP: Click on subject to list as thread! ANSI
echo: locuser
to: All
from: david begley
date: 1994-04-10 14:53:24
subject: Patch - Oops..

The code I posted works fine for Squish, but Tobruk still has some problems
with it.  Here are the solutions:

1.  In procfile(), near the end the code reads:

        fputc( 0, np );
        fclose(np);
        fclose(fp);

    Change this to read:

        fputc( 0, np );
        fputc( 0, np );                         /*!*/
        fclose(np);
        fclose(fp);

    I don't know how this will work under DOS, but it works fine for me
    under OS/2 - add the following two lines after the segment above:

        remove(file);                           /*!*/
        rename( "fixed.pkt", file );            /*!*/

    This way the packet is fixed "inline" and I'm not left having to
    rename it so that Squish/Tobruk will process it.

2.  If Tobruk complains of no origin line, seen-bys or whatever, then it's
    because it can't find a distinct EOL when it hits the end of the message,
    so it misdiagnoses the problem as being a *missing* line of some kind.

    Fix - in procfile(), change:

        fseek( fp, -36, SEEK_CUR );
        fseek( np, -2, SEEK_CUR );
        fputc( 0, np );
        fread( &msghdr, 34, 1, fp );
        printf( "message fixed\n" );

    to read:

        fseek( fp, -36, SEEK_CUR );
        fseek( np, -2, SEEK_CUR );
        fputc( 13, np );                        /*!*/
        fputc( 10, np );                        /*!*/
        fputc( 0, np );
        fread( &msghdr, 34, 1, fp );
        printf( "message fixed\n" );

So sue me, it was early in the morning, okay?!  ;-)


    - dave
    david{at}harpo.nepean.uws.edu.au

---
* Origin: [ epicentre of the universe -- sydney australia ] (3:711/934.4)
SEEN-BY: 640/305 711/934
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.