#include <syslog.h>
#include "citadel.h"
-int struncmp();
-void LoadInternetConfig();
-void get_config();
+void LoadInternetConfig(void);
+void get_config(void);
struct config config;
char temp[20];
char TABLEFILE[128];
int RUN_NETPROC = 1;
-int haschar(st,ch)
-char st[];
-int ch; {
+int haschar(char *st, int ch)
+{
int a,b;
b=0;
for (a=0; a<strlen(st); ++a) if (st[a]==ch) ++b;
}
-int struncmp(lstr,rstr,len)
-char lstr[],rstr[];
-int len; {
- int pos = 0;
- char lc,rc;
- while (pos<len) {
- lc=tolower(lstr[pos]);
- rc=tolower(rstr[pos]);
- if ((lc==0)&&(rc==0)) return(0);
- if (lc<rc) return(-1);
- if (lc>rc) return(1);
- pos=pos+1;
- }
- return(0);
- }
-
-void fpgetfield(fp,string)
-FILE *fp;
-char string[];
+void fpgetfield(FILE *fp, char *string)
{
int a,b;
strcpy(string,"");
* modified to format 80 columns into a temporary file, and extract the
* sender and recipient names for use within the main() loop.
*/
-void msgform(msgfile,mfout,sbuf,rbuf,nbuf,pbuf,mid_buf,rmname,subj)
-char *msgfile;
-FILE *mfout;
-char *sbuf; /* sender */
-char *rbuf; /* recipient (in this case, an Internet address) */
-char *nbuf; /* source node */
-char *pbuf; /* path */
-long *mid_buf; /* message ID */
-char *rmname; /* room name */
-char *subj; /* subject */
+void msgform(char *msgfile, FILE *mfout, char *sbuf, char *rbuf, char *nbuf, char *pbuf, long int *mid_buf, char *rmname, char *subj)
+
+
+ /* sender */
+ /* recipient (in this case, an Internet address) */
+ /* source node */
+ /* path */
+ /* message ID */
+ /* room name */
+ /* subject */
{
int a,b,c,e,old,mtype,aflag;
int real = 0;
goto BONFGM;
}
-void main(argc,argv)
-int argc;
-char *argv[]; {
+void main(int argc, char **argv)
+{
int a;
FILE *fp,*rmail;
char sbuf[200],rbuf[200],cstr[100],fstr[128];
* accept postings from subscribed addresses, we must always use the
* room's address as the originating user.
*/
- if ( (argc == 3) && (!strucmp(argv[2], "mlist")) ) {
+ if ( (argc == 3) && (!strcasecmp(argv[2], "mlist")) ) {
mlist = 1;
}
* users to receive Internet mail.
*/
fprintf(rmail,"From ");
- if (strucmp(nbuf,NODENAME)) fprintf(rmail,"%s!",nbuf);
+ if (strcasecmp(nbuf,NODENAME)) fprintf(rmail,"%s!",nbuf);
- if (!strucmp(nbuf,NODENAME)) strcpy(nbuf, FQDN);
+ if (!strcasecmp(nbuf,NODENAME)) strcpy(nbuf, FQDN);
if (mlist) {
fprintf(rmail,"%s\n", rmname);
}
else {
- if (!strucmp(nbuf, NODENAME)) { /* from this system */
+ if (!strcasecmp(nbuf, NODENAME)) { /* from this system */
fprintf(rmail,"%s\n",pbuf);
fprintf(rmail,"From: %s@%s (%s)\n",
sbuf, FQDN, fstr);