MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / print_sdl_verb

Function print_sdl_verb

src/common/pretty.cpp:768–867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766//
767
768static int print_sdl_verb( ctl* control, SSHORT level)
769{
770 const char* p;
771
772 SSHORT offset = control->ctl_blr - control->ctl_blr_start;
773 const UCHAR sdl_operator = BLR_BYTE;
774
775 if (sdl_operator > FB_NELEM(sdl_table) || sdl_operator <= 0 || !(p = sdl_table[sdl_operator]))
776 {
777 return error(control, offset, "*** SDL operator %d is undefined ***\n", (int) sdl_operator);
778 }
779
780 indent(control, level);
781 blr_format(control, p);
782 PUT_BYTE(',');
783 PUT_BYTE(' ');
784 ++level;
785 int n = 0;
786
787 switch (sdl_operator)
788 {
789 case isc_sdl_begin:
790 print_line(control, offset);
791 while (NEXT_BYTE != isc_sdl_end)
792 PRINT_SDL_VERB;
793 PRINT_SDL_VERB;
794 return 0;
795
796 case isc_sdl_struct:
797 n = print_byte(control);
798 while (n--)
799 {
800 print_line(control, offset);
801 indent(control, level + 1);
802 offset = control->ctl_blr - control->ctl_blr_start;
803 print_blr_dtype(control, true);
804 }
805 break;
806
807 case isc_sdl_scalar:
808 print_byte(control);
809
810 case isc_sdl_element:
811 n = print_byte(control);
812 print_line(control, offset);
813 while (n--)
814 PRINT_SDL_VERB;
815 return 0;
816
817 case isc_sdl_field:
818 case isc_sdl_relation:
819 print_string(control, offset);
820 break;
821
822 case isc_sdl_fid:
823 case isc_sdl_rid:
824 case isc_sdl_short_integer:
825 print_word(control);

Callers

nothing calls this directly

Calls 9

indentFunction · 0.85
print_lineFunction · 0.85
print_byteFunction · 0.85
print_blr_dtypeFunction · 0.85
print_stringFunction · 0.85
print_wordFunction · 0.85
print_longFunction · 0.85
errorFunction · 0.70
blr_formatFunction · 0.70

Tested by

no test coverage detected