| 331 | |
| 332 | |
| 333 | static int parseIntArg(int& i, const std::vector<std::string>& tokens, |
| 334 | int offset = 0) { |
| 335 | if ((i + 1) >= (int)tokens.size()) { |
| 336 | std::cerr << "ERROR: integer argument expected for " |
| 337 | << tokens[i - offset] << std::endl; |
| 338 | usage("bzfs"); |
| 339 | } |
| 340 | i++; // skip the option argument string |
| 341 | return atoi(tokens[i].c_str()); |
| 342 | } |
| 343 | |
| 344 | |
| 345 | static float parseFloatArg(int& i, const std::vector<std::string>& tokens, |