msg.c (66834) | msg.c (70005) |
---|---|
1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * | 1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * |
7 * $FreeBSD: head/usr.sbin/sade/msg.c 66834 2000-10-08 21:34:00Z phk $ | 7 * $FreeBSD: head/usr.sbin/sade/msg.c 70005 2000-12-14 02:49:02Z jkh $ |
8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 221 unchanged lines hidden (view full) --- 237 ioctl(0, VT_ACTIVATE, 1); /* Switch back */ 238 msgInfo(NULL); 239 } 240 ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); 241 restorescr(w); 242 return ret; 243} 244 | 8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 221 unchanged lines hidden (view full) --- 237 ioctl(0, VT_ACTIVATE, 1); /* Switch back */ 238 msgInfo(NULL); 239 } 240 ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); 241 restorescr(w); 242 return ret; 243} 244 |
245/* Put up a message in a popup no/yes box and return 1 for YES, 0 for NO */ 246int 247msgNoYes(char *fmt, ...) 248{ 249 va_list args; 250 char *errstr; 251 int ret; 252 WINDOW *w = savescr(); 253 254 errstr = (char *)alloca(FILENAME_MAX); 255 va_start(args, fmt); 256 vsnprintf(errstr, FILENAME_MAX, fmt, args); 257 va_end(args); 258 use_helpline(NULL); 259 use_helpfile(NULL); 260 if (OnVTY) { 261 ioctl(0, VT_ACTIVATE, 1); /* Switch back */ 262 msgInfo(NULL); 263 } 264 ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1); 265 restorescr(w); 266 return ret; 267} 268 |
|
245/* Put up a message in an input box and return the value */ 246char * 247msgGetInput(char *buf, char *fmt, ...) 248{ 249 va_list args; 250 char *errstr; 251 static char input_buffer[256]; 252 int rval; --- 76 unchanged lines hidden --- | 269/* Put up a message in an input box and return the value */ 270char * 271msgGetInput(char *buf, char *fmt, ...) 272{ 273 va_list args; 274 char *errstr; 275 static char input_buffer[256]; 276 int rval; --- 76 unchanged lines hidden --- |