dvcfg.h (59874) | dvcfg.h (92761) |
---|---|
1/* $FreeBSD: head/sys/compat/netbsd/dvcfg.h 59874 2000-05-01 20:32:07Z peter $ */ | 1/* $FreeBSD: head/sys/compat/netbsd/dvcfg.h 92761 2002-03-20 05:48:58Z alfred $ */ |
2/* $NetBSD$ */ 3/* 4 * [NetBSD for NEC PC98 series] 5 * Copyright (c) 1996 NetBSD/pc98 porting staff. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 35 unchanged lines hidden (view full) --- 45 46#define DVCFG_MAJOR(dvcfg) (((u_int)(dvcfg)) >> 16) 47#define DVCFG_MINOR(dvcfg) (((u_int)(dvcfg)) & 0xffff) 48 49#define DVCFG_MKCFG(major, minor) ((((u_int)(major)) << 16) | ((minor) & 0xffff)) 50 51#define DVCFG_HWSEL_SZ(array) (sizeof(array) / sizeof(dvcfg_hw_t)) 52 | 2/* $NetBSD$ */ 3/* 4 * [NetBSD for NEC PC98 series] 5 * Copyright (c) 1996 NetBSD/pc98 porting staff. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 35 unchanged lines hidden (view full) --- 45 46#define DVCFG_MAJOR(dvcfg) (((u_int)(dvcfg)) >> 16) 47#define DVCFG_MINOR(dvcfg) (((u_int)(dvcfg)) & 0xffff) 48 49#define DVCFG_MKCFG(major, minor) ((((u_int)(major)) << 16) | ((minor) & 0xffff)) 50 51#define DVCFG_HWSEL_SZ(array) (sizeof(array) / sizeof(dvcfg_hw_t)) 52 |
53static __inline dvcfg_hw_t dvcfg_hw __P((struct dvcfg_hwsel *, u_int)); | 53static __inline dvcfg_hw_t dvcfg_hw(struct dvcfg_hwsel *, u_int); |
54 55static __inline dvcfg_hw_t 56dvcfg_hw(selp, num) 57 struct dvcfg_hwsel *selp; 58 u_int num; 59{ 60 61 return ((num >= selp->cfg_max) ? 0 : selp->cfg_sel[num]); 62} 63 64#define DVCFG_HW(SELP, NUM) dvcfg_hw((SELP), (NUM)) 65#endif /* _I386_DVCFG_H_ */ | 54 55static __inline dvcfg_hw_t 56dvcfg_hw(selp, num) 57 struct dvcfg_hwsel *selp; 58 u_int num; 59{ 60 61 return ((num >= selp->cfg_max) ? 0 : selp->cfg_sel[num]); 62} 63 64#define DVCFG_HW(SELP, NUM) dvcfg_hw((SELP), (NUM)) 65#endif /* _I386_DVCFG_H_ */ |