home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / wvhtm064.zip / notes / convert-to-struct / README < prev    next >
Text File  |  2000-09-02  |  995b  |  31 lines

  1. The little scripts here do most of the awful work of reformatting the
  2. ms specs into header files.
  3.  
  4. Given a selected structure from the docs in text format
  5. e.g.
  6. cat demo.txt | wvh.awk | wv.sed > headerfile
  7.  
  8. edit headerfile to check for duplicate offsets (they will be marked
  9. with lines beginning with /*error. Determine which one you want to
  10. use in the c implementation. After this...
  11.  
  12. wv-get-c.awk, creates the basic internal read from file and bucket functions.
  13.  
  14. wv-init-c.awk, creates a structure initializer.
  15.  
  16. wv-copy-c.awk, creates a basic structure copier
  17.  
  18. cat headerfile | wv-get-c.awk > cfile, 
  19. cat headerfile | wv-init-c.awk >> cfile
  20. cat headerfile | wv-copy-c.awk >> cfile
  21.  
  22. we can get things pretty much as we need them.
  23.  
  24. This mostly gets around the rewriting of the specs into structures and
  25. generates pseudo c++ constructors, copy constructors and assignment.
  26.  
  27. Caolan.McNamara@ul.ie
  28.  
  29. (a perl guy can rewrite this if they want, i never got up to date with that
  30. new fangled perl stuff)
  31.