81 bool messageUnderstood = newObj->
messageSend(OREF_INIT, arguments, 1, 0, p_result,
false);
100 bool messageUnderstood = newObj->
messageSend(OREF_INIT, arguments, 1, 0, p_result,
false);
131 if (((
RexxClass *)
this)->hasUninitDefined())
135 newObj->
sendMessage(OREF_INIT, init_args, argCount, named_argCount);
139 void *RexxText::operator
new(
size_t size)
281 if (value >=
min && value <= max)
return value;
304 return *((
int8_t*)&v64) == 1;
337 void *Unicode::operator
new(
size_t size)
371 #include "m17n/utf8proc/utf8proc.h"
376 const char *errmsg = utf8proc_errmsg(errcode);
379 case UTF8PROC_ERROR_NOMEM:
380 case UTF8PROC_ERROR_OVERFLOW:
382 case UTF8PROC_ERROR_INVALIDUTF8:
383 case UTF8PROC_ERROR_NOTASSIGNED:
385 case UTF8PROC_ERROR_INVALIDOPTS:
395 return new_string(utf8proc_unicode_version());
417 utf8proc_bool graphemeBreak = utf8proc_grapheme_break_stateful(codepoint1, codepoint2, &state);
424 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointCategory: codepoint must be an integer");
425 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
431 UTF8PROC_CATEGORY_CN = 0,
432 UTF8PROC_CATEGORY_LU = 1,
433 UTF8PROC_CATEGORY_LL = 2,
434 UTF8PROC_CATEGORY_LT = 3,
435 UTF8PROC_CATEGORY_LM = 4,
436 UTF8PROC_CATEGORY_LO = 5,
437 UTF8PROC_CATEGORY_MN = 6,
438 UTF8PROC_CATEGORY_MC = 7,
439 UTF8PROC_CATEGORY_ME = 8,
440 UTF8PROC_CATEGORY_ND = 9,
441 UTF8PROC_CATEGORY_NL = 10,
442 UTF8PROC_CATEGORY_NO = 11,
443 UTF8PROC_CATEGORY_PC = 12,
444 UTF8PROC_CATEGORY_PD = 13,
445 UTF8PROC_CATEGORY_PS = 14,
446 UTF8PROC_CATEGORY_PE = 15,
447 UTF8PROC_CATEGORY_PI = 16,
448 UTF8PROC_CATEGORY_PF = 17,
449 UTF8PROC_CATEGORY_PO = 18,
450 UTF8PROC_CATEGORY_SM = 19,
451 UTF8PROC_CATEGORY_SC = 20,
452 UTF8PROC_CATEGORY_SK = 21,
453 UTF8PROC_CATEGORY_SO = 22,
454 UTF8PROC_CATEGORY_ZS = 23,
455 UTF8PROC_CATEGORY_ZL = 24,
456 UTF8PROC_CATEGORY_ZP = 25,
457 UTF8PROC_CATEGORY_CC = 26,
458 UTF8PROC_CATEGORY_CF = 27,
459 UTF8PROC_CATEGORY_CS = 28,
460 UTF8PROC_CATEGORY_CO = 29,
461 } utf8proc_category_t;
467 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointCombiningClass: codepoint must be an integer");
468 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
475 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointBidiClass: codepoint must be an integer");
476 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
482 UTF8PROC_BIDI_CLASS_L = 1,
483 UTF8PROC_BIDI_CLASS_LRE = 2,
484 UTF8PROC_BIDI_CLASS_LRO = 3,
485 UTF8PROC_BIDI_CLASS_R = 4,
486 UTF8PROC_BIDI_CLASS_AL = 5,
487 UTF8PROC_BIDI_CLASS_RLE = 6,
488 UTF8PROC_BIDI_CLASS_RLO = 7,
489 UTF8PROC_BIDI_CLASS_PDF = 8,
490 UTF8PROC_BIDI_CLASS_EN = 9,
491 UTF8PROC_BIDI_CLASS_ES = 10,
492 UTF8PROC_BIDI_CLASS_ET = 11,
493 UTF8PROC_BIDI_CLASS_AN = 12,
494 UTF8PROC_BIDI_CLASS_CS = 13,
495 UTF8PROC_BIDI_CLASS_NSM = 14,
496 UTF8PROC_BIDI_CLASS_BN = 15,
497 UTF8PROC_BIDI_CLASS_B = 16,
498 UTF8PROC_BIDI_CLASS_S = 17,
499 UTF8PROC_BIDI_CLASS_WS = 18,
500 UTF8PROC_BIDI_CLASS_ON = 19,
501 UTF8PROC_BIDI_CLASS_LRI = 20,
502 UTF8PROC_BIDI_CLASS_RLI = 21,
503 UTF8PROC_BIDI_CLASS_FSI = 22,
504 UTF8PROC_BIDI_CLASS_PDI = 23,
505 } utf8proc_bidi_class_t;
511 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointBidiMirrored: codepoint must be an integer");
512 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
519 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointDecompositionType: codepoint must be an integer");
520 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
537 UTF8PROC_DECOMP_TYPE_FONT = 1,
538 UTF8PROC_DECOMP_TYPE_NOBREAK = 2,
539 UTF8PROC_DECOMP_TYPE_INITIAL = 3,
540 UTF8PROC_DECOMP_TYPE_MEDIAL = 4,
541 UTF8PROC_DECOMP_TYPE_FINAL = 5,
542 UTF8PROC_DECOMP_TYPE_ISOLATED = 6,
543 UTF8PROC_DECOMP_TYPE_CIRCLE = 7,
544 UTF8PROC_DECOMP_TYPE_SUPER = 8,
545 UTF8PROC_DECOMP_TYPE_SUB = 9,
546 UTF8PROC_DECOMP_TYPE_VERTICAL = 10,
547 UTF8PROC_DECOMP_TYPE_WIDE = 11,
548 UTF8PROC_DECOMP_TYPE_NARROW = 12,
549 UTF8PROC_DECOMP_TYPE_SMALL = 13,
550 UTF8PROC_DECOMP_TYPE_SQUARE = 14,
551 UTF8PROC_DECOMP_TYPE_FRACTION = 15,
552 UTF8PROC_DECOMP_TYPE_COMPAT = 16,
553 } utf8proc_decomp_type_t;
559 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointIgnorable: codepoint must be an integer");
560 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
567 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointControlBoundary: codepoint must be an integer");
568 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
575 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointCharWidth: codepoint must be an integer");
576 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
587 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointBoundClass: codepoint must be an integer");
588 const utf8proc_property_t *
property = utf8proc_get_property(codepoint);
594 UTF8PROC_BOUNDCLASS_START = 0,
595 UTF8PROC_BOUNDCLASS_OTHER = 1,
596 UTF8PROC_BOUNDCLASS_CR = 2,
597 UTF8PROC_BOUNDCLASS_LF = 3,
598 UTF8PROC_BOUNDCLASS_CONTROL = 4,
599 UTF8PROC_BOUNDCLASS_EXTEND = 5,
600 UTF8PROC_BOUNDCLASS_L = 6,
601 UTF8PROC_BOUNDCLASS_V = 7,
602 UTF8PROC_BOUNDCLASS_T = 8,
603 UTF8PROC_BOUNDCLASS_LV = 9,
604 UTF8PROC_BOUNDCLASS_LVT = 10,
605 UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR = 11,
606 UTF8PROC_BOUNDCLASS_SPACINGMARK = 12,
607 UTF8PROC_BOUNDCLASS_PREPEND = 13,
608 UTF8PROC_BOUNDCLASS_ZWJ = 14,
612 UTF8PROC_BOUNDCLASS_E_BASE = 15,
613 UTF8PROC_BOUNDCLASS_E_MODIFIER = 16,
614 UTF8PROC_BOUNDCLASS_GLUE_AFTER_ZWJ = 17,
615 UTF8PROC_BOUNDCLASS_E_BASE_GAZ = 18,
619 UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC = 19,
620 UTF8PROC_BOUNDCLASS_E_ZWG = 20,
621 } utf8proc_boundclass_t;
627 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointToLower: codepoint must be an integer");
634 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointToUpper: codepoint must be an integer");
641 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointToTitle: codepoint must be an integer");
648 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointIsLower: codepoint must be an integer");
656 utf8proc_int32_t codepoint = (utf8proc_int32_t)
integer(rexxCodepoint,
"CodepointIsUpper: codepoint must be an integer");
665 utf8proc_uint8_t *retval;
667 const utf8proc_uint8_t *str = (
const utf8proc_uint8_t *)string->
getStringData();
668 utf8proc_ssize_t strlength = (utf8proc_ssize_t)string->
getLength();
669 utf8proc_ssize_t reslength = utf8proc_map(str, strlength, &retval, options);
695 expectedNamedArguments.
match(named_arglist, named_argcount,
true,
false);
706 if (casefold) options |= UTF8PROC_CASEFOLD;
707 if (lump) options |= UTF8PROC_LUMP;
708 if (nlf == 1) options |= UTF8PROC_NLF2LF;
709 if (nlf == 2) options |= UTF8PROC_NLF2LS;
710 if (nlf == 3) options |= UTF8PROC_NLF2PS;
711 if (normalization == 1) options |= UTF8PROC_STABLE | UTF8PROC_COMPOSE;
712 if (normalization == 2) options |= UTF8PROC_STABLE | UTF8PROC_DECOMPOSE;
713 if (normalization == 3) options |= UTF8PROC_STABLE | UTF8PROC_COMPOSE | UTF8PROC_COMPAT;
714 if (normalization == 4) options |= UTF8PROC_STABLE | UTF8PROC_DECOMPOSE | UTF8PROC_COMPAT;
715 if (stripCC) options |= UTF8PROC_STRIPCC;
716 if (stripIgnorable) options |= UTF8PROC_IGNORE;
717 if (stripMark) options |= UTF8PROC_STRIPMARK;
718 if (stripNA) options |= UTF8PROC_STRIPNA;
720 return normalize(
string, utf8proc_option_t(options));
726 UTF8PROC_IGNORE = (1<<5),
734 UTF8PROC_NLF2LS = (1<<7),
742 UTF8PROC_NLF2PS = (1<<8),
746 UTF8PROC_NLF2LF = (UTF8PROC_NLF2LS | UTF8PROC_NLF2PS),
755 UTF8PROC_STRIPCC = (1<<9),
761 UTF8PROC_CASEFOLD = (1<<10),
770 UTF8PROC_LUMP = (1<<12),
778 UTF8PROC_STRIPMARK = (1<<13),
783 UTF8PROC_STRIPNA = (1<<14),
797 #include
"m17n/uni-algo/include/uni_algo/version.h"
802 std::stringstream version;
803 version << una::version::library.major() <<
"." << una::version::library.minor() <<
"." << una::version::library.patch();
806 const std::string& version_str = version.str();
807 const char* version_cstr = version_str.c_str();
void reportException(wholenumber_t error)
RexxInteger * new_integer(wholenumber_t v)
RexxString * stringArgument(RexxObject *object, RexxString *kind, size_t position)
RexxArray * arrayArgument(RexxObject *object, RexxString *kind, size_t position)
RexxInteger * REQUEST_INTEGER(RexxObject *obj)
#define Error_Unsupported_copy_method
#define Error_System_resources_user_defined
#define Error_Logical_value_user_defined
#define Error_Invalid_argument_user_defined
#define Error_System_service_user_defined
#define Error_Invalid_character_string_user_defined
#define Error_Unsupported_new_method
#define memory_mark(oref)
RexxObject * new_object(size_t s)
#define flatten_reference(oref, envel)
#define CLASS_CREATE(name, id, className)
#define memory_mark_general(oref)
#define setUpFlatten(type)
RexxString * new_string(const char *s, stringsize_t l)
ssize_t integerRange(RexxObject *obj, ssize_t min, ssize_t max, wholenumber_t error, const char *errorMessage)
RexxString * normalize(RexxString *string, utf8proc_option_t options)
void raiseError(utf8proc_ssize_t errcode)
ssize_t integer(RexxObject *obj, const char *errorMessage)
static RexxActivity *volatile currentActivity
void match(RexxObject **namedArglist, size_t namedArgCount, bool strict, bool extraAllowed, size_t minimumRequired=0)
void put(RexxObject *eref, size_t pos)
RexxObject * get(size_t pos)
void liveGeneral(int reason)
void setBehaviour(RexxBehaviour *b)
void sendMessage(RexxString *, RexxArray *, RexxDirectory *, ProtectedObject &)
bool messageSend(RexxString *, RexxObject **, size_t, size_t, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)
const char * getStringData()
void liveGeneral(int reason)
void liveGeneral(int reason)
static RexxText * newText(RexxString *s)
static RexxTextClass * classInstance
void flatten(RexxEnvelope *)
RexxString * makeString()
RexxText * primitiveMakeText()
static void createInstance()
RexxString * primitiveMakeString()
static RexxText * nullText
RexxObject * newRexx(RexxObject **, size_t, size_t)
RexxObject * utf8proc_transform(RexxString *str, RexxObject **named_arglist, size_t named_argcount)
RexxInteger * utf8proc_graphemeBreak(RexxArray *)
static RexxClass * classInstance
RexxInteger * utf8proc_codepointCharWidth(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointCategory(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointBidiClass(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointToTitleSimple(RexxObject *rexxCodepoint)
static void createInstance()
RexxString * utf8proc_version()
RexxInteger * utf8proc_codepointControlBoundary(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointToUpperSimple(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointIsLower(RexxObject *rexxCodepoint)
RexxString * unialgo_version()
RexxInteger * utf8proc_codepointToLowerSimple(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointDecompositionType(RexxObject *rexxCodepoint)
RexxInteger * systemIsLittleEndian()
void liveGeneral(int reason)
RexxInteger * utf8proc_codepointBoundClass(RexxObject *rexxCodepoint)
void flatten(RexxEnvelope *)
RexxInteger * utf8proc_codepointIsUpper(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointIgnorable(RexxObject *rexxCodepoint)
RexxInteger * utf8proc_codepointBidiMirrored(RexxObject *rexxCodepoint)
RexxObject * newRexx(RexxObject **, size_t, size_t)
RexxInteger * utf8proc_codepointCombiningClass(RexxObject *rexxCodepoint)