| 183 | |
| 184 | |
| 185 | void printpi(procinfov pi) |
| 186 | { |
| 187 | // char *buf, name[256]; |
| 188 | // int len1, len2; |
| 189 | /* pi->libname is badly broken -- use file, instead */ |
| 190 | FILE *fp = fopen( lib_file, "rb"); |
| 191 | |
| 192 | if (fp == NULL) |
| 193 | { |
| 194 | printf("Can not open %s\n", lib_file); |
| 195 | return; |
| 196 | } |
| 197 | |
| 198 | if(!found_info && !warning_info) warning_info++; |
| 199 | if(!found_version && !warning_version) warning_version++; |
| 200 | if(pi->data.s.body_end==0) |
| 201 | pi->data.s.body_end = pi->data.s.proc_end; |
| 202 | |
| 203 | if (texinfo_out) |
| 204 | { |
| 205 | if ((! pi->is_static) && |
| 206 | (pi->data.s.body_start - pi->data.s.def_end > 10) && |
| 207 | (! found_proc_in_proc)) |
| 208 | { |
| 209 | printf("push(@procs, \"%s\");\n", pi->procname); |
| 210 | printf("$help{\"%s\"} = <<EOT;\n", pi->procname); |
| 211 | PrintOut(fp, pi->data.s.help_start, pi->data.s.body_start-3); |
| 212 | printf("\nEOT\n"); |
| 213 | if ((pi->data.s.example_start > 0) && |
| 214 | (pi->data.s.proc_end - pi->data.s.example_start > 10)) |
| 215 | { |
| 216 | printf("$example{\"%s\"} = <<EOT;\n", pi->procname); |
| 217 | PrintOut(fp, pi->data.s.example_start, pi->data.s.proc_end); |
| 218 | printf("\nEOT\n"); |
| 219 | } |
| 220 | printf("$chksum{\"%s\"} = %ld;\n", pi->procname, pi->data.s.help_chksum); |
| 221 | } |
| 222 | } |
| 223 | else if (! category_out) |
| 224 | { |
| 225 | if(lpverbose) printf("// "); |
| 226 | printf( "%c %-15s %20s ", pi->is_static ? 'l' : 'g', pi->libname, |
| 227 | pi->procname); |
| 228 | printf("line %4d,%5ld-%-5ld %4d,%5ld-%-5ld %4d,%5ld-%-5ld\n", |
| 229 | pi->data.s.proc_lineno, pi->data.s.proc_start, pi->data.s.def_end, |
| 230 | pi->data.s.body_lineno, pi->data.s.body_start, pi->data.s.body_end, |
| 231 | pi->data.s.example_lineno, pi->data.s.example_start, |
| 232 | pi->data.s.proc_end); |
| 233 | if(check) { |
| 234 | if(!pi->is_static && (pi->data.s.body_start-pi->data.s.def_end)<4) |
| 235 | printf("*** Procedure '%s' is global and has no help-section.\n", |
| 236 | pi->procname); |
| 237 | if(!pi->is_static && !pi->data.s.example_start) |
| 238 | printf("*** Procedure '%s' is global and has no example-section.\n",\ |
| 239 | pi->procname); |
| 240 | if(found_proc_in_proc) |
| 241 | printf("*** found proc within procedure '%s'.\n", pi->procname); |
| 242 | } |
no test coverage detected