Hi,

as we don't even have the "get" command in base, there is no need to
support SCCS files anymore.  I also remember that we removed the
SCCS IDs from source files so...

Time to tedu sccs?


Tobias

Index: common.h
===================================================================
RCS file: /cvs/src/usr.bin/patch/common.h,v
retrieving revision 1.26
diff -u -p -r1.26 common.h
--- common.h    11 Mar 2006 19:41:30 -0000      1.26
+++ common.h    19 Nov 2014 18:23:01 -0000
@@ -39,10 +39,6 @@
 #define MAXLINELEN 8192
 #define BUFFERSIZE 1024
 
-#define SCCSPREFIX "s."
-#define GET "get -e %s"
-#define SCCSDIFF "get -p %s | diff - %s >/dev/null"
-
 #define RCSSUFFIX ",v"
 #define CHECKOUT "co -l %s"
 #define RCSDIFF "rcsdiff %s > /dev/null"
Index: inp.c
===================================================================
RCS file: /cvs/src/usr.bin/patch/inp.c,v
retrieving revision 1.39
diff -u -p -r1.39 inp.c
--- inp.c       15 Nov 2014 16:35:47 -0000      1.39
+++ inp.c       19 Nov 2014 18:23:01 -0000
@@ -163,7 +163,7 @@ plan_a(const char *filename)
        }
        if (statfailed && check_only)
                fatal("%s not found, -C mode, can't probe further\n", filename);
-       /* For nonexistent or read-only files, look for RCS or SCCS versions.  
*/
+       /* For nonexistent or read-only files, look for RCS versions.  */
        if (statfailed ||
            /* No one can write to it.  */
            (filestat.st_mode & 0222) == 0 ||
@@ -187,11 +187,6 @@ plan_a(const char *filename)
                        snprintf(buf, sizeof buf, CHECKOUT, filename);
                        snprintf(lbuf, sizeof lbuf, RCSDIFF, filename);
                        cs = "RCS";
-               } else if (try("%s/SCCS/%s%s", filedir, SCCSPREFIX, filebase) ||
-                   try("%s/%s%s", filedir, SCCSPREFIX, filebase)) {
-                       snprintf(buf, sizeof buf, GET, s);
-                       snprintf(lbuf, sizeof lbuf, SCCSDIFF, s, filename);
-                       cs = "SCCS";
                } else if (statfailed)
                        fatal("can't find %s\n", filename);
                /*
Index: patch.1
===================================================================
RCS file: /cvs/src/usr.bin/patch/patch.1,v
retrieving revision 1.27
diff -u -p -r1.27 patch.1
--- patch.1     15 Apr 2014 06:26:54 -0000      1.27
+++ patch.1     19 Nov 2014 18:23:01 -0000
@@ -481,8 +481,8 @@ the shortest basename, and the shortest 
 .It
 If no file exists,
 .Nm
-checks for the existence of the files in an SCCS or RCS directory
-(using the appropriate prefix or suffix) using the criteria specified
+checks for the existence of the files in an RCS directory
+(using the appropriate suffix) using the criteria specified
 above.
 If found,
 .Nm
Index: pch.c
===================================================================
RCS file: /cvs/src/usr.bin/patch/pch.c,v
retrieving revision 1.43
diff -u -p -r1.43 pch.c
--- pch.c       18 Nov 2014 17:03:35 -0000      1.43
+++ pch.c       19 Nov 2014 18:23:02 -0000
@@ -1451,7 +1451,7 @@ posix_name(const struct file_name *names
        if (path == NULL && !assume_exists) {
                /*
                 * No files found, look for something we can checkout from
-                * RCS/SCCS dirs.  Same order as above.
+                * RCS dirs.  Same order as above.
                 */
                for (i = 0; i < MAX_FILE; i++) {
                        if (names[i].path != NULL &&
Index: util.c
===================================================================
RCS file: /cvs/src/usr.bin/patch/util.c,v
retrieving revision 1.36
diff -u -p -r1.36 util.c
--- util.c      26 Nov 2013 13:19:07 -0000      1.36
+++ util.c      19 Nov 2014 18:23:02 -0000
@@ -374,7 +374,7 @@ fetchname(const char *at, bool *exists, 
 }
 
 /*
- * Takes the name returned by fetchname and looks in RCS/SCCS directories
+ * Takes the name returned by fetchname and looks in RCS directory
  * for a checked in version.
  */
 char *
@@ -391,9 +391,7 @@ checked_in(char *file)
 
        if (try("%s/RCS/%s%s", filedir, filebase, RCSSUFFIX) ||
            try("%s/RCS/%s%s", filedir, filebase, "") ||
-           try("%s/%s%s", filedir, filebase, RCSSUFFIX) ||
-           try("%s/SCCS/%s%s", filedir, SCCSPREFIX, filebase) ||
-           try("%s/%s%s", filedir, SCCSPREFIX, filebase))
+           try("%s/%s%s", filedir, filebase, RCSSUFFIX))
                return file;
 
        return NULL;

Reply via email to