G
gamename
Hi,
I have 2 vendor libraries. One is for transmitting, the other
receiving data. Virtually all of the functions in either lib are
almost exactly alike in the way they're called. The only external
difference is the name has an "R" or an "S" in it.
ex
fooSGetBytes(bufa, buftemp);
fooRGetBytes(bufa, buftemp);
Several of my own support routines have logic on the send and receive
side that are also identical except that they're calling "R" functions
or "S" functions.
Is there any way to have 1 routine that calls either the "S" or "R"
functions depending on a parm passed by the user? Otherwise, I have
dozens and dozens of situations like this:
if(send)
fooSGetBytes()
else
fooRGetBytes()
In short, I would rather have something like
fnptr = fooSGetBytes
....lotsa code...
fptr()
Any ideas?
Thanks,
-T
I have 2 vendor libraries. One is for transmitting, the other
receiving data. Virtually all of the functions in either lib are
almost exactly alike in the way they're called. The only external
difference is the name has an "R" or an "S" in it.
ex
fooSGetBytes(bufa, buftemp);
fooRGetBytes(bufa, buftemp);
Several of my own support routines have logic on the send and receive
side that are also identical except that they're calling "R" functions
or "S" functions.
Is there any way to have 1 routine that calls either the "S" or "R"
functions depending on a parm passed by the user? Otherwise, I have
dozens and dozens of situations like this:
if(send)
fooSGetBytes()
else
fooRGetBytes()
In short, I would rather have something like
fnptr = fooSGetBytes
....lotsa code...
fptr()
Any ideas?
Thanks,
-T