]> Pileus Git - ~andy/fetchmail/commitdiff
Remove all those obnoxious block comments.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 17 Oct 1996 17:44:12 +0000 (17:44 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 17 Oct 1996 17:44:12 +0000 (17:44 -0000)
svn path=/trunk/; revision=345

13 files changed:
daemon.c
driver.c
fetchmail.c
imap.c
options.c
pop2.c
pop3.c
rcfile_l.l
rcfile_y.y
smtp.c
socket.c
uid.c
xmalloc.c

index ea814a6c4b4748e0c8dbdf3289120a487c4c6132..27449e352b8833ae717a6867c6dc2b16dd8a8ab3 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -1,19 +1,9 @@
 /*
+ * damemon.c -- turn a process into a daemon under POSIX, SYSV, BSD.
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-
-/***********************************************************************
-  module:       daemon
-  project:      fetchmail
-  programmer:   Carl Harris, ceharris@mal.com
-  description:  This module contains all of the code needed to 
-               turn a process into a daemon for POSIX, SysV, and
-               BSD systems.
-
- ***********************************************************************/
-
-
 #include <config.h>
 
 #include <stdio.h>
 
 #include "fetchmail.h"
 
-/******************************************************************
-  function:    sigchld_handler
-  description: Process the SIGCHLD (a.k.a SIGCLD) signal by calling
-               a wait() variant to obtain the exit code of the 
-               terminating process.
-  arguments:   none.
-  ret. value:  none (or undefined if REGSIGTYPE is int).
-  globals:     none.
-  calls:       none.
- *****************************************************************/
-
 RETSIGTYPE
 sigchld_handler ()
+/* process SIGCHLD/SIGCLD to obtain the exit code of the terminating process */
 {
   pid_t pid;
 
@@ -75,24 +55,9 @@ sigchld_handler ()
 
 }
 
-
-
-/******************************************************************
-  function:    daemonize
-  description: become a daemon process; i.e. detach from the 
-               control terminal, don't reacquire a control terminal,
-                become process group leader of our own process group,
-                and set up to catch child process termination signals.
-  arguments:
-    logfile     file to direct stdout and stderr to, if non-NULL.
-
-  ret. value:  none.
-  globals:     termhook, sigchld_handler().
-  calls:       none.
- *****************************************************************/
-
 int
 daemonize (logfile, termhook)
+/* detach from control TTY, become process group leader, catch SIGCHLD */
 const char *logfile;
 void (*termhook)(int);
 {
@@ -210,3 +175,5 @@ nottyDetach:
   signal(SIGPWR, sigchld_handler); 
 #endif
 }
+
+/* daemon.c ends here */
index 8d4cb018fc88be1e3c5faec7c851d739accb65e8..dd8150419f3c96162cef424b1aca5f3a2cdf36d7 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -1,16 +1,11 @@
-/* Copyright 1996 by Eric S. Raymond
+/*
+ * driver.c -- generic driver for mail fetch method protocols
+ *
+ * Copyright 1996 by Eric S. Raymond
  * All rights reserved.
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       driver.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond
-  description:  Generic driver for mail fetch method protocols
-
- ***********************************************************************/
-
 #include  <config.h>
 #include  <stdio.h>
 #if defined(STDC_HEADERS)
@@ -49,23 +44,10 @@ static int tagnum;
 
 static char *shroud;
 
-/*********************************************************************
-  function:      
-  description:   hack message headers so replies will work properly
-
-  arguments:
-    after        where to put the hacked header
-    before       header to hack
-    host         name of the pop header
-
-  return value:  none.
-  calls:         none.
- *********************************************************************/
-
 static void reply_hack(buf, host)
-/* hack local mail IDs -- code by Eric S. Raymond 20 Jun 1996 */
-char *buf;
-const char *host;
+/* hack message headers so replies will work properly */
+char *buf;             /* header to be hacked */
+const char *host;      /* server hostname */
 {
     const char *from;
     int state = 0;
@@ -151,25 +133,19 @@ const char *host;
     *buf++ = '\0';
 }
 
-/*********************************************************************
-  function:      nxtaddr
-  description:   Parse addresses in succession out of a specified RFC822
-                 header.  Note 1: RFC822 escaping with \ is *not* handled.
-                 Note 2: it is important that this routine not stop on \r,
-                 since we use \r as a marker for RFC822 continuations below.
-  arguments:     
-    hdr          header line to be parsed, NUL to continue in previous hdr
-
-  return value:  next address, or NUL if there is no next address
-  calls:         none
- *********************************************************************/
-
 static char *nxtaddr(hdr)
-char *hdr;
+/* parse addresses in succession out of a specified RFC822 header */
+char *hdr;     /* header line to be parsed, NUL to continue in previous hdr */
 {
     static char        *hp, *tp, address[POPBUFSIZE+1];
     static     state;
 
+    /*
+     * Note 1: RFC822 escaping with \ is *not* handled.  Note 2: it is
+     * important that this routine not stop on \r, since we use \r as
+     * a marker for RFC822 continuations below.
+     */
+
     if (hdr)
     {
        hp = hdr;
@@ -271,30 +247,13 @@ char *hdr;
     return(NULL);
 }
 
-/*********************************************************************
-  function:      gen_readmsg
-  description:   Read the message content 
-
- as described in RFC 1225.
-  arguments:     
-    socket       ... to which the server is connected.
-    mboxfd       open file descriptor to which the retrieved message will
-                 be written.
-    len          length of text 
-    delimited    does the protocol use a message delimiter?
-    queryctl     host control block
-
-  return value:  zero if success else PS_* return code.
-  calls:         SockGets.
-  globals:       reads outlevel. 
- *********************************************************************/
-
 static int gen_readmsg (socket, mboxfd, len, delimited, queryctl)
-int socket;
-int mboxfd;
-long len;
-int delimited;
-struct hostrec *queryctl;
+/* read message content and ship to SMTP or MDA */
+int socket;    /* to which the server is connected */
+int mboxfd;    /* descriptor to which retrieved message will be written */
+long len;      /* length of message */
+int delimited; /* does the protocol use a message delimiter? */
+struct hostrec *queryctl;      /* query control record */
 { 
     char buf [MSGBUFSIZE+1]; 
     char fromBuf[MSGBUFSIZE+1];
@@ -501,24 +460,11 @@ struct hostrec *queryctl;
 }
 
 #ifdef KERBEROS_V4
-/*********************************************************************
-  function:      kerberos_auth
-  description:   Authenticate to the server host using Kerberos V4
-
-  arguments:     
-    socket       socket to server
-    servername   server name
-
-  return value:  exit code from the set of PS_.* constants defined in 
-                 fetchmail.h
-  calls:
-  globals:       reads outlevel.
- *********************************************************************/
-
 int
 kerberos_auth (socket, servername) 
-     int socket;
-     char *servername;
+/* authenticate to the server host using Kerberos V4 */
+int socket;            /* socket to server host */
+char *servername;      /* server name */
 {
     char * host_primary;
     KTEXT ticket;
@@ -562,25 +508,10 @@ kerberos_auth (socket, servername)
 }
 #endif /* KERBEROS_V4 */
 
-/*********************************************************************
-  function:      do_protocol
-  description:   retrieve messages from the specified mail server
-                 using a given set of methods
-
-  arguments:     
-    queryctl     fully-specified options (i.e. parsed, defaults invoked,
-                 etc).
-    proto        protocol method pointer
-
-  return value:  exit code from the set of PS_.* constants defined in 
-                 fetchmail.h
-  calls:
-  globals:       reads outlevel.
- *********************************************************************/
-
 int do_protocol(queryctl, proto)
-struct hostrec *queryctl;
-struct method *proto;
+/* retrieve messages from server using given protocol method table */
+struct hostrec *queryctl;      /* parsed options with merged-in defaults */
+struct method *proto;          /* protocol method table */
 {
     int ok, len;
     int mboxfd = -1;
@@ -814,26 +745,15 @@ closeUp:
     return(ok);
 }
 
-/*********************************************************************
-  function:      gen_send
-  description:   Assemble command in print style and send to the server
-
-  arguments:     
-    socket       socket to which the server is connected.
-    fmt          printf-style format
-
-  return value:  none.
-  calls:         SockPuts.
-  globals:       reads outlevel.
- *********************************************************************/
-
 #if defined(HAVE_STDARG_H)
 void gen_send(int socket, char *fmt, ... )
+/* assemble command in printf(3) style and send to the server */
 {
 #else
 void gen_send(socket, fmt, va_alist)
-int socket;
-const char *fmt;
+/* assemble command in printf(3) style and send to the server */
+int socket;            /* socket to which server is connected */
+const char *fmt;       /* printf-style format */
 va_dcl {
 #endif
 
@@ -865,27 +785,15 @@ va_dcl {
     }
 }
 
-/*********************************************************************
-  function:      gen_transact
-  description:   Assemble command in print style and send to the server.
-                 then accept a protocol-dependent response.
-
-  arguments:     
-    socket       socket to which the server is connected.
-    fmt          printf-style format
-
-  return value:  none.
-  calls:         SockPuts.
-  globals:       reads outlevel.
- *********************************************************************/
-
 #if defined(HAVE_STDARG_H)
 int gen_transact(int socket, char *fmt, ... )
+/* assemble command in printf(3) style, send to server, accept a response */
 {
 #else
 int gen_transact(socket, fmt, va_alist)
-int socket;
-const char *fmt;
+/* assemble command in printf(3) style, send to server, accept a response */
+int socket;            /* socket to which server is connected */
+const char *fmt;       /* printf-style format */
 va_dcl {
 #endif
 
@@ -922,24 +830,11 @@ va_dcl {
   return(ok);
 }
 
-/*********************************************************************
-  function:      strcrlf
-  description:   replace LFs with CR-LF
-
-  arguments:     
-    dst          new string with CR-LFs
-    src          original string with LFs
-    count        length of src
-
-  return value:  length of dst
-  calls:         none.
-  globals:       none.
- *********************************************************************/
-
 int strcrlf(dst, src, count)
-char *dst;
-char *src;
-int count;
+/* replace LFs with CR-LF; return length of string with replacements */
+char *dst;     /* new string with CR-LFs */
+char *src;     /* original string with LFs */
+int count;     /* length of src */
 {
   int len = count;
 
@@ -955,24 +850,15 @@ int count;
   *dst = '\0';
   return len;
 }
-/*********************************************************************
-  function:      alarm_handler
-  description:   In real life process can get stuck waiting for 
-                 something. This deadlock is avoided here by this 
-                 sending  SIGALRM
-
-  arguments:     
-    signal       hopefully SIGALRM
-
-  return value:  none.
-  calls:         none
-  globals:       sets alarmed to 1
- *********************************************************************/
+
 void 
 alarm_handler (int signal)
+/* handle server-timeout signal */
 {
     alarmed = 1;
     fprintf(stderr,
            "fetchmail: timeout after %d seconds waiting for %s.\n",
            mytimeout, srvname);
 }
+
+/* driver.c ends here */
index 08ca78f9d964dc2268e57a9c4396e6806229cb22..de258a1c8a05ed1b92845c49314b0b940d5031e5 100644 (file)
@@ -1,18 +1,10 @@
 /*
+ * fetchmail.c -- main driver module for fetchmail
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       fetchmail.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond <esr@thyrsus.com>
-  description: main driver module for fetchmail
-
- ***********************************************************************/
-
-
 #include <config.h>
-
 #include <stdio.h>
 
 #if defined(STDC_HEADERS)
@@ -59,19 +51,6 @@ char *rcfile;                /* path name of rc file */
 char *idfile;          /* UID list file */
 int versioninfo;       /* emit only version info */
 
-/*********************************************************************
-  function:      main
-  description:   main driver routine 
-  arguments:     
-    argc         argument count as passed by runtime startup code.
-    argv         argument strings as passed by runtime startup code.
-
-  return value:  an exit status code for the shell -- see the 
-                 PS_.* constants defined above.
-  calls:         parsecmdline, setdefaults, openuserfolder, doPOP2.
-  globals:       none.
- *********************************************************************/
-
 static void termhook();
 static char *lockfile;
 static int popstatus;
@@ -442,17 +421,8 @@ void termhook(int sig)
     exit(popstatus);
 }
 
-/*********************************************************************
-  function:      showproto
-  description:   protocol index to name mapping
-  arguments:
-    proto        protocol index
-  return value:  string name of protocol
-  calls:         none.
-  globals:       none.
- *********************************************************************/
-
 static char *showproto(proto)
+/* protocol index to protocol name mapping */
 int proto;
 {
     switch (proto)
@@ -512,19 +482,9 @@ struct hostrec *queryctl;
     }
 }
 
-/*********************************************************************
-  function:      dump_params
-  description:   display program options in English
-  arguments:
-    queryctl      merged options
-
-  return value:  none.
-  calls:         none.
-  globals:       outlimit.
-*********************************************************************/
-
 int dump_params (queryctl)
-struct hostrec *queryctl;
+/* display query parameters in English */
+struct hostrec *queryctl;      /* query parameter block */
 {
     printf("Options for %s retrieving from %s:\n",
           hostp->localname, visbuf(hostp->servername));
@@ -604,19 +564,9 @@ struct hostrec *queryctl;
        }
 }
 
- /*********************************************************************
-  function:      openmailpipe
-  description:   open a one-way pipe to the mail delivery agent.
-  arguments:     
-    queryctl     fully-determined options (i.e. parsed, defaults invoked,
-                 etc).
-
-  return value:  open file descriptor for the pipe or -1.
-  calls:         none.
- *********************************************************************/
-
 int openmailpipe (queryctl)
-struct hostrec *queryctl;
+/* open a one-way pipe to a mail delivery agent */
+struct hostrec *queryctl;      /* query control block */
 {
     int pipefd [2];
     int childpid;
@@ -652,19 +602,8 @@ struct hostrec *queryctl;
     return(pipefd[1]);
 }
 
-/*********************************************************************
-  function:      closemailpipe
-  description:   close pipe to the mail delivery agent.
-  arguments:     
-    queryctl     fully-determined options record
-    fd           pipe descriptor.
-
-  return value:  0 if success, else -1.
-  calls:         none.
-  globals:       none.
- *********************************************************************/
-
 int closemailpipe (fd)
+/* close the pipe to the mail delivery agent */
 int fd;
 {
     int err, status;
@@ -702,8 +641,8 @@ int fd;
 
 void escapes(cp, tp)
 /* process standard C-style escape sequences in a string */
-const char     *cp;
-char           *tp;
+const char     *cp;    /* source string with escapes */
+char           *tp;    /* target buffer for digested string */
 {
     while (*cp)
     {
@@ -789,3 +728,5 @@ const char *buf;
     *tp++ = '\0';
     return(vbuf);
 }
+
+/* fetchmail.c ends here */
diff --git a/imap.c b/imap.c
index 2c33511887857541ea1efd4f71cdc7801ffc8e4b..372e43e697863b7d493026d20fa60a421c74be22 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -1,28 +1,17 @@
-/* Copyright 1996 by Eric S. Raymond
+/*
+ * imap.c -- IMAP2bis protocol methods
+ *
+ * Copyright 1996 by Eric S. Raymond
  * All rights reserved.
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       imap.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond
-  description:  IMAP client code
-
- ***********************************************************************/
-
 #include  <config.h>
 #include  <stdio.h>
 #include  <string.h>
 #include  "socket.h"
 #include  "fetchmail.h"
 
-/*********************************************************************
-
- Method declarations for IMAP 
-
- *********************************************************************/
-
 static int count, seen;
 
 int imap_ok (socket, argbuf)
@@ -201,4 +190,4 @@ struct hostrec *queryctl;
     return(do_protocol(queryctl, &imap));
 }
 
-
+/* imap.c ends here */
index f85ff2d1d995ba3a1cee73f1159debc742071fbf..54688561c37ba9a091c80f1804227aad6baf5902 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1,15 +1,9 @@
 /*
+ * options.c -- command-line option processing
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       options.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond, <esr@thyrsus.com>
-  description: command-line option processing
-
- ***********************************************************************/
-
 #include <config.h>
 #include <stdio.h>
 #include <pwd.h>
@@ -79,32 +73,20 @@ static struct option longoptions[] = {
   {(char *) 0,  no_argument,       (int *) 0, 0              }
 };
 
-
-/*********************************************************************
-  function:      parsecmdline
-  description:   parse/validate the command line options.
-  arguments:
-    argc         argument count.
-    argv         argument strings.
-    queryctl     pointer to a struct hostrec to receive the parsed 
-                 options.
-
-  return value:  if positive, argv index of last parsed option + 1
-                (presumes one or more server names follows).
-                if zero, the command line switches are such that
-                no server names are required (e.g. --version).
-                if negative, the command line is has one or more
-                syntax errors.
-  calls:         none.  
-  globals:       writes outlevel, versioninfo, yydebug, logfile, 
-                poll_interval, quitmode, rcfile
- *********************************************************************/
-
 int parsecmdline (argc,argv,queryctl)
-int argc;
-char **argv;
-struct hostrec *queryctl;
+/* parse and validate the command line options */
+int argc;                      /* argument count */
+char **argv;                   /* argument strings */
+struct hostrec *queryctl;      /* option record to be initialized */
 {
+    /*
+     * return value: if positive, argv index of last parsed option + 1
+     * (presumes one or more server names follows).  if zero, the
+     * command line switches are such that no server names are
+     * required (e.g. --version).  if negative, the command line is
+     * has one or more syntax errors.
+     */
+
     int c;
     int ocount = 0;     /* count of destinations specified */
     int errflag = 0;   /* TRUE when a syntax error is detected */
@@ -282,3 +264,4 @@ struct hostrec *queryctl;
     return(optind);
 }
 
+/* options.c ends here */
diff --git a/pop2.c b/pop2.c
index bccc1b6e95b6b9b242b1a87a766f303bc67cd87d..1e49a6ca91f3305ef4e54648ea78bf181b34a02d 100644 (file)
--- a/pop2.c
+++ b/pop2.c
@@ -1,16 +1,11 @@
-/* Copyright 1996 by Eric S. Raymond
+/*
+ * pop2.c -- POP@ protocol methods
+ *
+ * Copyright 1996 by Eric S. Raymond
  * All rights reserved.
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       pop2.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond
-  description:  POP2 method code.
-
- ***********************************************************************/
-
 #include  <config.h>
 #include  <stdio.h>
 #include  "socket.h"
@@ -143,7 +138,10 @@ const static struct method pop2 =
 };
 
 int doPOP2 (queryctl)
+/* retrieve messages using POP2 */
 struct hostrec *queryctl;
 {
     return(do_protocol(queryctl, &pop2));
 }
+
+/* pop2.c ends here */
diff --git a/pop3.c b/pop3.c
index 92089e0ed45ea7d8e0cfe0219b465db0531173ff..bbf6e1ac0b39adaeb3b89d0514ff2f0bfe25c042 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -1,15 +1,9 @@
 /*
+ * pop3.c -- POP3 protocol methods
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       pop3.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond <esr@thyrsus.com>
-  description:  POP3 client code.
-
- ***********************************************************************/
-
 #include  <config.h>
 #include  <stdio.h>
  
@@ -243,4 +237,4 @@ struct hostrec *queryctl;
     return(do_protocol(queryctl, &pop3));
 }
 
-
+/* pop3.c ends here */
index 99558152d8b208e9b62d08b167c9792ec25d5381..5ef8722d9e957ae8601aa2c236b287f17e719136 100644 (file)
@@ -1,18 +1,11 @@
 %{
 
 /*
+ * rcfile_l.l -- lexer for the run control file
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       rcfile_l.l
-  project:      fetchmail
-  programmer:   Carl Harris, ceharris@mal.com
-               Extensively hacked by esr.
-  description:  configuration lexer
-
- ***********************************************************************/
-
 #include <config.h>
 #include "fetchmail.h"
 #include "rcfile_y.h"
index f6df31fffea85058896642888173566601e18266..849df683823263ac8fb28111b64f9754c15adcee 100644 (file)
@@ -1,5 +1,7 @@
 %{
 /*
+ * rcfile_y.y -- Run control file parser for fetchmail
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
diff --git a/smtp.c b/smtp.c
index 657d9373f3f4fc71cc96173e7e4ad66178952f92..07f83093ef9f4f99f9e7bad690345531d3b80cca 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -1,18 +1,14 @@
-/* Copyright 1996 Eric S. Raymond
+/*
+ * smtp.c -- code for speaking SMTP to a listener port
+ *
+ * Concept due to Harry Hochheiser.  Implementation by ESR.  Cleanup and
+ * strict RFC821 compliance by Cameron MacPherson.
+ *
+ * Copyright 1996 Eric S. Raymond
  * All rights reserved.
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       smtp.c
-  project:      fetchmail
-  programmer:   Harry Hochheiser
-                cleaned up and made rfc821 compliant by Cameron MacPherson
-  description:  Handling of SMTP connections, and processing of mail 
-                 to be forwarded via SMTP connections.
-
- ***********************************************************************/
-
 #include <stdio.h>
 #include <config.h>
 #include <sys/types.h>
 #include "fetchmail.h"
 #include "smtp.h"
 
-/*********************************************************************
-  function:      SMTP_helo
-  description:   Send a "HELO" message to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-  return value:  Result of SMTP_OK: based on codes in fetchmail.h.
-                 
- *********************************************************************/
-
 int SMTP_helo(int socket,char *host)
+/* send a "HELO" message to the SMTP listener */
 {
   int ok;
 
@@ -43,21 +30,8 @@ int SMTP_helo(int socket,char *host)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_from
-  description:   Send a "MAIL FROM:" message to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-    from         user name/host of originator
-
-    Note: these args are likely to change, as we get fancier about
-    handling the names.
-
-  return value:  Result of SMTP_ok: based on codes in fetchmail.h.
-                 
- *********************************************************************/
 int SMTP_from(int socket, char *from)
+/* send a "MAIL FROM:" message to the SMTP listener */
 {
   int ok;
 
@@ -68,19 +42,8 @@ int SMTP_from(int socket, char *from)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_rcpt
-  description:   Send a "RCPT TO:" message to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-    touser:      user name of recipient
-    tohost:      host name of recipient
-
-  return value:  Result of SMTP_OK: based on codes in fetchmail.h.
-                 
- *********************************************************************/
-int SMTP_rcpt(int socket,char *to)
+int SMTP_rcpt(int socket, char *to)
+/* send a "RCPT TO:" message to the SMTP listener */
 {
   int ok;
 
@@ -91,15 +54,8 @@ int SMTP_rcpt(int socket,char *to)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_data
-  description:   Send a "DATA" message to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-
- *********************************************************************/
 int SMTP_data(int socket)
+/* send a "DATA" message to the SMTP listener */
 {
   int ok;
 
@@ -110,17 +66,8 @@ int SMTP_data(int socket)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_quit
-  description:   Send a "QUIT" message to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-
-  return value:  Result of SMTP_OK: based on codes in fetchmail.h.
-
- *********************************************************************/
 int SMTP_quit(int socket)
+/* send a "QUIT" message to the SMTP listener */
 {
   int ok;
 
@@ -131,17 +78,8 @@ int SMTP_quit(int socket)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_eom
-  description:   Send a message data termination to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-  return value:  Result of SMTP_OK: based on codes in fetchmail.h.
-                 
- *********************************************************************/
-
 int SMTP_eom(int socket)
+/* send a message data terminator to the SMTP listener */
 {
   int ok;
 
@@ -152,30 +90,16 @@ int SMTP_eom(int socket)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_rset
-  description:   Send a "RSET" message to the SMTP server.
-
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-
- *********************************************************************/
 void SMTP_rset(int socket)
+/* send a "RSET" message to the SMTP listener */
 {
   SockPrintf(socket,"RSET\r\n");
   if (outlevel == O_VERBOSE)
       fprintf(stderr, "SMTP> RSET\n");
 }
 
-/*********************************************************************
-  function:      SMTP_check
-  description:   Returns the status of the smtp connection
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-  return value:  based on codes in fetchmail.h.
-                 Do the dirty work of seeing what the status is..
- *********************************************************************/
 static int SMTP_check(int socket,char *argbuf)
+/* returns status of SMTP connection */
 {
   int  ok;  
   char buf[SMTPBUFSIZE];
@@ -196,14 +120,8 @@ static int SMTP_check(int socket,char *argbuf)
   return (ok);
 }
 
-/*********************************************************************
-  function:      SMTP_ok
-  description:   Returns the statsus of the smtp connection
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-  return value:  based on codes in fetchmail.h.
- *********************************************************************/
 int SMTP_ok(int socket,char *argbuf)
+/* accepts SMTP response, returns status of SMTP connection */
 {
   int  ok;  
 
@@ -231,14 +149,10 @@ int SMTP_ok(int socket,char *argbuf)
   return ok;
 }
 
-/*********************************************************************
-  function:      SMTP_Gets
-  description:   Gets  a line from the SMTP connection
-  arguments:     
-    socket       TCP/IP socket for connection to SMTP
-  return value:  number of bytes read.
- *********************************************************************/
 int SMTP_Gets(int socket,char *buf,int sz)
+/* gets a line from the SMTP connection, returns bytes read */
 {
   return read(socket,buf,sz);
 }
+
+/* smtp.c ends here */
index 9347e367a64ce9ea3ed820f7a99a1aefe4409a34..9ea13864050bd820ddc9be12ea15504e0c88d65d 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -1,15 +1,12 @@
 /*
+ * socket.c -- socket library functions
+ *
+ * These were designed and coded by Carl Harris <ceharris@mal.com>
+ * and are essentially unchanged from the ancestral popclient.
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       socket.c
-  project:      fetchmail
-  programmer:   Carl Harris, ceharris@mal.com
-  description:  socket library functions
-
- ***********************************************************************/
-
 #include <config.h>
 
 #include <fcntl.h>
@@ -271,3 +268,5 @@ va_dcl {
     return SockWrite(socket, buf, strlen(buf));
 
 }
+
+/* socket.c ends here */
diff --git a/uid.c b/uid.c
index 676850c10743456dba3e2faf6fe0a63f3988df5f..ad043af690c7b9cbdf2591e0e0eaa7ddea075392 100644 (file)
--- a/uid.c
+++ b/uid.c
@@ -1,15 +1,9 @@
 /*
+ * uid.c -- UIDL handling for POP3 servers without LAST
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       uid.c
-  project:      fetchmail
-  programmer:   Eric S. Raymond
-  description: UID list handling
-
- ***********************************************************************/
-
 #include <config.h>
 
 #include <stdio.h>
@@ -222,3 +216,5 @@ char *idfile;
            fclose(tmpfp);
        }
 }
+
+/* uid.c ends here */
index bfa5b463a6c8e65197b6fb81da443efbb5b7c0bc..6fab5be1096d36966a65569c55041d5196c19eba 100644 (file)
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,16 +1,9 @@
 /*
+ * xmalloc.c -- allocate space or die 
+ *
  * For license terms, see the file COPYING in this directory.
  */
 
-/***********************************************************************
-  module:       xmalloc.c
-  project:      fetchmail
-  programmer:   Carl Harris, ceharris@mal.com
-  description:  malloc wrapper.
-
- ***********************************************************************/
-
-
 #include <config.h>
 #include <stdio.h>
 #include <string.h>
@@ -45,3 +38,5 @@ char *s;
   strcpy(p,s);
   return p;
 }
+
+/* xmalloc.c ends here */