X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fpaging.c;h=4b3dc217a716983c01875f6c31fbf74fd74741b6;hb=HEAD;hp=a4fa2665c27ede70d7fc2847dfb06877cc274c13;hpb=c6aec42f213ec284e34648f3d69bcf927dccddb1;p=citadel.git
diff --git a/webcit/paging.c b/webcit/paging.c
index a4fa2665c..f022c48bc 100644
--- a/webcit/paging.c
+++ b/webcit/paging.c
@@ -1,34 +1,29 @@
-
-/*
- * This module handles instant message related functions.
- *
- * Copyright (c) 1996-2012 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, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+// This module handles instant message related functions.
+//
+// Copyright (c) 1996-2023 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, version 3.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
#include "webcit.h"
-/*
- * display the form for paging (x-messaging) another user
- */
+// display the form for paging (x-messaging) another user
void display_page(void) {
char recp[SIZ];
strcpy(recp, bstr("recp"));
- output_headers(1, 1, 1, 0, 0, 0);
- wc_printf("
\n");
- wc_printf("
");
+ output_headers(1, 1, 1, 0, 0, 0);
+ wc_printf("
\n");
+ wc_printf("
");
wc_printf(_("Send instant message"));
wc_printf("
");
- wc_printf("\n");
+ wc_printf(" \n");
wc_printf("\n");
@@ -51,7 +46,8 @@ void display_page(void) {
wc_printf(_("Enter message text:"));
wc_printf("
");
- wc_printf("\n");
+ wc_printf("\n");
wc_printf("
\n");
@@ -63,9 +59,8 @@ void display_page(void) {
wDumpContent(1);
}
-/*
- * page another user
- */
+
+// page another user
void page_user(void) {
char recp[256];
StrBuf *Line;
@@ -93,19 +88,15 @@ void page_user(void) {
}
-
-/*
- * display page popup
- * If there are instant messages waiting, and we notice that we haven't checked them in
- * a while, it probably means that we need to open the instant messenger window.
- */
-int Conditional_PAGE_WAITING(StrBuf * Target, WCTemplputParams * TP) {
+// display page popup
+// If there are instant messages waiting, and we notice that we haven't checked them in
+// a while, it probably means that we need to open the instant messenger window.
+int Conditional_PAGE_WAITING(StrBuf *Target, WCTemplputParams *TP) {
int len;
char buf[SIZ];
- /** JavaScript function to alert the user that popups are probably blocked */
-
- /** First, do the check as part of our page load. */
+ // JavaScript function to alert the user that popups are probably blocked
+ // First, do the check as part of our page load.
serv_puts("NOOP");
len = serv_getln(buf, sizeof buf);
if ((len >= 3) && (buf[3] == '*')) {
@@ -114,7 +105,7 @@ int Conditional_PAGE_WAITING(StrBuf * Target, WCTemplputParams * TP) {
}
}
return 0;
- /* Then schedule it to happen again a minute from now if the user is idle. */
+ // Then schedule it to happen again a minute from now if the user is idle.
}
@@ -132,11 +123,14 @@ void ajax_send_instant_message(void) {
serv_puts("000");
}
- escputs(buf); /* doesn't really matter what we return - the client ignores it */
+ escputs(buf); // doesn't really matter what we return - the client ignores it
}
-void InitModule_PAGING(void) {
+void
+InitModule_PAGING
+(void)
+{
WebcitAddUrlHandler(HKEY("display_page"), "", 0, display_page, 0);
WebcitAddUrlHandler(HKEY("page_user"), "", 0, page_user, 0);
WebcitAddUrlHandler(HKEY("ajax_send_instant_message"), "", 0, ajax_send_instant_message, AJAX);
@@ -144,6 +138,9 @@ void InitModule_PAGING(void) {
}
-void SessionDestroyModule_PAGING(wcsession * sess) {
+void
+SessionDestroyModule_PAGING
+(wcsession *sess)
+{
/* nothing here anymore */
}