Commit Graph

20 Commits

Author SHA1 Message Date
christos 07ed41e72f - Default terminator to \n
- Don't print a trailing separator
Behavior now matches GNU seq (from Aram at tech-userlevel)
2018-12-17 20:10:51 +00:00
ginsbach 094918e495 The sign is optional in an exponent
Treat numbers after [Ee] as a positive number rather than an invalid
numeric sequence.  (Taken from FreeBSD but done differently.)
2017-10-29 01:28:46 +00:00
ginsbach 81821b805f Fix typos (from FreeBSD) 2017-10-29 00:02:23 +00:00
sevan 39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
sevan fbe5805edc seq(1) first appeared in Research Unix 8th Edition, which was before Plan 9.
Generalise in stating that this version is not bug for bug compatible with other
implementations.
Bump date.
Via FreeBSD bug 181390 with feedback from Warren Block.
2016-08-18 22:55:28 +00:00
jdf 2c8eda201a * Punctuation
* Create separate section with macro for EXIT STATUS
Patch supplied by Bug Hunting.
2013-04-07 17:37:45 +00:00
christos 5a1e6eb35b document non literal string format 2011-08-17 13:19:09 +00:00
dholland d6986f611b Rerun valid_format() both before and after unescaping the format
string, in case the format string contains printf conversions
assembled from escape sequences.

A better approach might be to adjust the unescape logic to avoid
generating printf conversions (e.g. convert \x25 to %% instead of %)
but that's somewhat problematic and it's not really worth taking the
trouble.

Running valid_format() only after unescaping would also be somewhat
tidier but makes printing the invalid format string problematic,
because the unescape logic runs in place.

None of these cases are really worth worrying about in detail, but now
at least they don't result in SIGSEGV.

Related to PR 43355.
2010-05-27 08:40:19 +00:00
dholland 76c7c8ecbf Fix valid_format() to be more careful about allowing only valid printf
formats.

Also, accept %a and %A, which are new since this logic was last updated,
and also allow %F even though it's not functionally different from %f.
Document these additions and bump date of man page.

Fixes PR 43355.
2010-05-27 08:30:35 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
ginsbach bfd03efd21 new sentence, new line 2008-11-26 15:03:47 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
ginsbach 709ba647ca Remove clause 3 and 4 from TNF licenses 2008-04-30 14:22:14 +00:00
ginsbach 9470f2d15c Fix problem with handling escaped octal and hexadecimal sequences in the -f
format option.  The problem is that the next character after such an escape
was not copied to the output.
2008-01-18 16:16:10 +00:00
garbled ee8c3b64e9 Add missing DPADD for LIBMATH 2006-01-07 07:12:27 +00:00
ginsbach cf8e68cb39 Add missing 'by' in license attribution -- Thanks, wiz! 2005-01-20 12:52:03 +00:00
wiz 704c845e60 Sync usage with man page. 2005-01-20 09:20:03 +00:00
wiz c6bb1f479a Add RCS Id; sort option(s) without arguments before options with,
in SYNOPSIS; add prompts in examples; sort format letters as option letters would be sorted.
2005-01-20 09:18:11 +00:00
wiz 99cb01f31a Drop trailing whitespace. 2005-01-20 09:13:16 +00:00
ginsbach e8c2320896 seq(1) - print sequences of numbers 2005-01-20 04:13:42 +00:00