/* $OpenBSD: util.h,v 1.36 2019/08/30 03:57:56 deraadt Exp $ */1/* $NetBSD: util.h,v 1.2 1996/05/16 07:00:22 thorpej Exp $ */23/*-4* Copyright (c) 19955* The Regents of the University of California. All rights reserved.6* Portions Copyright (c) 1996, Jason Downs. All rights reserved.7*8* Redistribution and use in source and binary forms, with or without9* modification, are permitted provided that the following conditions10* are met:11* 1. Redistributions of source code must retain the above copyright12* notice, this list of conditions and the following disclaimer.13* 2. Redistributions in binary form must reproduce the above copyright14* notice, this list of conditions and the following disclaimer in the15* documentation and/or other materials provided with the distribution.16* 3. Neither the name of the University nor the names of its contributors17* may be used to endorse or promote products derived from this software18* without specific prior written permission.19*20* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND21* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE24* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL25* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS26* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)27* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT28* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY29* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF30* SUCH DAMAGE.31*/3233#ifndef _UTIL_H_34#define _UTIL_H_3536#include <sys/types.h>3738/*39* fparseln() specific operation flags.40*/41#define FPARSELN_UNESCESC 0x0142#define FPARSELN_UNESCCONT 0x0243#define FPARSELN_UNESCCOMM 0x0444#define FPARSELN_UNESCREST 0x0845#define FPARSELN_UNESCALL 0x0f4647/*48* opendev() specific operation flags.49*/50#define OPENDEV_PART 0x01 /* Try to open the raw partition. */51#define OPENDEV_BLCK 0x04 /* Open block, not character device. */5253/*54* uu_lock(3) specific flags.55*/56#define UU_LOCK_INUSE (1)57#define UU_LOCK_OK (0)58#define UU_LOCK_OPEN_ERR (-1)59#define UU_LOCK_READ_ERR (-2)60#define UU_LOCK_CREAT_ERR (-3)61#define UU_LOCK_WRITE_ERR (-4)62#define UU_LOCK_LINK_ERR (-5)63#define UU_LOCK_TRY_ERR (-6)64#define UU_LOCK_OWNER_ERR (-7)6566/*67* fmt_scaled(3) specific flags.68*/69#define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */7071/*72* stub struct definitions.73*/74struct __sFILE;75struct login_cap;76struct passwd;77struct termios;78struct utmp;79struct winsize;8081#endif /* !_UTIL_H_ */828384