FreeTDS API

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 FREETDS_READPASSPHRASE_H_
33 #define FREETDS_READPASSPHRASE_H_
34
35 #ifdef HAVE_READPASSPHRASE
36
37 # include <readpassphrase.h>
38
39 #else /* !HAVE_READPASSPHRASE */
40
41 #include <freetds/pushvis.h>
42
43 #define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */
44 #define RPP_ECHO_ON 0x01 /* Leave echo on. */
45 #define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */
46 #define RPP_FORCELOWER 0x04 /* Force input to lower case. */
47 #define RPP_FORCEUPPER 0x08 /* Force input to upper case. */
48 #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */
49 #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */
50
51 #undef readpassphrase
52 char * tds_readpassphrase(const char *, char *, size_t, int);
53 #define readpassphrase tds_readpassphrase
54
55 #include <freetds/popvis.h>
56
57 #endif /* !HAVE_READPASSPHRASE */
58
59 #endif /* !FREETDS_READPASSPHRASE_H_ */