/**/ 

call rxfuncadd 'rxuinit','rxu','rxuinit'
call rxuinit

/* From scoreboard.h
typedef struct {
    pid_t pid;
    char status;
    unsigned long access_count;
    unsigned long bytes_served;
    unsigned long my_access_count;
    unsigned long my_bytes_served;
    unsigned long conn_bytes;
    unsigned short conn_count;
    struct tms times;
    time_t last_used;
    char client[32];	/* Keep 'em small... */
    char request[64];	/* We just want an idea... */
} short_score;
*/
/* To get named shared memory */
getrc = RxGetNamedSharedMem('pointer', '\SHAREMEM\SCOREBOARD', 'rw')
say 'getrc =' getrc

do forever
   outdata = RxStorage(pointer, 149 * 10)
   rc = lineout('erase.me', "--->" outdata);
   cnt = 0
   do x = 1 to 10
      /*
      do z = 1 to 10
         data = right(c2d(substr(outdata,z + ((x-1) * 148),1)),4)
         rc = charout(,data)
         rc = charout(,' ');
      end /* do */
      */
      cnt = cnt + c2d(substr(outdata,9 + ((x-1) * 148),1))
      who_offset  = ((x - 1) * 95) + x * 53 
      what_offset = who_offset + 32
      odata =  left(substr(outdata,who_offset,32),35) substr(outdata,what_offset,64) 
      /*
      rc = lineout('erase.me', "->" odata);
      */
   end /* do */
   say " cnt =" cnt
   rc  = syssleep(1)
   /*
rc = stream('erase.me', 'c','close');
*/
end /* do */
