| Last change
 on this file since a43b743 was             b28ce93, checked in by Michael Brooks <mlbrooks@…>, 4 months ago | 
        
          | 
Add POC illustrating generating headers from compile units
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            374 bytes | 
      
      
| Line |  | 
|---|
| 1 | #import auto a | 
|---|
| 2 |  | 
|---|
| 3 | //# @ | 
|---|
| 4 | struct b_t { | 
|---|
| 5 | // embedding is really a tack-on here; tested in coop | 
|---|
| 6 | // but it justifies the aymmetric a/b imports | 
|---|
| 7 | struct a_t a; // not a pointer | 
|---|
| 8 | }; | 
|---|
| 9 |  | 
|---|
| 10 | //# $f | 
|---|
| 11 | void b( struct b_t * p, int depth ) { | 
|---|
| 12 | int printf( const char *, ... );  // scaffold | 
|---|
| 13 | if (depth <= 0) return; | 
|---|
| 14 | printf( "b %p %d\n", p, depth ); | 
|---|
| 15 | a( & p->a, depth-1 ); | 
|---|
| 16 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.