Ejemplo n.º 1
0
//
// Function	: PrintOutput
// Role		: Takes the buffer we recieve from the driver and prints it out nicley
// Notes	: 
//
void PrintOutputReg(DWORD dwLen){

	PENTRY	ptr;

	for ( ptr = (PENTRY)RStats; (char *)ptr < min(RStats+dwLen,RStats + sizeof (RStats)); )  {
	 	// Add to list
		size_t len = strlen(ptr->text);

		ReplaceTabs(ptr,dwLen);
		wbprintf(0,"[regmon] %s \n",ptr->text);
		addactivity("[regmon] %s \n",ptr->text);

		len += 4; len &= 0xFFFFFFFC; // +1 for null-terminator +3 for 32bit alignment
		ptr = (PENTRY)(ptr->text + len);
	}

}
Ejemplo n.º 2
0
int main()
{
  int c, i;
  char buf[1000];
  
  i = 0;

  while((c = getchar()) != EOF) {
    if (c == '\n' && i > 0) {
      buf[i] = '\0';
      ReplaceTabs(buf, i);
      i = 0;
    } else {
      buf[i] = c; i++;
    }
  }

  return 0;
}