]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Removing init sequence tag-0.6
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 14 Mar 2025 12:42:41 +0000 (08:42 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 14 Mar 2025 12:42:41 +0000 (08:42 -0400)
22 files changed:
app/emlrcvr.c
app/maild.c
lib/devlog.c
lib/devlog.h
lib/devsoc.c
lib/devsoc.h
lib/gesspf.c
lib/gesspf.h
lib/gestcp.c
lib/gestcp.h
lib/lvleml.c
lib/lvleml.h
lib/modrec.c
lib/modrec.h
lib/subafn.c
lib/subafn.h
lib/unidns.c
lib/unidns.h
lib/unieml.c
lib/unieml.h
lib/unipar.c
lib/unipar.h

index 1762290da68a69d25db876f9e4497e62a11fdae8..f2eb98984b79a20ab9e40081beed2737aa694571 100644 (file)
@@ -55,10 +55,8 @@ while (proceed==true) {
       (void) prc_preptitle(argc,argv,environ);
       (void) rou_setappname(RECNAME);
       (void) rou_modesubrou(true);
-      (void) par_modeunipar(true);
       (void) prc_modeuniprc(true);
       (void) sig_modeunisig(true);
-      (void) rec_modemodrec(true);
       (void) sig_trapsignal(true,sig_alrm);
       break;
     case 2      :       //doing main task
@@ -68,10 +66,8 @@ while (proceed==true) {
       (void) prc_cleantitle();
       params=par_freeparams(params);
       (void) sig_trapsignal(false,sig_alrm);
-      (void) rec_modemodrec(false);
       (void) sig_modeunisig(false);
       (void) prc_modeuniprc(false);
-      (void) par_modeunipar(false);
       (void) rou_modesubrou(false);
       break;
     default     :       //end of task
index f8ada5355b009ddd8bd5e198c4694f83282e13da..339088816991bafec5c3fe0130679642805d7203 100644 (file)
@@ -139,7 +139,6 @@ while (proceed==true) {
     case 2      :       //initialising process
       (void) prc_preptitle(argc,argv,environ);
       (void) rou_modesubrou(true);
-      (void) par_modeunipar(true);
       (void) prc_modeuniprc(true);
       (void) sig_modeunisig(true);
       (void) sig_trapsignal(true,sig_alrm);
@@ -156,7 +155,6 @@ while (proceed==true) {
       (void) sig_trapsignal(false,sig_alrm);
       (void) sig_modeunisig(false);
       (void) prc_modeuniprc(false);
-      (void) par_modeunipar(false);
       (void) rou_modesubrou(false);
       break;
     default     :       //end of task
index 055a0f82e0e7bf200240df196f72f6102805ee6e..f06f4f43317a8aa81174d95ed62b2ad799e0eb4e 100644 (file)
@@ -24,7 +24,6 @@ typedef struct  {
         TIMESPEC start;         //log start time
         }LOGTYP;
 
-static  _Bool modopen;          //boolean module open/close
 /*
 ^L
 */
@@ -220,38 +219,3 @@ va_end(args);
 return taille;
 #undef  OPEP
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-PUBLIC int log_modedevlog(_Bool mode)
-
-{
-#define OPEP    "devlog.c:log_modedevlog"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  switch ((int)mode) {
-    case true     :
-      break;
-    case false    :
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index b3d26503b48f5931614cdf9150e3079b36de82af..fc294f7da73015f2a3a6f515a104ddd32e37f600 100644 (file)
@@ -25,7 +25,4 @@ extern int log_fprintlog(LOGPTR *logptr,_Bool suite,const char *format,...);
 //current daily log
 extern int log_mergelog(char *logname);
 
-//homework to be done before starting/stopping module.
-extern int log_modedevlog(_Bool mode);
-
 #endif
index 888f91550562a9ee68c86bedcc8c4bc4bf480670..5b42147e2dca1b7ecfcbacde219341d7dc3128a5 100644 (file)
@@ -47,7 +47,6 @@ typedef struct  {
         int iteration;  //number of soc slot used on the IP
         }SOCTYP;
 
-static  _Bool modopen;        //module open/close status
 /*
 \f
 */
@@ -1102,49 +1101,6 @@ return socptr;
 ^L
 */
 /********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-int soc_modedevsoc(_Bool mode)
-
-{
-#define OPEP    "unidoc.c:soc_modeunisoc"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  switch ((int)mode) {
-    case true     :
-      (void) rou_modesubrou(mode);
-      (void) eml_modeunieml(mode);
-      (void) prc_modeuniprc(mode);
-      (void) tls_modeunitls(mode);
-      break;
-    case false    :
-      (void) tls_modeunitls(mode);
-      (void) prc_modeuniprc(mode);
-      (void) eml_modeunieml(mode);
-      (void) rou_modesubrou(mode);
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
-/*
-^L
-*/
-/********************************************************/
 /*                                                     */
 /*      Procedure to switch a plain socket channel to   */
 /*      crypted channel, return true is successful.     */
index c5c31181e9000c3f4848db04fbcaa87c2eca5668..c79278d6d984ceb46d0bc2fbf323c304c7071ecc 100644 (file)
@@ -71,7 +71,4 @@ extern SOCPTR *soc_release(SOCPTR *socptr);
 //procedure to initiate crypted mode on plain channel
 extern _Bool soc_starttls(SOCPTR *socptr,const char *peerip);
 
-//homework to be done before starting/stopping module.
-extern int soc_modedevsoc(_Bool mode);
-
 #endif
index 2f4d298de0b6e7696714cf719d6367559eeb9dfb..c54da7b382da16fdb478929026b3411ba36dfe43 100644 (file)
@@ -33,7 +33,6 @@ typedef enum    {               //mechanism definition
         mch_unknown             //unknown mechanism
         }MCHTYP;
 
-static  _Bool modopen;          //module open/close status
 /*
 \f
 */
@@ -634,40 +633,3 @@ return spf;
 
 #undef  OPEP
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-int spf_modegesspf(_Bool mode)
-
-{
-#define OPEP    "unidoc.c:soc_modeunisoc"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  (void) rou_modesubrou(mode);
-  (void) afn_modesubafn(mode);
-  switch ((int)mode) {
-    case true     :
-      break;
-    case false    :
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index f8093e0165d9a7d3763f6f75a5342a0d56e0f608..7eed2c0262de503e7af35834fa76475a208eed84 100644 (file)
@@ -27,7 +27,4 @@ extern const char *spf_spfASCII(SPFENU spf);
 //get the SPF status for a specific domain and a remote peer IP
 extern SPFENU spf_getstatus(int *try,char *domain,AFNTYP *afnnum);
 
-//homework to be done before starting/stopping module.
-extern int spf_modegesspf(_Bool mode);
-
 #endif
index f408ba02dd4023cc6d322cfde73d07c3f94bdb90..1ca136d2546ba1da0f47c37a07e6ea4eae89fb22 100644 (file)
@@ -1,7 +1,7 @@
 // vim: smarttab tabstop=8 shiftwidth=2 expandtab
 /********************************************************/
 /*                                                     */
-/*     Module for signal handling level                */
+/*     Module to handle TCP communication              */
 /*                                                     */
 /********************************************************/
 #include        <sys/wait.h>
@@ -20,7 +20,6 @@
 #include        "uniprc.h"
 #include        "gestcp.h"
 
-static  _Bool modopen;          //boolean module open/close
 /*
 ^L
 */
@@ -242,48 +241,3 @@ while (proceed==true) {
 return contact;
 #undef  OPEP
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-PUBLIC int tcp_modegestcp(_Bool mode)
-
-{
-#define OPEP    "unisig.c:sig_modeunisig"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  switch ((int)mode) {
-    case true     :
-      (void) rou_modesubrou(mode);
-      (void) sig_modeunisig(mode);
-      (void) prc_modeuniprc(mode);
-      (void) eml_modeunieml(mode);
-      (void) soc_modedevsoc(mode);
-      break;
-    case false    :
-      (void) soc_modedevsoc(mode);
-      (void) eml_modeunieml(mode);
-      (void) sig_modeunisig(mode);
-      (void) prc_modeuniprc(mode);
-      (void) rou_modesubrou(mode);
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index 3abb019cc370831a9795869e939e62a4c6c13d1c..19aa78548a8dd5932a3a44de49fb3a21d739468b 100644 (file)
@@ -39,7 +39,4 @@ extern CONTYP *tcp_getcontact(SOCPTR *socptr,int pos);
 //drop contact established by remote
 extern CONTYP *tcp_dropcontact(CONTYP *contact);
 
-//homework to be done before starting/stopping module.
-extern int tcp_modegestcp(_Bool mode);
-
 #endif
index 3504738b2b7a7815d64bc2f548af76c721b21cad..3c4167ec5a111f72f77097dedd42e635b3e8d229 100644 (file)
@@ -15,8 +15,6 @@
 #include       "lvleml.h"
 
 
-
-static  _Bool modopen;          //module open/close status
 /*
 ^L
 */
@@ -80,7 +78,7 @@ if (contact!=(CONTYP *)0) {
 /*     if EHLO message is not accepted.        */
 /*                                             */
 /************************************************/
-static _Bool dohelo(CONTYP *contact,char *keyword,char *parameter)
+static _Bool dohelo(CONTYP *contact,char *parameter)
 
 {
 #define        OPEP    "unieml.c:dohelo"
@@ -128,7 +126,7 @@ return done;
 /*     if EHLO message is not accepted.        */
 /*                                             */
 /************************************************/
-static _Bool doehlo(CONTYP *contact,char *keyword,char *parameter)
+static _Bool doehlo(CONTYP *contact,char *parameter)
 
 {
 static char *ehlostr[]= {
@@ -192,7 +190,7 @@ return done;
 /*     Procedure to rset the current session   */
 /*                                             */
 /************************************************/
-static _Bool doreset(CONTYP *contact,char *keyword,char *parameter)
+static _Bool doreset(CONTYP *contact,char *parameter)
 
 {
 (void) transmit(contact,"%d 2.0.0 Flushed session %s",CMDOK,contact->cursesid);
@@ -225,7 +223,6 @@ proceed=true;
 (void) signon(contact);
 while (proceed==true) {
   char *line;
-  char *parameter;
   TIMESPEC attend;
 
   attend.tv_sec=60;
@@ -234,31 +231,23 @@ while (proceed==true) {
   if (status<=0)        //timeout or trouble?
     break;              //no need to go further
   (void) log_fprintlog(contact->logptr,false,"%s",line);
-  if (line!=(char *)0) {
-    parameter=strchr(line,' ');
-    if (parameter==(char *)0)
-    parameter=strchr(line,'\t');
-    if (parameter!=(char *)0) {
-      *parameter='\000';
-      parameter++;
-      while ((*parameter==' ')||(*parameter=='\t')) 
-        parameter++;
-      }
-    }
   switch (eml_getcode(line)) {
     case c_helo         :       //HELO SMTP protocol
-      proceed=dohelo(contact,line,parameter);
+      proceed=dohelo(contact,line);
       break;
     case c_ehlo         :       //EHLO SMTP protocol
-      proceed=doehlo(contact,line,parameter);
+      proceed=doehlo(contact,line);
       break;
     case c_quit         :       //QUIT SMTP protocol
       (void) transmit(contact,"%d 2.0.0 Bye, closing connection %s",
                               QUITOK,contact->mainsesid);
       proceed=false;
       break;
+    case c_mail         :       //MAIL FROM: checking originator
+      (void) rou_alert(0,"JMPDBG parameter=<%s>",line);
+      break;
     case c_rset         :       //Doing session reset
-      proceed=doreset(contact,line,parameter);
+      proceed=doreset(contact,line);
       break;
     case c_starttls     :       //EHLO start encryptel link
       switch (soc_starttls(contact->socptr,contact->peerip)) {
@@ -289,44 +278,3 @@ while (proceed==true) {
 return status;
 #undef  OPEP
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-int eml_modelvleml(_Bool mode)
-
-{
-#define OPEP    "unidoc.c:soc_modeunisoc"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  switch ((int)mode) {
-    case true     :
-      (void) rou_modesubrou(mode);
-      (void) eml_modeunieml(mode);
-      (void) log_modedevlog(mode);
-      break;
-    case false    :
-      (void) log_modedevlog(mode);
-      (void) eml_modeunieml(mode);
-      (void) rou_modesubrou(mode);
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index 6172c1ab41571c6b81153349551b230ae6b1107e..12f51e34b86fbd8662fa49990ae5fa35775c53e7 100644 (file)
@@ -13,7 +13,4 @@
 //procedure to extract line and proceed with peer contact
 extern int eml_docontact(CONTYP *contact);
 
-//homework to be done before starting/stopping module.
-extern int eml_modelvleml(_Bool mode);
-
 #endif
index 980354589481addd8c5c941fde67748ffcf62c18..b23bba806d40b711c6a6f428c7f6908c47a0fafd 100644 (file)
@@ -21,7 +21,6 @@
 #include        "lvleml.h"
 #include        "modrec.h"
 
-static  _Bool modopen;          //boolean module open/close
 #define DFLTIP  "127.0.10.25"   //smtp test IP
 #define SMTPORT "1025"          //smtp test port
 /*
@@ -56,7 +55,7 @@ for (int i=0;i<argc;i++) {
   char *ptr;
   char config[80];
 
-  (void) strncpy(config,argv[i],sizeof(ptr));
+  (void) strncpy(config,argv[i],sizeof(config));
   ptr=config;
   iteration=1;
   proto=pro_smtp; 
@@ -353,50 +352,3 @@ while (proceed==true) {
   }
 #undef  OPEP
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-PUBLIC int rec_modemodrec(_Bool mode)
-
-{
-#define OPEP    "mode.c:rec_modemoderec"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  switch ((int)mode) {
-    case true     :
-      (void) rou_modesubrou(mode);
-      (void) prc_modeuniprc(mode);
-      (void) sig_modeunisig(mode);
-      (void) soc_modedevsoc(mode);
-      (void) tcp_modegestcp(mode);
-      (void) eml_modelvleml(mode);
-      break;
-    case false    :
-      (void) eml_modelvleml(mode);
-      (void) tcp_modegestcp(mode);
-      (void) soc_modedevsoc(mode);
-      (void) sig_modeunisig(mode);
-      (void) prc_modeuniprc(mode);
-      (void) rou_modesubrou(mode);
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index 3c0955e83efe24bde3f16d1697f98f8b79c1e898..e13e74759269524858ef5c7255acb16ac0f1b974 100644 (file)
@@ -9,10 +9,7 @@
 
 #include        <stdbool.h>
 
-//procedure to receive email form outside
+//procedure to receive email from outside
 extern void rec_handlesmtp(int argc,char *argv[]);
 
-//homework to be done before starting/stoping module.
-extern int rec_modemodrec(_Bool mode);
-
 #endif
index 35d2458eed5837825588a04064f57261cdf25bc3..e24c278f1b54f9e93fb0eb93b730dfc3600b3bf7 100644 (file)
@@ -15,7 +15,6 @@
 
 #define PUBLIC                  //to specify public variable
 
-static  _Bool modopen;          //module open/close status
 /*
 \f
 */
@@ -378,38 +377,3 @@ while (proceed==true) {
   }
 return areequal;
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-PUBLIC int afn_modesubafn(_Bool mode)
-
-{
-#define OPEP    "subafn.c:afn_modesubafn"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  switch ((int)mode) {
-    case true     :
-      break;
-    case false    :
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index 9363104adeb6ea925a0192842f67c15bcf4393af..4c84d905150f4f783a6a5391cb20c17662e0e553 100644 (file)
@@ -46,7 +46,4 @@ extern AFNTYP *afn_getipnum(char *cleanipstr);
 //procedure to compare 2 same class IP according a mask value
 extern int afn_cmpipnum(AFNTYP *afnnum1,AFNTYP *afnnum2,int mask);
 
-//homework to be done before starting/stoping module.
-extern int afn_modesubafn(_Bool mode);
-
 #endif
index 2a7ffaee8b915671e6f521c7e7da802420b7ffd2..20b416af5af026871ce673e4adf7dbd37c1b03c1 100644 (file)
@@ -26,7 +26,6 @@ typedef       union   {
         u_char buf[B64K];      //according US Cert VU#738331
        }RSPTYP;
 
-static  _Bool modopen;          //module open/close status
 /*
 \f
 */
@@ -380,42 +379,6 @@ while (proceed==true) {
   }
 return mxlist;
 
-#undef  OPEP
-}
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-int dns_modeunidns(_Bool mode)
-
-{
-#define OPEP    "unidoc.c:soc_modeunisoc"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  (void) rou_modesubrou(mode);
-  switch ((int)mode) {
-    case true     :
-      break;
-    case false    :
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
 #undef  OPEP
 }
 /*
index 6c0b1fa9c62adda13a061cbd3f6f80e1e1e4eb57..689d706d9335da59acfd92f1e82d0143357ce6a9 100644 (file)
@@ -30,7 +30,4 @@ extern MXTYP **dns_getmx(char *domain);
 //of domain A record list
 extern _Bool dns_matchiprec(char *hostname,AFNTYP *afnnum,int mask);
 
-//homework to be done before starting/stopping module.
-extern int dns_modeunidns(_Bool mode);
-
 #endif
index df4d934d21c1e6383cabeb8f94b90247d02c0a5c..9617913b5e1bd6f7459f09d9ebe7e8bd6d7cdd46 100644 (file)
@@ -13,8 +13,6 @@
 #include       "subrou.h"
 #include       "unieml.h"
 
-static  _Bool modopen;          //module open/close status
-
 typedef struct  {
         CODTYP code;            //keyword code
         const char *key;        //keyword itself
@@ -26,6 +24,7 @@ static VOCTYP vocsmtp[]={
                 {c_ehlo,"EHLO"},
                 {c_quit,"QUIT"},
                 {c_rset,"RSET"},
+                {c_mail,MAILF},
                 {c_starttls,"STARTTLS"},
                 {c_unknown,(const char *)0}
                 };
@@ -92,46 +91,16 @@ VOCTYP *ptr;
 
 code=c_unknown;
 for (ptr=vocsmtp;ptr->code!=c_unknown;ptr++) {
-  if (strncasecmp(ptr->key,keyword,strlen(keyword))==0) {
+  if (strncasecmp(ptr->key,keyword,strlen(ptr->key))==0) {
+    char *par;
+
     code=ptr->code;
+    par=keyword+strlen(ptr->key);
+    while ((*par==' ')||(*par=='\t'))
+      par++;
+    (void) strcpy(keyword,par);
     break;
     }
   }
 return code;
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-int eml_modeunieml(_Bool mode)
-
-{
-#define OPEP    "unidoc.c:soc_modeunisoc"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  (void) rou_modesubrou(mode);
-  switch ((int)mode) {
-    case true     :
-      break;
-    case false    :
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index b168b0b1f028f47bdc2763a5a1e32f494ea73c79..ebcf180581cdca826af3ac89a9bbe5d084ee7390 100644 (file)
 #define BADPAR  501             //error in parameters
 #define CMDBAD  502             //command not implemented
 
+
+//SMTP avail command
+#define        MAILF   "MAIL FROM:"    //Mail from a sender
+
 //list of keyword
 typedef enum    {               //list of SMTP protocol keyword
                 c_helo,         //Basic Helo command
                 c_ehlo,         //EHLO command
                 c_quit,         //quit exchange
                 c_rset,         //resetting session
+                c_mail,         //mail from sequence detected
                 c_starttls,     //Starting a TLS crypted link
                 c_unknown       //key word unknown
                 }CODTYP;
@@ -35,7 +40,4 @@ extern char *eml_getcursesid(char *mainid,int numreset);
 //convert SMTP keyword to CODTYP
 extern CODTYP eml_getcode(char *keyword);
 
-//homework to be done before starting/stopping module.
-extern int eml_modeunieml(_Bool mode);
-
 #endif
index 72ec658e204edff6428830f710f70742a23507d2..7c9b60945830702d8c3de0c3bf23d554710bbeb8 100644 (file)
@@ -14,7 +14,6 @@
 #include       "subrou.h"
 #include       "unipar.h"
 
-static  _Bool modopen;        //module open/close status
 /*
 ^L
 */
@@ -156,39 +155,3 @@ if ((params!=(ARGTYP *)0)&&(argc>optind)) {
   }
 return params;
 }
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to "open/close" module and do         */
-/*      homework purpose                                */
-/*      return zero if everything right                 */
-/*                                                      */
-/********************************************************/
-PUBLIC int par_modeunipar(_Bool mode)
-
-{
-#define OPEP    "unipar.c:uni_modeunipar"
-
-int status;
-
-status=0;
-if (mode!=modopen) {
-  (void) rou_modesubrou(mode);
-  switch ((int)mode) {
-    case true     :
-      break;
-    case false    :
-      break;
-    default       :
-      (void) fprintf(stderr,"Calling %s with wrong mode='%d' (Bug?!):",
-                            OPEP,(int)mode);
-      status=-1;
-      break;
-    }
-  modopen=mode;
-  }
-return status;
-#undef  OPEP
-}
index e992c9ffcc116b1682d4701e12957c53808ce6b5..a66672b037243585f98114b679bece236a148ad2 100644 (file)
@@ -23,7 +23,4 @@ extern ARGTYP *par_freeparams(ARGTYP *params);
 //allocated memory and parse an argment list
 extern ARGTYP *par_getparams(int argc,char * const argv[],const char *optstring);
 
-//homework to be done before starting/stopping module.
-extern int par_modeunipar(_Bool mode);
-
 #endif