Hello Folks,
replying to myself to summarise what I was doing so far.
First, I fetched the current version of pwgen from github and made some changes, to make it compile cleanly.
- Add a freely available definition of getopt(),
- irgnore isatty() because it's not available on V7R2,
- circumvent the lack of strdup with a crude manual malloc/memcpy.
These changes allow the whole pwgen to be compiled in the CL environment in IBM i. For your convenience, a readymade save file can be found here:
https://leela.pocnet.net/~poc/pwgen.savf
(If anyone wants to volunteer by providing some wrapper to the *PGM object to use typical IBM i command line prompts and parameters, feel free. :-) I'm planning to send my changes back to the author anyway, so I can include the wrapper also.)
Indeed, pw_rand wants for parameters now. A bit of research doesn't give me a hint how to implement a NULL pointer in ILR RPG, though. So, I'm stuck again. May I kindly ask for a hint?
:wq! PoC
PGP-Key: DDD3 4ABF 6413 38DE -
https://www.pocnet.net/poc-key.asc
As an Amazon Associate we earn from qualifying purchases.