OSSP CVS Repository

ossp - Check-in [955]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 955
Date: 2001-Sep-12 15:04:39 (local)
2001-Sep-12 13:04:39 (UTC)
User:thl
Branch:
Comment: relocating -l code according to sortspec; added missing break in -s option switch
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp.c      1.55 -> 1.56     19 inserted, 18 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp.c 1.55 -> 1.56

--- lmtp2nntp.c  2001/09/12 09:58:22     1.55
+++ lmtp2nntp.c  2001/09/12 13:04:39     1.56
@@ -489,6 +489,25 @@
                 }
                 free(azHosts);
                 break;
+            case 'l': /*POD [B<-l> I<level>[:I<logfile>]] */
+                if ((cp = strrchr(optarg, ':')) != NULL) {
+                    *cp++ = NUL;
+                    if (*cp == NUL) {
+                        fprintf(stderr, "%s:Error: empty logfile to option -l\n", ctx->progname);
+                        exit(ERR_EXECUTION);
+                    }
+                    else
+                        ctx->option_logfile = strdup(cp);
+                }
+                else
+                    ctx->option_logfile = strdup("logfile");
+
+                if (l2_util_s2l(optarg, strlen(optarg), ',', &ctx->option_levelmask) != L2_OK) {
+                    fprintf(stderr, "%s:Error: invalid level \"%s\" to option -l\n", ctx->progname, optarg);
+                    exit(ERR_EXECUTION);
+                }
+                ctx->option_levelmask = L2_LEVEL_UPTO(ctx->option_levelmask);
+                break;
             case 'm': /*POD [B<-m> I<mailfrom>] */
                 ctx->option_mailfrom = strdup(optarg);
                 /* protect ourselfs from the substitution of backreferences.
@@ -518,24 +537,6 @@
                         fprintf(stderr, "%s:Error: maximum message size is unacceptable small.\n", ctx->progname);
                         exit(ERR_EXECUTION);
                     }
-            case 'l': /*POD [B<-l> I<level>[:I<logfile>]] */
-                if ((cp = strrchr(optarg, ':')) != NULL) {
-                    *cp++ = NUL;
-                    if (*cp == NUL) {
-                        fprintf(stderr, "%s:Error: empty logfile to option -l\n", ctx->progname);
-                        exit(ERR_EXECUTION);
-                    }
-                    else
-                        ctx->option_logfile = strdup(cp);
-                }
-                else
-                    ctx->option_logfile = strdup("logfile");
-
-                if (l2_util_s2l(optarg, strlen(optarg), ',', &ctx->option_levelmask) != L2_OK) {
-                    fprintf(stderr, "%s:Error: invalid level \"%s\" to option -l\n", ctx->progname, optarg);
-                    exit(ERR_EXECUTION);
-                }
-                ctx->option_levelmask = L2_LEVEL_UPTO(ctx->option_levelmask);
                 break;
             case 'v': /*POD [B<-v>] (version)*/
                 fprintf(stdout, "%s\n", lmtp2nntp_version.v_gnu);

CVSTrac 2.0.1