home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / grap / util / 020 / example2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-04  |  949 b   |  36 lines

  1. /*
  2.     Example2.C version 1.0
  3.     by Robert Schmidt of Ztiff Zox Softwear 1993
  4.  
  5.     Example of making use of a TWEAK file by linking its contents in
  6.     with the program.  This program doesn't need any external files at
  7.     run time.
  8. */
  9.  
  10. #include <conio.h>
  11. #include "TwkUser.h"
  12.  
  13. /*    The following included file defines the Mode320x240 table of Registers.
  14.     The file should be created by running
  15.     TWEAK2C 320x240.256 320x240.c Mode320x240 */
  16.  
  17. #include "320x240.c"
  18.  
  19. main()
  20.     {
  21.     /* Note that no initialization is neccessary now.  The Register array
  22.        is linked in as global data, and is directly accessible.  Take
  23.        note of the way the number of Register elements in the array is
  24.        calculated: */
  25.  
  26.     outRegArray(Mode320x240, sizeof(Mode320x240)/sizeof(Register));
  27.  
  28.     getch();
  29.     textmode(C80);
  30.  
  31.     /* Also note that since the array is static, global data, there is
  32.        no pointer to free(), as was done in Example1.C */
  33.  
  34.     return 0;
  35.     }
  36.