-char *pname; /* programme name for error messages */
-
-/* Accepts a string of two fields seperated by FS.
- First field is string for getdate, saying when to wake-up.
+char *pname; /* program name for error messages */
+
+/* This buffer is used for reading commands.
+ We make it longer when necessary, but we never free it. */
+char *buf;
+/* This is the allocated size of buf. */
+int buf_size;
+
+/* Non-zero means don't handle an alarm now;
+ instead, just set alarm_deferred if an alarm happens.
+ We set this around parts of the program that call malloc and free. */
+int defer_alarms;
+
+/* Non-zero if an alarm came in during the reading of a command. */
+int alarm_deferred;
+\f
+/* Schedule one event, and arrange an alarm for it.
+ STR is a string of two fields separated by FS.
+ First field is string for get_date, saying when to wake-up.