advise Sample Subroutine

This section explains the advise sample subroutine.


/* Function: advise
*
* Inputs:
* code - the logging level to associate with this error (int) 
* what - the thing that went wrong
* fmt - the string to be printed in printf format (char*)
* variables - variable needed to fill in the fmt.
*
* Outputs: none
* Returns: none
*
* NOTE: The advise function calls the logging function with the  
* variables above. This is a usability front end to the logging 
* functions.
*/
#ifndef lint
void    advise (va_list)
va_dcl
{
   int code;
   va_list ap;
   va_start (ap);
   code = va_arg (ap, int);  /*Gets the code variable */ 
                             /* from the list of parameters */ 
   _ll_log (pgm_log, code, ap);
   va_end (ap);
}
#else
/*  VARAGS  */
void advise (code, what, fmt)
char *what,
     *fmt;
int   code;
{
   advise (code, what, fmt);
}
#endif