Sorry if this is a complete newbie silly question.  I am very new to
Factor and I still often get lost between the forest and the trees. One
of the things that first attracted me to Factor was its nice C interface.

So, suppose I have defined some structure like this, almost an exact
copy of its C analog:

STRUCT: event-entry
    { uDateTime       alien.c-types:uint }
    { uSystemTick    alien.c-types:uint }
    { uTimeStampLSW alien.c-types:uint }
    { uTimeStampMSW alien.c-types:ushort }
    { uWindowID          alien.c-types:char }
    { cEventString        alien.c-types:char[17] } ;


Now let's further suppose that I have a large binary file made up of
thousands of these structures, except that there is a known gap between
each one that is actually used for logging some arbitrary event data.

I have been able to figure out how to read a large block of these into a
big byte array (128 K).  What I would next like to do is somehow iterate
over this byte-array and create a sequence of event-entry structures.
Unfortunately I cannot figure out how to do this.  I have been able to
create a single instance of an event-entry using memory>struct with the
128 K byte-array.

Can anyone provide some guidance for me?

Thanks,

John Whittaker

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to