TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: LARRY OLSON 72227,3467
date: 1993-07-02 02:05:15
subject: get/put problems

#: 18371 S12/OS9/68000 (OSK)
    02-Jul-93  02:05:15
Sb: get/put problems
Fm: LARRY OLSON 72227,3467
To: all

                  /*  GET/PUT block test  */

      /*    This is a test routine, written to show the      */
      /*  problem that cropped up with PUTting a GET block.  */

#include 
#include 

#define STDIN  0
#define STDOUT 1
#define STDERR 2

main()
{

   int P_id, Wpath, xx, yy, chrcnt ;
   char response;

   P_id = getpid();

   Wpath = open("/w",3);
   DWSet(Wpath,3,0,0,40,26,7,0,0);

   Palette(Wpath,7,0,140,170);         /* Set color to med. blue */

   Clear(Wpath);
   CurOff(Wpath);
   Select(Wpath);

   SetDPtr(Wpath,10,10);
   Box(Wpath,33,17);                   /* Draw box  */
   SetDPtr(Wpath, 12,12);

   /* Remark this out to see problem clearer */
   FFill(Wpath);

   GetBlk(Wpath,P_id,1,10,10,24,8);

   Clear(Wpath);
   CWArea(Wpath,3,2,37,7);
   writeln(Wpath," This example is with LSET(path,0)\n",35);
   writeln(Wpath,"  notice alternating wide gaps.\n",32);
   writeln(Wpath," To really see the problem, remark\n",35);
   writeln(Wpath,"out the FFill(Wpath) function call.\n",36);
   CWArea(Wpath,0,0,40,26);

  /*   LSet is not being called, I assume default LSET is 0  */

   for (xx=60; xx <= 554; xx += 26)  {
       for (yy = 70; yy <= 151; yy += 9)  {
           PutBlk(Wpath,P_id,1,xx,yy);
           }
       }

   CurXY(Wpath,9,23);
   writeln(Wpath,"Press key to continue\n",22);
   chrcnt = (read(Wpath, &response, 1));

   Clear(Wpath);
   CWArea(Wpath,3,3,36,5);
   writeln(Wpath," This example is with LSET(path,2)\n",35);
   writeln(Wpath,"notice, no alternating wide gaps.\n",34);
   CWArea(Wpath,0,0,40,26);

   LSet(Wpath, 2);

   for (xx=60; xx <= 554; xx += 26)  {
       for (yy = 70; yy <= 151; yy += 9)  {
           PutBlk(Wpath,P_id,1,xx,yy);
           }
       }

   CurXY(Wpath,9,23);
   writeln(Wpath,"Press key to continue\n",22);
   chrcnt = (read(Wpath, &response, 1));

   Select(0);

   KilBuf(Wpath, P_id, 1);

   DWEnd(Wpath);
   close(Wpath);

   exit(0);
}

SOURCE: compuserve via textfiles.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™.