Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 309543 Details for
Bug 412699
Set builtin implementation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
set builtin patch
set_builtin.patch (text/plain), 4.17 KB, created by
Alex
on 2012-04-19 21:57:35 UTC
(
hide
)
Description:
set builtin patch
Filename:
MIME Type:
Creator:
Alex
Created:
2012-04-19 21:57:35 UTC
Size:
4.17 KB
patch
obsolete
>diff -rc2P libbash-original//Makefile.am libbash-modified//Makefile.am >*** libbash-original//Makefile.am Thu Apr 12 15:48:50 2012 >--- libbash-modified//Makefile.am Thu Apr 12 17:48:17 2012 >*************** >*** 237,240 **** >--- 237,242 ---- > src/builtins/unset_builtin.h \ > src/builtins/unset_builtin.cpp \ >+ src/builtins/set_builtin.h \ >+ src/builtins/set_builtin.cpp \ > src/builtins/builtin_exceptions.h \ > $(GENERATED_PARSER_C) \ >diff -rc2P libbash-original//src/builtins/set_builtin.cpp libbash-modified//src/builtins/set_builtin.cpp >*** libbash-original//src/builtins/set_builtin.cpp Thu Jan 1 03:00:00 1970 >--- libbash-modified//src/builtins/set_builtin.cpp Thu Apr 12 19:18:20 2012 >*************** >*** 0 **** >--- 1,40 ---- >+ /* >+ Please use git log for copyright holder and year information >+ >+ This file is part of libbash. >+ >+ libbash is free software: you can redistribute it and/or modify >+ it under the terms of the GNU General Public License as published by >+ the Free Software Foundation, either version 2 of the License, or >+ (at your option) any later version. >+ >+ libbash is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License >+ along with libbash. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ /// >+ /// \file set_builtin.cpp >+ /// \brief implementation for the set builtin >+ /// >+ #include "builtins/set_builtin.h" >+ #include "core/interpreter.h" >+ >+ #include <boost/lexical_cast.hpp> >+ >+ int set_builtin::exec(const std::vector<std::string>& bash_args) >+ { >+ if(bash_args.empty()) >+ return 0; >+ >+ if(bash_args[0] == "--") { >+ int i = 1; >+ for (auto iter = bash_args.begin() + 1; iter != bash_args.end(); ++iter, ++i) >+ _walker.define(boost::lexical_cast<std::string>(i), *iter); >+ } >+ >+ return 0; >+ } >diff -rc2P libbash-original//src/builtins/set_builtin.h libbash-modified//src/builtins/set_builtin.h >*** libbash-original//src/builtins/set_builtin.h Thu Jan 1 03:00:00 1970 >--- libbash-modified//src/builtins/set_builtin.h Thu Apr 12 17:48:17 2012 >*************** >*** 0 **** >--- 1,39 ---- >+ /* >+ Please use git log for copyright holder and year information >+ >+ This file is part of libbash. >+ >+ libbash is free software: you can redistribute it and/or modify >+ it under the terms of the GNU General Public License as published by >+ the Free Software Foundation, either version 2 of the License, or >+ (at your option) any later version. >+ >+ libbash is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License >+ along with libbash. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ /// >+ /// \file unset_builtin.h >+ /// \brief implementation for the unset builtin >+ /// >+ #ifndef LIBBASH_BUILTINS_UNSET_BUILTIN_H_ >+ #define LIBBASH_BUILTINS_UNSET_BUILTIN_H_ >+ >+ #include "cppbash_builtin.h" >+ >+ /// >+ /// \class unset_builtin >+ /// \brief the unset builtin for bash >+ /// >+ class unset_builtin : public virtual cppbash_builtin >+ { >+ public: >+ BUILTIN_CONSTRUCTOR(set) >+ virtual int exec(const std::vector<std::string>& bash_args); >+ }; >+ >+ #endif >diff -rc2P libbash-original//src/cppbash_builtin.cpp libbash-modified//src/cppbash_builtin.cpp >*** libbash-original//src/cppbash_builtin.cpp Thu Apr 12 15:48:50 2012 >--- libbash-modified//src/cppbash_builtin.cpp Thu Apr 12 17:48:17 2012 >*************** >*** 45,48 **** >--- 45,49 ---- > #include "builtins/source_builtin.h" > #include "builtins/unset_builtin.h" >+ #include "builtins/set_builtin.h" > > namespace qi = boost::spirit::qi; >*************** >*** 74,77 **** >--- 75,79 ---- > {"let", boost::factory<let_builtin*>()}, > {"unset", boost::factory<unset_builtin*>()}, >+ {"set", boost::factory<set_builtin*>()}, > }); > return *p;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 412699
: 309543