msg.c (79304) | msg.c (80674) |
---|---|
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 79304 2001-07-05 09:51:09Z kris $ | 7 * $FreeBSD: head/usr.sbin/sade/msg.c 80674 2001-07-30 20:45:54Z 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 --- 216 unchanged lines hidden (view full) --- 232 vsnprintf(errstr, FILENAME_MAX, fmt, args); 233 va_end(args); 234 use_helpline(NULL); 235 use_helpfile(NULL); 236 if (OnVTY) { 237 ioctl(0, VT_ACTIVATE, 1); /* Switch back */ 238 msgInfo(NULL); 239 } | 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 --- 216 unchanged lines hidden (view full) --- 232 vsnprintf(errstr, FILENAME_MAX, fmt, args); 233 va_end(args); 234 use_helpline(NULL); 235 use_helpfile(NULL); 236 if (OnVTY) { 237 ioctl(0, VT_ACTIVATE, 1); /* Switch back */ 238 msgInfo(NULL); 239 } |
240 if (variable_get(VAR_NONINTERACTIVE)) 241 return 1; /* If non-interactive, return YES all the time */ |
|
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, ...) --- 8 unchanged lines hidden (view full) --- 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 } | 242 ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); 243 restorescr(w); 244 return ret; 245} 246 247/* Put up a message in a popup no/yes box and return 1 for YES, 0 for NO */ 248int 249msgNoYes(char *fmt, ...) --- 8 unchanged lines hidden (view full) --- 258 vsnprintf(errstr, FILENAME_MAX, fmt, args); 259 va_end(args); 260 use_helpline(NULL); 261 use_helpfile(NULL); 262 if (OnVTY) { 263 ioctl(0, VT_ACTIVATE, 1); /* Switch back */ 264 msgInfo(NULL); 265 } |
266 if (variable_get(VAR_NONINTERACTIVE)) 267 return 0; /* If non-interactive, return NO all the time */ |
|
264 ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1); 265 restorescr(w); 266 return ret; 267} 268 269/* Put up a message in an input box and return the value */ 270char * 271msgGetInput(char *buf, char *fmt, ...) --- 81 unchanged lines hidden --- | 268 ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1); 269 restorescr(w); 270 return ret; 271} 272 273/* Put up a message in an input box and return the value */ 274char * 275msgGetInput(char *buf, char *fmt, ...) --- 81 unchanged lines hidden --- |