Deleted Added
full compact
msg.c (8317) msg.c (8347)
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 * $Id: msg.c,v 1.7 1995/05/07 03:38:01 jkh Exp $
7 * $Id: msg.c,v 1.8 1995/05/07 05:58:57 jkh Exp $
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

--- 32 unchanged lines hidden (view full) ---

48void
49msgYap(char *fmt, ...)
50{
51 va_list args;
52 char *errstr;
53 int attrs;
54
55 errstr = (char *)safe_malloc(FILENAME_MAX);
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

--- 32 unchanged lines hidden (view full) ---

48void
49msgYap(char *fmt, ...)
50{
51 va_list args;
52 char *errstr;
53 int attrs;
54
55 errstr = (char *)safe_malloc(FILENAME_MAX);
56 errstr[0] = '\0';
57 va_start(args, fmt);
56 va_start(args, fmt);
58 vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
57 vsnprintf(errstr, FILENAME_MAX, fmt, args);
59 va_end(args);
60 attrs = getattrs(stdscr);
61 attrset(A_REVERSE);
62 mvaddstr(23, 0, errstr);
63 attrset(attrs);
64 refresh();
65 free(errstr);
66}
67
68/* Whack up an informational message on the status line */
69void
70msgInfo(char *fmt, ...)
71{
72 va_list args;
73 char *errstr;
74 int attrs;
75
76 errstr = (char *)safe_malloc(FILENAME_MAX);
58 va_end(args);
59 attrs = getattrs(stdscr);
60 attrset(A_REVERSE);
61 mvaddstr(23, 0, errstr);
62 attrset(attrs);
63 refresh();
64 free(errstr);
65}
66
67/* Whack up an informational message on the status line */
68void
69msgInfo(char *fmt, ...)
70{
71 va_list args;
72 char *errstr;
73 int attrs;
74
75 errstr = (char *)safe_malloc(FILENAME_MAX);
77 errstr[0] = '\0';
78 va_start(args, fmt);
76 va_start(args, fmt);
79 vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
77 vsnprintf(errstr, FILENAME_MAX, fmt, args);
80 va_end(args);
81 attrs = getattrs(stdscr);
82 attrset(A_NORMAL);
83 mvaddstr(23, 0, errstr);
84 attrset(attrs);
85 refresh();
86 free(errstr);
87}

--- 147 unchanged lines hidden (view full) ---

235 rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
236 free(errstr);
237 if (!rval)
238 return input_buffer;
239 else
240 return NULL;
241}
242
78 va_end(args);
79 attrs = getattrs(stdscr);
80 attrset(A_NORMAL);
81 mvaddstr(23, 0, errstr);
82 attrset(attrs);
83 refresh();
84 free(errstr);
85}

--- 147 unchanged lines hidden (view full) ---

233 rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
234 free(errstr);
235 if (!rval)
236 return input_buffer;
237 else
238 return NULL;
239}
240
241/* Write something to the debugging port */
242void
243msgDebug(char *fmt, ...)
244{
245 va_list args;
246 char *dbg;
247
248 dbg = (char *)safe_malloc(FILENAME_MAX);
249 strcpy(dbg, "DEBUG: ");
250 va_start(args, fmt);
251 vsnprintf((char *)(dbg + strlen(dbg)), FILENAME_MAX, fmt, args);
252 va_end(args);
253 write(DebugFD, dbg, strlen(dbg));
254 free(dbg);
255}