aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dos2unix.c
AgeCommit message (Collapse)Author
2017-04-17Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko
By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Make dos2unix/unix2dos independently selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all coreutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-01-17dos2unix: try to preserve ownership. closes 8311Denys Vlasenko
function old new delta dos2unix_main 426 441 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31move help text from include/usage.src.h to coreutils/*.cPere Orga
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-22*: introduce and use xmkstemp. -65 bytes.Alexander Shishkin
Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-01Marked some more applets NOEXEC/NOFORKDan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-17dos2unix: fix the case w/o parametersDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-28*: remove a few more cases of argc usage. -89 bytes.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15libbb: added xfdopen_for_read/writeDenys Vlasenko
function old new delta xfdopen_helper - 40 +40 logdir_open 1163 1184 +21 process_stdin 433 443 +10 xfdopen_for_write - 9 +9 doCommands 2465 2474 +9 patch_main 1214 1222 +8 bbunpack 457 465 +8 xfdopen_for_read - 7 +7 scan_tree 258 262 +4 xstrtoul_range_sfx 230 231 +1 sendmail_main 957 955 -2 passwd_main 1027 1023 -4 parse 969 964 -5 test_main 253 247 -6 sed_main 655 649 -6 dos2unix_main 437 429 -8 fbsplash_main 950 938 -12 handle_dir_common 371 354 -17 expand_vars_to_list 2197 2169 -28 update_passwd 1275 1246 -29 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117) Total: 0 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2008-07-21libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko
(by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
2008-06-14dos2unix: do not destroy symlinks and mode of the file being converted.Denis Vlasenko
2008-03-17dos2unix: tiny shrinkDenis Vlasenko
login,su: fix setup_environment() so that it works as intended (parameter names were a bit misleading) fdisk: shrink help text: shrink function old new delta login_main 1658 1701 +43 setup_environment 206 203 -3 dos_compatible_flag 4 1 -3 dos2unix_main 383 375 -8 get_boot 1724 1702 -22 fdisk_main 2949 2889 -60 packed_usage 24250 23948 -302 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 43/-398) Total: -355 bytes text data bss dec hex filename 798768 661 7428 806857 c4fc9 busybox_old 798327 658 7428 806413 c4e0d busybox_unstripped
2008-02-17dos2unix: shrinkDenis Vlasenko
bloatcheck for last four commits: function old new delta xrename - 38 +38 md5_hash_block 437 458 +21 sv_main 1237 1254 +17 update_status 569 580 +11 decode_format_string 795 805 +10 doset 317 326 +9 passwd_main 1070 1074 +4 sha1_compile 447 446 -1 rename_or_warn 49 47 -2 fill_bounds 174 172 -2 buffer_fill_and_print 76 73 -3 bb_perror_nomsg 9 - -9 get_next_block 1810 1795 -15 patch_main 1107 1085 -22 write_status_file 1123 1077 -46 remove 52 - -52 __GI_remove 52 - -52 open_as_user 171 111 -60 microcom_main 811 747 -64 dos2unix_main 452 383 -69 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 6/10 up/down: 110/-397) Total: -287 bytes
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-08-18don't pass argc in getopt32, it's superfluousDenis Vlasenko
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-16hdparm: shrink rodata by ~250 bytesDenis Vlasenko
2007-08-16whitespace fixes, no code changesDenis Vlasenko
2007-07-21libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive optionsDenis Vlasenko
find_pair 164 180 +16 passwd_main 1222 1230 +8 display_speed 91 96 +5 msh_main 1335 1339 +4 qrealloc 38 36 -2 refresh 1190 1182 -8 cut_main 543 532 -11 sendCgi 1807 1794 -13 getopt32 1063 1045 -18 arith 2077 2030 -47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99) Total: -66 bytes text data bss dec hex filename 781548 1168 11900 794616 c1ff8 busybox_old 781452 1168 11900 794520 c1f98 busybox_unstripped
2007-06-04Audit bb_common_bufsiz usage, add script which looks for misuse.Denis Vlasenko
tr: stop using globals needlessly. code: -103 bytes
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-11bb_full_fd_action: remove potential xmalloc from NOFORK pathDenis Vlasenko
cat: stop using stdio.h opens libbb: introduce & use open[3]_or_warn function old new delta open3_or_warn - 54 +54 bb_cat 115 144 +29 open_or_warn - 25 +25 unlzma 2404 2412 +8 chattr_main 334 339 +5 xstrtoul_range_sfx 251 255 +4 telnet_main 1514 1510 -4 static.opt 4 - -4 qgravechar 122 118 -4 fuser_add_pid 61 54 -7 fuser_add_inode 154 147 -7 writeFileToTarball 1542 1534 -8 refresh 1156 1148 -8 do_show 856 846 -10 read_leases 212 200 -12 setup_redirects 236 222 -14 iproute_list_or_flush 1582 1568 -14 read_config 427 411 -16 write_leases 284 264 -20 hash_file 338 318 -20 copy_file 1760 1740 -20 do_iproute 2610 2588 -22 bb_full_fd_action 320 269 -51 open_to_or_warn 103 49 -54 fuser_main 1660 1596 -64 .rodata 131160 131096 -64 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-04-04- sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2006-10-03bb_applet_name -> applet_nameDenis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-06-01- look at bb_applet_name. Should close bugs #892 and #893Bernhard Reutner-Fischer
also restructure code a bit so the fix only adds 1 byte..
2006-05-27Consolidate #include <sys/time.h> so libbb.h does it.Rob Landley
2006-03-18- tito writes: this patch fixes some comments in dos2unix that are wrongBernhard Reutner-Fischer
or that reports non existent features (that i've ripped out...)
2006-03-14Tito shrank dos2unix.Rob Landley
2005-10-15common BUFSIZ BSS buffer, small reduce code, data and bss"Vladimir N. Oleynik"
2005-09-11Cleanup patch by Bernhard Fischer, removing unnecessary includes ofRob Landley
getopt.h, whitespace changes, typos, etc.
2005-09-01Bernhard Fischer trimmed down dos2unix a bit.Rob Landley
2004-05-05Steve Grubb writes:Eric Andersen
Hi, I just re-reviewed the patch I just sent...and it needed to be BUFSIZ-3 in dos2unix.c . tempFn is BUFSIZ so the last addressable spot it BUFSIZ-1. The loop increments by 2. That's why it should be BUFSIZ-3. Best Regards, Steve Grubb
2004-05-05Steve Grubb writes:Eric Andersen
Hello, I found and patched 2 more bugs. The first is a misplaced semi-colon. The second one is a buffer overflow. I doubt the buffer overflow is triggered in real life. But you never know what those wily hackers are up to. Thanks, Steve Grubb
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2003-03-19Major coreutils update.Manuel Novoa III
2002-07-03Little fix to avoid overflowEric Andersen
2001-08-22Scrub things and ditch uint64_t and use a custom type nameEric Andersen
to avoid C lib compatibility problems.
2001-08-21Fix dos2unix compile problem with certain glibc versionsEric Andersen
2001-08-02More libc5 fixupsEric Andersen
-Erik
2001-07-25This fixes dos2unix and unix2dos so they behave as expected. dos2unixEric Andersen
was broken in the 0.52 release, and unix2dos was pretty lame... -Erik
2001-05-24Fix up some signed char vs int issues that show up on powerpc.Eric Andersen
2001-04-12Fix dos2unix/tr problem noted by Larry Doolittle.Matt Kraai
2001-04-12use tmpfile() and revert my previous changes... convert() belongs hereGlenn L McGrath
2001-04-12Move convert to libbbGlenn L McGrath
2001-02-22Add in kent robotti's updated dos2unix.cEric Andersen