Deleted Added
full compact
pdb.c (8857) pdb.c (13558)
1/*
2 * Copyright (c) 1994 Christopher G. Demetriou
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef LINT
1/*
2 * Copyright (c) 1994 Christopher G. Demetriou
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef LINT
32static char rcsid[] = "$Id: pdb.c,v 1.1.1.1 1994/09/26 21:22:56 davidg Exp $";
32static char rcsid[] = "$Id: pdb.c,v 1.2 1995/05/30 03:51:41 rgrimes Exp $";
33#endif
34
35#include <sys/types.h>
36#include <sys/acct.h>
37#include <err.h>
38#include <errno.h>
39#include <fcntl.h>
40#include <stdio.h>
33#endif
34
35#include <sys/types.h>
36#include <sys/acct.h>
37#include <err.h>
38#include <errno.h>
39#include <fcntl.h>
40#include <stdio.h>
41#include <string.h>
41#include "extern.h"
42#include "pathnames.h"
43
44static int check_junk __P((struct cmdinfo *));
45static void add_ci __P((const struct cmdinfo *, struct cmdinfo *));
46static void print_ci __P((const struct cmdinfo *, const struct cmdinfo *));
47
48static DB *pacct_db;

--- 348 unchanged lines hidden (view full) ---

397 printf(" %4s ", "");
398 }
399 }
400
401 if (tflag)
402 if (!uflow)
403 printf("%8.2fre/cp ", cip->ci_etime / (double) (cip->ci_utime + cip->ci_stime));
404 else
42#include "extern.h"
43#include "pathnames.h"
44
45static int check_junk __P((struct cmdinfo *));
46static void add_ci __P((const struct cmdinfo *, struct cmdinfo *));
47static void print_ci __P((const struct cmdinfo *, const struct cmdinfo *));
48
49static DB *pacct_db;

--- 348 unchanged lines hidden (view full) ---

398 printf(" %4s ", "");
399 }
400 }
401
402 if (tflag)
403 if (!uflow)
404 printf("%8.2fre/cp ", cip->ci_etime / (double) (cip->ci_utime + cip->ci_stime));
405 else
405 printf("%8 ", "*ignore*");
406 printf("*ignore* ");
406
407 if (Dflag)
408 printf("%10qutio ", cip->ci_io);
409 else
410 printf("%8.0favio ", cip->ci_io / c);
411
412 if (Kflag)
413 printf("%10quk*sec ", cip->ci_mem);
414 else
415 printf("%8.0fk ", cip->ci_mem / t);
416
417 printf(" %s\n", cip->ci_comm);
418}
407
408 if (Dflag)
409 printf("%10qutio ", cip->ci_io);
410 else
411 printf("%8.0favio ", cip->ci_io / c);
412
413 if (Kflag)
414 printf("%10quk*sec ", cip->ci_mem);
415 else
416 printf("%8.0fk ", cip->ci_mem / t);
417
418 printf(" %s\n", cip->ci_comm);
419}