File: Options.h

package info (click to toggle)
abyss 2.3.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,284 kB
  • sloc: cpp: 78,182; ansic: 6,512; makefile: 2,252; perl: 672; sh: 509; haskell: 412; python: 4
file content (22 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef OPTIONS_H
#define OPTIONS_H 1

#include <string>
#include <sstream>
#include <iterator>

namespace opt {
	extern std::string db;

	std::string getCommand(
			int argc, char* const* argv)
	{
		std::ostringstream command;
		char* const* last = argv + argc -1;
		copy(argv, last, std::ostream_iterator<const char*>(command, " "));
		command << *last;
		return command.str();
	}
}

#endif