Esempio n. 1
0
void cprintf(int session_id,const char *fmt,...)
{
   char s[8000];
   va_list marker;

   va_start(marker,fmt);
   vsnprintf(s,sizeof(s),fmt,marker);
   va_end(marker);

   TermConvertBuffer(s,sizeof(s));

   SendClientStr(session_id,s);
}
Esempio n. 2
0
void eprintf(const char *fmt,...)
{
   char s[2000];
   va_list marker;

   sprintf(s,"%s | ",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   TermConvertBuffer(s,sizeof(s)); /* makes \n's into CR/LF pairs */

   WriteStrChannel(CHANNEL_E,s);
}
Esempio n. 3
0
void lprintf(const char *fmt,...)
{
   char s[1000];
   va_list marker;

   sprintf(s,"%s | ",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   TermConvertBuffer(s,sizeof(s)); /* makes \n's into CR/LF pairs */
   if (s[strlen(s)-1] != '\n')
      strcat(s,"\r\n");

   WriteStrChannel(CHANNEL_L,s);
}