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

RE: SOCKET_H & IFSIO_H



Sender: "Lapeyre, Francis" <FLAPEYRE@xxxxxxxx>

Scott,

In fact, it's our shop's practice to do exactly that. And I might have done
it for the FTPAPIR4 I installed, except for my time constraints. It's not an
issue for me yet, since FTPAPIR4 only used in one application, but I can see
the utility: use the APIs to create a file to FTP straight to the IFS, then
FTP to it, and then copy it to a database file.

Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx 


-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On
Behalf Of Scott Klement
Sent: Monday, June 26, 2006 12:39 PM
To: ftpapi@xxxxxxxxxxxxx
Subject: 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
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------