[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOCKET_H & IFSIO_H



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

I know you have already renamed close in IFSIO_H to CloseF(), as it conflicts with the same prototype in in SOCKET_H (stupid RPG compiler!)

I would like to go even further, in order to remove the ambiguity with the OPCODES of the same name (not to mention that it annoys me to write "CALLP Close(wSocket);":

SOCKET_H - close -> CloseS
IFSIO_H - open -> OpenF, read -> ReadF, write -> WriteF

YUCK!


Instead, just do this:

 /if not defined(CLOSE_PROTOTYPE)
 ... put close() prototype here ...
 /define CLOSE_PROTOTYPE
 /endif

If you put this in both SOCKET_H and IFSIO_H, there won't be a conflict and you can call it as close() for both situtions without any conflict. It was called closef() because in V3R2, we didn't have the /if defined() capability, that was added to the language later, but that's not a problem in today's code.

I have a LOT of code on my system (not just FTPAPI and HTTPAPI) that uses the sockets and IFS APIs, and I'd rather than you don't change the names of the APIs!

Plus, it's a lot easier for the next guy to read if the API names match what IBM has in the documentation.


Personally, I would just change the entries in the copy member, but I guess that would not be nice to some people. Thus I propose to add duplicate prototypes under the new names. Your opinion?

Please don't change the names in the copy members, (Except to remove the unnecessary "f" from closef())
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------