A small improvement, don't print the "Ausfuehrungsdatum" if none was
authorJoey Schulze <joey@infodrom.org>
Tue, 1 Jan 2002 18:52:06 +0000 (18:52 +0000)
committerJoey Schulze <joey@infodrom.org>
Tue, 1 Jan 2002 18:52:06 +0000 (18:52 +0000)
specified, hence the field is empty in the bank file.

dtaus.c

diff --git a/dtaus.c b/dtaus.c
index 78fcdaf..42ff0bd 100644 (file)
--- a/dtaus.c
+++ b/dtaus.c
@@ -778,10 +778,15 @@ void printctln(FILE *f, char *field, char *value)
 void printctlndate(FILE *f, char *field, char *value)
 {
   char mydate[11];
 void printctlndate(FILE *f, char *field, char *value)
 {
   char mydate[11];
+  int i;
 
   if (!strlen(field) || !strlen(value))
     return;
 
 
   if (!strlen(field) || !strlen(value))
     return;
 
+  for (i=0;isspace (value[i]) && i<= strlen (value); i++);
+  if (i == strlen (value))
+    return;
+
   memset (mydate, 0, sizeof (mydate));
   if (strlen (value) == 6) {
     mydate[0] = value[0];
   memset (mydate, 0, sizeof (mydate));
   if (strlen (value) == 6) {
     mydate[0] = value[0];