I have written a function called OutStr, which is a scaled-down version 
of printf  for a small embedded system:

void OutStr(const char * format, ...);

Now I want to write another function that uses this function to write to 
various output devices, like this:

void OutStrDevice(int Device, const char  * format, ...);

How can I call OutStr from within OutstrDevice and pass the same 
parameters in ellipsis?

This illustrates what I am trying to do:

void OutStrDevice(unsigned int Device, const char  * format, ...)
{
  switch(Device)
  {
    case 1:
// code enable device1 one here
  break;
  default:
    case 2:
// code enable device2 one here
  break;
  }
  Outstr(format,?????);   // <-- How do I do this?
}


Regards

Chris

Reply via email to