Re: C program for QDFRTVFD API

Frank Kolmann <[email protected]>
Newsgroups gmane.comp.lang.as400.c
Message-ID <CAB-SQvgVghHidAZ=W+hwDaZJMXmwP8Qo5g5+WrG1KYke6uTo4w@mail.gmail.com>
Hi Jevgeni

Just to let you know that I have made a change based on your recommendation.
It is not exactly like you say but I am using a index from last used field.

This change also fixes a bug when comments overlay the same start position.
http://wiki.midrange.com/index.php/CQDFRTVFD

Regards
Frank

>From: Jevgeni Astanovski <jevgeniast@xxxxxxxxx>
>Date: Mon, 22 Sep 2014 09:52:44 +0300
>I meant different thing.
>I would retrieve QDFTRTVD API data into an allocated memory chunk.
>Then I would create user space to keep retrieved structures in a
>format of FieldData_t format.
>I would place two integers in the beginning of the user space that are
>length of the data in the user space and offset to the first unsent
>field in the user space.
>Then I would return first retrieved field from the user space and
>increment a pointer to the next one.
>When called with "NEXT" I would just return a field pointed by my
>"next" pointer in the user space and increment it.
>In this case you also do not need to pass previous field when requesting
next.
-- 
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.