MCPcopy Create free account
hub / github.com/Genivia/RE-flex / init_options

Method init_options

lib/pattern.cpp:646–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646void Pattern::init_options(const char *options)
647{
648 opt_.b = false;
649 opt_.h = false;
650 opt_.g = 0;
651 opt_.i = false;
652 opt_.m = false;
653 opt_.o = false;
654 opt_.p = false;
655 opt_.q = false;
656 opt_.r = false;
657 opt_.s = false;
658 opt_.w = false;
659 opt_.x = false;
660 opt_.e = '\\';
661 if (options != NULL)
662 {
663 for (const char *s = options; *s != '\0'; ++s)
664 {
665 switch (*s)
666 {
667 case 'b':
668 opt_.b = true;
669 break;
670 case 'e':
671 opt_.e = (*(s += (s[1] == '=') + 1) == ';' || *s == '\0' ? 256 : *s++);
672 --s;
673 break;
674 case 'g':
675 ++opt_.g;
676 break;
677 case 'h':
678 opt_.h = true;
679 break;
680 case 'i':
681 opt_.i = true;
682 break;
683 case 'm':
684 opt_.m = true;
685 break;
686 case 'o':
687 opt_.o = true;
688 break;
689 case 'p':
690 opt_.p = true;
691 break;
692 case 'q':
693 opt_.q = true;
694 break;
695 case 'r':
696 opt_.r = true;
697 break;
698 case 's':
699 opt_.s = true;
700 break;
701 case 'w':
702 opt_.w = true;
703 break;

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected