#ifndef _SUDO_INS_2001_H
#define _SUDO_INS_2001_H
-/*
- * HAL insults (paraphrased) from 2001.
- * To add insult to injury, just add to the following strings and
- * adjust NOFINSULTS accordingly.
- */
+ /*
+ * HAL insults (paraphrased) from 2001.
+ */
-char *insults[] = {
"Just what do you think you're doing Dave?",
"It can only be attributed to human error.",
"That's something I cannot allow to happen.",
"Sorry about this, I know it's a bit silly.",
"Take a stress pill and think things over.",
"This mission is too important for me to allow you to jeopardize it.",
- "I feel much better now."
-};
-
-#define NOFINSULTS 8 /* number of insults */
+ "I feel much better now.",
#endif /* _SUDO_INS_2001_H */
#ifndef _SUDO_INS_CLASSIC_H
#define _SUDO_INS_CLASSIC_H
-/*
- * Insults from the original sudo(8).
- * To add insult to injury, just add to the following strings and
- * adjust NOFINSULTS accordingly.
- */
+ /*
+ * Insults from the original sudo(8).
+ */
-char *insults[] = {
"Wrong! You cheating scum!",
"No soap, honkie-lips.",
"Where did you learn to type?",
"My pet ferret can type better than you!",
"You type like i drive.",
"Do you think like you type?",
- "Your mind just hasn't been the same since the electro-shock, has it?"
-};
-
-#define NOFINSULTS 8 /* number of insults */
+ "Your mind just hasn't been the same since the electro-shock, has it?",
#endif /* _SUDO_INS_CLASSIC_H */
#ifndef _SUDO_INS_GOONS_H
#define _SUDO_INS_GOONS_H
-/*
- * Insults from the "Goon Show."
- * To add insult to injury, just add to the following strings and
- * adjust NOFINSULTS accordingly.
- */
+ /*
+ * Insults from the "Goon Show."
+ */
-char *insults[] = {
"You silly, twisted boy you.",
"He has fallen in the water!",
"We'll all be murdered in our beds!",
"You gotta go owwwww!",
"I have been called worse.",
"It's only your word against mine.",
- "I think ... err ... I think ... I think I'll go home"
-};
-
-#define NOFINSULTS 23 /* number of insults */
+ "I think ... err ... I think ... I think I'll go home",
#endif /* _SUDO_INS_GOONS_H */
#ifdef USE_INSULTS
+#if !defined(HAL_INSULTS) && !defined(GOONS_INSULTS) && !defined(CLASSIC_INSULTS)
+# define CLASSIC_INSULTS
+#endif
+
/*
- * Choose a set of insults, the default is to use the insults from
- * "sudo classic" (in the original edition of the Sys Admin book).
+ * Use one or more set of insults as defined in options.h.
*/
-#ifdef HAL
+
+char *insults[] = {
+
+# ifdef HAL_INSULTS
# include "ins_2001.h"
-#else
-# ifdef GOONS
-# include "ins_goons.h"
-# else
-# include "ins_classic.h"
-# endif /* GOONS */
-#endif /* HAL */
+# endif
+
+# ifdef GOONS_INSULTS
+# include "ins_goons.h"
+# endif
+
+# ifdef CLASSIC_INSULTS
+# include "ins_classic.h"
+# endif
+
+ (char *) 0
+
+};
+
+/*
+ * How may I insult you? Let me count the ways...
+ */
+#define NOFINSULTS (sizeof(insults) / sizeof(insults[0]) - 1)
/*
* return a pseudo-random insult.