.CM  SCRIPT , Version - 1.1 , last edited by B.Morgeneyer
.ad 8
.bm 8
.fm 4
.bt $Copyright (c) 2000-2005 SAP AG$$Page %$
.tm 12
.hm 6
.hs 3
.TT 1 $SQL$Project Distributed Database System$VIN17$
.tt 2 $$$
.TT 3 $HolgerB$pop_up_menu$1995-11-01$
***********************************************************
.nf
 
.nf
 
 .nf

    ========== licence begin  GPL
    Copyright (c) 2000-2005 SAP AG

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    ========== licence end
.fo

 
.fo
 
 
.fo
.nf
.sp
MODULE  : pop_up_menu
=========
.sp
Purpose : Functions to handle popup menu
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :
 
        PROCEDURE
              i17testpopup;
 
        PROCEDURE
              i17testinfo;
 
        PROCEDURE
              i17info (
                    msg   : tin_screenline;
                    wait  : boolean );
 
        PROCEDURE
              i17popup (
                    length            : tin_natural;
                    width             : tin_natural;
                    top_pos           : integer;
                    left_pos          : integer;
                    center            : boolean;
                    header            : tsp00_C20;
                    VAR eform         : tin_eform_buffer;
                    VAR evars         : tin_eform_vars;
                    VAR popup_record  : tin_popup_record;
                    VAR change        : boolean );
 
        PROCEDURE
              i17putinputfield (
                    screen_pos  : tin_ls_position;
                    selected    : boolean );
 
        FUNCTION
              in1730 : tsp00_Int4;
 
.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :
 
        FROM
              global_variable : VIN01;
 
        VAR
              i01g   : tin_global_in_vars;
 
      ------------------------------ 
 
        FROM
              logical_screen: VIN50;
 
        PROCEDURE
              i50getfield (
                    VAR vt_input    : tin_ls_input_field;
                    VAR field_found : boolean);
 
        PROCEDURE
              i50getwindow (
                    first_pos          : tin_ls_position;
                    window_len         : tin_natural;
                    window_width       : tin_natural;
                    VAR window_changed : boolean);
 
        PROCEDURE
              i50clear (
                    screen_part : tin_ls_part );
 
        PROCEDURE
              i50put1field (
                    VAR field  : tsp00_C20;
                    length     : tin_natural;
                    field_pos  : tin_ls_position;
                    field_type : tin_ls_fieldtype);
 
        PROCEDURE
              i50put2field (
                    VAR field  : tin_screenline;
                    length     : tin_natural;
                    field_pos  : tin_ls_position;
                    field_type : tin_ls_fieldtype);
 
        PROCEDURE
              i50put3field (
                    VAR field  : char;
                    length     : tin_natural;
                    field_pos  : tin_ls_position;
                    field_type : tin_ls_fieldtype);
 
      ------------------------------ 
 
        FROM
              logical_screen_layout: VIN51;
 
        PROCEDURE
              i51ownlayout (
                    defined_part : tin_ls_part;
                    first_pos    : tin_ls_position;
                    lines,cols   : tin_natural);
 
        PROCEDURE
              i51layout (
                    functionmenu_length : tin_natural;
                    inputarea_length    : tin_natural;
                    msglines            : tin_natural);
 
        PROCEDURE
              i51size (
                    screen_part    : tin_ls_part;
                    VAR partlength : tin_natural;
                    VAR partwidth  : tin_natural);
 
        PROCEDURE
              i51onwindow (
                    defined_part : tin_ls_part;
                    VAR win      : tin_screen_window;
                    VAR ok       : boolean );
 
        PROCEDURE
              i51offwindow (
                    VAR restore : boolean );
 
      ------------------------------ 
 
        FROM
              logical_screen_IO: VIN57;
 
        PROCEDURE
              i57ioscreen (
                    VAR csr_pos        : tin_ls_position;
                    VAR rf             : tin_ls_releasemode;
                    VAR screen_changed : boolean);
 
      ------------------------------ 
 
        FROM
              logical_screen_modules: VIN56;
 
&       ifdef WINDOWS
        PROCEDURE
              i56infobox (
                    VAR text : tin_screenline;
                    textlen  : tsp00_Int2 ;
                    wait     : boolean ) ;
&       endif
 
        PROCEDURE
              i56putlabels (
                    fct_cursorpos      : tin_ls_releasemode;
                    functionline_label : boolean);
 
      ------------------------------ 
 
        FROM
              RTE-Extension-30: VSP30;
 
        FUNCTION
              s30lnr (VAR str : tin_screenline;
                    val : char;
                    start : tsp00_Int4;
                    cnt : tsp00_Int4) : tsp00_Int4;
 
        FUNCTION
              s30klen (VAR str : tsp00_C20;
                    val : char; cnt : integer) : integer;
 
      ------------------------------ 
 
        FROM
              Kernel_move_and_fill: VGG101;
 
        PROCEDURE
              SAPDB_PascalForcedFill (
                    size        : tsp00_Int4;
                    m           : tsp00_MoveObjPtr;
                    pos         : tsp00_Int4;
                    len         : tsp00_Int4;
                    fillchar    : char);
 
        PROCEDURE
              SAPDB_PascalForcedMove (
                    source_upb  : tsp00_Int4;
                    destin_upb  : tsp00_Int4;
                    source      : tsp00_MoveObjPtr;
                    source_pos  : tsp00_Int4;
                    destin      : tsp00_MoveObjPtr;
                    destin_pos  : tsp00_Int4;
                    length      : tsp00_Int4);
 
        PROCEDURE
              s10mv (
                    source_upb  : tsp00_Int4;       
                    destin_upb  : tsp00_Int4;
                    source      : tsp00_MoveObjPtr;    
                    source_pos  : tsp00_Int4;
                    destin      : tsp00_MoveObjPtr;    
                    destin_pos  : tsp00_Int4;
                    length      : tsp00_Int4);
 
      ------------------------------ 
 
        FROM
              standard_editor_functions: VIN14;
 
        PROCEDURE
              i14cleareform (
                    VAR evars     : tin_eform_vars);
 
        PROCEDURE
              i14puteline (
                    VAR eform     : tin_eform_buffer;
                    VAR evars     : tin_eform_vars;
                    VAR line      : tin_screenline;
                    line_nr       : tin_natural;
                    length        : tin_natural;
                    VAR error     : boolean);
 
        PROCEDURE
              i14geteline (
                    VAR eform     : tin_eform_buffer;
                    VAR evars     : tin_eform_vars;
                    VAR line      : tin_screenline;
                    line_nr       : tin_natural;
                    VAR length    : tin_natural;
                    VAR error     : boolean);
 
      ------------------------------ 
 
        FROM
              RTE-Extension-60: VSP60;
 
        FUNCTION
              s60tocap (
                    c : char ) : char;
 
      ------------------------------ 
 
        FROM
              messages: VIN03;
 
        PROCEDURE
              i03msg (
                    msg_nr    : integer;
                    VAR parms : tin_msg_parms;
                    VAR msg   : tin_screenline;
                    VAR msgt  : tin_msg_type);
 
.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :
 
        PROCEDURE
              i50put1field;
 
              tsp00_MoveObj tsp00_C20
 
        PROCEDURE
              i50put2field;
 
              tsp00_MoveObj tin_screenline
 
        PROCEDURE
              i50put3field;
 
              tsp00_MoveObj char
 
        PROCEDURE
              s30klen;
 
              tsp00_MoveObj tsp00_C20
 
        PROCEDURE
              s30lnr;
 
              tsp00_MoveObj tin_screenline
 
        PROCEDURE
              i14geteline;
 
              tin_eline tin_screenline
 
        PROCEDURE
              i14puteline;
 
              tin_eline tin_screenline
&             ifdef WINDOWS
 
        PROCEDURE
              i56infobox;
 
              tsp00_Line tin_screenline
&             endif
 
.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  : HolgerB
.sp
.cp 3
Created : 1992-12-07
.sp
.cp 3
.sp
.cp 3
Release :  6.1.2     Date : 1995-11-01
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
 
.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.cp 50;
.oc _/1
Description:
 
 
.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:
 
.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
 
 
CONST
      cin17_m_mark        = 17221;
      cin17_m_wrong_char  = 17222;
      cin17_m_one_only    = 17223;
 
 
(*------------------------------*) 
 
FUNCTION
      in1730 : tsp00_Int4;
 
BEGIN
(* linkcheck function *)
in1730 := 220920627;
END;
 
(*------------------------------*) 
 
PROCEDURE
      i17testinfo;
 
VAR
      msg            : tin_screenline;
      helptxt        : tsp00_C40;
      i              : integer;
 
BEGIN
helptxt := 'Dies ist der Test fuer die Infofunktion ';
SAPDB_PascalForcedFill (mxin_screenline, @msg, 1, mxin_screenline, bsp_c1);
FOR i := 1 TO 40 DO
    msg [i] := helptxt [i];
(*ENDFOR*) 
i17info (msg, true);
END;
 
(*------------------------------*) 
 
PROCEDURE
      i17testpopup;
 
CONST
      center   = true;
 
VAR
      i        : integer;
      width    : tin_natural;
      length   : tin_natural;
      header   : tsp00_C20;
      toppos   : integer;
      leftpos  : integer;
      eform    : tin_eform_buffer;
      evars    : tin_eform_vars;
      line     : tin_screenline;
      line_len : tin_natural;
      error    : boolean;
      restore  : boolean;
      popupbuf : tin_popup_record;
 
BEGIN
restore := true;
length := 10;
width  := 20;
toppos := 3;
leftpos:= 5;
header := 'popup               ';
i14cleareform (evars);
WITH popupbuf DO
    BEGIN
    only_one := true;
    used := length - 1;
    FOR i := 1 TO length -1 DO
        popup_set [i] := false;
    (*ENDFOR*) 
    popup_set [3] := true;
    END;
(*ENDWITH*) 
FOR i := 1 TO length - 1 DO
    BEGIN
    SAPDB_PascalForcedFill (mxin_screenline, @line, 1, mxin_screenline, bsp_c1);
    line [1] := 'T';
    line [2] := 'E';
    line [3] := 'S';
    line [4] := 'T';
    line [5] := chr( ord ('0') + i);
    line_len := 5;
    i14puteline(eform, evars, line, i, line_len, error);
    END;
(*ENDFOR*) 
i17popup (length, width, toppos, leftpos, center,
      header, eform, evars, popupbuf, error );
END;
 
(*------------------------------*) 
 
PROCEDURE
      i17popup (
            length            : tin_natural;
            width             : tin_natural;
            top_pos           : integer;
            left_pos          : integer;
            center            : boolean;
            header            : tsp00_C20;
            VAR eform         : tin_eform_buffer;
            VAR evars         : tin_eform_vars;
            VAR popup_record  : tin_popup_record;
            VAR change        : boolean );
 
VAR
      restore     : boolean;
      save_popup  : tin_popup_record;
 
BEGIN
save_popup := popup_record;
i50clear (cin_ls_functionmenu);
in17_popup_frame (length, width, header, top_pos, left_pos, center);
in17_fill_body (eform, evars, popup_record, width);
i51offwindow (restore);
change := in17_any_diff (save_popup, popup_record);
END; (* i17popup *)
 
(*------------------------------*) 
 
PROCEDURE
      in17_popup_frame (
            length   : tin_natural;
            width    : tin_natural;
            header   : tsp00_C20;
            top_pos  : integer;
            left_pos : integer;
            center   : boolean );
 
CONST
      functionmenu_length  =  1;
      inputarea_length     =  0;
      message_lines        =  1;
 
VAR
      win     : tin_screen_window;
      s_len   : tin_natural;
      s_wid   : tin_natural;
      restore : boolean;
      ok      : boolean;
 
BEGIN
ok := true;
restore := false;
WITH win DO
    BEGIN
    lines := length + 2;
    cols := width + 2;
    first_pos.screen_part := cin_ls_whole_screen;
    IF  center
    THEN
        BEGIN
        i51size (cin_ls_whole_screen, s_len, s_wid);
        first_pos.scol := (s_wid - cols) DIV 2;
        first_pos.sline := (s_len - lines) DIV 2;
        END
    ELSE
        BEGIN
        first_pos.scol :=  left_pos;
        first_pos.sline := top_pos;
        END;
    (*ENDIF*) 
    WITH i01g^.vt.wopt DO
        BEGIN
        with_frame := true;
        WITH frame_ft DO
            BEGIN
            field_att := cin_attr7;
            fieldmode := [  ] ;
            END;
        (*ENDWITH*) 
        background_part := cin_ls_whole_screen;
        background_ft.field_att := cin_attr1;
        background_ft.fieldmode := [ ] ;
        END;
    (*ENDWITH*) 
    i51onwindow (cin_ls_basic_window, win, ok);
    IF  ok
    THEN
        BEGIN
        i51layout (functionmenu_length, inputarea_length, message_lines);
        i50clear (cin_ls_basic_window);
        in17_setkeys;
        in17_put_header (header);
        END;
    (*ENDIF*) 
    END;
(*ENDWITH*) 
END;
 
(*------------------------------*) 
 
PROCEDURE
      i17info (
            msg   : tin_screenline;
            wait  : boolean );
 
CONST
      box_height  = 3;
 
VAR
      win            : tin_screen_window;
      s_len          : tin_natural;
      s_wid          : tin_natural;
      restore        : boolean;
      ok             : boolean;
      win_pos        : tin_ls_position;
      csr_pos        : tin_ls_position;
      screen_changed : boolean;
      rf             : tin_ls_releasemode;
      field_pos      : tin_ls_position;
      field_type     : tin_ls_fieldtype;
      length         : integer;
 
BEGIN
&ifdef WINDOWS
length := s30lnr ( msg, bsp_c1, 1, mxin_screenline );
i56infobox (msg, length, wait) ;
&else
WITH win DO
    BEGIN
    ok := true;
    restore := false;
    WITH win_pos DO
        BEGIN
        screen_nr   := 1;
        screen_part := cin_ls_whole_screen;
        scol        := 2;
        sline       := 1;
        END;
    (*ENDWITH*) 
    i51ownlayout ( cin_ls_inputarea, win_pos, 0, 0 );
    i51ownlayout ( cin_ls_workarea, win_pos, 0, 0 );
    i51ownlayout ( cin_ls_header, win_pos, 0, 0 );
    IF  NOT i01g^.vt.desc.has_sysline
    THEN
        i51ownlayout ( cin_ls_sysline, win_pos, 0, 0 )
    ELSE
        i50clear (cin_ls_sysline);
    (*ENDIF*) 
    i51ownlayout ( cin_ls_functionmenu, win_pos, 0, 0 );
    length := s30lnr ( msg, bsp_c1, 1, mxin_screenline );
    lines := box_height;
    cols := length + 4;
    first_pos.screen_part := cin_ls_whole_screen;
    i51size (cin_ls_whole_screen, s_len, s_wid);
    first_pos.scol := (s_wid - cols) DIV 2;
    first_pos.sline := (s_len - lines) DIV 2;
    WITH i01g^.vt.wopt DO
        BEGIN
        with_frame := true;
        WITH frame_ft DO
            BEGIN
            field_att := cin_attr7;
            fieldmode := [  ] ;
            END;
        (*ENDWITH*) 
        background_part := cin_ls_whole_screen;
        background_ft.field_att := cin_attr1;
        background_ft.fieldmode := [ ] ;
        END;
    (*ENDWITH*) 
    i51onwindow (cin_ls_basic_window, win, ok);
    i50clear (cin_ls_basic_window);
    WITH i01g^.key_type DO
        BEGIN
        activated := [ f_enter, f_exit, f_end, f_clear ];
        END;
    (*ENDWITH*) 
    i56putlabels (f_clear, false);
    WITH field_type DO
        BEGIN (* B.M. *)
        field_att  := cin_attr5;
        fieldmode  := [  ] ;
        END;
    (*ENDWITH*) 
    WITH field_pos DO
        BEGIN
        screen_part := cin_ls_basic_window;
        sline       := 2;
        scol        := 1;
        screen_nr   := 1;
        END;
    (*ENDWITH*) 
    i50put2field (msg, length, field_pos, field_type);
    END;
(*ENDWITH*) 
WITH i01g^.vt.opt DO
    BEGIN
    wait_for_input := wait;
    usage_mode := vt_form;
    return_on_last  := false;
    return_on_first := false;
    returnkeys      := [  ] ;
    reject_keys     := [  ] ;
    bell := false;
    END;
(*ENDWITH*) 
WITH csr_pos DO
    BEGIN
    screen_part := cin_ls_basic_window;
    scol := 1;
    sline := 1;
    screen_nr := 1;
    END;
(*ENDWITH*) 
i57ioscreen(csr_pos,rf,screen_changed);
i51offwindow (restore);
&endif
END;
 
(*------------------------------*) 
 
PROCEDURE
      in17_setkeys;
 
CONST
      popup_key1 = 17230;
      popup_key2 = 17231;
 
VAR
      msg       : tin_screenline;
      lab       : tin_ls_sk_label;
      msgt      : tin_msg_type;
      parms     : tin_msg_parms;
 
BEGIN
WITH i01g^.key_type DO
    BEGIN
    parms.length := 0;
    i03msg (popup_key1, parms, msg, msgt);
    s10mv (mxin_screenline,csp_lslabel,
          @msg,1,
          @lab,1,csp_lslabel );
    key_labels [f1] := lab;
    parms.length := 0;
    i03msg (popup_key2, parms, msg, msgt);
    s10mv (mxin_screenline,csp_lslabel,
          @msg,1,
          @lab,1,csp_lslabel );
    key_labels [f9] := lab;
    activated := [ f1, f9, f_enter, f_exit, f_end, f_clear ];
    END;
(*ENDWITH*) 
i56putlabels (f_clear, false);
END;
 
(*------------------------------*) 
 
PROCEDURE
      in17_put_header (
            header : tsp00_C20 );
 
VAR
      len          : integer;
      width        : tin_natural;
      length       : tin_natural;
      win_ft       : tin_ls_fieldtype;
      hdr_pos      : tin_ls_position;
 
BEGIN
len := s30klen (header, bsp_c1, mxsp_c20);
i51size (cin_ls_basic_window, length, width);
WITH hdr_pos DO
    BEGIN
    screen_part := cin_ls_basic_window;
    sline := 0;
    IF  (((width - len) DIV 2) + 1) < 1
    THEN
        scol := 1
    ELSE
        scol := ((width -len) DIV 2) + 1;
    (*ENDIF*) 
    END;
(*ENDWITH*) 
WITH win_ft DO
    BEGIN
    field_att  := cin_attr1;
    fieldmode  := [  ] ;
    END;
(*ENDWITH*) 
i50put1field(header, len, hdr_pos, win_ft);
END;
 
(*------------------------------*) 
 
PROCEDURE
      in17_fill_body (
            VAR eform   : tin_eform_buffer;
            VAR evars   : tin_eform_vars;
            VAR popup   : tin_popup_record;
            maxwid      : integer );
 
CONST
      cin_name_col     = 7;
      cin_input_col    = 1;
 
VAR
      i              : integer;
      screen_pos     : tin_ls_position;
      fieldtype      : tin_ls_fieldtype;
      field          : tin_screenline;
      field_length   : tin_natural;
      error          : boolean;
      selected       : boolean;
      screen_changed : boolean;
      msg_no         : integer;
      rf             : tin_ls_releasemode;
 
BEGIN
screen_changed := false;
msg_no := cin17_m_mark;
REPEAT
    in17_putmsg (msg_no);
    msg_no := cin17_m_mark;
    WITH screen_pos DO
        screen_part := cin_ls_basic_window;
    (*ENDWITH*) 
    WITH fieldtype DO
        BEGIN
        field_att := cin_attr1;
        fieldmode := [  ] ;
        END;
    (*ENDWITH*) 
    FOR i := 1 TO popup.used DO
        BEGIN
        selected := popup.popup_set [i];
        screen_pos.scol := cin_input_col;
        screen_pos.sline := i;
        i17putinputfield (screen_pos, selected);
        screen_pos.scol := cin_name_col;
        i14geteline (eform, evars, field, i, field_length, error);
        IF  field_length > (maxwid - cin_name_col)
        THEN
            field_length := maxwid - cin_name_col;
        (*ENDIF*) 
        i50put2field (field, field_length, screen_pos, fieldtype);
        END;
    (*ENDFOR*) 
    WITH screen_pos DO
        BEGIN
        scol := cin_input_col + 2;
        sline := 1;
        END;
    (*ENDWITH*) 
    in17_outscreen (screen_pos, rf, screen_changed);
    IF  screen_changed AND (rf in [f_enter, f1])
    THEN
        BEGIN
        WITH screen_pos DO
            BEGIN
            scol := cin_input_col + 2;
            sline := 1;
            END;
        (*ENDWITH*) 
        in17_inscreen (screen_pos, screen_changed, popup, msg_no);
        END;
    (*ENDIF*) 
UNTIL
    (msg_no = cin17_m_mark);
(*ENDREPEAT*) 
END;
 
(*------------------------------*) 
 
PROCEDURE
      i17putinputfield (
            screen_pos  : tin_ls_position;
            selected    : boolean );
 
VAR
      fieldtype    : tin_ls_fieldtype;
      field        : char;
 
BEGIN
WITH fieldtype DO
    BEGIN
    field_att := cin_attr1;
    fieldmode := [  ] ;
    END;
(*ENDWITH*) 
field := '(';
i50put3field (field, 1, screen_pos, fieldtype);
screen_pos.scol := screen_pos.scol + 2;
WITH fieldtype DO
    BEGIN
    field_att := cin_attr2;
    fieldmode := [ls_input];
    END;
(*ENDWITH*) 
IF  selected
THEN
    field := 'x'
ELSE
    field := ' ';
(*ENDIF*) 
i50put3field (field, 1, screen_pos, fieldtype);
screen_pos.scol := screen_pos.scol + 2;
WITH fieldtype DO
    BEGIN
    field_att := cin_attr1;
    fieldmode := [  ] ;
    END;
(*ENDWITH*) 
field := ')';
i50put3field (field, 1, screen_pos, fieldtype);
END;
 
(*------------------------------*) 
 
PROCEDURE
      in17_outscreen (
            VAR   csr_pos        : tin_ls_position;
            VAR   rf             : tin_ls_releasemode;
            VAR   screen_changed : boolean );
 
BEGIN
WITH i01g^.vt.opt DO
    BEGIN
    wait_for_input := true;
    usage_mode := vt_form;
    return_on_last  := false;
    return_on_first := false;
    returnkeys      := [  ] ;
    reject_keys     := [  ] ;
    bell := false;
    END;
(*ENDWITH*) 
i57ioscreen(csr_pos,rf,screen_changed);
END;
 
(*------------------------------*) 
 
PROCEDURE
      in17_inscreen (
            VAR   csr_pos        : tin_ls_position;
            VAR   screen_changed : boolean;
            VAR   popup          : tin_popup_record;
            VAR   msg_no         : integer );
 
VAR
      i            : integer;
      input        : tin_ls_input_field;
      field_found  : boolean;
      mark_found   : integer;
      wrong_char   : boolean;
      save_popup   : tin_popup_record;
 
BEGIN
save_popup := popup;
mark_found := 0;
wrong_char := false;
i50getwindow (csr_pos, 999, 999, screen_changed);
FOR i := 1 TO popup.used DO
    BEGIN
    i50getfield (input, field_found);
    IF  field_found
    THEN
        IF  s60tocap (input.buf [1]) = 'X'
        THEN
            BEGIN
            popup.popup_set [i] := true ;
            mark_found := mark_found + 1;
            END
        ELSE
            IF  input.buf [1] = bsp_c1
            THEN
                popup.popup_set [i] := false
            ELSE
                wrong_char := true;
            (*ENDIF*) 
        (*ENDIF*) 
    (*ENDIF*) 
    END;
(*ENDFOR*) 
IF  wrong_char
THEN
    BEGIN
    msg_no := cin17_m_wrong_char;
    popup := save_popup;
    END;
(*ENDIF*) 
IF  (mark_found > 1) AND popup.only_one
THEN
    BEGIN
    msg_no := cin17_m_one_only;
    popup := save_popup;
    END;
(*ENDIF*) 
END;
 
(*------------------------------*) 
 
PROCEDURE
      in17_putmsg (
            VAR msg_no : integer) ;
 
VAR
      screen_pos     : tin_ls_position;
      field_type     : tin_ls_fieldtype;
      msgt           : tin_msg_type;
      parms          : tin_msg_parms;
      msg            : tin_screenline;
 
BEGIN
parms.length := 0;
i03msg ( msg_no, parms, msg, msgt );
WITH field_type DO
    BEGIN
    field_att := cin_attr5;
    fieldmode := [  ] ;
    END;
(*ENDWITH*) 
WITH screen_pos DO
    BEGIN
    screen_part := cin_ls_sysline;
    sline := 1;
    scol  := 1;
    END;
(*ENDWITH*) 
i50put2field (msg, i01g^.vt.desc.num_of_cols,
      screen_pos, field_type);
END;
 
(*------------------------------*) 
 
FUNCTION
      in17_any_diff (
            popup1 : tin_popup_record;
            popup2 : tin_popup_record ) : boolean;
 
VAR
      diff : boolean;
      i    : integer;
 
BEGIN
diff := false;
IF  popup1.used = popup2.used
THEN
    BEGIN
    FOR i := 1 TO popup1.used DO
        IF  popup1.popup_set [i] <> popup2.popup_set [i]
        THEN
            diff := true;
        (*ENDIF*) 
    (*ENDFOR*) 
    END
ELSE
    diff := true;
(*ENDIF*) 
in17_any_diff := diff;
END;
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
.PA 
