NO FUNCTIONAL CHANGES!!
Only reformated stupid astyle formating; it seems the code inside a string confused astyle...
This commit is contained in:
parent
0522a1eb29
commit
cee7aaca54
1 changed files with 121 additions and 121 deletions
|
@ -42,23 +42,23 @@ const char *dbus_includes = "\n\
|
|||
#include <cassert>\n\
|
||||
";
|
||||
|
||||
void underscorize(string &str)
|
||||
{
|
||||
void underscorize(string &str)
|
||||
{
|
||||
for (unsigned int i = 0; i < str.length(); ++i)
|
||||
{
|
||||
if (!isalpha(str[i]) && !isdigit(str[i])) str[i] = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string stub_name(string name)
|
||||
{
|
||||
string stub_name(string name)
|
||||
{
|
||||
underscorize(name);
|
||||
|
||||
return "_" + name + "_stub";
|
||||
}
|
||||
}
|
||||
|
||||
const char *atomic_type_to_string(char t)
|
||||
{
|
||||
const char *atomic_type_to_string(char t)
|
||||
{
|
||||
static struct
|
||||
{
|
||||
char type;
|
||||
|
@ -87,10 +87,10 @@ const char *dbus_includes = "\n\
|
|||
if (atos[i].type == t) break;
|
||||
}
|
||||
return atos[i].name;
|
||||
}
|
||||
}
|
||||
|
||||
static void _parse_signature(const string &signature, string &type, unsigned int &i, bool only_once = false)
|
||||
{
|
||||
static void _parse_signature(const string &signature, string &type, unsigned int &i, bool only_once = false)
|
||||
{
|
||||
/*cout << "signature: " << signature << endl;
|
||||
cout << "type: " << type << endl;
|
||||
cout << "i: " << i << ", signature[i]: " << signature[i] << endl;*/
|
||||
|
@ -170,12 +170,12 @@ const char *dbus_includes = "\n\
|
|||
type += ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string signature_to_type(const string &signature)
|
||||
{
|
||||
string signature_to_type(const string &signature)
|
||||
{
|
||||
string type;
|
||||
unsigned int i = 0;
|
||||
_parse_signature(signature, type, i);
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue