Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

escape.hxx 1020B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef REPLXX_ESCAPE_HXX_INCLUDED
  2. #define REPLXX_ESCAPE_HXX_INCLUDED 1
  3. namespace replxx {
  4. namespace EscapeSequenceProcessing {
  5. // This is a typedef for the routine called by doDispatch(). It takes the
  6. // current character
  7. // as input, does any required processing including reading more characters and
  8. // calling other
  9. // dispatch routines, then eventually returns the final (possibly extended or
  10. // special) character.
  11. //
  12. typedef char32_t (*CharacterDispatchRoutine)(char32_t);
  13. // This structure is used by doDispatch() to hold a list of characters to test
  14. // for and
  15. // a list of routines to call if the character matches. The dispatch routine
  16. // list is one
  17. // longer than the character list; the final entry is used if no character
  18. // matches.
  19. //
  20. struct CharacterDispatch {
  21. unsigned int len; // length of the chars list
  22. const char* chars; // chars to test
  23. CharacterDispatchRoutine* dispatch; // array of routines to call
  24. };
  25. char32_t doDispatch(char32_t c);
  26. }
  27. }
  28. #endif