Aer Interpreter Source
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
2.0 KiB

  1. /**
  2. * @PROJECT AerScript Interpreter
  3. * @COPYRIGHT See COPYING in the top level directory
  4. * @FILE modules/ctype/ctype.h
  5. * @DESCRIPTION Character type checking module for AerScript Interpreter
  6. * @DEVELOPERS Symisc Systems <devel@symisc.net>
  7. * Rafal Kupiec <belliash@codingworkshop.eu.org>
  8. */
  9. #ifndef __CTYPE_H__
  10. #define __CTYPE_H__
  11. #include "ph7.h"
  12. #include "ph7int.h"
  13. #define MODULE_DESC "CType Module"
  14. #define MODULE_VER 1.0
  15. /* Forward reference */
  16. static int PH7_builtin_ctype_alnum(ph7_context *pCtx, int nArg, ph7_value **apArg);
  17. static int PH7_builtin_ctype_alpha(ph7_context *pCtx, int nArg, ph7_value **apArg);
  18. static int PH7_builtin_ctype_cntrl(ph7_context *pCtx, int nArg, ph7_value **apArg);
  19. static int PH7_builtin_ctype_digit(ph7_context *pCtx, int nArg, ph7_value **apArg);
  20. static int PH7_builtin_ctype_xdigit(ph7_context *pCtx, int nArg, ph7_value **apArg);
  21. static int PH7_builtin_ctype_graph(ph7_context *pCtx, int nArg, ph7_value **apArg);
  22. static int PH7_builtin_ctype_print(ph7_context *pCtx, int nArg, ph7_value **apArg);
  23. static int PH7_builtin_ctype_punct(ph7_context *pCtx, int nArg, ph7_value **apArg);
  24. static int PH7_builtin_ctype_space(ph7_context *pCtx, int nArg, ph7_value **apArg);
  25. static int PH7_builtin_ctype_lower(ph7_context *pCtx, int nArg, ph7_value **apArg);
  26. static int PH7_builtin_ctype_upper(ph7_context *pCtx, int nArg, ph7_value **apArg);
  27. PH7_PRIVATE sxi32 initializeModule(ph7_vm *pVm, ph7_real *ver, SyString *desc);
  28. static const ph7_builtin_func ctypeFuncList[] = {
  29. { "ctype_alnum", PH7_builtin_ctype_alnum },
  30. { "ctype_alpha", PH7_builtin_ctype_alpha },
  31. { "ctype_cntrl", PH7_builtin_ctype_cntrl },
  32. { "ctype_digit", PH7_builtin_ctype_digit },
  33. { "ctype_xdigit", PH7_builtin_ctype_xdigit},
  34. { "ctype_graph", PH7_builtin_ctype_graph },
  35. { "ctype_print", PH7_builtin_ctype_print },
  36. { "ctype_punct", PH7_builtin_ctype_punct },
  37. { "ctype_space", PH7_builtin_ctype_space },
  38. { "ctype_lower", PH7_builtin_ctype_lower },
  39. { "ctype_upper", PH7_builtin_ctype_upper }
  40. };
  41. #endif