HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/numpy/distutils/__pycache__/line_endings.cpython-310.pyc
o

6��a��@sjdZddlZddlZddlZdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
dkr3eejd�dSdS)z9 Functions for converting from DOS to UNIX line endings

�NcCs�tj�|�r
t|d�dSt|d��}|��}Wd�n1s!wYd|vr1t|d�dSt�dd|�}||kr^td|�t|d	��}|�|�Wd�|S1sWwY|St|d
�dS)zFReplace CRLF with LF in argument files.  Print names of changed files.�
Directory!N�rb��Binary!�
�
z	dos2unix:�wb�ok�	�os�path�isdir�print�open�read�re�sub�write��file�fp�data�newdata�f�r�>/usr/lib/python3/dist-packages/numpy/distutils/line_endings.py�dos2unix	s&

�


��rcCs6|D]}tj�||�}t|�}|dur|�|�qdS�N)rr�joinr�append��modified_files�dir_name�
file_namesr�	full_pathrrr�dos2unix_one_dir�
��r%cC�g}tj�|t|�|Sr)rr�walkr%�r"r!rrr�dos2unix_dir%�r*cCs�tj�|�r
t|d�dSt|d��}|��}Wd�n1s!wYd|vr1t|d�dSt�dd|�}t�dd|�}||kretd|�t|d	��}|�|�Wd�|S1s^wY|St|d
�dS)zFReplace LF with CRLF in argument files.  Print names of changed files.rNrrrrrz	unix2dos:rr	r
rrrr�unix2dos+s(

�


��r,cCs6|D]}tj�||�}t|�|dur|�|�qdSr)rrrr,rr rrr�unix2dos_one_dir@r&r-cCr'r)rrr(r-r)rrr�unix2dos_dirGr+r.�__main__�)�__doc__rr�sysrr%r*r,r-r.�__name__�argvrrrr�<module>s�