home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / API / BUILDVAR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-23  |  1.7 KB  |  52 lines

  1. /*------------------------------------------------------------------*/
  2. /* BUILDVAR.C                                                       */
  3. /*------------------------------------------------------------------*/
  4. /* API ▒`  ªí : 1. SetUp()   ( in buildvar.c )                      */
  5. /*              2. CleanUp() ( in buildvar.c )                      */
  6. /* API ¿τ╝╞└] : buildvar.plb                                        */
  7. /* ⌐IÑsñΦªí   : SET LIBRARY TO BUILDVAR ( ½╪Ñ▀┼▄╝╞   )              */
  8. /*              SET LIBRARY TO          ( ─└⌐±▒╝┼▄╝╞ )              */
  9. /*------------------------------------------------------------------*/
  10.  
  11. #include  <pro_ext.h>
  12. Locator loc;
  13. Value   val;
  14.  
  15. void FAR SetUp()
  16. {
  17.         int building;
  18.  
  19.         val.ev_type  = 'N';    /* ╕Ω«╞½¼║A       */
  20.         val.ev_width = 8;      /* ┼πÑ▄╝╞¡╚¬║╝e½╫ */
  21.         val.ev_length= 2;      /* ñp╝╞ª∞╝╞       */
  22.         val.ev_real  = 0.00;   /* ª╣╝╞¡╚¬║¡╚     */
  23.  
  24.         loc.l_subs=0;          /* ¬φÑ▄¼░ñ@░O╛╨┼Θ┼▄╝╞ */
  25.  
  26.         building= _NewVar("number",&loc,NV_PUBLIC); /* ½╪Ñ▀ªW║┘¼░ number    */
  27.                                                     /* ñº░O╛╨┼Θ┼▄╝╞         */
  28.         if(building>0)
  29.             building = _Store(&loc, &val);          /* │]⌐w┼▄╝╞ñº¬∞¡╚       */
  30.         else
  31.             _Error(building);                       /* ½╪Ñ▀┼▄╝╞«╔╡oÑ═┐∙╗~   */
  32.  
  33. }
  34.  
  35. void FAR CleanUp()
  36. {
  37.         _Release(loc.l_NTI);                        /* ─└⌐±ª╣┼▄╝╞           */
  38. }
  39. FoxInfo myFoxInfo[] =
  40. {
  41.         {"SETUP", SetUp, CALLONLOAD, ""},
  42.         {"CLEANUP", CleanUp,CALLONUNLOAD ,""},
  43. };
  44.  
  45.  
  46. FoxTable _FoxTable =
  47. {
  48.     (FoxTable FAR *)0,
  49.     sizeof(myFoxInfo) / sizeof(FoxInfo),
  50.     myFoxInfo
  51. };
  52.