EXEEXT=@EXEEXT@
-CLIENT_TARGETS=citadel$(EXEEXT) whobbs$(EXEEXT)
+CLIENT_TARGETS=citadel$(EXEEXT)
NOINST_TARGETS=stress$(EXEEXT)
SERVER_TARGETS=citserver$(EXEEXT)
SERV_MODULES= md5.o \
UTIL_TARGETS=citmail$(EXEEXT) sendcommand$(EXEEXT)
UTILBIN_TARGETS= base64$(EXEEXT) setup$(EXEEXT) \
- chkpw$(EXEEXT) chkpwd$(EXEEXT) userlist$(EXEEXT) \
+ chkpw$(EXEEXT) chkpwd$(EXEEXT) \
aidepost$(EXEEXT) msgform$(EXEEXT) \
ctdlmigrate$(EXEEXT)
.SILENT:
-SOURCES=utils/aidepost.c utils/stress.c utils/whobbs.c utils/citmail.c \
+SOURCES=utils/aidepost.c utils/stress.c utils/citmail.c \
utils/setup.c utils/msgform.c utils/chkpw.c \
- utils/sendcommand.c utils/userlist.c \
+ utils/sendcommand.c \
utils/ctdlmigrate.c utils/base64.c utils/chkpwd.c \
utillib/citadel_ipc.c utillib/citadel_dirs.c utillib/ipc_c_tcp.c \
textclient/client_chat.c textclient/client_passwords.c \
$(CC) utils/chkpw.o auth.o utillib/citadel_dirs.o \
$(LDFLAGS) -o chkpw$(EXEEXT) $(chkpwd_LIBS)
-whobbs$(EXEEXT): utils/whobbs.o utillib/ipc_c_tcp.o utillib/citadel_ipc.o \
- utillib/citadel_dirs.o $(LIBOBJS)
- $(CC) utils/whobbs.o utillib/ipc_c_tcp.o utillib/citadel_ipc.o \
- utillib/citadel_dirs.o $(LIBOBJS) \
- $(LDFLAGS) -o whobbs$(EXEEXT) $(LIBS)
-
stress$(EXEEXT): utils/stress.o utillib/ipc_c_tcp.o utillib/citadel_ipc.o \
utillib/citadel_dirs.o $(LIBOBJS)
$(CC) utils/stress.o utillib/ipc_c_tcp.o utillib/citadel_ipc.o \
utillib/citadel_dirs.o $(LIBOBJS) \
$(LDFLAGS) -o stress$(EXEEXT) $(LIBS)
-sendcommand$(EXEEXT): utils/sendcommand.o $(LIBOBJS)
- $(CC) utils/sendcommand.o \
+sendcommand$(EXEEXT): utils/sendcommand.o utillib/citadel_dirs.o $(LIBOBJS)
+ $(CC) utils/sendcommand.o utillib/citadel_dirs.o \
$(LIBOBJS) $(LDFLAGS) -o sendcommand$(EXEEXT) $(LIBS)
base64$(EXEEXT): utils/base64.o
$(CC) utils/base64.o $(LDFLAGS) -o base64$(EXEEXT)
-userlist$(EXEEXT): utils/userlist.o utillib/ipc_c_tcp.o utillib/citadel_ipc.o \
- utillib/citadel_dirs.o $(LIBOBJS)
- $(CC) utils/userlist.o utillib/ipc_c_tcp.o utillib/citadel_ipc.o \
- utillib/citadel_dirs.o \
- $(LIBOBJS) $(LDFLAGS) -o userlist$(EXEEXT) $(LIBS)
-
msgform$(EXEEXT): utils/msgform.o
$(CC) utils/msgform.o $(LDFLAGS) -o msgform$(EXEEXT)
/*
* Main Citadel header file
*
- * Copyright (c) 1987-2011 by the citadel.org team
+ * Copyright (c) 1987-2012 by the citadel.org team
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* system customizations are in sysconfig.h */
* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 803 /* This version */
+#define REV_LEVEL 810 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
#define EXPORT_REV_MIN 760 /* Oldest compatible export files */
-#define LIBCITADEL_MIN 802 /* Minimum required version of libcitadel */
+#define LIBCITADEL_MIN 810 /* Minimum required version of libcitadel */
#define SERVER_TYPE 0 /* zero for stock Citadel; other developers please
obtain SERVER_TYPE codes for your implementations */
*/
typedef struct ExpirePolicy ExpirePolicy;
struct ExpirePolicy {
-/*
-#include "datadefinitions.h"
-#include "dtds/expirepolicy-defs.h"
-#include "undef_data.h"
-*/
int expire_mode;
int expire_value;
};
*/
typedef struct march march;
struct march {
-/*
-#include "datadefinitions.h"
-#include "dtds/march-defs.h"
-#include "undef_data.h"
-*/
struct march *next;
char march_name[ROOMNAMELEN];
unsigned int march_flags;
*/
typedef struct ctdluser ctdluser;
struct ctdluser { /* User record */
-/*
-#include "datadefinitions.h"
-#include "dtds/user-defs.h"
-#include "undef_data.h"
-*/
int version; /* Cit vers. which created this rec */
uid_t uid; /* Associate with a unix account? */
char password[32]; /* password */
*/
typedef struct ctdlroom ctdlroom;
struct ctdlroom {
-/*
-#include "datadefinitions.h"
-#include "dtds/room-defs.h"
-#include "undef_data.h"
-*/
char QRname[ROOMNAMELEN]; /* Name of room */
char QRpasswd[10]; /* Only valid if it's a private rm */
long QRroomaide; /* User number of room aide */
*/
typedef struct floor floor;
struct floor {
-/*
-#include "datadefinitions.h"
-#include "dtds/floor-defs.h"
-#include "undef_data.h"
-*/
unsigned short f_flags; /* flags */
char f_name[256]; /* name of floor */
int f_ref_count; /* reference count */
#define NEXT_KEY 15
#define STOP_KEY 3
-/* server exit codes */
-#define EXIT_NORMAL 0 /* server terminated normally */
- /* 1 through 63 reserved for signals */
-#define EXIT_NULL 64 /* EOF on server command input */
-
/* citadel.rc stuff */
#define RC_NO 0 /* always no */
#define RC_YES 1 /* always yes */
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([Citadel], [8.03], [http://www.citadel.org/])
+AC_INIT([Citadel], [8.10], [http://www.citadel.org/])
AC_REVISION([$Revision: 5108 $])
AC_CONFIG_SRCDIR([citserver.c])
AC_CONFIG_HEADER(sysdep.h)
#include <sys/socket.h>
#include <sys/un.h>
#include "citadel.h"
+#include "include/citadel_dirs.h"
{
int a;
int watchdog = 60;
- char *ctdl_home_directory = CTDLDIR;
char buf[SIZ];
int xfermode = 0;
+ int relh=0;
+ int home=0;
+ char relhome[PATH_MAX]="";
+ char ctdldir[PATH_MAX]=CTDLDIR;
/* Parse command line */
while ((a = getopt(argc, argv, "h:w:")) != EOF) {
switch (a) {
case 'h':
- ctdl_home_directory = strdup(optarg);
+ relh=optarg[0]!='/';
+ if (!relh) {
+ strncpy(ctdl_home_directory, optarg, sizeof ctdl_home_directory);
+ } else {
+ strncpy(relhome, optarg, sizeof relhome);
+ }
+ home = 1;
break;
case 'w':
watchdog = atoi(optarg);
}
}
- fprintf(stderr, "sendcommand: started (pid=%d) connecting to Citadel server in %s\n",
+ calc_dirs_n_files(relh, home, relhome, ctdldir, 0);
+
+ fprintf(stderr, "sendcommand: started (pid=%d) connecting to Citadel server at %s\n",
(int) getpid(),
- ctdl_home_directory
+ file_citadel_admin_socket
);
fflush(stderr);
alarm(watchdog);
- snprintf(buf, sizeof buf, "%s/citadel-admin.socket", ctdl_home_directory);
- serv_sock = uds_connectsock(buf);
+ serv_sock = uds_connectsock(file_citadel_admin_socket);
serv_gets(buf);
fprintf(stderr, "%s\n", buf);
/*
* Citadel setup utility
+ *
+ * Copyright (c) 1987-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.
*/
#define SHOW_ME_VAPPEND_PRINTF
const char *setup_titles[eMaxQuestions];
const char *setup_text[eMaxQuestions];
-/* calculate all our path on a central place */
-/* where to keep our config */
-
-
void SetTitles(void)
{
setup_text[eUID] = _(
"Citadel needs to run under its own user ID. This would\n"
"typically be called \"citadel\", but if you are running Citadel\n"
-"as a public BBS, you might also call it \"bbs\" or \"guest\".\n"
+"as a public site, you might also call it \"bbs\" or \"guest\".\n"
"The server will run under this user ID. Please specify that\n"
"user ID here. You may specify either a user name or a numeric\n"
"UID.\n");
}
/*
- * print the actual stack frame.
+ * Print the stack frame for a backtrace
*/
void cit_backtrace(void)
{
}
struct config config;
-
int direction;
Msg = NewStrBuf();
va_start(arg_ptr, error_message_format);
- StrBufVAppendPrintf(Msg,
- error_message_format,
- arg_ptr);
+ StrBufVAppendPrintf(Msg, error_message_format, arg_ptr);
va_end(arg_ptr);
important_message(_("Error"), ChrPtr(Msg));
int rv;
/* Determine the fully qualified path name of citserver */
- snprintf(looking_for,
- sizeof looking_for,
- "%s/citserver",
- ctdl_sbin_dir
- );
+ snprintf(looking_for, sizeof looking_for, "%s/citserver", ctdl_sbin_dir);
/* Now tweak /etc/inittab */
infp = fopen("/etc/inittab", "r");
rv = fwrite(buf, strlen(buf), 1, outfp);
if (rv == -1)
{
- display_error("%s %s\n",
- _("failed to modify inittab"),
- strerror(errno));
+ display_error("%s %s\n", _("failed to modify inittab"), strerror(errno));
}
}
char command[SIZ];
int rv;
- if ((stat("/etc/init.d/", &etcinitd) == -1) &&
- (errno == ENOENT))
- {
- if ((stat("/etc/rc.d/init.d/", &etcinitd) == -1) &&
- (errno == ENOENT))
+ if ( (stat("/etc/init.d/", &etcinitd) == -1)
+ && (errno == ENOENT)
+ ) {
+ if ( (stat("/etc/rc.d/init.d/", &etcinitd) == -1)
+ && (errno == ENOENT)
+ ) {
initfile = CTDLDIR"/citadel.init";
- else
+ }
+ else {
initfile = "/etc/rc.d/init.d/citadel";
+ }
}
fp = fopen(initfile, "r");
/* Set up the run levels. */
rv = system("/bin/rm -f /etc/rc?.d/[SK]??citadel 2>/dev/null");
- if (rv != 0)
- display_error(_("failed to remove system V init links \n"));
+ if (rv != 0) {
+ display_error(_("failed to remove system V init links\n"));
+ }
snprintf(command, sizeof(command), "for x in 2 3 4 5 ; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/S79citadel ; done 2>/dev/null", initfile);
rv = system(command);
- if (rv != 0)
- display_error(_("failed to set system V init links \n"));
+ if (rv != 0) {
+ display_error(_("failed to set system V init links\n"));
+ }
snprintf(command, sizeof(command),"for x in 0 6 S; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/K30citadel ; done 2>/dev/null", initfile);
rv = system(command);
- if (rv != 0)
- display_error(_("failed to set system V init links \n"));
+ if (rv != 0) {
+ display_error(_("failed to set system V init links\n"));
+ }
}
_("Setup can configure the \"xinetd\" service to automatically\n"
"connect incoming telnet sessions to Citadel, bypassing the\n"
"host system login: prompt. Would you like to do this?\n"
- ));
+ )
+ );
if (yesno(buf, 1) == 0) {
return;
}
* to the server and try to get it back. The cookie does not
* have to be secret ... just unique.
*/
- sprintf(cookie, "--test--%d--", getpid());
+ generate_uuid(cookie);
- if (relhome)
+ if (relhome) {
sprintf(cmd, "%s/sendcommand -h%s ECHO %s 2>&1",
ctdl_sbin_dir,
relhomestr,
- cookie);
- else
+ cookie
+ );
+ }
+ else {
sprintf(cmd, "%s/sendcommand ECHO %s 2>&1",
ctdl_sbin_dir,
- cookie);
+ cookie
+ );
+ }
fp = popen(cmd, "r");
if (fp == NULL) return(errno);
Target,
dialog_result);
rv = system(buf);
- if (rv != 0)
- fprintf(stderr, "failed to run Dialog.\n");
+ if (rv != 0) {
+ fprintf(stderr, "failed to run whiptail or dialog\n");
+ }
fp = fopen(dialog_result, "r");
if (fp != NULL) {
strprompt(setup_titles[msgpos],
setup_text[msgpos],
Target,
- DefValue);
+ DefValue
+ );
}
void set_int_val(int msgpos, int *ip, char *DefValue)
{
Value = getenv(EnvNames[curr]);
}
- if (Value == NULL)
+ if (Value == NULL) {
Value = "";
-
+ }
switch (curr) {
else
{
#ifdef __CYGWIN__
- config.c_ctdluid = 0; /* XXX Windows hack, prob. insecure */
+ config.c_ctdluid = 0; /* work-around for Windows */
#else
i = config.c_ctdluid;
pw = getpwuid(i);
int discover_ui(void)
{
- /* Use "dialog" if we have it */
+ /* Use "whiptail" or "dialog" if we have it */
if (getenv("CTDL_DIALOG") != NULL) {
return UI_DIALOG;
}
-void migrate_old_installs(void)
-{
- int rv;
- rv = system("exec /bin/rm -fr ./rooms ./chatpipes ./expressmsgs ./sessions 2>/dev/null");
- if (rv != 0)
- fprintf(stderr, _("failed to remove old style directories.\n"));
- unlink("citadel.log");
- unlink("weekly");
-}
-
-
/*
* Strip "db" entries out of /etc/nsswitch.conf
*/
}
- get_config ();
-
+ get_config();
set_default_values();
/* Go through a series of dialogs prompting for config info */
write_config_to_disk();
- migrate_old_installs(); /* Delete files and directories used by older Citadel versions */
-
if ( ((setup_type == UI_SILENT)
&& (getenv("ALTER_ETC_SERVICES")!=NULL))
|| (setup_type != UI_SILENT)
cleanup(0);
return 0;
}
-
-
+++ /dev/null
-/*
- * Command-line user list utility.
- *
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-#include <libcitadel.h>
-#include "citadel.h"
-#include <unistd.h>
-#include "citadel_ipc.h"
-#include "citadel_dirs.h"
-
-void logoff(int code)
-{
- exit(code);
-}
-
-void userlist(CtdlIPC *ipc) {
- char buf[SIZ];
- char fl[SIZ];
- struct tm tmbuf;
- time_t lc;
- char *listing = NULL;
- int r;
-
- r = CtdlIPCUserListing(ipc, "", &listing, buf);
- if (r / 100 != 1) {
- printf("%s\n", buf);
- return;
- }
- printf(" User Name Num L Last Visit Logins Messages\n");
- printf("------------------------- ----- - ---------- ------ --------\n");
- while (strlen(listing) > 0) {
- extract_token(buf, listing, 0, '\n', sizeof buf);
- remove_token(listing, 0, '\n');
- extract_token(fl, buf, 0, '|', sizeof fl);
- printf("%-25s ",fl);
- printf("%5ld %d ", extract_long(buf,2),
- extract_int(buf,1));
- lc = extract_long(buf,3);
- localtime_r(&lc, &tmbuf);
- printf("%02d/%02d/%04d ",
- (tmbuf.tm_mon+1),
- tmbuf.tm_mday,
- (tmbuf.tm_year + 1900));
- printf("%6ld %8ld\n",
- extract_long(buf,4),extract_long(buf,5));
- }
- printf("\n");
-}
-
-
-int main(int argc, char **argv)
-{
- char buf[SIZ];
- char hostbuf[SIZ], portbuf[SIZ];
- CtdlIPC *ipc = NULL;
- int relh=0;
- int home=0;
- char relhome[PATH_MAX]="";
- char ctdldir[PATH_MAX]=CTDLDIR;
-
- calc_dirs_n_files(relh, home, relhome, ctdldir, 0);
-
- ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
- CtdlIPC_chat_recv(ipc, buf);
- if ((buf[0]!='2')&&(strncmp(buf,"551",3))) {
- fprintf(stderr,"%s: %s\n",argv[0],&buf[4]);
- logoff(atoi(buf));
- }
-
- userlist(ipc);
-
- CtdlIPCQuit(ipc);
- exit(0);
-}
-
-
-#ifndef HAVE_STRERROR
-/*
- * replacement strerror() for systems that don't have it
- */
-char *strerror(int e)
-{
- static char buf[32];
-
- snprintf(buf, sizeof buf, "errno = %d",e);
- return(buf);
-}
-#endif
-
-
-/*
- * Stub function
- */
-void stty_ctdl(int cmd) {
-}
-
+++ /dev/null
-/*
- * Command-line "who is online?" utility
- *
- */
-
-#include "sysdep.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <libcitadel.h>
-#include "citadel.h"
-#include "citadel_ipc.h"
-#include "citadel_dirs.h"
-
-void logoff(int code)
-{
- exit(code);
- }
-
-static void escapize(char *buf, size_t n) {
- char hold[512];
- int i, len;
- size_t tmp;
-
- strcpy(hold, buf);
- strcpy(buf, "");
- tmp = 0;
- len = strlen(hold);
- for (i=0; i<len; ++i) {
- if (hold[i]=='<') {
- snprintf(&buf[tmp], n - tmp, "<");
- tmp += 4;
- }
- else if (hold[i]=='>'){
- snprintf(&buf[tmp], n - tmp, ">");
- tmp += 4;
- }
- else if (hold[i]==34){
- snprintf(&buf[tmp], n - tmp, """);
- tmp += 6;
- }
- else{
- snprintf(&buf[tmp], n - tmp, "%c", hold[i]);
- tmp ++;
- }
- }
-}
-
-
-
-
-int main(int argc, char **argv)
-{
- char buf[512];
- char nodetitle[SIZ];
- int www = 0;
- int s_pid = 0;
- int my_pid = 0;
- char hostbuf[SIZ];
- char portbuf[SIZ];
- char s_user[SIZ];
- char s_room[SIZ];
- char s_host[SIZ];
- char s_client[SIZ];
- int r; /* IPC response code */
- time_t timenow;
- char *listing = NULL;
- CtdlIPC *ipc = NULL;
- int relh=0;
- int home=0;
- char relhome[PATH_MAX]="";
- char ctdldir[PATH_MAX]=CTDLDIR;
-
- calc_dirs_n_files(relh, home, relhome, ctdldir, 0);
-
- /* If this environment variable is set, we assume that the program
- * is being called as a cgi-bin from a webserver and will output
- * everything as HTML.
- */
- if (getenv("REQUEST_METHOD") != NULL) www = 1;
-
- ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
- if (!ipc) {
- fprintf(stderr, "Server not available: %s\n", strerror(errno));
- logoff(errno);
- }
- CtdlIPC_chat_recv(ipc, buf);
- if ((buf[0]!='2')&&(strncmp(buf,"551",3))) {
- fprintf(stderr,"%s: %s\n",argv[0],&buf[4]);
- logoff(atoi(buf));
- }
- strcpy(nodetitle, "this Citadel site");
- r = CtdlIPCServerInfo(ipc, buf);
- if (r / 100 == 1) {
- my_pid = ipc->ServInfo.pid;
- strcpy(nodetitle, ipc->ServInfo.humannode);
- }
-
- if (www) {
- printf( "Content-type: text/html\n"
- "\n"
- "<HTML><HEAD>"
- "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"60\">\n"
- "<TITLE>");
- printf("%s: who is online", nodetitle);
- printf( "</TITLE></HEAD><BODY><H1>");
- } else {
- printf(" ");
- }
-
- if (www) {
- printf("<CENTER><H1>");
- }
-
- printf("Users currently logged on to %s\n", nodetitle);
-
- if (www) {
- printf("</H1>\n");
- }
-
- r = CtdlIPCOnlineUsers(ipc, &listing, &timenow, buf);
- if (r / 100 != 1) {
- fprintf(stderr,"%s: %s\n",argv[0], buf);
- logoff(atoi(buf));
- }
-
- if (www) {
- printf( "<TABLE BORDER=1 WIDTH=100%%>"
- "<TR><TH>Session</TH><TH>User name</TH>"
- "<TH>Room</TH><TH>From host</TH>"
- "<TH>Client software</TH></TR>\n");
- } else {
-
- printf( "Session User name "
- "Room From host\n");
- printf( "------- ------------------------- "
- "------------------- ------------------------\n");
- }
-
-
- while (!IsEmptyStr(listing)) {
- extract_token(buf, listing, 0, '\n', sizeof buf);
- remove_token(listing, 0, '\n');
-
- /* Escape some stuff if we're using www mode */
- if (www) escapize(buf, sizeof buf);
-
- s_pid = extract_int(buf,0);
- extract_token(s_user, buf, 1, '|', sizeof s_user);
- extract_token(s_room, buf, 2, '|', sizeof s_room);
- extract_token(s_host, buf, 3, '|', sizeof s_host);
- extract_token(s_client, buf, 4, '|', sizeof s_client);
- if (s_pid != my_pid) {
-
- if (www) printf("<TR><TD>");
- printf("%-7d", s_pid);
- printf("%c",
- ((s_pid == my_pid) ? '*' : ' '));
- if (www) printf("</TD><TD>");
- printf("%-26s", s_user);
- if (www) printf("</TD><TD>");
- printf("%-19s ", s_room);
- if (www) printf("</TD><TD>");
- printf("%-24s\n", s_host);
- if (www) printf("</TD><TD>%s</TD></TR>\n", s_client);
- }
- }
- free(listing);
-
- if (www) printf("</TABLE></CENTER>\n"
- "<FONT SIZE=-1>"
- "(This display will automatically refresh "
- "once per minute)</FONT>\n"
- "</BODY></HTML>\n");
-
- r = CtdlIPCQuit(ipc);
- return (r / 100 == 2) ? 0 : r;
-}
-
-
-/*
- * Stub function
- */
-void stty_ctdl(int cmd) {
-}
-
-
-#ifndef HAVE_STRERROR
-/*
- * replacement strerror() for systems that don't have it
- */
-char *strerror(int e)
-{
- static char buf[32];
-
- snprintf(buf, sizeof buf, "errno = %d",e);
- return(buf);
- }
-#endif
dnl Ensure that libcitadel is configured with autoconf 2.52 or newer
AC_PREREQ(2.52)
-AC_INIT(libcitadel, 8.02, http://uncensored.citadel.org)
+AC_INIT(libcitadel, 8.10, http://uncensored.citadel.org)
AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(conftools)
dnl
LIBCURRENT=2
-LIBREVISION=1
-LIBAGE=0
+LIBREVISION=2
+LIBAGE=1
sinclude(conftools/libtool.m4)
sinclude(conftools/ac_c_bigendian_cross.m4)
/*
* Header file for libcitadel
+ *
+ * Copyright (c) 1987-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.
*/
#include <sys/types.h>
#include <netinet/in.h>
-#define LIBCITADEL_VERSION_NUMBER 802
+#define LIBCITADEL_VERSION_NUMBER 810
/*
* Here's a bunch of stupid magic to make the MIME parser portable.
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
-AC_INIT([WebCit], [8.03], [http://www.citadel.org/])
+AC_INIT([WebCit], [8.10], [http://www.citadel.org/])
AC_SUBST(PROG_SUBDIRS)
#define PORT_NUM 2000 /* port number to listen on */
#define DEVELOPER_ID 0
#define CLIENT_ID 4
-#define CLIENT_VERSION 802 /* This version of WebCit */
-#define MINIMUM_CIT_VERSION 802 /* min required Citadel ver */
-#define LIBCITADEL_MIN 802 /* min required libcitadel ver */
+#define CLIENT_VERSION 810 /* This version of WebCit */
+#define MINIMUM_CIT_VERSION 810 /* Minimum required version of Citadel server */
+#define LIBCITADEL_MIN 810 /* Minimum required version of libcitadel */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
-#define TARGET "webcit01" /* Target for inline URL's */
+#define TARGET "webcit01" /* Window target for inline URL's */
#define HOUSEKEEPING 15 /* Housekeeping frequency */
#define MAX_WORKER_THREADS 250
#define LISTEN_QUEUE_LENGTH 100 /* listen() backlog queue */
#define EXPIRE_MANUAL 1 /* Don't expire messages at all */
#define EXPIRE_NUMMSGS 2 /* Keep only latest n messages */
#define EXPIRE_AGE 3 /* Expire messages after n days */
+
typedef struct __ExpirePolicy {
int loaded; /* has this been loaded from the server? */
int expire_mode;
int expire_value;
-}ExpirePolicy;
+} ExpirePolicy;
void LoadExpirePolicy(GPEXWhichPolicy which);
void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which);
StrBuf *ConvertBuf1;
StrBuf *ConvertBuf2;
-/* cache stuff for templates. TODO: find a smartrer way */
+/* cache stuff for templates. TODO: find a smarter way */
HashList *ServCfg; /* cache our server config for editing */
HashList *InetCfg; /* Our inet server config for editing */
ExpirePolicy Policy[maxpolicy];
ssize_t write(int fd, const void *buf, size_t count);
void cal_process_attachment(wc_mime_attachment *Mime);
-void generate_uuid(char *);
-
void address_book_popup(void);
void begin_ajax_response(void);
void end_ajax_response(void);
-
extern char *months[];
extern char *days[];
long locate_user_vcard_in_this_room(message_summary **VCMsg,
void begin_tab(int tabnum, int num_tabs);
void end_tab(int tabnum, int num_tabs);
-
int get_time_format_cached (void);
void display_wiki_pagelist(void);
HashList *GetRoomListHashLKRA(StrBuf *Target, WCTemplputParams *TP);