-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update .gitattributes and renormalize files
git add --renormalize .
- Loading branch information
Showing
25 changed files
with
2,703 additions
and
2,689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
/scripts/debian/ export-ignore | ||
/src/devices/dimax_u2c/blob/ export-ignore | ||
.appveyor.yml export-ignore | ||
.clang-format export-ignore | ||
.coveralls.yml export-ignore | ||
.gitattributes export-ignore | ||
.github/ export-ignore | ||
.gitignore export-ignore | ||
.mailmap export-ignore | ||
.appveyor.yml export-ignore | ||
.coveralls.yml export-ignore | ||
.travis.yml export-ignore | ||
|
||
*.c whitespace=tab-in-indent | ||
*.h whitespace=tab-in-indent | ||
*.cpp whitespace=tab-in-indent | ||
*.hpp whitespace=tab-in-indent | ||
*.cc whitespace=tab-in-indent | ||
*.txt whitespace=tab-in-indent | ||
*.cmake whitespace=tab-in-indent | ||
*.qml whitespace=tab-in-indent | ||
*.inl whitespace=tab-in-indent | ||
*.dox whitespace=tab-in-indent | ||
*.xml whitespace=tab-in-indent | ||
*.inl whitespace=tab-in-indent | ||
*.thrift whitespace=tab-in-indent | ||
*.msg whitespace=tab-in-indent | ||
*.txt whitespace=trailing-space,space-before-tab,tab-in-indent | ||
*.md whitespace=trailing-space,space-before-tab,tab-in-indent | ||
*.dox whitespace=trailing-space,space-before-tab,tab-in-indent | ||
*.qml whitespace=trailing-space,space-before-tab,tab-in-indent | ||
*.msg whitespace=trailing-space,space-before-tab,tab-in-indent | ||
|
||
*.c whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.h whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.hpp whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.cc whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.thrift whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.xml whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
*.qrc whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=4 | ||
|
||
|
||
CMakeLists.txt whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=2 | ||
*.cmake whitespace=trailing-space,space-before-tab,tab-in-indent,tabwidth=2 | ||
|
||
*.vcproj text eol=crlf | ||
*.dsp text eol=crlf | ||
*.dsw text eol=crlf | ||
|
||
*.png binary | ||
*.jpg binary | ||
*.gif binary | ||
*.tiff binary | ||
*.ico binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Configuration (please complete the following information):** | ||
- OS: | ||
- yarp version: | ||
- compiler: | ||
|
||
**Additional context** | ||
Add any other context about the problem here. | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Configuration (please complete the following information):** | ||
- OS: | ||
- yarp version: | ||
- compiler: | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,108 @@ | ||
// FileClient.cpp : A simple xmlrpc client. Usage: FileClient serverHost serverPort xmlfile | ||
// Reads an xmlrpc request from the specified xmlfile and calls the method on the server. | ||
// | ||
// Link against xmlrpc lib and whatever socket libs your system needs (ws2_32.lib on windows) | ||
|
||
#include "XmlRpc.h" | ||
#include <iostream> | ||
#include <fstream> | ||
#include <stdlib.h> | ||
|
||
using namespace XmlRpc; | ||
|
||
std::string parseRequest(std::string const& xml, XmlRpcValue& params); | ||
|
||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
if (argc != 4) { | ||
std::cerr << "Usage: FileClient serverHost serverPort requestXmlFile\n"; | ||
return -1; | ||
} | ||
int port = atoi(argv[2]); | ||
|
||
XmlRpc::setVerbosity(5); | ||
XmlRpcClient c(argv[1], port); | ||
|
||
// | ||
std::ifstream infile(argv[3]); | ||
if (infile.fail()) { | ||
std::cerr << "Could not open file '" << argv[3] << "'.\n"; | ||
return -1; | ||
} | ||
|
||
// Suck in the file. This is a one-liner in good compilers (which vc++ 6 is not)... | ||
infile.seekg(0L, std::ios::end); | ||
long nb = infile.tellg(); | ||
infile.clear(); | ||
infile.seekg(0L); | ||
char* b = new char[nb+1]; | ||
infile.read(b, nb); | ||
b[nb] = 0; | ||
|
||
std::cout << "Read file.\n"; | ||
|
||
// Find the methodName and parse the params | ||
std::string s(b); | ||
XmlRpcValue params; | ||
std::string name = parseRequest(s, params); | ||
|
||
if (name.empty()) { | ||
std::cerr << "Could not parse file\n"; | ||
return -1; | ||
} | ||
|
||
for (;;) { | ||
XmlRpcValue result; | ||
std::cout << "Calling " << name << std::endl; | ||
if (c.execute(name.c_str(), params, result)) | ||
std::cout << result << "\n\n"; | ||
else | ||
std::cout << "Error calling '" << name << "'\n\n"; | ||
std::cout << "Again? [y]: "; | ||
std::string ans; | ||
std::cin >> ans; | ||
if (ans != "" && ans != "y") break; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
|
||
// | ||
std::string | ||
parseRequest(std::string const& xml, XmlRpcValue& params) | ||
{ | ||
const char METHODNAME_TAG[] = "<methodName>"; | ||
const char PARAMS_TAG[] = "<params>"; | ||
const char PARAMS_ETAG[] = "</params>"; | ||
const char PARAM_TAG[] = "<param>"; | ||
const char PARAM_ETAG[] = "</param>"; | ||
|
||
int offset = 0; // Number of chars parsed from the request | ||
|
||
std::string methodName = XmlRpcUtil::parseTag(METHODNAME_TAG, xml, &offset); | ||
XmlRpcUtil::log(3, "XmlRpcServerConnection::parseRequest: parsed methodName %s.", methodName.c_str()); | ||
|
||
if (! methodName.empty() && XmlRpcUtil::findTag(PARAMS_TAG, xml, &offset)) | ||
{ | ||
int nArgs = 0; | ||
while (XmlRpcUtil::nextTagIs(PARAM_TAG, xml, &offset)) { | ||
std::cout << "Parsing arg " << nArgs+1 << std::endl; | ||
XmlRpcValue arg(xml, &offset); | ||
if ( ! arg.valid()) { | ||
std::cerr << "Invalid argument\n"; | ||
return std::string(); | ||
} | ||
std::cout << "Adding arg " << nArgs+1 << " to params array." << std::endl; | ||
params[nArgs++] = arg; | ||
(void) XmlRpcUtil::nextTagIs(PARAM_ETAG, xml, &offset); | ||
} | ||
|
||
XmlRpcUtil::log(3, "XmlRpcServerConnection::parseRequest: parsed %d params.", nArgs); | ||
|
||
(void) XmlRpcUtil::nextTagIs(PARAMS_ETAG, xml, &offset); | ||
} | ||
|
||
return methodName; | ||
} | ||
// FileClient.cpp : A simple xmlrpc client. Usage: FileClient serverHost serverPort xmlfile | ||
// Reads an xmlrpc request from the specified xmlfile and calls the method on the server. | ||
// | ||
// Link against xmlrpc lib and whatever socket libs your system needs (ws2_32.lib on windows) | ||
|
||
#include "XmlRpc.h" | ||
#include <iostream> | ||
#include <fstream> | ||
#include <stdlib.h> | ||
|
||
using namespace XmlRpc; | ||
|
||
std::string parseRequest(std::string const& xml, XmlRpcValue& params); | ||
|
||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
if (argc != 4) { | ||
std::cerr << "Usage: FileClient serverHost serverPort requestXmlFile\n"; | ||
return -1; | ||
} | ||
int port = atoi(argv[2]); | ||
|
||
XmlRpc::setVerbosity(5); | ||
XmlRpcClient c(argv[1], port); | ||
|
||
// | ||
std::ifstream infile(argv[3]); | ||
if (infile.fail()) { | ||
std::cerr << "Could not open file '" << argv[3] << "'.\n"; | ||
return -1; | ||
} | ||
|
||
// Suck in the file. This is a one-liner in good compilers (which vc++ 6 is not)... | ||
infile.seekg(0L, std::ios::end); | ||
long nb = infile.tellg(); | ||
infile.clear(); | ||
infile.seekg(0L); | ||
char* b = new char[nb+1]; | ||
infile.read(b, nb); | ||
b[nb] = 0; | ||
|
||
std::cout << "Read file.\n"; | ||
|
||
// Find the methodName and parse the params | ||
std::string s(b); | ||
XmlRpcValue params; | ||
std::string name = parseRequest(s, params); | ||
|
||
if (name.empty()) { | ||
std::cerr << "Could not parse file\n"; | ||
return -1; | ||
} | ||
|
||
for (;;) { | ||
XmlRpcValue result; | ||
std::cout << "Calling " << name << std::endl; | ||
if (c.execute(name.c_str(), params, result)) | ||
std::cout << result << "\n\n"; | ||
else | ||
std::cout << "Error calling '" << name << "'\n\n"; | ||
std::cout << "Again? [y]: "; | ||
std::string ans; | ||
std::cin >> ans; | ||
if (ans != "" && ans != "y") break; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
|
||
// | ||
std::string | ||
parseRequest(std::string const& xml, XmlRpcValue& params) | ||
{ | ||
const char METHODNAME_TAG[] = "<methodName>"; | ||
const char PARAMS_TAG[] = "<params>"; | ||
const char PARAMS_ETAG[] = "</params>"; | ||
const char PARAM_TAG[] = "<param>"; | ||
const char PARAM_ETAG[] = "</param>"; | ||
|
||
int offset = 0; // Number of chars parsed from the request | ||
|
||
std::string methodName = XmlRpcUtil::parseTag(METHODNAME_TAG, xml, &offset); | ||
XmlRpcUtil::log(3, "XmlRpcServerConnection::parseRequest: parsed methodName %s.", methodName.c_str()); | ||
|
||
if (! methodName.empty() && XmlRpcUtil::findTag(PARAMS_TAG, xml, &offset)) | ||
{ | ||
int nArgs = 0; | ||
while (XmlRpcUtil::nextTagIs(PARAM_TAG, xml, &offset)) { | ||
std::cout << "Parsing arg " << nArgs+1 << std::endl; | ||
XmlRpcValue arg(xml, &offset); | ||
if ( ! arg.valid()) { | ||
std::cerr << "Invalid argument\n"; | ||
return std::string(); | ||
} | ||
std::cout << "Adding arg " << nArgs+1 << " to params array." << std::endl; | ||
params[nArgs++] = arg; | ||
(void) XmlRpcUtil::nextTagIs(PARAM_ETAG, xml, &offset); | ||
} | ||
|
||
XmlRpcUtil::log(3, "XmlRpcServerConnection::parseRequest: parsed %d params.", nArgs); | ||
|
||
(void) XmlRpcUtil::nextTagIs(PARAMS_ETAG, xml, &offset); | ||
} | ||
|
||
return methodName; | ||
} |
Oops, something went wrong.