aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/w/pr_time.c
Commit message (Collapse)AuthorAgeFilesLines
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Convert to use libxo.Marcel Moolenaar2014-11-051-7/+10
| | | | | | | | Obtained from: Phil Shafer <phil@juniper.net> Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=274151
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-111-4/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* Constify format string pointer, otherwise this would trigger warning whenXin LI2009-09-081-1/+1
| | | | | | | higher warning level is enabled. Notes: svn path=/head/; revision=196956
* Fix the problem that the entry broke into two lines with multi-byteHajimu UMEMOTO2009-08-301-8/+19
| | | | | | | | | AM/PM format. Reported by: takawata Notes: svn path=/head/; revision=196652
* w(1) uses strftime %b with to print the abbreviated month nameAndrey A. Chernov2008-08-201-1/+2
| | | | | | | | | | | | | if a user logged in more than a week ago. This may contain multibyte characters (e.g. when using UTF-8). This string is then aligned on byte-length rathern than char-length, resulting in misalignment and unfinished multibyte characters. PR: 126657 Submitted by: Johan van Selst <johans@stack.nl> Notes: svn path=/head/; revision=181922
* ANSI style function declarations.Juli Mallett2002-06-071-4/+2
| | | | Notes: svn path=/head/; revision=97981
* WARNS=2 fix, use __FBSDID() and sort includes.Mark Murray2001-12-111-5/+5
| | | | | | | WARNS=2 not added to Makefile as it is to become default. Notes: svn path=/head/; revision=87674
* Fix width for printing timeAndrey A. Chernov2001-03-211-5/+4
| | | | Notes: svn path=/head/; revision=74603
* Oops, remove tabs sneaked in wrong placeAndrey A. Chernov2001-03-021-2/+2
| | | | Notes: svn path=/head/; revision=73366
* Use AM/PM time only when available in localeAndrey A. Chernov2001-03-021-5/+2
| | | | Notes: svn path=/head/; revision=73365
* Fix cosmetic bug in time display. Current day logins are now displayedDavid Nugent1999-11-101-4/+9
| | | | | | | | | | as plain time as originally intended, instead of displaying DayHH times when the login time happens to be prior the GMT - TZ difference. (Only noticable on systems operating east of GMT/UTC). Local times are now used to determine the day. Notes: svn path=/head/; revision=53073
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Fix the annoying bug introduced in rev 1.18 that caused each line to bePeter Wemm1999-01-101-3/+6
| | | | | | | | | | | | | | | | | | | one character shorter than the previous in a stairstep fashion when long idle times were involved. A couple of nits: - spelling/typo fix. - some of the easier style(9) fixes where it was bothering me. - Handle 100+ days idle time (ha!). Probably the right thing to do is to do a snprintf into a buffer and strlen the result rather than doing hackery on magic numbers. XXX the wide (and mostly unused) username and tty columns annoy me since it it could be used for more useful information for the command. We should actually count the largest username and tty and adjust like 'ls -l' does. Notes: svn path=/head/; revision=42481
* -Wall cleanup.Alexander Langer1997-12-281-3/+3
| | | | Notes: svn path=/head/; revision=32055
* Revert some casts I introduced.Philippe Charnier1997-08-261-3/+3
| | | | | | | Requested by: Bruce. Notes: svn path=/head/; revision=28785
* Typo in usage(). Err -> errx when testing allocations.Philippe Charnier1997-08-251-2/+6
| | | | Notes: svn path=/head/; revision=28694
* Made sure the string formated by strftime() is properlyKazutaka YOKOTA1997-03-071-1/+2
| | | | | | | | | | | null-terminated. Should go to RELENG_2_1 and RELENG_2_2. Reviewed by guido@freebsd.org. Notes: svn path=/head/; revision=23493
* Reduce the command field width by one when idle time is > 9 days, toDaniel O'Callaghan1997-02-111-1/+5
| | | | | | | | | eliminate unsightly blank line. Possibly a 2.2 candidate. Notes: svn path=/head/; revision=22558
* Fix one column wrong offset in previous change days->dayAndrey A. Chernov1995-10-081-1/+1
| | | | Notes: svn path=/head/; revision=11339
* Print "1day" instead of "1days"Dima Ruban1995-09-221-2/+4
| | | | Notes: svn path=/head/; revision=10948
* Delete bogus referneces to timezone code internal header file `tzfile.h',Garrett Wollman1995-08-071-9/+8
| | | | | | | which is no longer bogusly installed in /usr/include. Notes: svn path=/head/; revision=9987
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8874
* idle time == 0 printed now as "-" like in good old BSDAndrey A. Chernov1994-09-271-0/+3
| | | | | | | skip cua* 3 chars as tty* 3 lchars Notes: svn path=/head/; revision=3138
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+104
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590