
    g=                     &    S  r SS jrS rS rS rg)c                     X:  X:  -
  $ )z
Replacement for built-in function cmp that was removed in Python 3

Compare the two objects x and y and return an integer according to
the outcome. The return value is negative if x < y, zero if x == y
and strictly positive if x > y.
 )xys     ./usr/lib/python3/dist-packages/samba/common.pycmpr      s     Eae    c                     U(       a  [        SU -  5        gSSSSSS.nSnU(       a  SUS'   SUS'   Sn [        U S	U-  -   5      nUR                  5       nXS;   a  X5   $ [        S
U-  5        M:  )zpconfirm an action with the user

:param msg: A string to print to the user
:param forced: Are the answer forced
z%s [YES]TF)YYES NNOz[y/N]ALLNONEz[y/N/all/none]z %s zUnknown response '%s')printinputupper)msgforced	allow_allmappingpromptvs         r   confirmr   !   s     j3 G F !
#'(GGI<:%)* r   c                     [        U 5      S-  (       a&  [        U 5      S:  a  [        [        U 5      S-
  5      $ [        U 5      $ )z)normalise a ldap integer to signed 32 bitl            l        )intstr)ivalues    r   normalise_int32r    B   s6    
6{ZCK!O3v;,--v;r   c                     U n[        U [        5      (       a  U R                  S5      nU$ [        U [        5      (       d  [	        S[        U 5      < SU < 35      eU$ Nutf8zExpected bytes or string for :)
isinstancer   encodebytes
ValueErrortypebytesorstringtmps     r   	get_bytesr-   O   sU    
C-%%""6* J u--mATVcdeeJr   c                     U n[        U [        5      (       a  U R                  S5      nU$ [        U [        5      (       d  [	        S[        U 5      < SU < 35      eU$ r"   )r%   r'   decoder   r(   r)   r*   s     r   
get_stringr0   Z   sU    
C-''""6* J s++mATVcdeeJr   N)FF)r   r   r    r-   r0   r   r   r   <module>r1      s   *	+Br   