Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1000 Bytes

ui_stdio.c

File metadata and controls

67 lines (46 loc) · 1000 Bytes
 
Jan 5, 2004
Jan 5, 2004
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include <stdio.h>
#include "platform.h"
#include "ui.h"
int ui_init(void)
{
return(1); /* always succeeds. */
} /* ui_init */
void ui_title(const char *str)
{
} /* ui_title */
void ui_deinit(void)
{
printf("\n\nHit enter to quit.\n\n");
getchar();
} /* ui_deinit */
void ui_pump(void)
{
/* no-op. */
} /* ui_pump */
void ui_add_to_log(const char *str, int debugging)
{
printf("%s%s\n", debugging ? "debug: " : "", str);
} /* ui_add_to_log */
void ui_fatal(const char *str)
{
fprintf(stderr, "\n%s\n\n", str);
} /* ui_fatal */
void ui_success(const char *str)
{
fprintf(stderr, "\n%s\n\n", str);
} /* ui_success */
void ui_total_progress(int percent)
{
static int lastpercent = -1;
if (percent != lastpercent)
{
lastpercent = percent;
printf(".");
if (percent == 100)
printf("\n");
} /* if */
} /* ui_total_progress */
void ui_status(const char *str)
{
} /* ui_status */
/* end of ui_stdio.h ... */