Copyright clean-up (part 1):
[AROS.git] / arch / arm-native / ceboot / ui.c
blob9aea7f92e9661927bc198a6ac75dc41b498768b3
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdarg.h>
7 #include <stdio.h>
8 #include <windows.h>
10 #include <runtime.h>
12 #include "bootstrap.h"
14 static LPTSTR StrConvert(const char *src)
16 int len = strlen(src) + 1;
17 LPTSTR res = malloc(len * 2);
19 if (res)
21 if (!MultiByteToWideChar(CP_ACP, 0, src, -1, res, len))
23 free(res);
24 return NULL;
27 return res;
30 void kprintf(const char *fmt, ...)
32 va_list args;
34 va_start(args, fmt);
35 vfprintf(stderr, fmt, args);
36 va_end(args);
39 void DisplayError(char *fmt, ...)
41 va_list args;
42 LPTSTR str;
44 va_start(args, fmt);
45 vsnprintf(buf, sizeof(buf), fmt, args);
46 va_end(args);
48 str = StrConvert(buf);
49 MessageBox(NULL, str, TEXT("AROS bootstrap error"), MB_OK|MB_ICONSTOP);
50 free(str);