strbasic.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*******************************************************************
  2. *
  3. * DESCRIPTION: Basic string definitions header file
  4. *
  5. * AUTHOR: Tom Hudson
  6. *
  7. * HISTORY: File created 9/6/94
  8. *
  9. *******************************************************************/
  10. #ifndef _STRBASICS_
  11. #define _STRBASICS_
  12. #define WIN95STUFF
  13. // To set up Jaguar to use Unicode, define _UNICODE, and don't define _MBCS
  14. // To set up Jaguar to use multi-byte character sets, define _MBCS and
  15. // don't define _UNICODE
  16. // To set up Jaguar to use single-byte ANSI character strings, don't define
  17. // either _UNICODE or _MBCS
  18. // #define _UNICODE // turn on Unicode support
  19. #define _MBCS // if Unicode is off, turn on multi-byte character support
  20. #ifdef _UNICODE
  21. #ifdef _MBCS
  22. #undef _MBCS // can't have both Unicode and MBCS at once -- Unicode wins
  23. #endif
  24. #define UNICODE
  25. #define STRCONST L
  26. //#define RWSTR RWWString
  27. //#define RWTOKENIZER RWWTokenizer
  28. // Here's a macro to get a const char * from a RWWString object -- It
  29. // temporarily constructs a RWCString object to hold the 1-byte wide
  30. // character string output by the toAcsii() operator. Don't store
  31. // this pointer! Copy it to a new allocation, because it might go
  32. // away.
  33. #define NARROW(s) ((const char *)((s).toAscii()))
  34. #else
  35. //#define RWSTR RWCString
  36. //#define RWTOKENIZER RWCTokenizer
  37. //#define NARROW(s) (s)
  38. #endif
  39. // Bring in the generic international text header file
  40. #include <tchar.h>
  41. #ifdef __cplusplus
  42. // Bring in the Rogue Wave regular and wide string classes
  43. // These classes will help us avoid problems in dealing with strings.
  44. // Use the RWWString class to store all strings used in Jaguar -- The
  45. // RWWString class allows unlimited length strings, so we will avoid
  46. // the problems of string truncation or overwriting memory.
  47. // NOTE: No RogueWave classes should be used in plugin API's !!
  48. //#include <rw\cstring.h>
  49. //#include <rw\wstring.h>
  50. // Simple string class, can be used in plugin API's
  51. #endif // __cplusplus
  52. #endif // _STRBASICS_