]> code.citadel.org Git - citadel.git/blobdiff - webcit/bbsview_renderer.c
Removed the unused second argument from the do_template() macro
[citadel.git] / webcit / bbsview_renderer.c
index 3aef4d2428b6c9a76168179dc11d80a03faf583f..4d3ef1be90511e7fb700225f2948a1a0b9b02c70 100644 (file)
@@ -6,7 +6,7 @@
  * with it, go get commit dcf99fe61379b78436c387ea3f89ebfd4ffaf635 of
  * bbsview_renderer.c and have fun.
  *
- * Copyright (c) 1996-2010 by the citadel.org team
+ * Copyright (c) 1996-2011 by the citadel.org team
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -55,13 +55,15 @@ long bbsview_get_last_seen(void)
        serv_puts("GTSN");
        serv_getln(buf, sizeof buf);
        if (buf[0] == '2') {
+               char *colon_pos;
+               char *comma_pos;
 
-               char *comma_pos = strchr(buf, ',');     /* kill first comma and everything to its right */
+               comma_pos = strchr(buf, ',');   /* kill first comma and everything to its right */
                if (comma_pos) {
                        *comma_pos = 0;
                }
 
-               char *colon_pos = strchr(buf, ':');     /* kill first colon and everything to its left */
+               colon_pos = strchr(buf, ':');   /* kill first colon and everything to its left */
                if (colon_pos) {
                        strcpy(buf, ++colon_pos);
                }
@@ -263,7 +265,7 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat,
                                        && ( (i == 0) || (BBS->msgs[i-1] <= BBS->lastseen) )
                                ) {
                                        /* new messages start here */
-                                       do_template("start_of_new_msgs", NULL);
+                                       do_template("start_of_new_msgs");
                                        StrBufAppendPrintf(WC->trailing_javascript, "location.href=\"#newmsgs\";\n");
                                }
                                if (BBS->msgs[i] > 0L) {
@@ -274,20 +276,22 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat,
                                        && (BBS->msgs[i] <= BBS->lastseen)
                                ) {
                                        /* no new messages */
-                                       do_template("no_new_msgs", NULL);
+                                       do_template("no_new_msgs");
                                        StrBufAppendPrintf(WC->trailing_javascript, "location.href=\"#nonewmsgs\";\n");
                                }
                        }
                }
 
                else if ( (seq == 0) || (seq == 2) ) {
+                       int first;
+                       int last;
                        /* Display the selecto-bar with the page numbers */
 
                        wc_printf("<div class=\"moreprompt\">");
                        wc_printf(_("Go to page: "));
 
-                       int first = 0;
-                       int last = BBS->num_pages - 1;
+                       first = 0;
+                       last = BBS->num_pages - 1;
 
                        for (i=0; i<=last; ++i) {