From 56509ab16c8d2225182eb0400e5c6a4900870391 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= ");
printf("%s", err );
-printf("");
printf("%s", title );
printf("
\n
"); + +printf("\n | |
"); printf("%s", p ); printf(" | \n"); printf("%s", v ); printf(" | \n
From: <%= user->full %>
-<id); %>"><%= user->name %>>
-
Date: <% PFREE(date(post->created)); %>
+
From: <%= user->full? user->full: "" %> <%
+if(user->full) printf("<");
+%>id); %>"><%= user->name %><%
+if(user->full) printf(">"); %>
+
Date: <% printdate(post->created); %>
+<% if(post->edited){
+ printf("
Edited: ");
+ printdate(post->edited);
+} %>
<%= post->text %>\ No newline at end of file diff --git a/t/post.tc b/t/post.tc index 2f81de0..732f0a7 100644 --- a/t/post.tc +++ b/t/post.tc @@ -3,13 +3,23 @@ printf("%d", id); printf(": "); printf("%s", post->subject ); printf("\n
From: ");
-printf("%s", user->full );
-printf("\n<full? user->full: "" );
+printf(" ");
+if(user->full) printf("<");
+
+printf("id);
printf("\">");
printf("%s", user->name );
-printf(">\n
Date: ");
-PFREE(date(post->created));
+printf("");
+if(user->full) printf(">");
+printf("\n
Date: ");
+printdate(post->created);
+printf("\n");
+if(post->edited){
+ printf("
Edited: ");
+ printdate(post->edited);
+}
printf("\n
\n"); printf("%s", post->text ); printf("\n"); -- cgit v1.2.3