Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / pdisk / io.h
blob4194e1968822932356686c11171d3e2d66cfdb5e
1 //
2 // io.h - simple io and input parsing routines
3 //
4 // Written by Eryk Vershen
5 //
7 /*
8 * Copyright 1996,1997,1998 by Apple Computer, Inc.
9 * All Rights Reserved
11 * Permission to use, copy, modify, and distribute this software and
12 * its documentation for any purpose and without fee is hereby granted,
13 * provided that the above copyright notice appears in all copies and
14 * that both the copyright notice and this permission notice appear in
15 * supporting documentation.
17 * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
18 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE.
21 * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
22 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
23 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
24 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
25 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
28 #ifndef __io__
29 #define __io__
33 // Defines
35 #define MAXIOSIZE 2048
39 // Types
44 // Global Constants
46 extern const long kDefault;
50 // Global Variables
55 // Forward declarations
57 void bad_input(const char *fmt, ...);
58 void flush_to_newline(int keep_newline);
59 int get_command(const char *prompt, int promptBeforeGet, int *command);
60 unsigned long get_multiplier(long divisor);
61 int get_number_argument(const char *prompt, long *number, long default_value);
62 int get_okay(const char *prompt, int default_value);
63 int get_partition_modifier(void);
64 int get_string_argument(const char *prompt, char **string, int reprompt);
65 int number_of_digits(unsigned long value);
67 #endif /* __io__ */