/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
* Reserved. This file contains Original Code and/or Modifications of
* Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
+ * Source License Version 2.0 (the "License"). You may not use this file
* except in compliance with the License. Please obtain a copy of the
* License at http://www.apple.com/publicsource and read it before using
* this file.
*/
#include "libsaio.h"
+#include "bootstruct.h"
-BOOL verbose_mode;
-BOOL errors;
+BOOL gVerboseMode;
+BOOL gErrors;
/*
* write one character to console
int printf(const char * fmt, ...)
{
va_list ap;
+ if (bootArgs->Video.v_display != VGA_TEXT_MODE) return -1;
va_start(ap, fmt);
prf(fmt, ap, putchar, 0);
va_end(ap);
{
va_list ap;
- if (verbose_mode)
+ if (gVerboseMode)
{
va_start(ap, fmt);
prf(fmt, ap, putchar, 0);
int error(const char * fmt, ...)
{
va_list ap;
- errors = YES;
+ gErrors = YES;
va_start(ap, fmt);
prf(fmt, ap, putchar, 0);
va_end(ap);
return(0);
}
+
+void stop(const char * fmt, ...)
+{
+ va_list ap;
+
+ printf("\n");
+ va_start(ap, fmt);
+ prf(fmt, ap, putchar, 0);
+ va_end(ap);
+ printf("\n");
+ halt();
+}