Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ©ft`!0ã@sîddlmZddlmZddlmZddlZddlZddlZddlZddl Z ddl Z Gdd„de ƒZ dd„Z d d „Zd d „Zd d„Zdd„Zdd„Zdd„Zd'dd„Zdd„Zd(dd„Zd)dd„Zd d!„Zd"d#„Zd$d%„Zed&ƒ\ZZeZdS)*é)Úprint_function)Úunicode_literals)ÚunicodeNc@s$eZdZdd„Zdd„Zdd„ZdS)Ú UnicodeStreamcCs||_||_dS)N)ÚstreamÚencoding)Úselfrr©r ú/usr/lib/python3.6/i18n.pyÚ__init__$szUnicodeStream.__init__c Cs t|tƒs.tjjr |j|jdƒn |j|jdƒ}y|jj |ƒWn\t k rš|j|jjdƒ}t |jdƒrz|jj j |ƒn|j|jjdƒ}|jj |ƒYnXdS)NÚreplaceÚbackslashreplaceÚbufferÚignore) Ú isinstanceÚstrÚdnfÚpycompÚPY3ÚdecoderÚencoderÚwriteÚUnicodeEncodeErrorÚhasattrr)rÚsZs_bytesr r r r(s  zUnicodeStream.writecCs t|j|ƒS)N)Úgetattrr)rÚnamer r r Ú __getattr__7szUnicodeStream.__getattr__N)Ú__name__Ú __module__Ú __qualname__r rrr r r r r#srcCs0|dkr dS|jƒ}|jdƒs(|jdƒr,dSdS)a‘Return true if encoding can express any Unicode character. Even if an encoding can express all accented letters in the given language, we can't generally settle for it in DNF since sometimes we output special characters like the registered trademark symbol (U+00AE) and surprisingly many national non-unicode encodings, including e.g. ASCII and ISO-8859-2, don't contain it. NFzutf-Zutf_T)ÚlowerÚ startswith)rr!r r r Ú_full_ucd_support:s r#cCstjdƒ}|jdƒrdS|S)z= Take the best shot at the current system's string encoding. FZANSIzutf-8)ÚlocaleÚgetpreferredencodingr")rr r r Ú_guess_encodingKs r&cCsšytjjtjdƒWn€tjk r”ytjjtjdƒdtjd<Wn0tjk rttjjtjdƒdtjd<YnXtdj tjdƒt j d�YnXdS)NÚzC.UTF-8ÚLC_ALLÚCz&Failed to set locale, defaulting to {})Úfile) rrÚ setlocaler$r(ÚErrorÚosÚenvironÚprintÚformatÚsysÚstderrr r r r Ú setup_localePsr3c Cs`tj}|jƒstjtjtjƒy |j}Wntk r@d}YnXt|ƒs\t |t ƒƒt_dSdS)z½ Check that stdout is of suitable encoding and handle the situation if not. Returns True if stdout was of suitable encoding already and no changes were needed. NFT) r1ÚstdoutÚisattyÚsignalÚSIGPIPEÚSIG_DFLrÚAttributeErrorr#rr&)r4rr r r Ú setup_stdout^s  r:cCst|dd�tjjƒS)z› It uses print instead of passing the prompt to raw_input. raw_input doesn't encode the passed string and the output goes into stderr r')Úend)r/rrZ raw_input)Zucstringr r r Ú ucd_inputrs r<c Cs”tjjr:tjj|ƒr$t|tƒdd�St|tƒr2|St|ƒSt|tjjƒrL|St|dƒrxy tjj|ƒSt k rvYnXtjjt|ƒtƒdd�SdS)zD Like the builtin unicode() but tries to use a reasonable encoding. r)ÚerrorsZ __unicode__N) rrrZ is_py3bytesrr&rrrÚ UnicodeError)Úobjr r r Úucd}s    r@cCstj|ƒdkrdSdS)NÚWÚFéé)rArB)Ú unicodedataZeast_asian_width)Zucharr r r Ú_exact_width_char˜srFcCsX|dkrt|ƒ|fSd}d}x2|D]*}t|ƒ}|||kr "%s" % (chop_str(msg, 10)) Nrr')Ú exact_widthrF)ÚmsgÚchopÚwidthZ chopped_msgÚcharZ char_widthr r r Úchop_strœs    rLcCstdd„|DƒƒS)zQ Calculates width of char at terminal screen (Asian char counts for two) css|]}t|ƒVqdS)N)rF)Ú.0Úcr r r ú ³szexact_width..)Úsum)rHr r r rG°srGTr'cCsjt||ƒ\}}||kr0|s|rfdj|||gƒ}n6d||}|rTdj||||gƒ}ndj||||gƒ}|S)aµ Expand a msg to a specified "width" or chop to same. Expansion can be left or right. This is what you want to use instead of %*.*s, as it does the "right" thing with regard to different Unicode character width. prefix and suffix should be used for "invisible" bytes, like highlighting. Examples: ``"%-*.*s" % (10, 20, msg)`` becomes ``"%s" % (fill_exact_width(msg, 10, 20))``. ``"%20.10s" % (msg)`` becomes ``"%s" % (fill_exact_width(msg, 20, 10, left=False))``. ``"%s%.10s%s" % (pre, msg, suf)`` becomes ``"%s" % (fill_exact_width(msg, 0, 10, prefix=pre, suffix=suf))``. r'ú )rLÚjoin)rHZfillrIÚleftÚprefixÚsuffixrJZextrar r r Úfill_exact_width¶s rVéFcsÒ‡fdd„‰|jdƒ}|jdd ƒjdƒ}g}|}d}d}d} �xr|D�]h} | jdƒ} || } } ˆ| ƒ\}} d} |rz| rzd } |rŽ|t| ƒkrŽd } |r¬| r¬|d kr¬|| kr¬d } | rÈ|j|jdƒƒ|}d}|t| ƒkrØd } |rê| jdƒ} | } t|| ƒ|k�rd}|j|| ƒ|}qDd }| jdƒ}|} | }| �r@|d k�r@|}x^|D]V}|t| |ƒk�rŠt| ƒt|ƒk�rŠ|j| jdƒƒ|d|} | |7} | d7} �qFW| jdƒd}qDW|�rÈ|j|jdƒƒdj|ƒS) zq Works like we want textwrap.wrap() to work, uses Unicode strings and doesn't screw up lists/blocks/etc. csšd}d}x|D]}|dkrP|d7}qW|d kr8|dfSt||d…dƒd}|dkr’ˆ||t|ƒd…ƒ}|dp||d}|r’||d|fS|dfS)NrÚXrQrDú-Ú*Ú.Úoõâõ•õ‣õ∘)rYrZr[r\r])rYrZr[r\r^r_r`)rLÚlen)ÚlineÚcountZbyteZlist_chrZnxt)Ú_indent_at_begr r rdÜs   z%textwrap_fill.._indent_at_begÚ ú rQéFrTér'z )Úrstripr ÚsplitraÚappendÚlstriprGrR)ÚtextrJZinitial_indentZsubsequent_indentÚlinesÚretÚindentZ wrap_lastZcsabZ cspc_indentrbZlsabZ lspc_indentZforce_nlZwordsZspcsZwordr )rdr Ú textwrap_fillØsf           rqcCsHt|ƒ}t|ƒ}||kr|S||kr4||kr0|S|S||kr@|S|SdS)aÐ Automatically selects the short (abbreviated) or long (full) message depending on whether we have enough screen space to display the full message or not. If a caller by mistake passes a long string as msg_short and a short string as a msg_long this function recognizes the mistake and swaps the arguments. This function is especially useful in the i18n context when you cannot predict how long are the translated messages. Limitations: 1. If msg_short is longer than width you will still get an overflow. This function does not abbreviate the string. 2. You are not obliged to provide an actually abbreviated string, it is perfectly correct to pass the same string twice if you don't want any abbreviation. However, if you provide two different strings but having the same width this function is unable to recognize which one is correct and you should assume that it is unpredictable which one is returned. Example: ``select_short_long (10, _("Repo"), _("Repository"))`` will return "Repository" in English but the results in other languages may be different. N)rG)rJZ msg_shortZmsg_longZ width_shortZ width_longr r r Úselect_short_long'srrcCs2tƒdd„}tjjj|dd�}t|tjj|ƒƒS)z< Easy gettext translations setup based on given domain name cs ‡fdd„S)Ncs tˆ|ŽƒS)N)r@)Úw)Úfncr r ÚTsz2translation..ucd_wrapper..r )rtr )rtr Ú ucd_wrapperSsz translation..ucd_wrapperT)Zfallback)r3rrÚgettextÚ translationÚmapZ gettext_setup)rrvÚtr r r rxNsrxcCs(t|tdƒ|ƒ}d|kr |S|SdS)Nrhú)Ú_Úchr)ÚcontextÚmessageÚresultr r r ÚpgettextYsr�r)N)NTr'r')rWr'r')Z __future__rrZ dnf.pycomprrr$r-r6r1rEÚobjectrr#r&r3r:r<r@rFrLrGrVrqrrrxr�r|ZP_ZC_r r r r Ús2      " O'