Removed the undocumented -unique switches. Seems they were JLR-only stuff.
authormarkus schnalke <meillo@marmaro.de>
Sat, 28 Jan 2012 12:04:59 +0000 (13:04 +0100)
committermarkus schnalke <meillo@marmaro.de>
Sat, 28 Jan 2012 12:04:59 +0000 (13:04 +0100)
uip/send.c
uip/sendsbr.c
uip/whatnowsbr.c

index c19cf4f..e6d61dc 100644 (file)
@@ -33,21 +33,17 @@ static struct swit switches[] = {
        { "push", 0 },
 #define NPUSHSW  9
        { "nopush", 0 },
-#define UNIQSW  10
-       { "unique", -6 },
-#define NUNIQSW  11
-       { "nounique", -8 },
-#define VERBSW  12
+#define VERBSW  10
        { "verbose", 0 },
-#define NVERBSW  13
+#define NVERBSW  11
        { "noverbose", 0 },
-#define WATCSW  14
+#define WATCSW  12
        { "watch", 0 },
-#define NWATCSW  15
+#define NWATCSW  13
        { "nowatch", 0 },
-#define VERSIONSW  16
+#define VERSIONSW  14
        { "version", 0 },
-#define HELPSW  17
+#define HELPSW  15
        { "help", 0 },
        { NULL, 0 }
 };
@@ -56,7 +52,6 @@ extern int debugsw;  /* from sendsbr.c */
 extern int forwsw;
 extern int inplace;
 extern int pushsw;
-extern int unique;
 extern int verbsw;
 
 extern char *altmsg;  /*  .. */
@@ -115,13 +110,6 @@ main(int argc, char **argv)
                                pushsw = 0;
                                continue;
 
-                       case UNIQSW:
-                               unique++;
-                               continue;
-                       case NUNIQSW:
-                               unique = 0;
-                               continue;
-
                        case FORWSW:
                                forwsw++;
                                continue;
index 9c335bd..b2a298c 100644 (file)
@@ -30,7 +30,6 @@ int debugsw = 0;  /* global */
 int forwsw  = 1;
 int inplace = 1;
 int pushsw  = 0;
-int unique  = 0;
 int verbsw  = 0;
 
 char *altmsg   = NULL;  /*  .. */
@@ -79,7 +78,7 @@ int
 sendsbr(char **vec, int vecp, char *drft, struct stat *st, int rename_drft)
 {
        int status;
-       char buffer[BUFSIZ], file[BUFSIZ];
+       char buffer[BUFSIZ];
        char *original_draft;  /* name of original draft file */
        char *p;  /* string pointer for building file name */
 
@@ -115,23 +114,7 @@ sendsbr(char **vec, int vecp, char *drft, struct stat *st, int rename_drft)
        done=armed_done;
        switch (setjmp(env)) {
        case OK:
-               /*
-               ** If given -push and -unique (which is undocumented), then
-               ** rename the draft file.  I'm not quite sure why.
-               */
-               if (pushsw && unique) {
-                       char *cp = m_mktemp2(drft, invo_name, NULL, NULL);
-                       if (cp == NULL) {
-                               adios("sendsbr", "unable to create temporary file");
-                       }
-                       if (rename(drft, strncpy(file, cp, sizeof(file)))
-                                       == NOTOK)
-                               adios(file, "unable to rename %s to", drft);
-                       drft = file;
-               }
-
                status = sendaux(vec, vecp, drft, st) ? NOTOK : OK;
-
                /* rename the original draft */
                if (rename_drft && status == OK &&
                                rename(original_draft, strncpy(buffer,
index 79f7c6f..3ed0ea4 100644 (file)
@@ -846,23 +846,19 @@ static struct swit  sendswitches[] = {
        { "push", 0 },
 #define NSPSHSW  9
        { "nopush", 0 },
-#define UNIQSW  10
-       { "unique", -6 },
-#define NUNIQSW  11
-       { "nounique", -8 },
-#define VERBSW  12
+#define VERBSW  10
        { "verbose", 0 },
-#define NVERBSW  13
+#define NVERBSW  11
        { "noverbose", 0 },
-#define WATCSW  14
+#define WATCSW  12
        { "watch", 0 },
-#define NWATCSW  15
+#define NWATCSW  13
        { "nowatch", 0 },
-#define WIDTHSW  16
+#define WIDTHSW  14
        { "width columns", 0 },
-#define SVERSIONSW  17
+#define SVERSIONSW  15
        { "version", 0 },
-#define SHELPSW  18
+#define SHELPSW  16
        { "help", 0 },
        { NULL, 0 }
 };
@@ -872,7 +868,6 @@ extern int debugsw;  /* from sendsbr.c */
 extern int forwsw;
 extern int inplace;
 extern int pushsw;
-extern int unique;
 extern int verbsw;
 
 extern char *altmsg;  /*  .. */
@@ -928,7 +923,6 @@ sendit(char *sp, char **arg, char *file, int pushed)
        debugsw = 0;
        forwsw = 1;
        inplace = 1;
-       unique = 0;
 
        altmsg = NULL;
        annotext = NULL;
@@ -964,12 +958,6 @@ sendit(char *sp, char **arg, char *file, int pushed)
                                pushed = 0;
                                continue;
 
-                       case UNIQSW:
-                               unique++;
-                               continue;
-                       case NUNIQSW:
-                               unique = 0;
-                               continue;
                        case FORWSW:
                                forwsw++;
                                continue;