2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
11 // throw exception: used by boost
22 void throw_exception(std::exception
const &) {
23 std::cout
<< "[bug] boost exception" << std::endl
;
28 std::ostream
&operator <<(std::ostream
&os
, const QString
& s
) {
29 os
<< s
.toAscii().constData();
34 void __attribute__ ((used
))
38 pstr(const QString
& s
) {
39 std::cout
<< "\"" << s
<< "\"" << std::endl
;
42 QString
qPrintf(const char* fmt
, ...) {
46 int l
= vsnprintf(NULL
, 0, fmt
, ap
)+1;
49 char *str
= (char*)alloca(l
);
50 //char *str = (char*)malloc(l);
52 vsnprintf(str
, l
, fmt
, ap
);
66 QString
prettyTypeName(const char* name
) {
69 const char* res
= abi::__cxa_demangle(name
, NULL
, NULL
, &s
);