137322c4bSIngo Weinhold /*
237322c4bSIngo Weinhold * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
337322c4bSIngo Weinhold * Distributed under the terms of the MIT License.
437322c4bSIngo Weinhold */
537322c4bSIngo Weinhold
637322c4bSIngo Weinhold
737322c4bSIngo Weinhold #include "ShellParameters.h"
837322c4bSIngo Weinhold
9*19bfeaa7SSiarzhuk Zharski #include "TermConst.h"
10*19bfeaa7SSiarzhuk Zharski
1137322c4bSIngo Weinhold
ShellParameters(int argc,const char * const * argv,const BString & currentDirectory)1237322c4bSIngo Weinhold ShellParameters::ShellParameters(int argc, const char* const* argv,
1337322c4bSIngo Weinhold const BString& currentDirectory)
1437322c4bSIngo Weinhold :
1537322c4bSIngo Weinhold fArguments(argv),
1637322c4bSIngo Weinhold fArgumentCount(argc),
1737322c4bSIngo Weinhold fCurrentDirectory(currentDirectory),
18*19bfeaa7SSiarzhuk Zharski fEncoding(M_UTF8)
1937322c4bSIngo Weinhold {
2037322c4bSIngo Weinhold }
2137322c4bSIngo Weinhold
2237322c4bSIngo Weinhold
2337322c4bSIngo Weinhold void
SetArguments(int argc,const char * const * argv)2437322c4bSIngo Weinhold ShellParameters::SetArguments(int argc, const char* const* argv)
2537322c4bSIngo Weinhold {
2637322c4bSIngo Weinhold fArguments = argv;
2737322c4bSIngo Weinhold fArgumentCount = argc;
2837322c4bSIngo Weinhold }
2937322c4bSIngo Weinhold
3037322c4bSIngo Weinhold
3137322c4bSIngo Weinhold void
SetCurrentDirectory(const BString & currentDirectory)3237322c4bSIngo Weinhold ShellParameters::SetCurrentDirectory(const BString& currentDirectory)
3337322c4bSIngo Weinhold {
3437322c4bSIngo Weinhold fCurrentDirectory = currentDirectory;
3537322c4bSIngo Weinhold }
3637322c4bSIngo Weinhold
3737322c4bSIngo Weinhold
3837322c4bSIngo Weinhold void
SetEncoding(int encoding)39*19bfeaa7SSiarzhuk Zharski ShellParameters::SetEncoding(int encoding)
4037322c4bSIngo Weinhold {
4137322c4bSIngo Weinhold fEncoding = encoding;
4237322c4bSIngo Weinhold }
43