RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   26-May-2017 21:52:21
  Branch: rpm-5_4                          Handle: 2017052619522100

  Modified files:           (Branch: rpm-5_4)
    rpm/rpmio               librpmio.vers rpmlog.c rpmlog.h rpmzlog.c
                            rpmzlog.h rpmzq.h

  Log:
    - sanity.

  Summary:
    Revision    Changes     Path
    2.199.2.81  +1  -0      rpm/rpmio/librpmio.vers
    2.46.4.10   +3  -24     rpm/rpmio/rpmlog.c
    2.24.4.7    +59 -0      rpm/rpmio/rpmlog.h
    2.5.6.3     +5  -5      rpm/rpmio/rpmzlog.c
    2.5.6.5     +2  -0      rpm/rpmio/rpmzlog.h
    1.38.6.3    +2  -1      rpm/rpmio/rpmzq.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/librpmio.vers
  ============================================================================
  $ cvs diff -u -r2.199.2.80 -r2.199.2.81 librpmio.vers
  --- rpm/rpmio/librpmio.vers   25 May 2017 20:02:13 -0000      2.199.2.80
  +++ rpm/rpmio/librpmio.vers   26 May 2017 19:52:21 -0000      2.199.2.81
  @@ -910,6 +910,7 @@
       rpmxarPush;
       rpmxarStat;
       rpmxarSwapBuf;
  +    _rpmzlog_debug;
       rpmzLogAdd;
       rpmzLogDump;
       rpmzLogFree;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmlog.c
  ============================================================================
  $ cvs diff -u -r2.46.4.9 -r2.46.4.10 rpmlog.c
  --- rpm/rpmio/rpmlog.c        1 May 2017 19:54:43 -0000       2.46.4.9
  +++ rpm/rpmio/rpmlog.c        26 May 2017 19:52:21 -0000      2.46.4.10
  @@ -123,27 +123,6 @@
       "D: ",           /*!< RPMLOG_DEBUG */
   };
   
  -#define ANSI_COLOR_BLACK     "\x1b[30m"
  -#define ANSI_COLOR_RED               "\x1b[31m"
  -#define ANSI_COLOR_GREEN     "\x1b[32m"
  -#define ANSI_COLOR_YELLOW    "\x1b[33m"
  -#define ANSI_COLOR_BLUE              "\x1b[34m"
  -#define ANSI_COLOR_MAGENTA   "\x1b[35m"
  -#define ANSI_COLOR_CYAN              "\x1b[36m"
  -#define ANSI_COLOR_WHITE     "\x1b[37m"
  -
  -#define ANSI_BRIGHT_BLACK    "\x1b[30;1m"
  -#define ANSI_BRIGHT_RED              "\x1b[31;1m"
  -#define ANSI_BRIGHT_GREEN    "\x1b[32;1m"
  -#define ANSI_BRIGHT_YELLOW   "\x1b[33;1m"
  -#define ANSI_BRIGHT_BLUE     "\x1b[34;1m"
  -#define ANSI_BRIGHT_MAGENTA  "\x1b[35;1m"
  -#define ANSI_BRIGHT_CYAN     "\x1b[36;1m"
  -#define ANSI_BRIGHT_WHITE    "\x1b[37;1m"
  -
  -#define ANSI_COLOR_BOLD              "\x1b[1m"
  -#define ANSI_COLOR_RESET     "\x1b[0m"
  -
   static const char *rpmlogMsgPrefixColor[] = {
       ANSI_BRIGHT_RED, /*!< RPMLOG_EMERG */
       ANSI_BRIGHT_RED, /*!< RPMLOG_ALERT */
  @@ -202,8 +181,8 @@
       case RPMLOG_ERR:
       case RPMLOG_WARNING:
        if (colorOn && *colorOn) {
  -         (void) fputs(ANSI_COLOR_RESET, msgout);
  -         (void) fputs(ANSI_COLOR_BOLD, msgout);
  +         (void) fputs(ANSI_RESET, msgout);
  +         (void) fputs(ANSI_BOLD_ON, msgout);
        }
       case RPMLOG_DEBUG:
       default:
  @@ -224,7 +203,7 @@
       case RPMLOG_WARNING:
       case RPMLOG_DEBUG:
        if (colorOn && *colorOn)
  -         (void) fputs(ANSI_COLOR_RESET, msgout);
  +         (void) fputs(ANSI_RESET, msgout);
        break;
       default:
        break;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmlog.h
  ============================================================================
  $ cvs diff -u -r2.24.4.6 -r2.24.4.7 rpmlog.h
  --- rpm/rpmio/rpmlog.h        5 Jul 2016 14:46:57 -0000       2.24.4.6
  +++ rpm/rpmio/rpmlog.h        26 May 2017 19:52:21 -0000      2.24.4.7
  @@ -172,6 +172,65 @@
   #define RPMLOG_EXIT  0x02    /*!< exit after logging */
   
   #if defined(_RPMLOG_INTERNAL)
  +
  +#define ANSI_BRIGHT_BLACK    "\x1b[30;1m"
  +#define ANSI_BRIGHT_RED              "\x1b[31;1m"
  +#define ANSI_BRIGHT_GREEN    "\x1b[32;1m"
  +#define ANSI_BRIGHT_YELLOW   "\x1b[33;1m"
  +#define ANSI_BRIGHT_BLUE     "\x1b[34;1m"
  +#define ANSI_BRIGHT_MAGENTA  "\x1b[35;1m"
  +#define ANSI_BRIGHT_CYAN     "\x1b[36;1m"
  +#define ANSI_BRIGHT_WHITE    "\x1b[37;1m"
  +
  +#define ANSI_RESET           "\x1b[0m"
  +#define ANSI_BOLD_ON         "\x1b[1m"
  +#define ANSI_FAINT_ON                "\x1b[2m"
  +#define ANSI_ITALICS_ON              "\x1b[3m"
  +#define ANSI_UNDERLINE_ON    "\x1b[4m"
  +#define ANSI_BLINK_ON                "\x1b[5m"
  +#define ANSI_INVERSE_ON              "\x1b[7m"
  +#define ANSI_STRIKETHROUGH_ON        "\x1b[9m"
  +
  +#define ANSI_FONT_RESET              "\x1b[11m"
  +#define ANSI_FONT_1          "\x1b[11m"
  +#define ANSI_FONT_2          "\x1b[12m"
  +#define ANSI_FONT_3          "\x1b[13m"
  +#define ANSI_FONT_4          "\x1b[14m"
  +#define ANSI_FONT_5          "\x1b[15m"
  +#define ANSI_FONT_6          "\x1b[16m"
  +#define ANSI_FONT_7          "\x1b[17m"
  +#define ANSI_FONT_8          "\x1b[18m"
  +#define ANSI_FONT_9          "\x1b[19m"
  +
  +#define ANSI_BOLD_OFF                "\x1b[22m"
  +#define ANSI_ITALICS_OFF     "\x1b[23m"
  +#define ANSI_UNDERLINE_OFF   "\x1b[24m"
  +#define ANSI_BLINK_OFF               "\x1b[5m"
  +#define ANSI_INVERSE_OFF     "\x1b[27m"
  +#define ANSI_STRIKETHROUGH_OFF       "\x1b[29m"
  +
  +#define ANSI_FG_BLACK                "\x1b[30m"
  +#define ANSI_FG_RED          "\x1b[31m"
  +#define ANSI_FG_GREEN                "\x1b[32m"
  +#define ANSI_FG_YELLOW               "\x1b[33m"
  +#define ANSI_FG_BLUE         "\x1b[34m"
  +#define ANSI_FG_MAGENTA              "\x1b[35m"
  +#define ANSI_FG_CYAN         "\x1b[36m"
  +#define ANSI_FG_WHITE                "\x1b[37m"
  +
  +#define ANSI_FG_RESET                "\x1b[39m"
  +
  +#define ANSI_BG_BLACK                "\x1b[40m"
  +#define ANSI_BG_RED          "\x1b[41m"
  +#define ANSI_BG_GREEN                "\x1b[42m"
  +#define ANSI_BG_YELLOW               "\x1b[43m"
  +#define ANSI_BG_BLUE         "\x1b[44m"
  +#define ANSI_BG_MAGENTA              "\x1b[45m"
  +#define ANSI_BG_CYAN         "\x1b[46m"
  +#define ANSI_BG_WHITE                "\x1b[47m"
  +
  +#define ANSI_BG_RESET                "\x1b[49m"
  +
   /**
    */
   struct rpmlogRec_s {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmzlog.c
  ============================================================================
  $ cvs diff -u -r2.5.6.2 -r2.5.6.3 rpmzlog.c
  --- rpm/rpmio/rpmzlog.c       17 May 2017 12:34:41 -0000      2.5.6.2
  +++ rpm/rpmio/rpmzlog.c       26 May 2017 19:52:21 -0000      2.5.6.3
  @@ -47,13 +47,15 @@
   
   #include "debug.h"
   
  -static int _rpmzlog_debug = 0;
  +int _rpmzlog_debug = 0;
   
   #ifdef __cplusplus
   GENfree(rpmzMsg)
   GENfree(rpmzLog)
   #endif       /* __cplusplus */
   
  +#define SPEW(_list) if (_rpmzlog_debug) fprintf _list
  +
   /*==============================================================*/
   
   /* maximum log entry length */
  @@ -67,8 +69,7 @@
        return NULL;
       yarnPossess(zlog->_item.use);
       nrefs = yarnPeekLock(zlog->_item.use);
  -if (_rpmzlog_debug)
  -fprintf(stderr, "    ++ zlog %p[%ld]\n", zlog, nrefs+1);
  +SPEW((stderr, "    ++ zlog %p[%ld]\n", zlog, nrefs+1));
       yarnTwist(zlog->_item.use, BY, 1);
       return zlog;
   }
  @@ -168,8 +169,7 @@
   
       yarnPossess(zlog->_item.use);
       nrefs = yarnPeekLock(zlog->_item.use);
  -if (_rpmzlog_debug)
  -fprintf(stderr, "    -- zlog %p[%ld]\n", zlog, nrefs);
  +SPEW((stderr, "    -- zlog %p[%ld]\n", zlog, nrefs));
   #ifdef  NOTYET
   assert(nrefs > 0);
   #else
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmzlog.h
  ============================================================================
  $ cvs diff -u -r2.5.6.4 -r2.5.6.5 rpmzlog.h
  --- rpm/rpmio/rpmzlog.h       25 Jun 2016 22:36:54 -0000      2.5.6.4
  +++ rpm/rpmio/rpmzlog.h       26 May 2017 19:52:21 -0000      2.5.6.5
  @@ -7,6 +7,8 @@
   #include <stdio.h>
   #include <rpmdefs.h>
   
  +extern int _rpmzlog_debug;
  +
   /** trace log pointer */
   typedef struct rpmzLog_s * rpmzLog;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmzq.h
  ============================================================================
  $ cvs diff -u -r1.38.6.2 -r1.38.6.3 rpmzq.h
  --- rpm/rpmio/rpmzq.h 17 May 2017 12:34:41 -0000      1.38.6.2
  +++ rpm/rpmio/rpmzq.h 26 May 2017 19:52:21 -0000      1.38.6.3
  @@ -371,7 +371,8 @@
   
   /**
    */
  -rpmzQueue rpmzqFree(rpmzQueue zq);
  +rpmzQueue rpmzqFree(rpmzQueue zq)
  +     RPM_GNUC_CONST;
   
   /**
    */
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to