/[pengfork]/pengfork/src/log.c
ViewVC logotype

Diff of /pengfork/src/log.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by chupa, Thu Sep 12 12:45:35 2002 UTC revision 1.11 by chupa, Thu Sep 12 15:00:12 2002 UTC
# Line 86  dump_raw (text, data, size) Line 86  dump_raw (text, data, size)
86    int i, j;    int i, j;
87    unsigned char *p = data;    unsigned char *p = data;
88        
89    if(PARAM_DEBUG_LEVEL < 3) return;    if(PARAM_DEBUG_LEVEL < DEBUG_MAX) return;
90    debug (3, "%s raw dump: \n",text);    debug (DEBUG_MAX, "%s raw dump: \n",text);
91    for (i = 0; i < size; i += 16)    for (i = 0; i < size; i += 16)
92      {      {
93        debug (3, "  %04x: ", i);        debug (DEBUG_MAX, "  %04x: ", i);
94        for (j = 0; j < 8; j++)        for (j = 0; j < 8; j++)
95          if (i + j < size)          if (i + j < size)
96            debug (3, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.');            debug (DEBUG_MAX, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.');
97          else          else
98            debug (3, " ");            debug (DEBUG_MAX, " ");
99    
100        debug (3, " ");        debug (DEBUG_MAX, " ");
101    
102        for (j = 8; j < 16; j++)        for (j = 8; j < 16; j++)
103          if (i + j < size)          if (i + j < size)
104            debug (3, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.');            debug (DEBUG_MAX, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.');
105          else          else
106            debug (3, " ");            debug (DEBUG_MAX, " ");
107    
108        debug (3, "  |  ");        debug (DEBUG_MAX, "  |  ");
109    
110        for (j = 0; i + j < size && j < 8; j++)        for (j = 0; i + j < size && j < 8; j++)
111          debug (3, "%02x", p[i + j]);          debug (DEBUG_MAX, "%02x", p[i + j]);
112        debug (3, " ");        debug (DEBUG_MAX, " ");
113        for (j = 8; i + j < size && j < 16; j++)        for (j = 8; i + j < size && j < 16; j++)
114          debug (3, "%02x", p[i + j]);          debug (DEBUG_MAX, "%02x", p[i + j]);
115        debug (3, "\n");        debug (DEBUG_MAX, "\n");
116      }      }
117    debug (3, "\n");    debug (DEBUG_MAX, "\n");
118  }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26