Commit Graph

1823 Commits

Author SHA1 Message Date
sin
6da5fb7153 Rename check*() to parse*() to be consistent with the rest of sbase 2014-02-04 15:08:08 +00:00
sin
d7383490dc Use chmod() directly 2014-02-04 15:08:02 +00:00
sin
bf2b270946 A couple more stylistic changes to uudecode(1) 2014-02-04 14:46:34 +00:00
sin
ed9985205b Explicitly check for '\0' at the start and exit early 2014-02-04 14:38:43 +00:00
sin
c2db1b9ec6 Remember to fclose(nfp) as well 2014-02-04 14:35:13 +00:00
sin
4d8c3d4dc2 Simplify uudecode(1) and fix some bugs 2014-02-04 14:32:36 +00:00
dsp
7008d751b2 Initial commit of the uudecode tool and man page
Currently it operates only on regular files and does not
support Base64.
2014-02-02 20:50:31 +00:00
sin
d69ca7c9c3 Add FRIGN to LICENSE 2014-02-01 20:16:56 +00:00
FRIGN
a4d9b7b11e Use PRIu32 and avoid cast 2014-02-01 20:16:14 +00:00
dsp
2e98468788 check for valid octal input and crude range check on that for validity 2014-02-01 19:50:52 +00:00
sin
31894adad2 Use printf() instead of fprintf() in uuencode(1) 2014-01-31 15:55:38 +00:00
sin
cb5733ea41 Make the buffer 45 bytes exactly for uuencode(1) 2014-01-31 15:45:26 +00:00
sin
b60882f206 Use putchar() instead of fputc() in uuencode(1) 2014-01-31 15:44:00 +00:00
sin
aab53ef197 Add uuencode(1) 2014-01-31 15:29:11 +00:00
sin
04a32251e4 Use uint32_t instead of unsigned int in cksum(1) 2014-01-31 13:53:28 +00:00
sin
c96fc3a382 Forgot to include these before 2014-01-30 21:51:01 +00:00
sin
4ba6c37839 Ensure we #undef strlcat and strlcpy
These may be implemented as macros so #undef them and use our own
implementation.
2014-01-30 21:04:01 +00:00
sin
f4609e2836 Remove stat(1) from sbase as it is not portable
This utility uses major()/minor() and they are not portable.
It belongs in ubase.
2014-01-30 16:26:40 +00:00
sin
e37e2782a9 Only use major()/minor() if they are available in tar(1)
Otherwise silently ignore them in the archive case.  This is the
same in principle as what we do in the unarchive case.
2014-01-30 16:17:25 +00:00
sin
0a7791a25c Use recurse() in tar(1) instead of ftw(3) 2014-01-30 14:55:38 +00:00
sin
94e97f19cd No need to use enprintf() with EXIT_FAILURE
eprintf() does just that.
2014-01-30 14:55:26 +00:00
sin
b1b225c9ee No need to print the name of the program
The name is printed automatically.  Add some missing newlines
as well.
2014-01-30 14:55:18 +00:00
sin
fb12183c52 Add strlcpy()/strlcat()
Refactor recurse() routine in preparation to moving tar(1) over
to use it instead of the ftw() interface.
2014-01-30 14:55:05 +00:00
sin
08ff1c56e7 Update TODO 2014-01-30 11:44:29 +00:00
sin
c83aef2cda Use preprocessor conditionals to check if makedev() is present
makedev() is not portable and is typically implemented as a
macro.  If it exists use it, otherwise silently ignore character
and block devices.
2014-01-28 17:22:48 +00:00
sin
203b52c38a Use getpriority()/setpriority() instead of deprecated nice()
This is now similar to how renice(1) is implemented.
2014-01-28 17:20:20 +00:00
sin
43057f3a39 Remove mknod(1) from sbase
mknod(1) is not POSIX and it is not portable so it should be
in ubase instead of sbase.
2014-01-28 16:53:53 +00:00
sin
7028920ff4 Rename saved_errno' to savederrno' 2014-01-27 15:18:42 +00:00
sin
6a18e77962 Ensure we return a proper error value in setsid(1) 2014-01-27 15:18:30 +00:00
sin
a0fbe3278a Add Markus Teich to LICENSE 2014-01-25 22:53:14 +00:00
sin
eef1cef1d1 Add more people to LICENSE
Hopefully, I've not missed anyone.
2014-01-25 22:50:54 +00:00
sin
e31b8b76ee Add Silvan Jegen to LICENSE 2014-01-25 22:45:28 +00:00
sin
e9a4af87bd Staticise functions in tr(1) 2014-01-25 22:07:40 +00:00
sin
db2c54bee6 oops that should have been enprintf() 2014-01-24 16:46:56 +00:00
sin
b58951b4f0 snprintf() returns the # of chars printed *excluding* '\0' 2014-01-24 16:23:13 +00:00
sin
30620afb6c Check return value of snprintf in mktemp(1) 2014-01-24 16:19:46 +00:00
sin
5be9c21ce4 Use xrealpath() in du(1) 2014-01-23 21:17:24 +00:00
sin
3ef662c988 Check snprintf() return value 2014-01-23 21:17:08 +00:00
sin
cc2d762798 Use the width of the output device by default in mc(1)
If that fails, fallback to 65 characters as before.  If the -c
option is specified then just use that.
2014-01-21 11:23:16 +00:00
sin
fe6144793f Check mmap() return value and unmap at the end 2014-01-20 11:28:21 +00:00
Silvan Jegen
38f429a3d2 Add the tr program including man page 2014-01-20 11:22:28 +00:00
sin
cb005c150d Fix naming covention for uniq(1) 2014-01-20 10:49:28 +00:00
sin
13128a7aa0 Remove dead debug code 2014-01-18 11:50:51 +00:00
sin
7969fcd2c2 No need to dynamically allocate *cmd[] 2014-01-16 11:53:13 +00:00
sin
1bc2296bac Double NARGS
I just ran a simple one-liner[1] to find the average filepath
length on my system (absolute paths) and that came up with a value
~90 characters.  Assume this is out by a factor of two, we still
have potentially 5000 more arguments that we can put into the buffer.

Surely one might run xargs(1) on something that is not a filename.
We just choose to accomodate the common use-case as much as possible.

[1] find / 2>/dev/null | awk '{print length($0)}' \
	| awk '{a+=$1}END{print "average filepath length: ",a/NR}'
2014-01-16 11:01:10 +00:00
sin
b744ad5216 If there's no newline we don't count the last word - fix it 2014-01-10 22:52:00 +00:00
sin
fbd786d22a Correctly handle leftover input
We cannot rely on ungetc() pushing back more than 1 character
reliably on all systems, so just note if we have leftover input and
process it in the next run.
2014-01-08 20:49:52 +00:00
sin
1963a7cfb3 Group related declaration 2014-01-08 20:49:39 +00:00
sin
602fd49b53 Allocate the arg buffer in once place 2014-01-08 20:35:25 +00:00
sin
2d64fa9483 Rename runcmd() to spawn() 2014-01-08 20:35:19 +00:00