From 638177948ccc265dbb37b1ffa2f71f2dcc3a8c2f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 2 May 1995 05:34:59 +0000 Subject: [PATCH] broke out insults into separate include files --- insults.h | 53 ++++++++++++++--------------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/insults.h b/insults.h index 0846bb83c..1a7283059 100644 --- a/insults.h +++ b/insults.h @@ -20,53 +20,28 @@ * $Id$ */ -#ifdef USE_INSULTS - #ifndef _SUDO_INSULTS_H #define _SUDO_INSULTS_H +#ifdef USE_INSULTS + /* - * To add insult to injury, just add to the following strings and - * adjust NOFINSULTS accordingly. This code taken from the original - * sudo(8). HAL insults from 2001. + * Choose a set of insults, the default is to use the insults from + * "sudo classic" (in the original edition of the Sys Admin book). */ - -#ifdef HAL -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.", - "My mind is going. I can feel it.", - "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 */ - -#else /* HAL */ -char *insults[] = { - "Wrong! You cheating scum!", - "No soap, honkie-lips.", - "Where did you learn to type?", - "Are you on drugs?", - "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 */ - -#endif /* HAL */ +#if defined(HAL) +#include "ins_2001.h" +#elif defined(GOONS) +#include "ins_goons.h" +#else +#include "ins_classic.h" +#endif /* - * return a random insult. + * return a pseudo-random insult. */ - #define INSULT (insults[time(NULL) % NOFINSULTS]) -#endif /* _SUDO_INSULTS_H */ - #endif /* USE_INSULTS */ + +#endif /* _SUDO_INSULTS_H */ -- 2.40.0