tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
M\¬Qc@sädZddddgZdZdZdZdZyd    d
lmZmZWne    k
ridZdZnXd „Z d „Z d d„Z d d d„Zd d„Zd d„Zd„Zd„Zd„ZedkràeƒndS(sHConversions to/from quoted-printable transport encoding as per RFC 1521.tencodetdecodet encodestringt decodestringt=iLt0123456789ABCDEFtiÿÿÿÿ(ta2b_qptb2a_qpcCsG|dkr|S|dkr |S|tkpFd|koCdkn S(séDecide whether a particular character needs to be quoted.
 
    The 'quotetabs' flag indicates whether embedded tabs and spaces should be
    quoted.  Note that line-ending tabs and spaces are always encoded, as per
    RFC 1521.
    s     t_t t~(tESCAPE(tct    quotetabstheader((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyt needsquotings
  cCs(t|ƒ}tt|dt|dS(sQuote a single character.i(tordR tHEX(R ti((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pytquote#s ic Cs’tdk    rA|jƒ}t|d|d|ƒ}|j|ƒdS|dd„}d}x|jƒ}|soPng}    d}
|ddkrž|d }d}
nx^|D]V} t| ||ƒrÌt| ƒ} n|rî| dkrî|    jd    ƒq¥|    j| ƒq¥W|dk    r||ƒntj    |    ƒ} x<t
| ƒt kre|| t d
 d d ƒ| t d
} q*W| }qY|dk    rŽ||d |
ƒndS( s–Read 'input', apply quoted-printable encoding, and write to 'output'.
 
    'input' and 'output' are files with readline() and write() methods.
    The 'quotetabs' flag indicates whether embedded tabs and spaces should be
    quoted.  Note that line-ending tabs and spaces are always encoded, as per
    RFC 1521.
    The 'header' flag indicates whether we are encoding spaces as _ as per
    RFC 1522.
    RRNs
cSsw|r<|ddkr<|j|d t|dƒ|ƒn7|dkrb|jt|ƒ|ƒn|j||ƒdS(Niÿÿÿÿs     t.(twriteR(tstoutputtlineEnd((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyR;s
& RiÿÿÿÿR
R    iRs=
( RtNonetreadRtreadlineRRtappendt EMPTYSTRINGtjointlent MAXLINESIZE( tinputRRRtdatatodataRtprevlinetlinetoutlinetstrippedR tthisline((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyR*s>   
 
            cCsdtdk    r"t|d|d|ƒSddlm}||ƒ}|ƒ}t||||ƒ|jƒS(NRRiÿÿÿÿ(tStringIO(RRt    cStringIOR*Rtgetvalue(RRRR*tinfptoutfp((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyRis      c CsWtdk    r;|jƒ}t|d|ƒ}|j|ƒdSd}xù|jƒ}|sZPndt|ƒ}}|dkrÑ||ddkrÑd}    |d}x7|dkrÍ||ddkrÍ|d}q Wnd}    x@||kr||}
|
dkr|r|d    }|d}qÚ|
tkr<||
}|d}qÚ|d|kr]|     r]d}    PqÚ|d|kr˜||dtkr˜|t}|d
}qÚ|d
|krt||dƒrt||d
ƒr|tt    ||d|d !ƒƒ}|d }qÚ||
}|d}qÚW|    sD|j|dƒd}qDqD|rS|j|ƒndS( sÑRead 'input', apply quoted-printable decoding, and write to 'output'.
    'input' and 'output' are files with readline() and write() methods.
    If 'header' is true, decode underscore as space (per RFC 1522).RNRiis
s      R    R
ii(
RRRRRR R tishextchrtunhex( R"RRR#R$tnewR&RtntpartialR ((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyRtsR     
#
 
 
$
8% 
 cCs^tdk    rt|d|ƒSddlm}||ƒ}|ƒ}t||d|ƒ|jƒS(NRiÿÿÿÿ(R*(RRR+R*RR,(RRR*R-R.((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyRŸs      cCsPd|kodknpOd|ko3dknpOd|koMdkSS(s8Return true if the character 'c' is a hexadecimal digit.t0t9tatftAtF((R ((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyR/«scCs½d}x°|D]¨}d|ko*dknr>tdƒ}n_d|koUdknrmtdƒd}n0d|ko„dknrœtdƒd}nP|d    t|ƒ|}q W|S(
s.Get the integer value of a hexadecimal number.iR5R6R7R8i
R9R:i(R(RtbitsR R((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyR1¯s c Csçddl}ddl}y#|j|jddƒ\}}WnC|jk
r€}|j|_|GHdGHdGHdGH|jdƒnXd}d}x>|D]6\}}|d    krµd}n|d
kr”d}q”q”W|rû|rû|j|_d GH|jdƒn|s d g}nd}    x·|D]¯}
|
d kr8|j} nIyt|
ƒ} Wn6t    k
r€}|jj
d |
|fƒd}    qnX|ršt | |jƒnt | |j|ƒ| |jk    r| j ƒqqW|    rã|j|    ƒndS(Niÿÿÿÿittds"usage: quopri [-t | -d] [file] ...s-t: quote tabss-d: decode; default encodeiis-ts-ds -t and -d are mutually exclusivet-s%s: can't open (%s)
(tsystgetopttargvterrortstderrtstdouttexittstdintopentIOErrorRRRtclose( R>R?toptstargstmsgtdecottabstoR7tststfiletfp((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pytmainÀsR  #            t__main__N(t__doc__t__all__R R!RRtbinasciiRRt ImportErrorRRRRRRRR/R1RRt__name__(((sN/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/quopri.pyt<module>s* 
         ? +            ,