home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / samples / include / general.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-18  |  4.4 KB  |  107 lines

  1. /*
  2. ** GENERAL.H
  3. **
  4. **      This header file contains the public HTTP interfaces used by the
  5. **        Sambar Server for interfacing with General RCP and Scalar
  6. **        Utility functions.
  7. **
  8. **        Confidential Property of Tod Sambar
  9. **        (c) Copyright Tod Sambar 1997
  10. **        All rights reserved.
  11. **
  12. **
  13. ** History:
  14. ** Chg#    Date    Description                                                Resp
  15. ** ----    -------    -------------------------------------------------------    ----
  16. **        10JUN97    Created                                                    sambar
  17. */
  18.  
  19. #if     !defined(__GENERAL_H__)
  20. #define __GENERAL_H__
  21.  
  22. #include    <sambar.h>
  23. #ifdef    WIN32
  24. #include    <io.h>
  25. #include    <sys/stat.h>
  26. #include    <sys/locking.h>
  27. #include    <share.h>
  28. #include    <fcntl.h>
  29. #endif    /* WIN32 */
  30.  
  31. /*
  32. ** General Defines
  33. */
  34. #define INT_WIDTH        7        /* MAX is 8 */
  35. #define COUNT_WIDTH     8
  36. #define COUNT_HEIGHT    16
  37.  
  38. static char           *bitmap[] = 
  39. {
  40.     "0xff", "0xff", "0xff", "0xc3", "0x99", "0x99", "0x99", "0x99",    /* rows 1-8  of 0 */
  41.     "0x99", "0x99", "0x99", "0x99", "0xc3", "0xff", "0xff", "0xff",    /* rows 9-16 of 0 */
  42.     "0xff", "0xff", "0xff", "0xcf", "0xc7", "0xcf", "0xcf", "0xcf",    /* rows 1-8  of 1 */
  43.     "0xcf", "0xcf", "0xcf", "0xcf", "0xcf", "0xff", "0xff", "0xff",    /* rows 9-16 of 1 */
  44.     "0xff", "0xff", "0xff", "0xc3", "0x99", "0x9f", "0x9f", "0xcf",    /* rows 1-8  of 2 */
  45.     "0xe7", "0xf3", "0xf9", "0xf9", "0x81", "0xff", "0xff", "0xff",    /* rows 9-16 of 2 */
  46.     "0xff", "0xff", "0xff", "0xc3", "0x99", "0x9f", "0x9f", "0xc7",    /* rows 1-8  of 3 */
  47.     "0x9f", "0x9f", "0x9f", "0x99", "0xc3", "0xff", "0xff", "0xff",    /* rows 9-16 of 3 */
  48.     "0xff", "0xff", "0xff", "0xcf", "0xcf", "0xc7", "0xc7", "0xcb",    /* rows 1-8  of 4 */
  49.     "0xcb", "0xcd", "0x81", "0xcf", "0x87", "0xff", "0xff", "0xff",    /* rows 9-16 of 4 */
  50.     "0xff", "0xff", "0xff", "0x81", "0xf9", "0xf9", "0xf9", "0xc1",    /* rows 1-8  of 5 */
  51.     "0x9f", "0x9f", "0x9f", "0x99", "0xc3", "0xff", "0xff", "0xff",    /* rows 9-16 of 5 */
  52.     "0xff", "0xff", "0xff", "0xc7", "0xf3", "0xf9", "0xf9", "0xc1",    /* rows 1-8  of 6 */
  53.     "0x99", "0x99", "0x99", "0x99", "0xc3", "0xff", "0xff", "0xff",    /* rows 9-16 of 6 */
  54.     "0xff", "0xff", "0xff", "0x81", "0x99", "0x9f", "0x9f", "0xcf",    /* rows 1-8  of 7 */
  55.     "0xcf", "0xe7", "0xe7", "0xf3", "0xf3", "0xff", "0xff", "0xff",    /* rows 9-16 of 7 */
  56.     "0xff", "0xff", "0xff", "0xc3", "0x99", "0x99", "0x99", "0xc3",    /* rows 1-8  of 8 */
  57.     "0x99", "0x99", "0x99", "0x99", "0xc3", "0xff", "0xff", "0xff",    /* rows 9-16 of 8 */
  58.     "0xff", "0xff", "0xff", "0xc3", "0x99", "0x99", "0x99", "0x99",    /* rows 1-8  of 9 */
  59.     "0x83", "0x9f", "0x9f", "0xcf", "0xe3", "0xff", "0xff", "0xff"    /* rows 9-16 of 9 */
  60. };
  61.  
  62. static unsigned char    bitmap2[11][COUNT_HEIGHT] =
  63. {
  64.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0xC3, 0xC3,
  65.         0xDB, 0xDB, 0xC3, 0xC3, 0x66, 0x3C }, /* 0 */
  66.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1C, 0x1E, 0x18,
  67.         0x18, 0x18, 0x18, 0x18, 0x18, 0x7E }, /* 1 */
  68.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x63, 0x60, 0x30,
  69.         0x18, 0x0C, 0x06, 0x03, 0x63, 0x7F }, /* 2 */
  70.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x63, 0x60, 0x60,
  71.         0x3C, 0x60, 0x60, 0x60, 0x63, 0x3E }, /* 3 */
  72.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x3C, 0x36,
  73.         0x33, 0x7F, 0x30, 0x30, 0x30, 0x78 }, /* 4 */
  74.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x03, 0x03, 0x03,
  75.         0x3F, 0x60, 0x60, 0x60, 0x63, 0x3E }, /* 5 */
  76.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x06, 0x03, 0x03,
  77.         0x3F, 0x63, 0x63, 0x63, 0x63, 0x3E }, /* 6 */
  78.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x63, 0x60, 0x60,
  79.         0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x0C }, /* 7 */
  80.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x63,
  81.         0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E }, /* 8 */
  82.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x63,
  83.         0x7E, 0x60, 0x60, 0x60, 0x30, 0x1E }, /* 9 */
  84.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
  85.         0x00, 0x00, 0x00, 0x18, 0x18, 0x00 }  /* : */
  86. };
  87.  
  88. /*
  89. ** Sambar Server General Utility DLL Function Prototypes
  90. */
  91. #if defined(__cplusplus)
  92. extern "C" {
  93. #endif /* defined(__cplusplus) */
  94.  
  95. extern SA_RETCODE SA_EXPORT        general_init(SA_CTX *sactx);
  96.  
  97. extern SA_RETCODE SA_PUBLIC        pagecount_rpc(SA_CTX *sactx, SA_CONN *saconn,
  98.                                     SA_PARAMS *saparams, SA_INT *infop);
  99. extern SA_RETCODE SA_PUBLIC        pagecount_scalar(SA_CTX *sactx, SA_CONN *saconn,
  100.                                     SA_ARG *saargs, SA_CHAR *value);
  101.  
  102. #if defined(__cplusplus)
  103. }
  104. #endif /* defined(__cplusplus) */
  105.  
  106. #endif /* __GENERAL_H__ */
  107.