Commit Graph

254 Commits

Author SHA1 Message Date
maya bd073e6366 Remove Free, s/xfree/free/.
Standard C says that free should be a no-op for a NULL pointer, so
we don't need an extra function to do this.

While here, add an XXX about a wrong sounding comment
2019-01-05 10:51:06 +00:00
christos 2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
christos 397b110260 Add a variant that passes the format, so that time(1) can use it. 2017-07-15 14:35:55 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos 8080de59a7 switch to a backtracking instead of a recursive pattern matcher. 2017-04-27 18:50:34 +00:00
sevan a275f45a6c C Shell appeared in 2BSD, not 3BSD 2016-08-10 17:16:47 +00:00
christos c1d7b11ef3 add Will Robinson comment. 2016-03-16 22:35:44 +00:00
christos b4f0f90a59 Avoid gcc-5 conversion warning (|= expands to int) 2016-03-16 22:25:05 +00:00
dholland 076d336118 remove .if make(install)
these are seriously bad juju
2014-07-05 23:12:33 +00:00
dholland b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
mrg 26f35dd6b6 remove the build support for GCC 4.1, and any hacks i found for it.
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
2014-06-13 01:17:45 +00:00
christos eca938ae97 CID 1060854: Wrong sizeof argument (SIZEOF_MISMATCH) 2013-08-06 05:42:43 +00:00
christos 37e3924882 WARNS=6 [-Wconversion] 2013-07-16 17:47:43 +00:00
christos 2227ba4bf1 Make shifting variables reflect their environment counterparts. Makes
"shift path" work as expected.
2013-04-03 17:32:24 +00:00
he 85e98624ed When using -ledit, also use -lterminfo, to allow static linking. 2013-01-25 19:07:14 +00:00
christos 0961e62ab9 Obey SMALLPROG and don't enable the editor 2013-01-25 14:20:57 +00:00
christos 185136779b make history kind of work :-), turn libedit support on. 2013-01-23 16:39:03 +00:00
christos 9263138f08 fix compilation without -DEDIT 2013-01-22 22:40:31 +00:00
wiz cefd6eea55 Bump date for previous. 2013-01-22 21:20:26 +00:00
christos 5e9a2dddf3 Add a little libedit front end. Could be used as someone's pet project to
learn how to program. It is not enabled in the Makefile, and it states why
there.
2013-01-22 20:35:29 +00:00
christos cd0ed5aa5a Remove alloc builtin, it did not work anyway since most modern malloc
implementation use a combination of sbrk/mmap.
2013-01-22 19:28:00 +00:00
christos 55853dd5e1 sprinkle const, no functional change intended. 2012-12-27 21:19:20 +00:00
christos 8af1ed165c support RLIMIT_NTHR 2012-06-09 02:50:43 +00:00
wiz 3957bea1ef Fix whitespace nits. Suggested by Bug Hunting. 2012-03-22 07:58:16 +00:00
christos 1897181a72 From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
2012-01-22 18:36:14 +00:00
christos 09838d02ff PR/45856: Bernhard "Burnhard" Riedel: Infinite loop on &nbsp; input. Sending
char 160 in the input to csh, lead it to an infinite loop, because tcsh tables
counted this as a space character, but the word logic switch does not. Change
that character tables, so that this does not count as a spacing character
anymore, by syncing the table with the one from tcsh.
2012-01-19 02:42:53 +00:00
christos c4753f0f6f sync with /usr/bin/time, use CLOCK_MONOTONIC 2011-11-09 19:16:00 +00:00
christos 03561a047f csh has no business using TTYHOG 2011-09-24 14:44:11 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
joerg 5bb1ddccc2 Use __dead 2011-08-29 14:51:17 +00:00
christos bc4c3c5734 use strpct(3) from libutil. 2011-08-28 07:49:16 +00:00
joerg 0bb547d3b0 Uses non-literal format strings in err.c 2011-08-25 15:44:51 +00:00
christos fe8677c354 Document non-literal formats 2011-08-14 10:53:16 +00:00
mrg e7c388dbdf add a comment to confirm a workaround as only being a GCC 4.1 issue. 2011-07-01 03:58:10 +00:00
njoly ef6127c9f2 Fix sub-section references. 2011-03-09 22:26:36 +00:00
joerg 899808a54d Use .In instead of .Aq .Pa for signal.h. 2010-03-22 18:33:27 +00:00
wiz 4eb4d50caa Match curly braces in undef(FILEC) case. Found by cppcheck. 2010-01-17 12:15:36 +00:00
wiz 7d6100a52d Bump date for previous. 2009-03-29 08:54:10 +00:00
mrg fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
2009-03-29 01:02:48 +00:00
joerg 51c2955e45 Use .Rs/.Re for reference to C shell introduction. 2009-03-13 14:07:54 +00:00
wiz 9a3995e433 Remove weird backslash that somehow must have crept in.
Found by joerg and mdocml.
2009-03-03 15:11:29 +00:00
lukem 9050ab5cfa fix -Wsign-compare issues 2009-02-14 07:12:29 +00:00
abs 0c7bdeb6b8 Use u_int counter to count from 0 to u_int: for (u = 0; u < digits; u++) 2009-02-13 00:46:25 +00:00
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
lukem 2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dholland 8392979dd5 Dividing by a time_t makes the result time_t, so it should be cast to long
when being printf'd as a long.
2008-02-24 05:20:17 +00:00
perry 0c0bc4573a __attribute__((__noreturn__)) to __dead 2007-12-24 16:11:50 +00:00