FreeTDS API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
readpassphrase.h
1 /* OPENBSD ORIGINAL: include/readpassphrase.h */
2
3 /* $OpenBSD: readpassphrase.h,v 1.3 2002/06/28 12:32:22 millert Exp $ */
4
5 /*
6 * Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com>
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 #ifndef _READPASSPHRASE_H_
33 #define _READPASSPHRASE_H_
34
35 #if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__MINGW32__)
36 #pragma GCC visibility push(hidden)
37 #endif
38
39 #ifndef HAVE_READPASSPHRASE
40
41 #define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */
42 #define RPP_ECHO_ON 0x01 /* Leave echo on. */
43 #define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */
44 #define RPP_FORCELOWER 0x04 /* Force input to lower case. */
45 #define RPP_FORCEUPPER 0x08 /* Force input to upper case. */
46 #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */
47 #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */
48
49 char * readpassphrase(const char *, char *, size_t, int);
50
51 #endif /* HAVE_READPASSPHRASE */
52
53 #if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__MINGW32__)
54 #pragma GCC visibility pop
55 #endif
56
57 #endif /* !_READPASSPHRASE_H_ */