#include <limits.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <sys/time.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 <stdarg.h>
#include "citadel.h"
#include "messages.h"
#include "snprintf.h"
#endif
-#define MAXWORDBUF 256
+#define MAXWORDBUF SIZ
#define MAXMSGS 512
struct cittext {
void ka_sigcatch(int signum)
{
- char buf[256];
+ char buf[SIZ];
alarm(S_KEEPALIVE);
signal(SIGALRM, ka_sigcatch);
serv_puts("NOOP");
long num, /* message number */
char pagin) /* 0 = normal read, 1 = read with pagination, 2 = header */
{
- char buf[256];
- char m_subject[256];
- char from[256], node[256], rfca[256];
- char now[256];
+ char buf[SIZ];
+ char m_subject[SIZ];
+ char from[SIZ], node[SIZ], rfca[SIZ];
+ char now[SIZ];
int format_type = 0;
int fr = 0;
int nhdr = 0;
*/
void transmit_message(FILE *fp)
{
- char buf[256];
+ char buf[SIZ];
int ch, a;
long msglen;
time_t lasttick;
int c) /* */
{
char buf[300];
- char cmd[256];
+ char cmd[SIZ];
int a, b;
int need_recp = 0;
int mode;
void list_urls()
{
int i;
- char cmd[256];
+ char cmd[SIZ];
if (num_urls == 0) {
printf("There were no URL's in the previous message.\n\n");
int hold_color = 0;
char prtfile[PATH_MAX];
char pagin;
- char cmd[256];
+ char cmd[SIZ];
char targ[ROOMNAMELEN];
- char filename[256];
+ char filename[SIZ];
if (c < 0)
b = (MAXMSGS - 1);
}
}
+ if (num_msgs == 0) {
+ printf("*** There are no ");
+ if (c == 1) printf("new ");
+ if (c == 2) printf("old ");
+ printf("messages in this room.\n");
+ return;
+ }
+
lines_printed = 0;
/* this loop cycles through each message... */
*/
void check_message_base(void)
{
- char buf[256];
+ char buf[SIZ];
printf
("Please read the documentation before running this command.\n"