Artifact 05e7ced61b1a86e60f2cdb9e236755902493b62f:
File
src/rss.c
part of check-in
[f3807dbd88]
- Removed unnecessary items from WWW Configuration, also made RSS Title and Description into generic Project Name and Project Description settings, which will be used elsewhere in the web site.
by
jnc on
2007-10-10 02:49:29.
Also file
src/rss.c
part of check-in
[d0305b305a]
- Merged mainline into my branch to get the newest application.
by
aku on
2007-12-05 08:07:46.
0000: 2f 2a 0a 2a 2a 20 43 6f 70 79 72 69 67 68 74 20 /*.** Copyright
0010: 28 63 29 20 32 30 30 37 20 44 2e 20 52 69 63 68 (c) 2007 D. Rich
0020: 61 72 64 20 48 69 70 70 0a 2a 2a 0a 2a 2a 20 54 ard Hipp.**.** T
0030: 68 69 73 20 70 72 6f 67 72 61 6d 20 69 73 20 66 his program is f
0040: 72 65 65 20 73 6f 66 74 77 61 72 65 3b 20 79 6f ree software; yo
0050: 75 20 63 61 6e 20 72 65 64 69 73 74 72 69 62 75 u can redistribu
0060: 74 65 20 69 74 20 61 6e 64 2f 6f 72 0a 2a 2a 20 te it and/or.**
0070: 6d 6f 64 69 66 79 20 69 74 20 75 6e 64 65 72 20 modify it under
0080: 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74 68 65 the terms of the
0090: 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 GNU General Pub
00a0: 6c 69 63 0a 2a 2a 20 4c 69 63 65 6e 73 65 20 76 lic.** License v
00b0: 65 72 73 69 6f 6e 20 32 20 61 73 20 70 75 62 6c ersion 2 as publ
00c0: 69 73 68 65 64 20 62 79 20 74 68 65 20 46 72 65 ished by the Fre
00d0: 65 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 e Software Found
00e0: 61 74 69 6f 6e 2e 0a 2a 2a 0a 2a 2a 20 54 68 69 ation..**.** Thi
00f0: 73 20 70 72 6f 67 72 61 6d 20 69 73 20 64 69 73 s program is dis
0100: 74 72 69 62 75 74 65 64 20 69 6e 20 74 68 65 20 tributed in the
0110: 68 6f 70 65 20 74 68 61 74 20 69 74 20 77 69 6c hope that it wil
0120: 6c 20 62 65 20 75 73 65 66 75 6c 2c 0a 2a 2a 20 l be useful,.**
0130: 62 75 74 20 57 49 54 48 4f 55 54 20 41 4e 59 20 but WITHOUT ANY
0140: 57 41 52 52 41 4e 54 59 3b 20 77 69 74 68 6f 75 WARRANTY; withou
0150: 74 20 65 76 65 6e 20 74 68 65 20 69 6d 70 6c 69 t even the impli
0160: 65 64 20 77 61 72 72 61 6e 74 79 20 6f 66 0a 2a ed warranty of.*
0170: 2a 20 4d 45 52 43 48 41 4e 54 41 42 49 4c 49 54 * MERCHANTABILIT
0180: 59 20 6f 72 20 46 49 54 4e 45 53 53 20 46 4f 52 Y or FITNESS FOR
0190: 20 41 20 50 41 52 54 49 43 55 4c 41 52 20 50 55 A PARTICULAR PU
01a0: 52 50 4f 53 45 2e 20 20 53 65 65 20 74 68 65 20 RPOSE. See the
01b0: 47 4e 55 0a 2a 2a 20 47 65 6e 65 72 61 6c 20 50 GNU.** General P
01c0: 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 66 6f ublic License fo
01d0: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a r more details..
01e0: 2a 2a 0a 2a 2a 20 59 6f 75 20 73 68 6f 75 6c 64 **.** You should
01f0: 20 68 61 76 65 20 72 65 63 65 69 76 65 64 20 61 have received a
0200: 20 63 6f 70 79 20 6f 66 20 74 68 65 20 47 4e 55 copy of the GNU
0210: 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 0a General Public.
0220: 2a 2a 20 4c 69 63 65 6e 73 65 20 61 6c 6f 6e 67 ** License along
0230: 20 77 69 74 68 20 74 68 69 73 20 6c 69 62 72 61 with this libra
0240: 72 79 3b 20 69 66 20 6e 6f 74 2c 20 77 72 69 74 ry; if not, writ
0250: 65 20 74 6f 20 74 68 65 0a 2a 2a 20 46 72 65 65 e to the.** Free
0260: 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61 Software Founda
0270: 74 69 6f 6e 2c 20 49 6e 63 2e 2c 20 35 39 20 54 tion, Inc., 59 T
0280: 65 6d 70 6c 65 20 50 6c 61 63 65 20 2d 20 53 75 emple Place - Su
0290: 69 74 65 20 33 33 30 2c 0a 2a 2a 20 42 6f 73 74 ite 330,.** Bost
02a0: 6f 6e 2c 20 4d 41 20 20 30 32 31 31 31 2d 31 33 on, MA 02111-13
02b0: 30 37 2c 20 55 53 41 2e 0a 2a 2a 0a 2a 2a 20 41 07, USA..**.** A
02c0: 75 74 68 6f 72 20 63 6f 6e 74 61 63 74 20 69 6e uthor contact in
02d0: 66 6f 72 6d 61 74 69 6f 6e 3a 0a 2a 2a 20 20 20 formation:.**
02e0: 64 72 68 40 68 77 61 63 69 2e 63 6f 6d 0a 2a 2a drh@hwaci.com.**
02f0: 20 20 20 68 74 74 70 3a 2f 2f 77 77 77 2e 68 77 http://www.hw
0300: 61 63 69 2e 63 6f 6d 2f 64 72 68 2f 0a 2a 2a 0a aci.com/drh/.**.
0310: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0320: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0330: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0340: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0350: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a ***************.
0360: 2a 2a 0a 2a 2a 20 54 68 69 73 20 66 69 6c 65 20 **.** This file
0370: 63 6f 6e 74 61 69 6e 73 20 63 6f 64 65 20 75 73 contains code us
0380: 65 64 20 74 6f 20 63 72 65 61 74 65 20 61 20 52 ed to create a R
0390: 53 53 20 66 65 65 64 20 66 6f 72 20 74 68 65 20 SS feed for the
03a0: 43 47 49 20 69 6e 74 65 72 66 61 63 65 2e 0a 2a CGI interface..*
03b0: 2f 0a 23 69 6e 63 6c 75 64 65 20 22 63 6f 6e 66 /.#include "conf
03c0: 69 67 2e 68 22 0a 23 69 6e 63 6c 75 64 65 20 22 ig.h".#include "
03d0: 72 73 73 2e 68 22 0a 23 69 6e 63 6c 75 64 65 20 rss.h".#include
03e0: 3c 61 73 73 65 72 74 2e 68 3e 0a 23 69 6e 63 6c <assert.h>.#incl
03f0: 75 64 65 20 3c 74 69 6d 65 2e 68 3e 0a 0a 74 69 ude <time.h>..ti
0400: 6d 65 5f 74 20 72 73 73 5f 64 61 74 65 74 69 6d me_t rss_datetim
0410: 65 5f 74 6f 5f 74 69 6d 65 5f 74 28 63 6f 6e 73 e_to_time_t(cons
0420: 74 20 63 68 61 72 20 2a 64 74 29 7b 0a 20 20 73 t char *dt){. s
0430: 74 72 75 63 74 20 74 6d 20 74 68 65 5f 74 6d 3b truct tm the_tm;
0440: 0a 0a 20 20 74 68 65 5f 74 6d 2e 74 6d 5f 79 65 .. the_tm.tm_ye
0450: 61 72 20 3d 20 61 74 6f 69 28 64 74 29 2d 31 39 ar = atoi(dt)-19
0460: 30 30 3b 0a 20 20 74 68 65 5f 74 6d 2e 74 6d 5f 00;. the_tm.tm_
0470: 6d 6f 6e 20 20 3d 20 61 74 6f 69 28 26 64 74 5b mon = atoi(&dt[
0480: 35 5d 29 2d 31 3b 0a 20 20 74 68 65 5f 74 6d 2e 5])-1;. the_tm.
0490: 74 6d 5f 6d 64 61 79 20 3d 20 61 74 6f 69 28 26 tm_mday = atoi(&
04a0: 64 74 5b 38 5d 29 3b 0a 20 20 74 68 65 5f 74 6d dt[8]);. the_tm
04b0: 2e 74 6d 5f 68 6f 75 72 20 3d 20 61 74 6f 69 28 .tm_hour = atoi(
04c0: 26 64 74 5b 31 31 5d 29 3b 0a 20 20 74 68 65 5f &dt[11]);. the_
04d0: 74 6d 2e 74 6d 5f 6d 69 6e 20 20 3d 20 61 74 6f tm.tm_min = ato
04e0: 69 28 26 64 74 5b 31 34 5d 29 3b 0a 20 20 74 68 i(&dt[14]);. th
04f0: 65 5f 74 6d 2e 74 6d 5f 73 65 63 20 20 3d 20 61 e_tm.tm_sec = a
0500: 74 6f 69 28 26 64 74 5b 31 37 5d 29 3b 0a 0a 20 toi(&dt[17]);..
0510: 20 72 65 74 75 72 6e 20 6d 6b 74 69 6d 65 28 26 return mktime(&
0520: 74 68 65 5f 74 6d 29 3b 0a 7d 0a 0a 2f 2a 0a 2a the_tm);.}../*.*
0530: 2a 20 57 45 42 50 41 47 45 3a 20 74 69 6d 65 6c * WEBPAGE: timel
0540: 69 6e 65 2e 72 73 73 0a 2a 2f 0a 0a 76 6f 69 64 ine.rss.*/..void
0550: 20 70 61 67 65 5f 74 69 6d 65 6c 69 6e 65 5f 72 page_timeline_r
0560: 73 73 28 76 6f 69 64 29 7b 0a 20 20 53 74 6d 74 ss(void){. Stmt
0570: 20 71 3b 0a 20 20 69 6e 74 20 6e 4c 69 6e 65 3d q;. int nLine=
0580: 30 3b 0a 20 20 63 68 61 72 20 2a 7a 50 75 62 44 0;. char *zPubD
0590: 61 74 65 2c 20 2a 7a 50 72 6f 6a 65 63 74 4e 61 ate, *zProjectNa
05a0: 6d 65 2c 20 2a 7a 50 72 6f 6a 65 63 74 44 65 73 me, *zProjectDes
05b0: 63 72 2c 20 2a 7a 46 72 65 65 50 72 6f 6a 65 63 cr, *zFreeProjec
05c0: 74 4e 61 6d 65 3d 30 3b 0a 20 20 63 6f 6e 73 74 tName=0;. const
05d0: 20 63 68 61 72 20 7a 53 51 4c 5b 5d 20 3d 0a 20 char zSQL[] =.
05e0: 20 20 20 40 20 53 45 4c 45 43 54 0a 20 20 20 20 @ SELECT.
05f0: 40 20 20 20 62 6c 6f 62 2e 72 69 64 2c 0a 20 20 @ blob.rid,.
0600: 20 20 40 20 20 20 75 75 69 64 2c 0a 20 20 20 20 @ uuid,.
0610: 40 20 20 20 64 61 74 65 74 69 6d 65 28 65 76 65 @ datetime(eve
0620: 6e 74 2e 6d 74 69 6d 65 29 2c 0a 20 20 20 20 40 nt.mtime),. @
0630: 20 20 20 63 6f 61 6c 65 73 63 65 28 65 63 6f 6d coalesce(ecom
0640: 6d 65 6e 74 2c 63 6f 6d 6d 65 6e 74 29 2c 0a 20 ment,comment),.
0650: 20 20 20 40 20 20 20 63 6f 61 6c 65 73 63 65 28 @ coalesce(
0660: 65 75 73 65 72 2c 75 73 65 72 29 2c 0a 20 20 20 euser,user),.
0670: 20 40 20 20 20 28 53 45 4c 45 43 54 20 63 6f 75 @ (SELECT cou
0680: 6e 74 28 2a 29 20 46 52 4f 4d 20 70 6c 69 6e 6b nt(*) FROM plink
0690: 20 57 48 45 52 45 20 70 69 64 3d 62 6c 6f 62 2e WHERE pid=blob.
06a0: 72 69 64 20 41 4e 44 20 69 73 70 72 69 6d 29 2c rid AND isprim),
06b0: 0a 20 20 20 20 40 20 20 20 28 53 45 4c 45 43 54 . @ (SELECT
06c0: 20 63 6f 75 6e 74 28 2a 29 20 46 52 4f 4d 20 70 count(*) FROM p
06d0: 6c 69 6e 6b 20 57 48 45 52 45 20 63 69 64 3d 62 link WHERE cid=b
06e0: 6c 6f 62 2e 72 69 64 29 0a 20 20 20 20 40 20 46 lob.rid). @ F
06f0: 52 4f 4d 20 65 76 65 6e 74 2c 20 62 6c 6f 62 0a ROM event, blob.
0700: 20 20 20 20 40 20 57 48 45 52 45 20 62 6c 6f 62 @ WHERE blob
0710: 2e 72 69 64 3d 65 76 65 6e 74 2e 6f 62 6a 69 64 .rid=event.objid
0720: 0a 20 20 20 20 40 20 4f 52 44 45 52 20 42 59 20 . @ ORDER BY
0730: 65 76 65 6e 74 2e 6d 74 69 6d 65 20 44 45 53 43 event.mtime DESC
0740: 0a 20 20 3b 0a 0a 20 20 63 67 69 5f 73 65 74 5f . ;.. cgi_set_
0750: 63 6f 6e 74 65 6e 74 5f 74 79 70 65 28 22 61 70 content_type("ap
0760: 70 6c 69 63 61 74 69 6f 6e 2f 72 73 73 2b 78 6d plication/rss+xm
0770: 6c 22 29 3b 0a 0a 20 20 7a 50 72 6f 6a 65 63 74 l");.. zProject
0780: 4e 61 6d 65 20 3d 20 64 62 5f 67 65 74 28 22 70 Name = db_get("p
0790: 72 6f 6a 65 63 74 2d 6e 61 6d 65 22 2c 20 30 29 roject-name", 0)
07a0: 3b 0a 20 20 69 66 28 20 7a 50 72 6f 6a 65 63 74 ;. if( zProject
07b0: 4e 61 6d 65 3d 3d 30 20 29 7b 0a 20 20 20 20 7a Name==0 ){. z
07c0: 46 72 65 65 50 72 6f 6a 65 63 74 4e 61 6d 65 20 FreeProjectName
07d0: 3d 20 7a 50 72 6f 6a 65 63 74 4e 61 6d 65 20 3d = zProjectName =
07e0: 20 6d 70 72 69 6e 74 66 28 22 46 6f 73 73 69 6c mprintf("Fossil
07f0: 20 73 6f 75 72 63 65 20 72 65 70 6f 73 69 74 6f source reposito
0800: 72 79 20 66 6f 72 3a 20 25 73 22 2c 0a 20 20 20 ry for: %s",.
0810: 20 20 20 67 2e 7a 42 61 73 65 55 52 4c 29 3b 0a g.zBaseURL);.
0820: 20 20 7d 0a 20 20 7a 50 72 6f 6a 65 63 74 44 65 }. zProjectDe
0830: 73 63 72 20 3d 20 64 62 5f 67 65 74 28 22 70 72 scr = db_get("pr
0840: 6f 6a 65 63 74 2d 64 65 73 63 72 69 70 74 69 6f oject-descriptio
0850: 6e 22 2c 20 30 29 3b 0a 20 20 69 66 28 20 7a 50 n", 0);. if( zP
0860: 72 6f 6a 65 63 74 44 65 73 63 72 3d 3d 30 20 29 rojectDescr==0 )
0870: 7b 0a 20 20 20 20 7a 50 72 6f 6a 65 63 74 44 65 {. zProjectDe
0880: 73 63 72 20 3d 20 7a 50 72 6f 6a 65 63 74 4e 61 scr = zProjectNa
0890: 6d 65 3b 0a 20 20 7d 0a 0a 20 20 7a 50 75 62 44 me;. }.. zPubD
08a0: 61 74 65 20 3d 20 63 67 69 5f 72 66 63 38 32 32 ate = cgi_rfc822
08b0: 5f 64 61 74 65 73 74 61 6d 70 28 74 69 6d 65 28 _datestamp(time(
08c0: 4e 55 4c 4c 29 29 3b 0a 0a 20 20 40 20 3c 3f 78 NULL));.. @ <?x
08d0: 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 ml version="1.0"
08e0: 3f 3e 0a 20 20 40 20 3c 72 73 73 20 76 65 72 73 ?>. @ <rss vers
08f0: 69 6f 6e 3d 22 32 2e 30 22 3e 0a 20 20 40 20 20 ion="2.0">. @
0900: 20 3c 63 68 61 6e 6e 65 6c 3e 0a 20 20 40 20 20 <channel>. @
0910: 20 20 20 3c 74 69 74 6c 65 3e 25 73 28 7a 50 72 <title>%s(zPr
0920: 6f 6a 65 63 74 4e 61 6d 65 29 3c 2f 74 69 74 6c ojectName)</titl
0930: 65 3e 0a 20 20 40 20 20 20 20 20 3c 6c 69 6e 6b e>. @ <link
0940: 3e 25 73 28 67 2e 7a 42 61 73 65 55 52 4c 29 3c >%s(g.zBaseURL)<
0950: 2f 6c 69 6e 6b 3e 0a 20 20 40 20 20 20 20 20 3c /link>. @ <
0960: 64 65 73 63 72 69 70 74 69 6f 6e 3e 25 73 28 7a description>%s(z
0970: 50 72 6f 6a 65 63 74 44 65 73 63 72 29 3c 2f 64 ProjectDescr)</d
0980: 65 73 63 72 69 70 74 69 6f 6e 3e 0a 20 20 40 20 escription>. @
0990: 20 20 20 20 3c 70 75 62 44 61 74 65 3e 25 73 28 <pubDate>%s(
09a0: 7a 50 75 62 44 61 74 65 29 3c 2f 70 75 62 44 61 zPubDate)</pubDa
09b0: 74 65 3e 0a 20 20 40 20 20 20 20 20 3c 67 65 6e te>. @ <gen
09c0: 65 72 61 74 6f 72 3e 46 6f 73 73 69 6c 20 76 65 erator>Fossil ve
09d0: 72 73 69 6f 6e 20 25 73 28 4d 41 4e 49 46 45 53 rsion %s(MANIFES
09e0: 54 5f 56 45 52 53 49 4f 4e 29 20 25 73 28 4d 41 T_VERSION) %s(MA
09f0: 4e 49 46 45 53 54 5f 44 41 54 45 29 3c 2f 67 65 NIFEST_DATE)</ge
0a00: 6e 65 72 61 74 6f 72 3e 0a 20 20 64 62 5f 70 72 nerator>. db_pr
0a10: 65 70 61 72 65 28 26 71 2c 20 7a 53 51 4c 29 3b epare(&q, zSQL);
0a20: 0a 20 20 77 68 69 6c 65 28 20 64 62 5f 73 74 65 . while( db_ste
0a30: 70 28 26 71 29 3d 3d 53 51 4c 49 54 45 5f 52 4f p(&q)==SQLITE_RO
0a40: 57 20 26 26 20 6e 4c 69 6e 65 3c 3d 32 30 20 29 W && nLine<=20 )
0a50: 7b 0a 20 20 20 20 63 6f 6e 73 74 20 63 68 61 72 {. const char
0a60: 20 2a 7a 49 64 20 3d 20 64 62 5f 63 6f 6c 75 6d *zId = db_colum
0a70: 6e 5f 74 65 78 74 28 26 71 2c 20 31 29 3b 0a 20 n_text(&q, 1);.
0a80: 20 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a const char *z
0a90: 44 61 74 65 20 3d 20 64 62 5f 63 6f 6c 75 6d 6e Date = db_column
0aa0: 5f 74 65 78 74 28 26 71 2c 20 32 29 3b 0a 20 20 _text(&q, 2);.
0ab0: 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 43 const char *zC
0ac0: 6f 6d 20 3d 20 64 62 5f 63 6f 6c 75 6d 6e 5f 74 om = db_column_t
0ad0: 65 78 74 28 26 71 2c 20 33 29 3b 0a 20 20 20 20 ext(&q, 3);.
0ae0: 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 41 75 74 const char *zAut
0af0: 68 6f 72 20 3d 20 64 62 5f 63 6f 6c 75 6d 6e 5f hor = db_column_
0b00: 74 65 78 74 28 26 71 2c 20 34 29 3b 0a 20 20 20 text(&q, 4);.
0b10: 20 63 68 61 72 20 2a 7a 50 72 65 66 69 78 20 3d char *zPrefix =
0b20: 20 22 22 3b 0a 20 20 20 20 69 6e 74 20 6e 43 68 "";. int nCh
0b30: 69 6c 64 20 3d 20 64 62 5f 63 6f 6c 75 6d 6e 5f ild = db_column_
0b40: 69 6e 74 28 26 71 2c 20 35 29 3b 0a 20 20 20 20 int(&q, 5);.
0b50: 69 6e 74 20 6e 50 61 72 65 6e 74 20 3d 20 64 62 int nParent = db
0b60: 5f 63 6f 6c 75 6d 6e 5f 69 6e 74 28 26 71 2c 20 _column_int(&q,
0b70: 36 29 3b 0a 0a 20 20 20 20 7a 44 61 74 65 20 3d 6);.. zDate =
0b80: 20 63 67 69 5f 72 66 63 38 32 32 5f 64 61 74 65 cgi_rfc822_date
0b90: 73 74 61 6d 70 28 72 73 73 5f 64 61 74 65 74 69 stamp(rss_dateti
0ba0: 6d 65 5f 74 6f 5f 74 69 6d 65 5f 74 28 7a 44 61 me_to_time_t(zDa
0bb0: 74 65 29 29 3b 0a 0a 20 20 20 20 69 66 28 20 6e te));.. if( n
0bc0: 50 61 72 65 6e 74 3e 31 20 26 26 20 6e 43 68 69 Parent>1 && nChi
0bd0: 6c 64 3e 31 20 29 7b 0a 20 20 20 20 20 20 7a 50 ld>1 ){. zP
0be0: 72 65 66 69 78 20 3d 20 22 2a 4d 45 52 47 45 2f refix = "*MERGE/
0bf0: 46 4f 52 4b 2a 20 22 3b 0a 20 20 20 20 7d 65 6c FORK* ";. }el
0c00: 73 65 20 69 66 28 20 6e 50 61 72 65 6e 74 3e 31 se if( nParent>1
0c10: 20 29 7b 0a 20 20 20 20 20 20 7a 50 72 65 66 69 ){. zPrefi
0c20: 78 20 3d 20 22 2a 4d 45 52 47 45 2a 20 22 3b 0a x = "*MERGE* ";.
0c30: 20 20 20 20 7d 65 6c 73 65 20 69 66 28 20 6e 43 }else if( nC
0c40: 68 69 6c 64 3e 31 20 29 7b 0a 20 20 20 20 20 20 hild>1 ){.
0c50: 7a 50 72 65 66 69 78 20 3d 20 22 2a 46 4f 52 4b zPrefix = "*FORK
0c60: 2a 20 22 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 * ";. }..
0c70: 40 20 20 20 20 20 3c 69 74 65 6d 3e 0a 20 20 20 @ <item>.
0c80: 20 40 20 20 20 20 20 20 20 3c 74 69 74 6c 65 3e @ <title>
0c90: 25 73 28 7a 50 72 65 66 69 78 29 25 73 28 7a 43 %s(zPrefix)%s(zC
0ca0: 6f 6d 29 3c 2f 74 69 74 6c 65 3e 0a 20 20 20 20 om)</title>.
0cb0: 40 20 20 20 20 20 20 20 3c 6c 69 6e 6b 3e 25 73 @ <link>%s
0cc0: 28 67 2e 7a 42 61 73 65 55 52 4c 29 2f 76 69 6e (g.zBaseURL)/vin
0cd0: 66 6f 2f 25 73 28 7a 49 64 29 3c 2f 6c 69 6e 6b fo/%s(zId)</link
0ce0: 3e 0a 20 20 20 20 40 20 20 20 20 20 20 20 3c 64 >. @ <d
0cf0: 65 73 63 72 69 70 74 69 6f 6e 3e 25 73 28 7a 50 escription>%s(zP
0d00: 72 65 66 69 78 29 25 73 28 7a 43 6f 6d 29 3c 2f refix)%s(zCom)</
0d10: 64 65 73 63 72 69 70 74 69 6f 6e 3e 0a 20 20 20 description>.
0d20: 20 40 20 20 20 20 20 20 20 3c 70 75 62 44 61 74 @ <pubDat
0d30: 65 3e 25 73 28 7a 44 61 74 65 29 3c 2f 70 75 62 e>%s(zDate)</pub
0d40: 44 61 74 65 3e 0a 20 20 20 20 40 20 20 20 20 20 Date>. @
0d50: 20 20 3c 61 75 74 68 6f 72 3e 25 73 28 7a 41 75 <author>%s(zAu
0d60: 74 68 6f 72 29 3c 2f 61 75 74 68 6f 72 3e 0a 20 thor)</author>.
0d70: 20 20 20 40 20 20 20 20 20 20 20 3c 67 75 69 64 @ <guid
0d80: 3e 25 73 28 67 2e 7a 42 61 73 65 55 52 4c 29 2f >%s(g.zBaseURL)/
0d90: 76 69 6e 66 6f 2f 25 73 28 7a 49 64 29 3c 2f 67 vinfo/%s(zId)</g
0da0: 75 69 64 3e 0a 20 20 20 20 40 20 20 20 20 20 3c uid>. @ <
0db0: 2f 69 74 65 6d 3e 0a 20 20 20 20 6e 4c 69 6e 65 /item>. nLine
0dc0: 2b 2b 3b 0a 20 20 7d 0a 0a 20 20 64 62 5f 66 69 ++;. }.. db_fi
0dd0: 6e 61 6c 69 7a 65 28 26 71 29 3b 0a 20 20 40 20 nalize(&q);. @
0de0: 20 20 3c 2f 63 68 61 6e 6e 65 6c 3e 0a 20 20 40 </channel>. @
0df0: 20 3c 2f 72 73 73 3e 0a 0a 20 20 69 66 28 20 7a </rss>.. if( z
0e00: 46 72 65 65 50 72 6f 6a 65 63 74 4e 61 6d 65 20 FreeProjectName
0e10: 21 3d 20 30 20 29 7b 0a 20 20 20 20 66 72 65 65 != 0 ){. free
0e20: 28 20 7a 46 72 65 65 50 72 6f 6a 65 63 74 4e 61 ( zFreeProjectNa
0e30: 6d 65 20 29 3b 0a 20 20 7d 0a 7d 0a me );. }.}.