From: Antoine Jacquet Date: Sat, 13 Dec 2003 23:00:00 +0000 (+0100) Subject: version 0.51 X-Git-Tag: v0.51 X-Git-Url: http://royale.zerezo.com/git/?a=commitdiff_plain;h=cfd419cb491b39d0064949297565fc65297dc2bb;p=irssistats version 0.51 * bugfixes and polish language updated (thank you Jakub Jankowski) * "CHARSET" is now a language parameter * Internet Explorer specific bugfix in themes --- diff --git a/README b/README index ebba4e7..3e1adf0 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -irssistats 0.5 +irssistats 0.51 site: http://royale.zerezo.com/irssistats/ mail: royale@zerezo.com diff --git a/data/blue.css b/data/blue.css index 17166ee..8d5ff28 100644 --- a/data/blue.css +++ b/data/blue.css @@ -73,6 +73,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -80,6 +81,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/data/dark.css b/data/dark.css index eac24ba..0bf47ba 100644 --- a/data/dark.css +++ b/data/dark.css @@ -75,6 +75,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -82,6 +83,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/data/default.css b/data/default.css index 88a2b0d..b36f313 100644 --- a/data/default.css +++ b/data/default.css @@ -65,6 +65,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -72,6 +73,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/data/grayscale.css b/data/grayscale.css index 7131eaa..e739063 100644 --- a/data/grayscale.css +++ b/data/grayscale.css @@ -88,6 +88,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -95,6 +96,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1, #irssistats div.v1 { diff --git a/data/namour.css b/data/namour.css index b19ebcc..db74b22 100644 --- a/data/namour.css +++ b/data/namour.css @@ -73,6 +73,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -80,6 +81,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/data/pisg.css b/data/pisg.css index 211ab04..c306040 100644 --- a/data/pisg.css +++ b/data/pisg.css @@ -116,6 +116,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -123,6 +124,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/data/zeduel.css b/data/zeduel.css index 941b36e..6706b61 100644 --- a/data/zeduel.css +++ b/data/zeduel.css @@ -73,6 +73,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -80,6 +81,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/data/zerezo.css b/data/zerezo.css index d8d47a4..a34612b 100644 --- a/data/zerezo.css +++ b/data/zerezo.css @@ -75,6 +75,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { @@ -82,6 +83,7 @@ body { margin: 0; padding: 0; border: 0; + font-size: 0; } #irssistats div.h1 { diff --git a/irssistats.c b/irssistats.c index ae6b2a8..7b5d209 100644 --- a/irssistats.c +++ b/irssistats.c @@ -20,7 +20,7 @@ #define MINWORDLENGTH 5 /* irssistats */ -#define VERSION "0.5" +#define VERSION "0.51" #define URL "http://royale.zerezo.com/irssistats/" /* Counters */ @@ -42,11 +42,12 @@ char *counters[NBCOUNTERS]={"C_SMILE","C_FROWN","C_EXCLAM","C_QUESTION","C_ME"," /* Languages */ #define NBLANGUAGES 8 -#define NBKEYS 38 +#define NBKEYS 39 char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and abbreviation */ { { /* English language */ { "English", "en" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Statistics for %s by %s" }, { "LEGEND", "Legend" }, { "LASTDAYS", "Lastdays statistics" }, @@ -88,6 +89,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab }, { /* French language */ { "French", "fr" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Statistiques de %s par %s" }, { "LEGEND", "Légende" }, { "LASTDAYS", "Statistiques des derniers jours" }, @@ -130,6 +132,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { /* German language */ /* contributed by Valentin Gelhorn */ { "German", "de" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Statistiken für %s von %s" }, { "LEGEND", "Legende" }, { "LASTDAYS", "Statistik der letzten Tage" }, @@ -172,6 +175,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { /* Spanish language */ /* contributed by Alex */ { "Spanish", "es" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Estadísticas de %s por %s" }, { "LEGEND", "Leyenda" }, { "LASTDAYS", "Estadísticas de los últimos días" }, @@ -213,49 +217,52 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab }, { /* Polish language */ /* contributed by Piotr Jarmuz */ + /* updated by Jakub Jankowski */ { "Polish", "pl" }, - { "HEADER", "Statystyki dla %s przez %s" }, + { "CHARSET", "ISO-8859-2" }, + { "HEADER", "Statystyki dla %s zebrane przez %s" }, { "LEGEND", "Legenda" }, { "LASTDAYS", "Statystyki z ostatnich dni" }, - { "TOPHOURS", "Statystyki godzinne" }, - { "TOPUSERS", "Najaktywniejsi ludzie" }, - { "OTHERS", "Zostalo jeszcze %d nie sklasyfikowanych..." }, - { "NBLINES", "linie" }, + { "TOPHOURS", "Statystyki godzinowe" }, + { "TOPUSERS", "Najaktywniejsi" }, + { "OTHERS", "Jest jeszcze %d nie sklasyfikowanych..." }, + { "NBLINES", "linii" }, { "NICK", "nick" }, - { "AVGLETTERS", "litery/linie" }, + { "AVGLETTERS", "liter/liniê" }, { "HOURS", "godziny" }, - { "QUOTE", "przypadkowa wiadomosc" }, - { "TOPUSERSTIME", "Najaktywniejsi ludzie wedlug czasu dnia" }, - { "RANDTOPICS", "Pare tematow" }, - { "CHANGEDBY", "zmienione przez" }, - { "NEWTOPIC", "nowy temat" }, - { "RANDURLS", "Pare URL-i" }, - { "POSTEDBY", "wyslane przez" }, + { "QUOTE", "losowa wypowied¼" }, + { "TOPUSERSTIME", "Najaktywniejsi wed³ug pory dnia" }, + { "RANDTOPICS", "Kilka topików" }, + { "CHANGEDBY", "ustawiony przez" }, + { "NEWTOPIC", "topik" }, + { "RANDURLS", "Kilka URL-i" }, + { "POSTEDBY", "poda³(a)" }, { "POSTEDURL", "URL" }, - { "TOPWORDS", "Najczestsze slowa" }, - { "WORD", "slowo" }, - { "OCCURRENCES", "wystapienia" }, - { "BIGNUMBERS", "Pare wielkich liczb..." }, - { "NUMBERS", "liczby" }, - { "TIME", "%d linii (%d dni) sparsowanych w %d sekund" }, + { "TOPWORDS", "Najczê¶ciej wystêpuj±ce s³owa" }, + { "WORD", "s³owo" }, + { "OCCURRENCES", "wyst±pieñ" }, + { "BIGNUMBERS", "Kilka wielkopomnych liczb..." }, + { "NUMBERS", "kategorie" }, + { "TIME", "Dokonano analizy %d linii (obejmuj±cych %d dni) w czasie %d sekund" }, { "FOOTER", "Statystyki wygenerowane przez" }, - { "C_SMILE", "jest czesto szczesliwy :)" }, - { "C_FROWN", "jest czesto smutny :(" }, - { "C_EXCLAM", "duzo krzyczy !" }, - { "C_QUESTION", "zadaje duzo pytan ?" }, - { "C_ME", "lubi /mnie polecenie" }, - { "C_TOPIC", "czesto zmienia temat" }, - { "C_MODE", "czesto zmienia tryb" }, - { "C_KICK", "lubi /kopac" }, - { "C_KICKED", "czesto go wykopuja" }, - { "C_URL", "wysyla duzo URL-i" }, - { "C_JOIN", "nie wie czy zostac czy wyjsc" }, - { "C_NICK", "czesto zmienia swojego nicka" }, - { "C_MONOLOGUE", "czesto mowi monologiem" } + { "C_SMILE", "jest czêsto szczesliwy(a) :)" }, + { "C_FROWN", "jest czêsto smutny(a) :(" }, + { "C_EXCLAM", "czêsto KRZYCZY!" }, + { "C_QUESTION", "zadaje du¿o pytañ?" }, + { "C_ME", "lubi u¿ywaæ /me" }, + { "C_TOPIC", "czêsto zmienia topik" }, + { "C_MODE", "czêsto zmienia tryby kana³u" }, + { "C_KICK", "lubi kopaæ" }, + { "C_KICKED", "czêsto wykopywany(a)" }, + { "C_URL", "podaje du¿o URL-i" }, + { "C_JOIN", "nie wie czy zostaæ, czy wyj¶æ" }, + { "C_NICK", "czêsto zmienia nick" }, + { "C_MONOLOGUE", "uwielbia monologi" } }, { /* Finnish language */ /* contributed by Antti Huopana */ { "Finnish", "fi" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Kanavan %s tilastot - %s" }, { "LEGEND", "Merkkien selitykset" }, { "LASTDAYS", "Viime päivien tilastot" }, @@ -298,6 +305,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { /* Italian language */ /* contributed by Coviello Giuseppe */ { "Italian", "it" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Statistiche per il canale %s di %s" }, { "LEGEND", "Legenda" }, { "LASTDAYS", "Statistiche degli ultimi giorni" }, @@ -340,6 +348,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { /* Dutch language */ /* contributed by Jeroen Ubbink */ { "Dutch", "nl" }, + { "CHARSET", "ISO-8859-1" }, { "HEADER", "Statistieken voor %s door %s" }, { "LEGEND", "Legenda" }, { "LASTDAYS", "Statistieken van de laatste dagen" }, @@ -421,14 +430,14 @@ struct char nick[MAXNICKLENGTH]; char url[MAXLINELENGTH]; char shorturl[MAXQUOTELENGTH+1]; -} urls[5]; +} urls[NBURLS]; int nburls=0; struct { char nick[MAXNICKLENGTH]; char topic[MAXQUOTELENGTH+1]; -} topics[5]; +} topics[NBTOPICS]; int nbtopics=0; struct @@ -469,6 +478,11 @@ void findwords(char *message) if (pos->next[(int)c]==NULL) { tmp=malloc(sizeof(struct letter)); + if (tmp==NULL) + { + fprintf(stderr, "findwords(): malloc failure\n"); + exit(1); + } tmp->nb=0; for (i=0;i<26;i++) tmp->next[i]=NULL; pos->next[(int)c]=tmp; @@ -790,7 +804,7 @@ void gen_xhtml(char *xhtmlfile) fprintf(fic,"\n\n",VERSION,URL); fprintf(fic,"\n\n\n"); fprintf(fic,L("HEADER"),channel,maintainer); - fprintf(fic,"\n\n"); + fprintf(fic,"\n\n",L("CHARSET")); if (refresh_time) fprintf(fic,"\n",refresh_time); fprintf(fic,"\n",theme); @@ -818,7 +832,7 @@ void gen_xhtml(char *xhtmlfile) for (i=30;i>=0;i--) if (lastdays[i].lines>max) max=lastdays[i].lines; for (i=30;i>=0;i--) { - fprintf(fic,"%d",lastdays[i].lines); /* width=\"15\" */ + fprintf(fic,"%d",lastdays[i].lines); for (j=0;j<4;j++) if (lastdays[i].hours[j]!=0) fprintf(fic,"
",j+1,150*lastdays[i].hours[j]/max); fprintf(fic,"\n"); } @@ -833,7 +847,7 @@ void gen_xhtml(char *xhtmlfile) for (i=0;i<24;i++) if (hours[i]>max) max=hours[i]; for (i=0;i<24;i++) { - fprintf(fic,"%.1f%%",lines!=0?(float)100*hours[i]/lines:0); /* width=\"15\" */ + fprintf(fic,"%.1f%%",lines!=0?(float)100*hours[i]/lines:0); if (hours[i]!=0) fprintf(fic,"
",i/6+1,150*hours[i]/max); fprintf(fic,"\n"); } diff --git a/sample.configfile b/sample.configfile index d618512..1051de4 100644 --- a/sample.configfile +++ b/sample.configfile @@ -27,7 +27,7 @@ language : fr # Theme (colors) to use for the statistics # In fact this is the name of the CSS file to include. # This option has no effect if you use a custom header : you'll have to include the CSS yourself. -theme : orange +theme : default # Specifies the refresh time in seconds (0 to disable) # This option has no effect if you use a custom header : you'll have to include the refresh code yourself.