[BACK]Return to log.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/log.c between version 1.2 and 1.3

version 1.2, 2004/07/27 16:19:41 version 1.3, 2004/08/05 13:32:08
Line 35 
Line 35 
 #include <syslog.h>  #include <syslog.h>
   
 #include "log.h"  #include "log.h"
   #include "cvs.h"
   
 extern char *__progname;  extern char *__progname;
   
   
 #ifdef unused  #ifdef unused
 static char *cvs_log_levels[] = {  static char *cvs_log_levels[] = {
         "debug",          "debug",
Line 222 
Line 224 
         if (level == LP_ERRNO)          if (level == LP_ERRNO)
                 ecp = errno;                  ecp = errno;
   
         strlcpy(prefix, __progname, sizeof(prefix));  #ifdef CVS
           /* The cvs program appends the command name to the program name */
           if (cvs_command != NULL) {
                   snprintf(prefix, sizeof(prefix), "%s %s", __progname,
                       cvs_command);
           }
           else /* just use the standard strlcpy */
   #endif
                   strlcpy(prefix, __progname, sizeof(prefix));
   
         if (cvs_log_flags & LF_PID) {          if (cvs_log_flags & LF_PID) {
                 snprintf(buf, sizeof(buf), "[%d]", (int)getpid());                  snprintf(buf, sizeof(buf), "[%d]", (int)getpid());
                 strlcat(prefix, buf, sizeof(prefix));                  strlcat(prefix, buf, sizeof(prefix));
Line 239 
Line 250 
                         out = stdout;                          out = stdout;
                 else                  else
                         out = stderr;                          out = stderr;
   
   #ifdef CVS
                   if (cvs_cmdop == CVS_OP_SERVER) {
                           if (out == stdout)
                                   putc('M', out);
                           else
                                   putc('E', out);
                           putc(' ', out);
                   }
   #endif
   
                 fprintf(out, "%s: %s\n", prefix, buf);                  fprintf(out, "%s: %s\n", prefix, buf);
         }          }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3