Yes. It would be great to have such software available for all ILE Languages. At last a real template engine for the System i (without the need to use Java and Velocity, which works ... even from RPG , but is not a good way to go, though Velocity is a great template engine).

Mihael

-----Ursprüngliche Nachricht-----
Von: c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx [mailto:c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx] Im Auftrag von Bob Crothers
Gesendet: Donnerstag, 11. Juni 2009 16:59
An: C programming iSeries / AS400
Betreff: Re: [C400-L] lockf() on system i

I cant help you with your lockf issues...but clear silver sure looks
interesting!
Bob Crothers
www.BJsBariatrics.Com
------------------------------------------
"That which we manifest is before us; we are the creators of our own
destiny. Be it through intention or ignorance, our successes and our
failures have been brought on by none other than ourselves"
- Garth Stein (The Art of Racing in the Rain)


On Thu, Jun 11, 2009 at 10:24 AM, Schmidt, Mihael <
Mihael.Schmidt@xxxxxxxxxxx> wrote:

Hi,

I'm quite new to C especially ILE C and am trying to port a software
written in C (with target platform Linux/Unix) to ILE C.

The software uses the lockf() function which is available on other
platforms but not on System i.

The "UNIX C Applications Porting to AS/400 Companion Guide" also points out
that there are problems but gives a function which should be used for
lockf().

On most (probably all) systems lockf the following declaration:
int lockf(int fildes, int function, off_t size);

But the function from the IBM redbook has:
int lockf(_RFILE *fildes, int function, int size)

Where _RFILE is:

typedef _Packed struct {
char reserved1[16];
volatile void *const *const in_buf;
volatile void *const *const out_buf;
char reserved2[48];
_RIOFB_T riofb;
char reserved3[32];
const unsigned int buf_length;
char reserved4[28];
volatile char *const in_null_map;
volatile char *const out_null_map;
volatile char *const null_key_map;
char reserved5[48];
const int min_length;
short null_map_len;
short null_key_map_len;
char reserved6[8];
} _RFILE;

What do I have to do to get these two worlds together ?

For those interested: I try to port the template engine ClearSilver (
www.clearsilver.net) to ILE C to be able to use it from RPG.

Any ideas?

Thanx in advance

Mihael Schmidt
Anwendungsentwicklung

Dirk Rossmann GmbH
Iserhägener Str.16
30938 Burgwedel
* +49 (05139) 898 - 4353

Handelsregister-Nr. HRB 120546, Amtsgericht Hannover
Ust-Id-Nr. DE 115055186
St.-Nr. 16 / 205 / 65401
Geschäftsführer: Dirk Roßmann, Alice Schardt-Roßmann, Roland Frobel, Klaus
Praus

--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.



This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact [javascript protected email address].