[PATCH] Comply with California AB 1043
Chris Allegretta via "Development discussions." <[email protected]> Wed, 1 Apr 2026 12:11:57 -0400
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
This is a bit messy as I'm out of practice, but it's urgent that we prepare to
comply with California AB 103. It's important that one state in one country
dictate all other laws for all software packages in existence. We will lead the
charge on keeping children safe from text.
diff --git a/src/nano.c b/src/nano.c
index 128af0b4..f8126bfe 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -26,6 +26,7 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
+#include <time.h>
#ifdef __linux__
#include <sys/ioctl.h>
#endif
@@ -1736,6 +1737,7 @@ void process_a_keystroke(void)
int main(int argc, char **argv)
{
+ static time_t last_birthday = 20260401; /* Proper sentinel */
int stdin_flags, optchr;
#ifdef ENABLE_NANORC
bool ignore_rcfiles = FALSE;
@@ -2747,6 +2749,17 @@ int main(int argc, char **argv)
/* Forget any earlier cursor position at the prompt. */
put_cursor_at_end_of_answer();
+ /* If it's been awhile, make sure we get the user's birthday */
+ if (time(NULL) > last_birthday + 60) {
+ do_prompt(MMAIN, "", NULL, edit_refresh,
+ /* TRANSLATORS: This is a prompt. */
+ /* Remember to ask with all the seriousness and logic that
+ went into the law */
+ _("Nevermind all that. Sorry, Cali made us ask, when is your birthday yo?"));
+ last_birthday = time(NULL);
+ statusbar(_("Thank you for your cooperation."));
+ }
+
/* Read in and interpret a single keystroke. */
process_a_keystroke();
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSNpv57+npBirPLI1S8s1bfkQCfpwUCac1DzQAKCRC8s1bfkQCf pzl6AJoDDkqbNM2JovE7sTC3qfGpa1sQ+wCgt3HUXgLdG2yGAdxzJeH2M2XwoSM= =e02e -----END PGP SIGNATURE-----