Chameleon

Chameleon Commit Details

Date:2010-02-20 12:13:28 (9 years 5 months ago)
Author:JrCs
Commit:93
Parents: 92
Message:Macrofy verbose function
Changes:
M/branches/JrCs/i386/libsaio/console.c
M/branches/JrCs/i386/libsaio/saio_internal.h

File differences

branches/JrCs/i386/libsaio/console.c
107107
108108
109109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126110
127111
128112
129
113
130114
131
132
133
134
135
115
116
117
118
119
120
136121
137122
138123
139124
140125
141126
142
143
127
144128
145
146
147
148
149
129
150130
131
132
133
134
135
151136
152137
return 0;
}
int verbose(const char * fmt, ...)
{
va_list ap;
if (gVerboseMode)
{
va_start(ap, fmt);
if (bootArgs->Video.v_display == VGA_TEXT_MODE)
prf(fmt, ap, putchar, 0);
else
vprf(fmt, ap);
va_end(ap);
}
return(0);
}
int error(const char * fmt, ...)
{
va_list ap;
gErrors = YES;
va_start(ap, fmt);
if (bootArgs->Video.v_display == VGA_TEXT_MODE)
prf(fmt, ap, putchar, 0);
else
vprf(fmt, ap);
va_end(ap);
gErrors = YES;
printf(fmt,ap);
va_end(ap);
return(0);
}
void stop(const char * fmt, ...)
{
va_list ap;
printf("\n");
va_start(ap, fmt);
if (bootArgs->Video.v_display == VGA_TEXT_MODE)
prf(fmt, ap, putchar, 0);
else
vprf(fmt, ap);
va_end(ap);
printf("\n");
printf(fmt,ap);
printf("\n");
va_end(ap);
halt();
}
branches/JrCs/i386/libsaio/saio_internal.h
9191
9292
9393
94
9495
95
9696
9797
9898
extern void putchar(int ch);
extern int getchar(void);
extern int printf(const char *format, ...);
#define verbose(...) if (gVerboseMode) printf(__VA_ARGS__)
extern int error(const char *format, ...);
extern int verbose(const char *format, ...);
extern void stop(const char *format, ...);
/* disk.c */

Archive Download the corresponding diff file

Revision: 93