kevgeniy
6228b06e29
cat: remove libc dependency
2016-10-24 05:23:54 +03:00
kevgeniy
72490ef956
cat: rewrote most part of the code
...
Rewrote cat to eliminate code duplication and make it safe
- UnsafeWriter is replaced by BufWriter
- write_lines (any option except -T and -v) and write_bytes (-T and -v
options) are replaced by single write_lines method. A new method use
``write_to_end``, ``write_tab_to_end`` or ``write_nonprint_to_end``
method to write all symbols untill the end of line in the right way.
- Benchmarking (-n, -T and -v options respectively):
| old (ns/iter) | new (ns/iter) |
| -------------------------- | -------------------------- |
| 6,501,496 (+/- 1,173,481) | 6,683,158 (+/- 373,539) |
| 8,634,023 (+/- 547,595) | 5,408,676 (+/- 715,458) |
| 24,056,507 (+/- 1,177,445) | 30,879,788 (+/- 1,180,598) |
2016-10-24 04:51:40 +03:00
evgeniy
4a2b8e3c52
cat: conditional compilation added
2016-10-18 19:09:36 +02:00
kevgeniy
2060048c79
Fixed and made the comments clearer
2016-10-16 17:13:02 +02:00
evgeniy
dd16c58ab4
cat utility refactoring:
...
- Less if branches
- Unnecessary range variable deleted
- Optional fail-assertion commented
2016-10-16 12:43:23 +02:00
Nathan Ross
7bb5891810
Merge pull request #991 from wimh/more_windows
...
more: fix build on windows
2016-10-06 18:47:26 -04:00
Wim Hueskes
046ff62af6
more: fix build on windows
2016-10-06 23:35:16 +02:00
mpkh
9a1f320bed
Merge pull request #989 from SjonHortensius/Makefile-fixes
...
Makefile fixes
2016-09-25 21:16:19 +04:00
Sjon Hortensius
c34c2ea074
Makefile: don't symlink uutils
to itself
...
Fix error where uutils would be symlinked to itself, resulting in:
> ln: 'uutils' and 'uutils' are the same file
2016-09-25 15:15:09 +02:00
Sjon Hortensius
f79467f5a1
Makefile: only add uutils
with MULTICALL=y
...
fixes error when making without MULTICALL=y
> install: cannot stat 'xxx/target/release/deps/uutils': No such file or
directory
2016-09-25 15:14:59 +02:00
Nathan Ross
20525a8a6c
Merge pull request #988 from wimh/who_rpi
...
who: fix build on raspberry pi 2
2016-09-03 18:23:41 -04:00
Wim Hueskes
4f91662057
who: use i64 instead of time_t
...
fixes build on raspberry pi 2 (armv7-unknown-linux-gnueabihf)
2016-09-03 22:18:10 +02:00
mpkh
783daa5839
Merge pull request #987 from Arcterus/master
...
hashsum: implement SHAKE-128 and SHAKE-256
2016-08-31 11:37:52 +04:00
Alex Lyon
362cabe1a6
hashsum: implement SHAKE-128 and SHAKE-256
2016-08-30 17:33:18 -07:00
Alex Lyon
8fa113123d
Merge pull request #986 from nathanross/cache-mingw
...
appveyor: add cache of mingw download
2016-08-30 02:09:43 -07:00
nathanross
d1d04f8fff
appveyor: add cache of mingw download
2016-08-29 20:18:52 -04:00
Jian Zeng
448764e611
Merge pull request #984 from knight42/fix-touch
...
touch: respect -h option
2016-08-28 07:38:48 +08:00
knight42
c277793f38
touch: add test
2016-08-28 07:12:58 +08:00
knight42
d0196b82ad
touch: respect -h
2016-08-28 07:12:25 +08:00
mpkh
b2ded87d39
Merge pull request #983 from knight42/fix-preserve-root
...
Updated chgrp & chown
2016-08-27 22:51:19 +04:00
knight42
89ac03d1c2
uucore::fs: add fn resolve_relative_path
2016-08-28 00:02:58 +08:00
knight42
136ca4e197
chgrp,chown: fix bug in option --preserve-root
2016-08-28 00:02:58 +08:00
Jian Zeng
d79e3d00eb
Merge pull request #980 from nathanross/tests-boilerplate-reduction
...
tests: remove helper function boilerplate via macros
2016-08-23 21:47:03 +08:00
nathanross
b667fce8ba
clone atpath to avoid borrow issue
2016-08-23 08:57:13 -04:00
nathanross
aa6ee03be3
tests: remove helper function boilerplate via macros
2016-08-23 08:04:02 -04:00
Nathan Ross
e8338ca175
Merge pull request #978 from vegichan/master
...
Implement more - initial draft
2016-08-23 07:26:33 -04:00
Martin Kysel
23bab3df69
moved more to unix utils, minor review updates
2016-08-23 11:40:09 +01:00
Martin Kysel
a90aec3f1b
add author name
2016-08-23 10:50:45 +01:00
Martin Kysel
c522a62232
update documentation
2016-08-23 10:46:28 +01:00
Martin Kysel
7d77b9720d
Initial more implementation
2016-08-23 10:45:51 +01:00
Nathan Ross
ae0e1c4768
Merge pull request #977 from knight42/chgrp
...
Implement chgrp
2016-08-21 06:39:54 -04:00
Knight
d2d9fcd628
chgrp: add tests
2016-08-21 17:40:46 +08:00
Knight
9dda0bcd25
chgrp: implemented
2016-08-21 17:04:38 +08:00
Knight
8cba71adb4
chgrp: add entries
2016-08-21 17:04:02 +08:00
Nathan Ross
55d13780a2
Merge pull request #976 from knight42/mv
...
mv: cleanup the code
2016-08-21 03:37:31 -04:00
Knight
a4bf852207
mv: cleanup the code
2016-08-21 14:57:28 +08:00
mpkh
2981eb5112
Merge pull request #975 from nathanross/normalize-coreopts-squashed
...
DRYer code and more UX consistency through use of coreopts
2016-08-20 18:44:17 +00:00
Nathan Ross
36503a77c7
impl: use coreopts for brevity and consistent UX
2016-08-20 10:07:24 -04:00
Nathan Ross
edc3bf7c08
impl: dryer use of coreopts
2016-08-20 10:07:24 -04:00
Nathan Ross
ee3aaa017f
uucore: allow 'wrong number of arguments' macro to be more precise
2016-08-20 10:07:08 -04:00
Michael Gehring
dcefbd54c6
Merge pull request #974 from knight42/fix-bugs
...
Fix bugs of `pinky` and `who`
2016-08-20 15:16:19 +02:00
Jian Zeng
14a34b48bf
Merge pull request #969 from robertclancy/tail-f-dev-stdin-bug
...
tail: fix bug when following /dev/stdin
2016-08-20 20:25:08 +08:00
Knight
fb53c019b4
who: limit the parts of split host to 2
2016-08-20 20:22:18 +08:00
Knight
34d2224098
pinky: correct the test
2016-08-20 20:22:18 +08:00
Robert Clancy
3a0c23561e
tail: fix bug when following /dev/stdin
...
main panics when following /dev/stdin since /dev/stdin is not seekable.
Check to see if file is seekable and use unbounded_seek if so.
Also `tail -f` with no files should not follow stdin.
2016-08-20 11:47:02 +01:00
Nathan Ross
268b691881
uucore: add support for optflagopt to coreopts
2016-08-20 05:58:36 -04:00
Nathan Ross
cb1b32cda1
uucore: fix utility name in coreopts parsing error messages
2016-08-20 05:58:36 -04:00
Nathan Ross
d0b5b9a9fd
Merge pull request #971 from knight42/remove-unnecessary-ctypes
...
Remove unnecessary c_types
2016-08-20 00:41:59 -04:00
Knight
9ecf899e3d
Remove uucore::c_types
2016-08-20 12:12:49 +08:00
Knight
ddf47fab31
groups: use uucore::entries::get_groups instead
2016-08-20 11:59:58 +08:00