extern.h (50479) | extern.h (99829) |
---|---|
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 --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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 * | 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 --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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 * $FreeBSD: head/usr.sbin/sa/extern.h 50479 1999-08-28 01:35:59Z peter $ | 30 * $FreeBSD: head/usr.sbin/sa/extern.h 99829 2002-07-11 22:11:20Z alfred $ |
31 */ 32 33#include <sys/types.h> 34#include <sys/param.h> 35#include <db.h> 36 37/* structures */ 38 --- 16 unchanged lines hidden (view full) --- 55 u_quad_t ui_utime; /* user time */ 56 u_quad_t ui_stime; /* system time */ 57 u_quad_t ui_mem; /* memory use */ 58 u_quad_t ui_io; /* number of disk i/o ops */ 59}; 60 61/* typedefs */ 62 | 31 */ 32 33#include <sys/types.h> 34#include <sys/param.h> 35#include <db.h> 36 37/* structures */ 38 --- 16 unchanged lines hidden (view full) --- 55 u_quad_t ui_utime; /* user time */ 56 u_quad_t ui_stime; /* system time */ 57 u_quad_t ui_mem; /* memory use */ 58 u_quad_t ui_io; /* number of disk i/o ops */ 59}; 60 61/* typedefs */ 62 |
63typedef int (*cmpf_t) __P((const DBT *, const DBT *)); | 63typedef int (*cmpf_t)(const DBT *, const DBT *); |
64 | 64 |
65/* external functions in sa.c */ 66int main __P((int, char **)); 67 | |
68/* external functions in pdb.c */ | 65/* external functions in pdb.c */ |
69int pacct_init __P((void)); 70void pacct_destroy __P((void)); 71int pacct_add __P((const struct cmdinfo *)); 72int pacct_update __P((void)); 73void pacct_print __P((void)); | 66int pacct_init(void); 67void pacct_destroy(void); 68int pacct_add(const struct cmdinfo *); 69int pacct_update(void); 70void pacct_print(void); |
74 75/* external functions in usrdb.c */ | 71 72/* external functions in usrdb.c */ |
76int usracct_init __P((void)); 77void usracct_destroy __P((void)); 78int usracct_add __P((const struct cmdinfo *)); 79int usracct_update __P((void)); 80void usracct_print __P((void)); | 73int usracct_init(void); 74void usracct_destroy(void); 75int usracct_add(const struct cmdinfo *); 76int usracct_update(void); 77void usracct_print(void); |
81 82/* variables */ 83 84extern int aflag, bflag, cflag, dflag, Dflag, fflag, iflag, jflag, kflag; 85extern int Kflag, lflag, mflag, qflag, rflag, sflag, tflag, uflag, vflag; | 78 79/* variables */ 80 81extern int aflag, bflag, cflag, dflag, Dflag, fflag, iflag, jflag, kflag; 82extern int Kflag, lflag, mflag, qflag, rflag, sflag, tflag, uflag, vflag; |
86extern int cutoff; | 83extern u_quad_t cutoff; |
87extern cmpf_t sa_cmp; 88 89/* some #defines to help with db's stupidity */ 90 91#define DB_CLOSE(db) \ 92 ((*(db)->close)(db)) 93#define DB_GET(db, key, data, flags) \ 94 ((*(db)->get)((db), (key), (data), (flags))) 95#define DB_PUT(db, key, data, flags) \ 96 ((*(db)->put)((db), (key), (data), (flags))) 97#define DB_SYNC(db, flags) \ 98 ((*(db)->sync)((db), (flags))) 99#define DB_SEQ(db, key, data, flags) \ 100 ((*(db)->seq)((db), (key), (data), (flags))) | 84extern cmpf_t sa_cmp; 85 86/* some #defines to help with db's stupidity */ 87 88#define DB_CLOSE(db) \ 89 ((*(db)->close)(db)) 90#define DB_GET(db, key, data, flags) \ 91 ((*(db)->get)((db), (key), (data), (flags))) 92#define DB_PUT(db, key, data, flags) \ 93 ((*(db)->put)((db), (key), (data), (flags))) 94#define DB_SYNC(db, flags) \ 95 ((*(db)->sync)((db), (flags))) 96#define DB_SEQ(db, key, data, flags) \ 97 ((*(db)->seq)((db), (key), (data), (flags))) |