Commit graph

984 commits

Author SHA1 Message Date
Rainer Hurling eb1ca6736a usr.bin/calendar/calendars: Add myself as a committer 2024-03-24 19:57:27 +01:00
Nuno Teixeira e37471440e Add myself (eduardo) to the calendar.
Reminded by:	mckusick
2024-03-19 21:21:04 +00:00
Oskar Holmlund d4135972ae add myself(oh) to the calendar
Reported by: McKusick
Approved by: Manu (mentor)
Differential Revision: https://reviews.freebsd.org/D44408
2024-03-18 22:33:03 +01:00
R. Christian McDonald 576fbcbf2d Add myself (rcm) to the calendar.
Reminded by:	mckusick
2024-03-18 16:26:59 -04:00
Hartmut Brandt c85d75a9fc Add myself (harti) to the calendar.
Reminded by:    mckusick
2024-03-18 17:58:03 +01:00
Gabriel M. Dutra f56e9a65cf calendars: Add myself to the FreeBSD calendar
Reported by:	mckusick
Approved by:	dbaio (mentor)
Differential Revision:	https://reviews.freebsd.org/D44396
2024-03-18 11:14:00 -03:00
Michael Osipov c547f17816 Add myself (michaelo) to the calendar
Reminded by:	mckusick
2024-03-18 10:46:02 +01:00
Jake Freeland 04473cfc4d Add myself (jfree) to calendar.freebsd
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44400
2024-03-17 18:10:42 -05:00
Neel Chauhan f526590a78 Add myself (nc) to the calendar
Reminded by:	mckusick
2024-03-17 15:34:59 -07:00
Vladimir Druzenko 228fc43bcf Add myself (vvd) to the calendar
Reported by:	mckusick
Approved by:	mckusick
2024-03-17 18:53:07 +03:00
Zhenlei Huang 4319ccae87 Add myself (zlei) to the calendar
Reminded by:	mckusick
2024-03-17 23:07:53 +08:00
Dmitry Salychev 65eb09f9d5
Add myself (dsl) to the calendar.freebsd 2024-03-17 11:09:52 +01:00
Kyle Evans 0a82cd4f10 calendar: correct the search order for files
Include files that don't begin with a '/' are documented to search the
current directory, then /usr/share/calendar.  This hasn't been accurate
for years, since e061f95e7b ("Rework calendar(1) parser") rewrote a
lot of this.

Stash off the cwd before we do any chdir()ing around and use that to
honor the same order we'll follow for the -f flag.  This may result in
an extra lookup that will fail for the initial calendar file, but I
don't think it's worth the complexity to avoid it.

While we're here, fix the documentation to just reference the order
described in FILES so that we only need to keep it up to date in one
place.

Reviewed by:	bapt
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D42278
2023-12-17 23:53:51 -06:00
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00
Warner Losh bdcbfde31e usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:30 -07:00
Arthur Kiyanovski fec0c3fb08 Add myself (akiyano) to calendar.freebsd
Approved by: cperciva (mentor)
2023-11-20 20:50:52 +00:00
Warner Losh b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh 42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
David E. O'Brien 65e9eb0701 Look in getlocalbase() for the calendar-data package data
Fix d20d655018 where getlocalbase()
wasn't used to fill out the printf(3) format of _PATH_INCLUDE_LOCAL.

Differential Revision:	https://reviews.freebsd.org/D38975
Reviewed by:	imp
2023-03-12 18:40:07 -07:00
Stefan Eßer dc9e68ad01 calendar: clarify comment syntax in man page
The single line comment indicator '//' is only detected at the
beginning of a line or when following white space to allow URLs
in calendar entries.

MFC after:	3 days
2022-07-31 07:37:05 +02:00
Lewis Cook fcaf016796 Correct calendar date entry for myself
Approved by:		hselasky (src)
Differential Revision:	https://reviews.freebsd.org/D34839
2022-04-08 14:02:30 +01:00
Dries Michiels ecf58c066c Complete steps 5 and 9 for new committers (driesm)
Reviewed by: 0mp (mentor)
Approved by: 0mp (mentor)
Differential Revision: https://reviews.freebsd.org/D32890
2021-11-08 17:19:57 +01:00
Yasuhiro Kimura 74237127e3 Add myself to calendar.freebsd
It corresponds to the 9th step of the procedure described in section
7.1 of Committer's Guide.

Approved by:	meta (mentor)
Differential Revision:	https://reviews.freebsd.org/D32153
2021-09-27 17:47:01 +09:00
Kevin Bowling 007c2463d6 calendar.freebsd: Fix off-by-one error 2021-09-17 16:07:23 -07:00
Baptiste Daroussin fe787aa3b2 calendars: fix tabs vs space indentation 2021-07-27 18:55:31 +02:00
Robert Wing 0626b0a89c Add myself to the calendar 2021-07-24 16:12:17 -08:00
Stefan Eßer 35b8fd0b69 usr.bin/calendar: do not treat // in text as comment
The C++-style comment marker "//" has been added with the rewrite of
the preprocessor features. Since this character sequence occurs	in
ULRS, the reminder of the URL was considered a comment and stripped
from the calendar line.

Change parsing of "//" to only start a comment at the begin of a line
or when	preceeded by a white-space character.

PR:		256455
Reported by:	Philippe Michel (philippe.michel7 at free.fr)
MFC after:	3 days
2021-06-07 15:55:23 +02:00
Rajesh Kumar M A 9f6cf1426f Source repo changes to add new committer Rajesh Kumar M A
Approved by: vmaffione, gallatin

Differential Revision: https://reviews.freebsd.org/D28586
2021-02-16 08:52:09 +00:00
Lewis Cook e808c8309c Complete Steps 5 and 9 from the Committer's guide
Summary:
Steps 5 and 9:
 - Update Mentor and Mentee Information
 - Update Ports with Personal Information

Reviewers: tcberner, fernape

Reviewed By: fernape

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D28281
2021-01-22 11:54:05 +00:00
Stefan Eßer a3c29cdbd4 Replace strcat, strcpy and snprintf with bounds checking versions 2020-12-31 12:37:37 +01:00
Stefan Eßer e163cae76e Make calendarhome buffer static
the value may be used in error messages after leaving this function.
2020-12-30 13:44:33 +01:00
Juraj Lutter 7bd0c4c47d Complete steps 5 and 9 from Committer's guide
Reviewed by:		osa (mentor)
Approved by:		osa (mentor)
Differential Revision:	https://reviews.freebsd.org/D27632
2020-12-16 16:59:52 +00:00
Stefan Eßer d87cb51f56 Fix WITHOUT_ICONV build
Move the include of langinfo.h out of the WITH_ICONV condition block,
since it is not dependent on ICONV. This was correct when nl_langinfo()
had only been called in the WITH_ICONV case, but that is no longer the
case.

Submitted by:	yuripv
2020-12-13 19:06:59 +00:00
Stefan Eßer 8a428dfecb Revert r368606
The issue will be fixed in a different way.

Reported by:	yuripv
2020-12-13 19:03:38 +00:00
Stefan Eßer c6e0073a42 Fix WITHOUT_ICONV build
There was an unprotected use of nl_langinfo() to determine the order of
day vs. month in the generated output.

When building without ICONV support, the order will be: month, day.
2020-12-13 09:38:50 +00:00
Stefan Eßer 6f139d796f Use getlocalbase() instead of compiled in LOCALBASE to locate calendars 2020-12-12 11:51:29 +00:00
Stefan Eßer 580a173a05 Install 2 forgotten shell scripts required to run the tests
Submitted by:		arichardson (Alexander Richardson)
Differential Revision:	https://reviews.freebsd.org/D27568
2020-12-11 13:23:59 +00:00
Stefan Eßer 0357fa2632 Restrict locale settings to the file they occur in
This prevents LANG= in an included file from affecting the interpretation
of month and day names in the including file.

Make the internal pre-processor accept white space between the "#" at
the start of the line and the keyword for better compatibility with cpp.

Add support for the cpp keywords #warning and #error.

MFC after:	3 days
2020-11-05 08:58:21 +00:00
Stefan Eßer 2ceb17a8be Add regression tests for conditions and comments
Fix one case where #else was not corerctly processed and simplify the
conditions logic.

Fix parsing of day and month names in the locale specified in the calendar
file. The previous version would expect those names to match the locale of
the user.

Mention that comments are now correctly processed and that // is supported
in addition to /* ... */.

MFC after:	3 days
2020-11-04 22:29:01 +00:00
Stefan Eßer 321b3540eb Update man-page to document changes made to the calendar program.
MFC after:	3 days
2020-11-03 22:13:16 +00:00
Stefan Eßer f1560bd080 Consistently print calendar dates in the locale of the user
Calendar files that specify LANG=... to specify their character encoding did
also set the date format defined for that locale, resulting in output like:

Nov  4 	Gabriel Faure dies from pneumonia in Paris, France, 1924
 4 nov. 	N'oubliez pas les Charles !

After this commit the output is always printed in a consistent format
according to the user's current locale, e.g.:

Nov  4 	Gabriel Faure dies from pneumonia in Paris, France, 1924
Nov  4 	N'oubliez pas les Charles !

I'll open a review asking for opinions whether this format change should
be merged to -STABLE.

Relnotes:	yes
2020-11-03 12:15:08 +00:00
Stefan Eßer cc9fbfafbe Check that #ifdef, #ifndef, and #undef are used with a single name
This restores the parameter validation that has been peformed by cpp
for defining and testing of names used in conditions.

MFC after:	3 days
2020-11-03 11:37:19 +00:00
Stefan Eßer ab34af0746 Fix psoition reporting for calendar data file in system directory
MFC after:	3 days
2020-11-01 20:38:35 +00:00
Stefan Eßer 8e8c5da47f Improve calendar file parsing and consistency tests
Add line number information to more warning and error messages.
Detect #else and #endif without corresponing #ifdef/#ifndef as error.
Detect missing #endif at end of file and print warning but continue.

Support for #undef has been added to reverse the effect of a prior #define.
It is no error if the argument value has not been defined before.

These changes may cause error aborts on malformed input files (e.g. with
spurious #else or #endif), but no such errors exist in the calendar files
in the FreeBSD base system and the calendar-data port and all tests pass.

More tests will be added in a follow-up commit to detect regressions that
might affect the newly added features.

This commit ends a series of updates that enhance the pre-processor and
make it behave much more like prior versions of the calendar progarm that
called cpp to pre-process the data files.

MFC after:	3 days
Relnotes:	yes
2020-10-31 15:11:24 +00:00
Stefan Eßer 6688708624 Add file names and line numbers to debug messages
MFC after:	3 days
2020-10-31 13:55:10 +00:00