projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restrict usernames to the same character set as tags
[blerg.git]
/
cgi
/
rss.c
diff --git
a/cgi/rss.c
b/cgi/rss.c
index
1506b81
..
c35e33b
100644
(file)
--- a/
cgi/rss.c
+++ b/
cgi/rss.c
@@
-1,3
+1,6
@@
+/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a
+ * BSD-style license. Please see the COPYING file for details.
+ */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@@
-6,6
+9,7
@@
#include "escapery.h"
#include "canned_responses.h"
#include "app.h"
#include "escapery.h"
#include "canned_responses.h"
#include "app.h"
+#include "config.h"
int fprint_rss(FILE *f, const char *username) {
struct blerg *b = blerg_open(username);
int fprint_rss(FILE *f, const char *username) {
struct blerg *b = blerg_open(username);
@@
-25,7
+29,7
@@
int fprint_rss(FILE *f, const char *username) {
"<link>%s#%s</link>\n"
"<description>%s</description>\n",
username,
"<link>%s#%s</link>\n"
"<description>%s</description>\n",
username,
-
"http://blerg.dominionfawesome.com/"
,
+
BASEURL
,
username,
"Textual vomit"
);
username,
"Textual vomit"
);
@@
-38,9
+42,11
@@
int fprint_rss(FILE *f, const char *username) {
fprintf(f,
"<item>\n"
"<pubDate>%s</pubDate>\n"
fprintf(f,
"<item>\n"
"<pubDate>%s</pubDate>\n"
+ "<guid>%sget/%s/%llu</guid>\n"
"<description>%s</description>\n"
"</item>\n",
date,
"<description>%s</description>\n"
"</item>\n",
date,
+ BASEURL, username, i,
tmp
);
free(tmp);
tmp
);
free(tmp);
@@
-96,6
+102,6
@@
int main (int argc, char *argv) {
printf("Content-type: application/rss+xml\r\n\r\n");
printf("Content-type: application/rss+xml\r\n\r\n");
- fprint_rss(stdout,
"chip"
);
+ fprint_rss(stdout,
info.author
);
}
}