made all major configuration possible from -D flags
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 15 Oct 1980 18:53:54 +0000 (10:53 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 15 Oct 1980 18:53:54 +0000 (10:53 -0800)
SCCS-vsn: usr.bin/sccs/sccs.c 1.38

usr/src/usr.bin/sccs/sccs.c

index 214be25..f3bac1c 100644 (file)
 **                     aspects of this program cannot be abused.
 **                     This flag also disables the -p flag.
 **             SCCSPATH -- the default for the -p flag.
 **                     aspects of this program cannot be abused.
 **                     This flag also disables the -p flag.
 **             SCCSPATH -- the default for the -p flag.
+**             MYNAME -- the title this program should print when it
+**                     gives error messages.
 **
 **     Compilation Instructions:
 **             cc -O -n -s sccs.c
 **
 **     Compilation Instructions:
 **             cc -O -n -s sccs.c
+**             The flags listed above can be -D defined to simplify
+**                     recompilation for variant versions.
 **
 **     Author:
 **             Eric Allman, UCB/INGRES
 **             Copyright 1980 Regents of the University of California
 */
 
 **
 **     Author:
 **             Eric Allman, UCB/INGRES
 **             Copyright 1980 Regents of the University of California
 */
 
-static char SccsId[] = "@(#)sccs.c     1.37 %G%";
+static char SccsId[] = "@(#)sccs.c     1.38 %G%";
 \f
 /*******************  Configuration Information  ********************/
 
 \f
 /*******************  Configuration Information  ********************/
 
+/* special defines for local berkeley systems */
+# include <whoami.h>
+
 # ifdef CSVAX
 # define UIDUSER
 # define PROGPATH(name)        "/usr/local/name"
 # endif CSVAX
 
 # ifdef CSVAX
 # define UIDUSER
 # define PROGPATH(name)        "/usr/local/name"
 # endif CSVAX
 
+/* end of berkeley systems defines */
+
+# ifndef SCCSPATH
 # define SCCSPATH      "SCCS"  /* pathname in which to find s-files */
 # define SCCSPATH      "SCCS"  /* pathname in which to find s-files */
-/* put #define SCCSDIR here */
+# endif NOT SCCSPATH
 
 
-char   MyName[] = "sccs";      /* name used in messages */
+# ifndef MYNAME
+# define MYNAME                "sccs"  /* name used for printing errors */
+# endif NOT MYNAME
 
 # ifndef PROGPATH
 # define PROGPATH(name)        "/usr/sccs/name"        /* place to find binaries */
 
 # ifndef PROGPATH
 # define PROGPATH(name)        "/usr/sccs/name"        /* place to find binaries */
@@ -194,6 +206,7 @@ char        *SccsDir = SCCSDIR;     /* directory to begin search from */
 # else
 char   *SccsDir = "";
 # endif
 # else
 char   *SccsDir = "";
 # endif
+char   MyName[] = MYNAME;      /* name used in messages */
 int    OutFile = -1;           /* override output file for commands */
 bool   RealUser;               /* if set, running as real user */
 # ifdef DEBUG
 int    OutFile = -1;           /* override output file for commands */
 bool   RealUser;               /* if set, running as real user */
 # ifdef DEBUG