comparison src/readpstlog.c @ 70:b12f4e50e2e8

Patch from Joachim Metz <joachim.metz@gmail.com> for 64 bit compile. Signed/unsigned cleanup from 'CFLAGS=-Wextra ./configure' Reindent vbuf.c to make it readable.
author Carl Byington <carl@five-ten-sg.com>
date Sun, 11 May 2008 10:04:33 -0700
parents 034641c26ab9
children 987aa872294e
comparison
equal deleted inserted replaced
69:63c02a242ca9 70:b12f4e50e2e8
27 int x, ptr, stop=0, flag; 27 int x, ptr, stop=0, flag;
28 char *fname, *buf, rec_type; 28 char *fname, *buf, rec_type;
29 unsigned char version; 29 unsigned char version;
30 int *show_type=NULL, show_size=0; 30 int *show_type=NULL, show_size=0;
31 int *ex_type=NULL, ex_size=0; 31 int *ex_type=NULL, ex_size=0;
32 unsigned int funcname=0, filename=0, text=0, end=0, dtype=0, line=0, c; 32 unsigned int funcname=0, filename=0, text=0, end=0, dtype=0, line=0;
33 int c;
34 char ch;
33 FILE *fp; 35 FILE *fp;
34 struct pst_debug_file_rec_m mfile_rec; 36 struct pst_debug_file_rec_m mfile_rec;
35 struct pst_debug_file_rec_l lfile_rec; 37 struct pst_debug_file_rec_l lfile_rec;
36 char format = 'D'; // default 38 char format = 'D'; // default
37 while ((c = getopt(argc, argv, "f:t:x:")) != -1) { 39 while ((c = getopt(argc, argv, "f:t:x:")) != -1) {
38 switch(c) { 40 ch = c;
41 switch(ch) {
39 case 'f': 42 case 'f':
40 // change the output format 43 // change the output format
41 format = toupper(optarg[0]); 44 format = toupper(optarg[0]);
42 break; 45 break;
43 case 't': 46 case 't':
110 line = mfile_rec.line; 113 line = mfile_rec.line;
111 } 114 }
112 if (dtype == DEBUG_FUNCENT_NO) level++; 115 if (dtype == DEBUG_FUNCENT_NO) level++;
113 if ((show_type == NULL || is_in(dtype, show_type, show_size)) && 116 if ((show_type == NULL || is_in(dtype, show_type, show_size)) &&
114 (ex_type == NULL || !is_in(dtype, ex_type, ex_size))) { 117 (ex_type == NULL || !is_in(dtype, ex_type, ex_size))) {
115 c = 0; flag = 0; 118 unsigned int c = 0;
119 flag = 0;
116 while (c < end) { 120 while (c < end) {
117 int ii = (level-1) * 4; 121 int ii = (level-1) * 4;
118 if (ii < 0) ii = 0; 122 if (ii < 0) ii = 0;
119 if (ii > 64) ii = 64; 123 if (ii > 64) ii = 64;
120 char indent[ii+1]; 124 char indent[ii+1];