diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-10-20 02:51:55 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-10-20 02:51:55 +0000 |
| commit | 8ae68834f157d323f4adfa7ff85dd7abf5ae46c0 (patch) | |
| tree | 6e8585b52047742bc39865ae4f7d2191925a39e4 /sbin/sysinstall/utils.c | |
| parent | 3e3ad4f2f1c0f915847d71bee78d86772c9ab2b9 (diff) | |
Notes
Diffstat (limited to 'sbin/sysinstall/utils.c')
| -rw-r--r-- | sbin/sysinstall/utils.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sbin/sysinstall/utils.c b/sbin/sysinstall/utils.c new file mode 100644 index 000000000000..24bd0ada9ae9 --- /dev/null +++ b/sbin/sysinstall/utils.c @@ -0,0 +1,41 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp + * ---------------------------------------------------------------------------- + * + * $Id$ + * + */ + +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> +#include <dialog.h> +#include <ncurses.h> + +#include "sysinstall.h" + +void +TellEm(char *fmt, ...) +{ + char *p; + va_list ap; + p = Malloc(2048); + va_start(ap,fmt); + vsnprintf(p, 2048, fmt, ap); + va_end(ap); + dialog_msgbox("Progress", p, 3, 75, 0); +} + +void * +Malloc(size_t size) +{ + void *p = malloc(size); + if (!p) { + exit(7); /* XXX longjmp bad */ + } + return p; +} |
