/*
+ * $Id$
+ *
* Citadel/UX message support routines
* see copyright.txt for copyright information
- * $Id$
*/
#include "sysdep.h"
};
void sttybbs(int cmd);
-int struncmp(char *lstr, char *rstr, int len);
int fmout(int width, FILE *fp, char pagin, int height, int starting_lp, char subst);
int haschar(char *st, int ch);
int checkpagin(int lp, int pagin, int height);
extern int editor_pid;
-int lines_printed;
-
void ka_sigcatch(int signum) {
char buf[256];
alarm(S_KEEPALIVE);
return(0);
}
- while(serv_gets(buf), struncmp(buf,"text",4)) {
- if (!struncmp(buf,"nhdr=yes",8)) nhdr=1;
- if (!struncmp(buf,"from=",5)) {
+ while(serv_gets(buf), strncasecmp(buf,"text",4)) {
+ if (!strncasecmp(buf,"nhdr=yes",8)) nhdr=1;
+ if (!strncasecmp(buf,"from=",5)) {
strcpy(from,&buf[5]);
}
if (nhdr==1) buf[0]='_';
- if (!struncmp(buf,"type=",5))
+ if (!strncasecmp(buf,"type=",5))
format_type=atoi(&buf[5]);
- if ((!struncmp(buf,"msgn=",5))&&(rc_display_message_numbers)) {
+ if ((!strncasecmp(buf,"msgn=",5))&&(rc_display_message_numbers)) {
color(DIM_WHITE);
printf("[");
color(BRIGHT_WHITE);
color(DIM_WHITE);
printf("] ");
}
- if (!struncmp(buf,"from=",5)) {
+ if (!strncasecmp(buf,"from=",5)) {
color(DIM_WHITE);
printf("from ");
color(BRIGHT_CYAN);
printf("%s ",&buf[5]);
}
- if (!struncmp(buf,"subj=",5))
+ if (!strncasecmp(buf,"subj=",5))
strcpy(m_subject,&buf[5]);
- if (!struncmp(buf,"rfca=",5)) {
+ if (!strncasecmp(buf,"rfca=",5)) {
safestrncpy(rfca, &buf[5], sizeof(rfca) - 5);
color(DIM_WHITE);
printf("<");
color(DIM_WHITE);
printf("> ");
}
- if ((!struncmp(buf,"hnod=",5))
- && (strucmp(&buf[5],serv_info.serv_humannode))
+ if ((!strncasecmp(buf,"hnod=",5))
+ && (strcasecmp(&buf[5],serv_info.serv_humannode))
&& (strlen(rfca) == 0) ) {
color(DIM_WHITE);
printf("(");
color(DIM_WHITE);
printf(") ");
}
- if ((!struncmp(buf,"room=",5))
- && (strucmp(&buf[5],room_name))
+ if ((!strncasecmp(buf,"room=",5))
+ && (strcasecmp(&buf[5],room_name))
&& (strlen(rfca) == 0)) {
color(DIM_WHITE);
printf("in ");
printf("%s> ",&buf[5]);
}
- if (!struncmp(buf,"node=",5)) {
+ if (!strncasecmp(buf,"node=",5)) {
safestrncpy(node, &buf[5], sizeof(buf) - 5);
if ( (room_flags&QR_NETWORK)
- || ((strucmp(&buf[5],serv_info.serv_nodename)
- &&(strucmp(&buf[5],serv_info.serv_fqdn)))) )
+ || ((strcasecmp(&buf[5],serv_info.serv_nodename)
+ &&(strcasecmp(&buf[5],serv_info.serv_fqdn)))) )
{
if (strlen(rfca) == 0) {
color(DIM_WHITE);
}
}
- if (!struncmp(buf,"rcpt=",5)) {
+ if (!strncasecmp(buf,"rcpt=",5)) {
color(DIM_WHITE);
printf("to ");
color(BRIGHT_CYAN);
printf("%s ",&buf[5]);
}
- if (!struncmp(buf,"time=",5)) {
+ if (!strncasecmp(buf,"time=",5)) {
fmt_date(now, atol(&buf[5]));
printf("%s ", now);
}
buf[strlen(buf)] = a;
if ( strlen(buf) >= strlen(srch_str) ) {
ptr=&buf[strlen(buf)-strlen(srch_str)];
- if (!struncmp(ptr,srch_str,strlen(srch_str))) {
+ if (!strncasecmp(ptr,srch_str,strlen(srch_str))) {
strcpy(ptr,rplc_str);
++substitutions;
}
color(DIM_WHITE);
printf(") ");
- if (is_mail==1) keyopt("<R>eply ");
- keyopt("<B>ack <A>gain <Q>uote <N>ext <S>top ");
+ keyopt("<B>ack <A>gain <Q>uote <R>eply <N>ext <S>top ");
if (rc_url_cmd[0] && num_urls) keyopt("<U>RL View ");
keyopt("<?>Help/others -> ");
if ((e=='d')||(e=='m')||(e=='c')) e=0;
}
/* print only if available */ if ((e=='p')&&(strlen(printcmd)==0)) e=0;
-/* can't reply in public rms */ if ((e=='r')&&(is_mail!=1)) e=0;
/* can't file if not allowed */ if ((e=='f')&&(rc_allow_attachments==0)) e=0;
/* link only if browser avail*/ if ((e=='u')&&(strlen(rc_url_cmd)==0)) e=0;
} while((e!='a')&&(e!='n')&&(e!='s')