Пример #1
0
void realPrint(Node* root) {
    if (root != NULL) {
        if (printCount)
            printf(" ");
        printCount++;
        printf("%d", root->val);
        realPrint(root->left);
        realPrint(root->right);
    }
}
Пример #2
0
void *print () {
  while(1){
    char buf[READ];
    int i, nr;

    int pw = get(&buffer);
    do{
      nr= read(pw, buf, READ);
      for(i=0; i<nr; i++)
        realPrint(pt_ch, buf+i);
    }while (nr ==READ);
    close(pw);}
  }
Пример #3
0
void printTree(Node* root) {
    printCount = 0;
    realPrint(root);
    printf("\n");
}