ODCore.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* OpenDoors Online Software Programming Toolkit
  2. * (C) Copyright 1991 - 1999 by Brian Pirie.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. *
  19. * File: ODCore.h
  20. *
  21. * Description: Global functions and variables provide by the odcore.c
  22. * module. These core facilities are used throughout OpenDoors,
  23. * and are required regardless of what OpenDoors features that
  24. * a given program uses.
  25. *
  26. * Revisions: Date Ver Who Change
  27. * ---------------------------------------------------------------
  28. * Nov 16, 1995 6.00 BP Created.
  29. * Nov 17, 1995 6.00 BP Use new input queue mechanism.
  30. * Dec 24, 1995 6.00 BP Added abtGreyBlock.
  31. * Dec 30, 1995 6.00 BP Added ODCALL for calling convention.
  32. * Jan 01, 1996 6.00 BP Changed TEXT_SIZE to 49.
  33. * Feb 19, 1996 6.00 BP Changed version number to 6.00.
  34. * Mar 03, 1996 6.10 BP Begin version 6.10.
  35. * Sep 01, 1996 6.10 BP Update output area on od_set_per...().
  36. */
  37. #ifndef _INC_ODCORE
  38. #define _INC_ODCORE
  39. /* Include other header files that have definitions neede by this one. */
  40. #include "ODInQue.h"
  41. #include "ODCom.h"
  42. #include "ODPlat.h"
  43. #include "ODScrn.h"
  44. /* OpenDoors global initialized flag. */
  45. extern BOOL bODInitialized;
  46. /* Global serial port object handle. */
  47. extern tPortHandle hSerialPort;
  48. /* Global input queue object handle. */
  49. extern tODInQueueHandle hODInputQueue;
  50. /* Reentrancy control. */
  51. extern BOOL bIsCallbackActive;
  52. extern BOOL bShellChatActive;
  53. /* Global working space. */
  54. #define OD_GLOBAL_WORK_STRING_SIZE 1025
  55. extern char szODWorkString[OD_GLOBAL_WORK_STRING_SIZE];
  56. /* Global instance of the text information structure for general use. */
  57. extern tODScrnTextInfo ODTextInfo;
  58. /* Logfile function hooks. */
  59. extern BOOL (*pfLogWrite)(INT);
  60. extern void (*pfLogClose)(INT);
  61. /* od_colour_config() support for od_printf(). */
  62. extern char chColorCheck;
  63. extern char *pchColorEndPos;
  64. /* Status line information. */
  65. extern BYTE btCurrentStatusLine;
  66. extern OD_PERSONALITY_CALLBACK *pfCurrentPersonality;
  67. extern char szDesiredPersonality[33];
  68. typedef BOOL ODCALL SET_PERSONALITY_FUNC(char *pszName);
  69. extern SET_PERSONALITY_FUNC *pfSetPersonality;
  70. /* Commonly used character sequences. */
  71. extern char abtBlackBlock[2];
  72. extern char abtGreyBlock[2];
  73. extern char szBackspaceWithDelete[4];
  74. /* Current output area on screen. */
  75. extern BYTE btOutputTop;
  76. extern BYTE btOutputBottom;
  77. /* Core functions used throughout OpenDoors. */
  78. void ODWaitDrain(tODMilliSec MaxWait);
  79. void ODStoreTextInfo(void);
  80. void ODRestoreTextInfo(void);
  81. void ODStringToName(char *pszToConvert);
  82. BOOL ODPagePrompt(BOOL *pbPausing);
  83. /* Number of built-in configuration file options. */
  84. #define TEXT_SIZE 49
  85. /* Number of user-defined info file options. */
  86. #define LINES_SIZE 25
  87. #endif /* _INC_ODCORE */