home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / sps / part2 / printall.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  430 b   |  21 lines

  1. # include       <stdio.h>
  2. # include       "sps.h"
  3.  
  4. /* PRINTALL - Recursively print the process tree. */
  5. printall ( p, md )
  6.  
  7. register struct process         *p ;
  8. register int                    md ;
  9.  
  10. {
  11.     while ( p )
  12.     {       /* Print this process */
  13.         printproc( p, md ) ;    
  14.         (void)fflush( stdout ) ;
  15.         /* Print child processes */
  16.         printall( p->pr_child, md+1 ) ;
  17.         /* Print brother processes */
  18.         p = p->pr_sibling ;     
  19.     }
  20. }
  21.