# Copyright (C) 2002 Ensim Corporation. All Rights Reserved.
#

F_display_mouse()
{
    more -c $KSGENDIR/lib/data/mouse.dat
}

F_read_mouse()
{
    echo ""
    _q_mouse="none"
    echo "> Default mouse type for the installed system is 'none' (no mouse)"
    F_ckyorn "y" "> Is this choice correct?"
    if [ $_q_yorn = "y" ]
    then
        return
    fi

    echo ""
    echo "> Please enter the number corresponding to your system mouse type."
    echo ""
    echo -n "  Press <ENTER> to view a list of choices ..."
    read _q_dummy
    echo ""
    _q_mouse=""
    local _N_mouse=`wc -l $KSGENDIR/lib/data/mouse.dat | awk '{print $1}'`
    while [ X"$_q_mouse" = X"" ] || [ $_q_mouse -lt 1 ] || [ $_q_mouse -gt $_N_mouse ]
    do
      F_display_mouse
      echo -n "Mouse [Default is 30 (none)]: "
      read _q_mouse
      if [ X"$_q_mouse" = X"" ]
      then
          _q_mouse=80
          break
      fi
      _q_mouse=`echo $_q_mouse | $AWK '/^[0-9]+$/ {print}'`
    done
    _q_mouse=`head -$_q_mouse $KSGENDIR/lib/data/mouse.dat | tail -1 | awk '{print $2}'`
    return
}

# __END__
