]> andersk Git - moira.git/commitdiff
don't put a \n on the end of dates; print %'s on sequences we don't know
authormar <mar>
Thu, 18 Jun 1992 14:20:41 +0000 (14:20 +0000)
committermar <mar>
Thu, 18 Jun 1992 14:20:41 +0000 (14:20 +0000)
gen/letter.dc

index 47be448508b2fb467e0a9dc0217a5ed92cf12cc3..4e6d14e80f9060e35b176bc02335ba3e0705d31c 100644 (file)
@@ -158,7 +158,7 @@ char *login, *fullname, *addr;
 int when;
 {
     register char *p;
-    char buf[256], *a1, *a2;
+    char buf[256], *a1, *a2, *d;
     char *rindex();
 
     /* split address into two lines.
@@ -188,6 +188,8 @@ int when;
        /* Must be interdepartmental */
        a2 = "MIT INTERDEPARTMENTAL MAIL";
     }
+    d = ctime(&when);
+    d[strlen(d)-1] = 0;
 
     for (p = letter_text; *p; p++) {
        if (*p == '%') {
@@ -216,10 +218,7 @@ int when;
                }
                break;
            case 'd':
-               fputs(ctime(&when), out);
-               break;
-           case '%':
-               putc('%', out);
+               fputs(d, out);
                break;
            default:
                putc('%', out);
This page took 0.480473 seconds and 5 git commands to generate.