YaST Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2007
- 28 participants
- 815 discussions
[yast-commit] r39993 - in /trunk/python-bindings: src/YPython.cc yast2-python-bindings.spec.in
by juhliarik@svn.opensuse.org 06 Aug '07
by juhliarik@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: juhliarik
Date: Mon Aug 6 14:13:40 2007
New Revision: 39993
URL: http://svn.opensuse.org/viewcvs/yast?rev=39993&view=rev
Log:
solved problem with building rpm
Modified:
trunk/python-bindings/src/YPython.cc
trunk/python-bindings/yast2-python-bindings.spec.in
Modified: trunk/python-bindings/src/YPython.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/YPython.cc?r…
==============================================================================
--- trunk/python-bindings/src/YPython.cc (original)
+++ trunk/python-bindings/src/YPython.cc Mon Aug 6 14:13:40 2007
@@ -189,10 +189,11 @@
// boolean value handling
if (PyBool_Check(pPythonValue)) {
- int compare = PyObject_Compare(pPythonValue, Py_True);
+ PyObject * true_value = PyBool_FromLong(1);
+ int compare = PyObject_Compare(pPythonValue, true_value);
if (compare == 0) {
out = YCPBoolean (true);
- } else if (compare < 0) {
+ } else if (compare < 1) {
out = YCPBoolean (false);
} else {
return false;
Modified: trunk/python-bindings/yast2-python-bindings.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/yast2-python-bin…
==============================================================================
--- trunk/python-bindings/yast2-python-bindings.spec.in (original)
+++ trunk/python-bindings/yast2-python-bindings.spec.in Mon Aug 6 14:13:40 2007
@@ -21,6 +21,7 @@
@INSTALL@
rm $RPM_BUILD_ROOT/@plugindir@/libpy2lang_python.la
+rm $RPM_BUILD_ROOT/%{_libdir}/python/site-packages/libYCP.la
@CLEAN@
@@ -33,5 +34,4 @@
# libYCP goes elsewhere
%dir %{_libdir}/python
%{_libdir}/python/site-packages
-%dir @moduledir@
%doc @docdir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
06 Aug '07
Author: jsuchome
Date: Mon Aug 6 14:12:32 2007
New Revision: 39992
URL: http://svn.opensuse.org/viewcvs/yast?rev=39992&view=rev
Log:
Created tag stable-2_15_17 for add-on-creator
Added:
tags/stable-2_15_17/add-on-creator/
- copied from r39991, trunk/add-on-creator/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39991 - in /trunk/add-on-creator: VERSION package/yast2-add-on-creator.changes src/AddOnCreator.ycp src/complex.ycp src/helps.ycp
by jsuchome@svn.opensuse.org 06 Aug '07
by jsuchome@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: jsuchome
Date: Mon Aug 6 14:12:21 2007
New Revision: 39991
URL: http://svn.opensuse.org/viewcvs/yast?rev=39991&view=rev
Log:
- enable entering product name and version before content file
dialog, so most of its mandatory keys can be filled
- 2.15.17
Modified:
trunk/add-on-creator/VERSION
trunk/add-on-creator/package/yast2-add-on-creator.changes
trunk/add-on-creator/src/AddOnCreator.ycp
trunk/add-on-creator/src/complex.ycp
trunk/add-on-creator/src/helps.ycp
Modified: trunk/add-on-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/VERSION?rev=39991…
==============================================================================
--- trunk/add-on-creator/VERSION (original)
+++ trunk/add-on-creator/VERSION Mon Aug 6 14:12:21 2007
@@ -1 +1 @@
-2.15.16
+2.15.17
Modified: trunk/add-on-creator/package/yast2-add-on-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/package/yast2-add…
==============================================================================
--- trunk/add-on-creator/package/yast2-add-on-creator.changes (original)
+++ trunk/add-on-creator/package/yast2-add-on-creator.changes Mon Aug 6 14:12:21 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Aug 6 14:07:47 CEST 2007 - jsuchome(a)suse.cz
+
+- enable entering product name and version before content file
+ dialog, so most of its mandatory keys can be filled
+- 2.15.17
+
+-------------------------------------------------------------------
Mon Aug 6 10:05:35 CEST 2007 - jsuchome(a)suse.cz
- command line option for packages resigning (#287447)
Modified: trunk/add-on-creator/src/AddOnCreator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/AddOnCreator.…
==============================================================================
--- trunk/add-on-creator/src/AddOnCreator.ycp (original)
+++ trunk/add-on-creator/src/AddOnCreator.ycp Mon Aug 6 14:12:21 2007
@@ -35,6 +35,7 @@
module "AddOnCreator";
textdomain "add-on-creator";
+import "Arch";
import "Directory";
import "FileUtils";
import "Mode";
@@ -743,6 +744,8 @@
else
content_descr[key,"allowed_values"] = [];
}
+ if (key == "DEFAULTBASE")
+ content_descr[key,"value"] = Arch::architecture ();
i = i + 1;
});
Modified: trunk/add-on-creator/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/complex.ycp?r…
==============================================================================
--- trunk/add-on-creator/src/complex.ycp (original)
+++ trunk/add-on-creator/src/complex.ycp Mon Aug 6 14:12:21 2007
@@ -203,10 +203,23 @@
AddOnCreator::rpm_path = "";
string old_requires = requires;
+ string product = AddOnCreator::content_map["PRODUCT"]:"";
+ string old_product = product == "" ? nil : product;
+
+ string version = AddOnCreator::content_map["VERSION"]:"";
+ string old_version = version;
+
// dialog caption
string caption = _("Add-On Product Creator");
term contents = `HBox (`HSpacing (), `VBox (
+ `HBox (
+ // textentry label
+ `TextEntry (`id (`product), _("&Add-On Product Name"), product),
+ // textentry label
+ `TextEntry (`id (`version), _("&Version"), version)
+ ),
+ `VSpacing (0.7),
`Frame (_("Required Product"), `HBox (`HSpacing (0.5), `VBox (
`VSpacing (0.4),
`RadioButtonGroup (`id(`rd),
@@ -268,7 +281,7 @@
Wizard::SetContentsButtons(caption, contents, HELPS["sources"]:"",
Label::BackButton(), Label::NextButton());
- UI::SetFocus (`id(`rpm_path));
+ UI::SetFocus (`id(`product));
if (UI::QueryWidget (`id(`rd), `Value) == nil)
{
@@ -286,6 +299,8 @@
string dir = (string) UI::QueryWidget (`id(`rpm_path), `Value);
string req_dir = (string)
UI::QueryWidget (`id(`required_rpm_path), `Value);
+ product = (string) UI::QueryWidget (`id(`product), `Value);
+ version = (string) UI::QueryWidget (`id(`version), `Value);
if (ret == `browse_rpm) {
dir = UI::AskForExistingDirectory (dir, "");
@@ -358,8 +373,17 @@
if (requires == "")
requires = (string) UI::QueryWidget (`id(`other_val), `Value);
AddOnCreator::content_map["REQUIRES"] = requires;
+ AddOnCreator::content_map["PRODUCT"] = product;
+ AddOnCreator::content_map["VERSION"] = version;
+ if (product != "" &&
+ AddOnCreator::content_map["DISTPRODUCT"]:"" == "")
+ AddOnCreator::content_map["DISTPRODUCT"] = product;
+ if (version != "" &&
+ AddOnCreator::content_map["DISTVERSION"]:"" == "")
+ AddOnCreator::content_map["DISTVERSION"] = version;
- if (requires == old_requires && dir == old_dir)
+ if (requires == old_requires && dir == old_dir &&
+ product == old_product && version == old_version)
ret = `skip_gen;
break;
}
Modified: trunk/add-on-creator/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/helps.ycp?rev…
==============================================================================
--- trunk/add-on-creator/src/helps.ycp (original)
+++ trunk/add-on-creator/src/helps.ycp Mon Aug 6 14:12:21 2007
@@ -58,7 +58,13 @@
_("<p>When basing the new product on an existing product, check <b>Generate Package Descriptions</b> to generate new descriptions of packages in the existing product.</p>"),
// help text for initial data (paragraph title)
- "sources" : _("<p><b>Required Product</b></p>") +
+ "sources" : _("<p><b>Name and Version</b></p>") +
+
+ // help text for initial data, cont.
+ _("<p>Enter the name and version of add-on product.</p>") +
+
+ // help text for initial data, cont.
+ _("<p><b>Required Product</b></p>") +
// help text for initial data, cont.
_("<p>Select the product to which the new add-on product can be applied. This selection forms the <b>REQUIRES</b> value of the <tt>content</tt> file.</p>") +
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39990 - in /trunk/storage: libstorage/src/Volume.cc package/yast2-storage.changes storage/src/modules/FileSystems.ycp
by fehr@svn.opensuse.org 06 Aug '07
by fehr@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: fehr
Date: Mon Aug 6 14:02:14 2007
New Revision: 39990
URL: http://svn.opensuse.org/viewcvs/yast?rev=39990&view=rev
Log:
add locale option to ntfs-3g entries in fstab (#297607)
Modified:
trunk/storage/libstorage/src/Volume.cc
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/modules/FileSystems.ycp
Modified: trunk/storage/libstorage/src/Volume.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc…
==============================================================================
--- trunk/storage/libstorage/src/Volume.cc (original)
+++ trunk/storage/libstorage/src/Volume.cc Mon Aug 6 14:02:14 2007
@@ -2086,14 +2086,16 @@
cmdline += "-r ";
const char * ign_opt[] = { "defaults", "" };
const char * ign_beg[] = { "loop", "encryption=", "phash=",
- "itercountk=" };
+ "itercountk=", "" };
if( cont->getStorage()->instsys() )
- ign_opt[1] = "ro";
+ ign_opt[lengthof(ign_opt)-1] = "ro";
+ if( fsn=="ntfs" )
+ ign_beg[lengthof(ign_beg)-1] = "locale=";
list<string> l = splitString( fstab_opt, "," );
y2mil( "l before:" << l );
- for( unsigned i=0; i<lengthof(ign_opt); i++ )
+ for( unsigned i=0; i<lengthof(ign_opt) && *ign_opt[i]!=0; i++ )
l.erase( remove(l.begin(), l.end(), ign_opt[i]), l.end() );
- for( unsigned i=0; i<lengthof(ign_beg); i++ )
+ for( unsigned i=0; i<lengthof(ign_beg) && *ign_beg[i]!=0; i++ )
l.erase( remove_if(l.begin(), l.end(), find_begin(ign_beg[i])),
l.end() );
y2mil( "l after:" << l );
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.ch…
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Mon Aug 6 14:02:14 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Mon Aug 6 14:00:13 CEST 2007 - fehr(a)suse.de
+
+- add locale option to ntfs-3g entries in fstab (#297607)
+
+-------------------------------------------------------------------
Thu Aug 2 16:34:43 CEST 2007 - fehr(a)suse.de
- allow mount-by-uuid for swap devices
Modified: trunk/storage/storage/src/modules/FileSystems.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/File…
==============================================================================
--- trunk/storage/storage/src/modules/FileSystems.ycp (original)
+++ trunk/storage/storage/src/modules/FileSystems.ycp Mon Aug 6 14:02:14 2007
@@ -1389,7 +1389,15 @@
fst_default = fst_default + ",iocharset=" + enc;
}
else
+ {
+ map m = (map)SCR::Execute( .target.bash_output, "locale | grep LC_CTYPE" );
+ list<string> sl = splitstring( m["stdout"]:"", "\n" );
+ sl = splitstring( sl[0]:"", "=" );
+ y2milestone( "DefaultFstabOptions sl %1", sl );
fst_default = fst_default + ",nls=" + enc;
+ if( size(sl[1]:"")>0 )
+ fst_default = fst_default + ",locale=" + deletechars(sl[1]:"", "\"" );
+ }
}
if( size(code)>0 && code != "437" && fsys!=`ntfs )
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39989 - in /branches/tmp/mvidner/ui-as-namespace/gtk: VERSION package/yast2-gtk.changes
by mvidner@svn.opensuse.org 06 Aug '07
by mvidner@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: mvidner
Date: Mon Aug 6 14:00:41 2007
New Revision: 39989
URL: http://svn.opensuse.org/viewcvs/yast?rev=39989&view=rev
Log:
Adapted to changes in yast2-core needed for making UI callable from
yast2-*-bindings.
Modified:
branches/tmp/mvidner/ui-as-namespace/gtk/VERSION
branches/tmp/mvidner/ui-as-namespace/gtk/package/yast2-gtk.changes
Modified: branches/tmp/mvidner/ui-as-namespace/gtk/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/g…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/gtk/VERSION (original)
+++ branches/tmp/mvidner/ui-as-namespace/gtk/VERSION Mon Aug 6 14:00:41 2007
@@ -1 +1 @@
-2.15.7
+2.15.7.1
Modified: branches/tmp/mvidner/ui-as-namespace/gtk/package/yast2-gtk.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/g…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/gtk/package/yast2-gtk.changes (original)
+++ branches/tmp/mvidner/ui-as-namespace/gtk/package/yast2-gtk.changes Mon Aug 6 14:00:41 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Aug 6 14:00:37 CEST 2007 - mvidner(a)suse.cz
+
+- Adapted to changes in yast2-core needed for making UI callable from
+ yast2-*-bindings.
+- 2.15.7.1
+
+-------------------------------------------------------------------
Thu Jul 26 07:28:31 CEST 2007 - jsrain(a)suse.cz
- removed yast2-devel from BuildRequires
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39988 - in /branches/tmp/mvidner/ui-as-namespace/ncurses: VERSION package/yast2-ncurses.changes
by mvidner@svn.opensuse.org 06 Aug '07
by mvidner@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: mvidner
Date: Mon Aug 6 13:57:07 2007
New Revision: 39988
URL: http://svn.opensuse.org/viewcvs/yast?rev=39988&view=rev
Log:
Adapted to changes in yast2-core needed for making UI callable from
yast2-*-bindings.
Modified:
branches/tmp/mvidner/ui-as-namespace/ncurses/VERSION
branches/tmp/mvidner/ui-as-namespace/ncurses/package/yast2-ncurses.changes
Modified: branches/tmp/mvidner/ui-as-namespace/ncurses/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/n…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/ncurses/VERSION (original)
+++ branches/tmp/mvidner/ui-as-namespace/ncurses/VERSION Mon Aug 6 13:57:07 2007
@@ -1 +1 @@
-2.15.21
+2.15.21.1
Modified: branches/tmp/mvidner/ui-as-namespace/ncurses/package/yast2-ncurses.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/n…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/ncurses/package/yast2-ncurses.changes (original)
+++ branches/tmp/mvidner/ui-as-namespace/ncurses/package/yast2-ncurses.changes Mon Aug 6 13:57:07 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Aug 6 13:56:58 CEST 2007 - mvidner(a)suse.cz
+
+- Adapted to changes in yast2-core needed for making UI callable from
+ yast2-*-bindings.
+- 2.15.21.1
+
+-------------------------------------------------------------------
Thu Jul 19 13:24:01 CEST 2007 - kmachalkova(a)suse.cz
- Make repositories list popup work (FaTE #301810 - part II) -
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39987 - in /branches/tmp/mvidner/ui-as-namespace/qt: VERSION package/yast2-qt.changes
by mvidner@svn.opensuse.org 06 Aug '07
by mvidner@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: mvidner
Date: Mon Aug 6 13:55:12 2007
New Revision: 39987
URL: http://svn.opensuse.org/viewcvs/yast?rev=39987&view=rev
Log:
Adapted to changes in yast2-core needed for making UI callable from
yast2-*-bindings.
Modified:
branches/tmp/mvidner/ui-as-namespace/qt/VERSION
branches/tmp/mvidner/ui-as-namespace/qt/package/yast2-qt.changes
Modified: branches/tmp/mvidner/ui-as-namespace/qt/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/q…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/qt/VERSION (original)
+++ branches/tmp/mvidner/ui-as-namespace/qt/VERSION Mon Aug 6 13:55:12 2007
@@ -1 +1 @@
-2.15.7
+2.15.7.1
Modified: branches/tmp/mvidner/ui-as-namespace/qt/package/yast2-qt.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/q…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/qt/package/yast2-qt.changes (original)
+++ branches/tmp/mvidner/ui-as-namespace/qt/package/yast2-qt.changes Mon Aug 6 13:55:12 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Aug 6 13:55:08 CEST 2007 - mvidner(a)suse.cz
+
+- Adapted to changes in yast2-core needed for making UI callable from
+ yast2-*-bindings.
+- 2.15.7.1
+
+-------------------------------------------------------------------
Tue Jul 24 10:59:06 CEST 2007 - sh(a)suse.de
- Fixed bug #285915: Can't cancel package search
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39986 - in /branches/tmp/mvidner/ui-as-namespace/core: VERSION package/yast2-core.changes
by mvidner@svn.opensuse.org 06 Aug '07
by mvidner@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: mvidner
Date: Mon Aug 6 13:49:04 2007
New Revision: 39986
URL: http://svn.opensuse.org/viewcvs/yast?rev=39986&view=rev
Log:
Converted the UI functions from YCP builtins to a YCP namespace, so
that they can be called from other language bindings.
Modified:
branches/tmp/mvidner/ui-as-namespace/core/VERSION
branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes
Modified: branches/tmp/mvidner/ui-as-namespace/core/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/VERSION (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/VERSION Mon Aug 6 13:49:04 2007
@@ -1 +1 @@
-2.15.6
+2.15.6.1
Modified: branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes Mon Aug 6 13:49:04 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Aug 6 13:48:45 CEST 2007 - mvidner(a)suse.cz
+
+- Converted the UI functions from YCP builtins to a YCP namespace, so
+ that they can be called from other language bindings.
+- 2.15.6.1
+
+-------------------------------------------------------------------
Thu Jul 12 11:52:24 CEST 2007 - locilka(a)suse.cz
- Fixed ag_background to always read the process exit status before
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39985 - in /branches/tmp/mvidner/ui-as-namespace/core: ./ agents-perl/ agents-perl/testsuite/ base/tools/ycpc/ libycp/src/ libycp/src/include/ycp/ package/
by mvidner@svn.opensuse.org 06 Aug '07
by mvidner@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: mvidner
Date: Mon Aug 6 13:44:24 2007
New Revision: 39985
URL: http://svn.opensuse.org/viewcvs/yast?rev=39985&view=rev
Log:
Merged revisions 39051-39971 via svnmerge from
http://svn.opensuse.org/svn/yast/trunk/core
........
r39062 | mvidner | 2007-06-28 10:03:29 +0200 (Čt, 28 čen 2007) | 2 lines
Fixed docs for the "random" builtin.
........
r39159 | kkaempf | 2007-07-04 11:47:40 +0200 (St, 04 čec 2007) | 9 lines
Provide XML representation of abstract syntax tree.
This changeset adds 'toXML()' methods to all YCP and YCode
classes to support a more easily parseable representation
of YCP data structures and code.
The XML structures are considered experimental, if and
when a matching DTD will appear is unknown.
........
r39161 | kkaempf | 2007-07-04 11:53:34 +0200 (St, 04 čec 2007) | 4 lines
Add '-x' (resp. '--xml') command line option to ycpc.
This will trigger output of XML instead of YCP bytecode.
........
r39192 | kkaempf | 2007-07-05 18:27:28 +0200 (Čt, 05 čec 2007) | 5 lines
clean up XML output, use more properties
- constants are enclosed by <const ... />
- symbol definitions are <symbol ... />
- variable references are <variable ... />
........
r39224 | kkaempf | 2007-07-06 22:26:10 +0200 (Pá, 06 čec 2007) | 2 lines
drop <parameters>
........
r39225 | kkaempf | 2007-07-06 22:26:48 +0200 (Pá, 06 čec 2007) | 2 lines
fix xml representatio
........
r39226 | kkaempf | 2007-07-06 22:27:30 +0200 (Pá, 06 čec 2007) | 3 lines
enclose items with <element>...</element>
<val> -> <value>
........
r39227 | kkaempf | 2007-07-06 22:28:07 +0200 (Pá, 06 čec 2007) | 2 lines
handle as <const type="term" ...
........
r39228 | kkaempf | 2007-07-06 23:20:09 +0200 (Pá, 06 čec 2007) | 2 lines
use attributes, not elements
........
r39229 | kkaempf | 2007-07-06 23:20:57 +0200 (Pá, 06 čec 2007) | 4 lines
xml output fixes
- use attributes instead of elements
- fix yeunary and yebinary accordingly
........
r39247 | kkaempf | 2007-07-09 14:07:41 +0200 (Po, 09 čec 2007) | 2 lines
further cleanup on XML output
........
r39248 | kkaempf | 2007-07-09 14:09:21 +0200 (Po, 09 čec 2007) | 2 lines
encode package & svn rev into xml header
........
r39249 | kkaempf | 2007-07-09 14:14:50 +0200 (Po, 09 čec 2007) | 2 lines
move versioning to <ycp...> header
........
r39250 | kkaempf | 2007-07-09 14:46:30 +0200 (Po, 09 čec 2007) | 2 lines
clean up <locale> xml output
........
r39274 | kkaempf | 2007-07-10 13:47:18 +0200 (Út, 10 čec 2007) | 2 lines
enclose block statements in <stmt>
........
r39275 | kkaempf | 2007-07-10 13:48:12 +0200 (Út, 10 čec 2007) | 3 lines
parameter -> elements for YCodelist
simplify <entry>
........
r39276 | kkaempf | 2007-07-10 13:48:38 +0200 (Út, 10 čec 2007) | 2 lines
<expression> -> <expr>
........
r39279 | kkaempf | 2007-07-10 14:29:36 +0200 (Út, 10 čec 2007) | 2 lines
bump xml version
........
r39280 | kkaempf | 2007-07-10 14:30:32 +0200 (Út, 10 čec 2007) | 3 lines
fix yepropagate, yebracket and yeis type handling
parameter -> args for <yecall ...>
........
r39281 | kkaempf | 2007-07-10 15:08:05 +0200 (Út, 10 čec 2007) | 2 lines
<val> -> <value> for YEMap
........
r39282 | kkaempf | 2007-07-10 15:19:28 +0200 (Út, 10 čec 2007) | 2 lines
fix <yemap> xml output to be compatible with <map> output
........
r39286 | kkaempf | 2007-07-10 16:20:41 +0200 (Út, 10 čec 2007) | 2 lines
fix <include and <filename
........
r39287 | kkaempf | 2007-07-10 17:00:14 +0200 (Út, 10 čec 2007) | 2 lines
fix duplicate <do> in do..while
........
r39293 | kkaempf | 2007-07-10 17:49:06 +0200 (Út, 10 čec 2007) | 2 lines
fix <const ...> closing tag
........
r39294 | kkaempf | 2007-07-10 17:49:24 +0200 (Út, 10 čec 2007) | 2 lines
fix <yeis ...> start tag
........
r39345 | locilka | 2007-07-12 12:00:18 +0200 (Čt, 12 čec 2007) | 5 lines
- Fixed ag_background to always read the process exit status before
returning it (#285920).
- 2.15.7
........
r39348 | locilka | 2007-07-12 12:14:14 +0200 (Čt, 12 čec 2007) | 3 lines
back to 2.15.6
........
r39349 | kkaempf | 2007-07-12 12:32:33 +0200 (Čt, 12 čec 2007) | 2 lines
put list and map size to xml
........
r39350 | locilka | 2007-07-12 12:36:13 +0200 (Čt, 12 čec 2007) | 3 lines
Doesn't fail anymore
........
r39369 | kkaempf | 2007-07-12 16:26:19 +0200 (Čt, 12 čec 2007) | 2 lines
first attempt on expressions with symbols, like maplist, foreach, etc.
........
r39414 | kkaempf | 2007-07-15 13:09:01 +0200 (Ne, 15 čec 2007) | 2 lines
dont count elements in ycodelist
........
r39415 | kkaempf | 2007-07-15 13:10:17 +0200 (Ne, 15 čec 2007) | 2 lines
fix builtin xml output
........
r39467 | kkaempf | 2007-07-17 14:12:35 +0200 (Út, 17 čec 2007) | 2 lines
xml-ify path elements properly
........
r39470 | kkaempf | 2007-07-17 15:31:05 +0200 (Út, 17 čec 2007) | 2 lines
fix switch/case/default xml output
........
Added:
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Xmlcode.cc
- copied unchanged from r39470, trunk/core/libycp/src/Xmlcode.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Xmlcode.h
- copied unchanged from r39470, trunk/core/libycp/src/include/ycp/Xmlcode.h
Modified:
branches/tmp/mvidner/ui-as-namespace/core/ (props changed)
branches/tmp/mvidner/ui-as-namespace/core/VERSION
branches/tmp/mvidner/ui-as-namespace/core/agents-perl/ag_background
branches/tmp/mvidner/ui-as-namespace/core/agents-perl/testsuite/Makefile.am
branches/tmp/mvidner/ui-as-namespace/core/base/tools/ycpc/ycpc.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Makefile.am
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Point.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/StaticDeclaration.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/SymbolTable.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Type.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YBlock.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBoolean.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBuiltinMisc.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPByteblock.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPCode.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPExternal.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPFloat.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPInteger.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPList.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPMap.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPPath.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPString.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPSymbol.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPTerm.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPVoid.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCode.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YExpression.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YStatement.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YSymbolEntry.cc
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Point.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/StaticDeclaration.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/SymbolTable.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Type.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YBlock.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPBoolean.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPByteblock.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPCode.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPElement.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPExternal.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPFloat.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPInteger.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPList.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPMap.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPPath.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPString.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPSymbol.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPTerm.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPValue.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPVoid.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCode.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YExpression.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YStatement.h
branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YSymbolEntry.h
branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes
Modified: branches/tmp/mvidner/ui-as-namespace/core/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/VERSION (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/VERSION Mon Aug 6 13:44:24 2007
@@ -1 +1 @@
-2.15.8
+2.15.6
Modified: branches/tmp/mvidner/ui-as-namespace/core/agents-perl/ag_background
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/agents-perl/ag_background (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/agents-perl/ag_background Mon Aug 6 13:44:24 2007
@@ -91,6 +91,12 @@
ycp::Return("");
}
+my $exit = 0;
+
+sub ReadExitCode {
+ $exit = $? >> 8; # high 8 bits are exit value
+}
+
# install SIGCHLD handler
$SIG{CHLD} = \&Handler;
@@ -112,8 +118,6 @@
my $pipe_defined = 0;
my $pipe_defined_err = 0;
-my $exit = 0;
-
$| = 1;
# main loop
@@ -235,6 +239,7 @@
}
elsif ($path eq '.status')
{
+ ReadExitCode();
ycp::Return($exit);
}
elsif ($path eq '.newout')
@@ -368,7 +373,7 @@
}
close(RD);
- $exit = $? >> 8; # high 8 bits are exit value
+ ReadExitCode();
}
else
{
@@ -417,7 +422,7 @@
}
close(ERR);
- $exit = $? >> 8; # high 8 bits are exit value
+ ReadExitCode();
}
else
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/agents-perl/testsuite/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/agents-perl/testsuite/Makefile.am (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/agents-perl/testsuite/Makefile.am Mon Aug 6 13:44:24 2007
@@ -6,6 +6,4 @@
t-srcmgr1.exp \
t-srcmgr2.exp
-XFAIL_TESTS = t-srcmgr1.exp
-
EXTRA_DIST = test-common.exp $(TESTS)
Modified: branches/tmp/mvidner/ui-as-namespace/core/base/tools/ycpc/ycpc.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/base/tools/ycpc/ycpc.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/base/tools/ycpc/ycpc.cc Mon Aug 6 13:44:24 2007
@@ -22,6 +22,7 @@
#include <ycp/YCode.h>
#include <ycp/Parser.h>
#include <ycp/Bytecode.h>
+#include <ycp/Xmlcode.h>
#include <ycp/Import.h>
#include <ycp/y2log.h>
#include <../../libycp/src/parser.h>
@@ -54,6 +55,7 @@
static int recursive = 0; // recursively all files
static int parse = 0; // just parse source code
static int compile = 0; // just compile source to bytecode
+static int to_xml = 0; // output XML instead of bytecode
static int read_n_print = 0; // read and print bytecode
static int read_n_run = 0; // read and run bytecode
static int freshen = 0; // freshen recompilation
@@ -914,11 +916,11 @@
int len = ofname.size ();
if (len > 4 && ofname.substr (len-4, 4) == ".ycp")
{
- ofname = ofname.replace (len-4, 4, ".ybc");
+ ofname = ofname.replace (len-4, 4, to_xml ? ".xml" : ".ybc");
}
else
{
- ofname += ".ybc";
+ ofname += to_xml ? ".xml" : ".ybc";
}
}
progress ("compiling to '%s'\n", ofname.c_str ());
@@ -928,7 +930,14 @@
if (c != NULL )
{
progress ("saving ...\n");
- return Bytecode::writeFile (c, ofname) ? 0 : 1;
+ int result = 0;
+ if (to_xml) {
+ result = Xmlcode::writeFile (c, ofname);
+ }
+ else {
+ result = Bytecode::writeFile (c, ofname);
+ }
+ return result ? 0 : 1;
}
return 2;
@@ -1177,10 +1186,11 @@
{"test", 0, 0, 't'}, // lots of output
{"ui", 1, 0, 'u' }, // UI to start in combination with 'r'
{"version", 0, 0, 'v'}, // show version and exit
+ {"xml", 0, 0, 'x'}, // output XML insteaf of Bytecode
{0, 0, 0, 0}
};
- int c = getopt_long (argc, argv, "h?vVnpqrtRdEcFfI:M:o:l:u:", options, &option_index);
+ int c = getopt_long (argc, argv, "h?vxVnpqrtRdEcFfI:M:o:l:u:", options, &option_index);
if (c == EOF) break;
switch (c)
@@ -1268,6 +1278,9 @@
case 'u':
ui_name = strdup (optarg);
break;
+ case 'x':
+ to_xml = 1;
+ break;
default:
fprintf (stderr, "Try `%s -h' for more information.\n", argv[0]);
exit(1);
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Makefile.am (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Makefile.am Mon Aug 6 13:44:24 2007
@@ -21,6 +21,7 @@
libycpvalues_la_SOURCES = \
Bytecode.cc Import.cc Point.cc \
+ Xmlcode.cc \
YCPBoolean.cc \
YCPElement.cc YCPByteblock.cc YCPFloat.cc \
YCPInteger.cc YCPList.cc \
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Point.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Point.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Point.cc Mon Aug 6 13:44:24 2007
@@ -45,6 +45,7 @@
#include "ycp/Point.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/Scanner.h"
#include "ycp/y2log.h"
@@ -169,4 +170,20 @@
}
+std::ostream &
+Point::toXml (std::ostream & str, int indent ) const
+{
+ str << Xmlcode::spaces( indent ) << "<point line=" << m_line << ">";
+#if DO_DEBUG
+ y2debug ("Point::toStream (%s)", toString().c_str());
+#endif
+ Xmlcode::writeEntry (str, m_entry);
+ if (m_point)
+ {
+ m_point->toXml( str, indent );
+ }
+ return str << "</point>";
+}
+
+
// EOF
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/StaticDeclaration.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/StaticDeclaration.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/StaticDeclaration.cc Mon Aug 6 13:44:24 2007
@@ -34,6 +34,7 @@
#include "ycp/YBlock.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/Import.h"
#include "ycp/Point.h"
@@ -513,6 +514,27 @@
}
+// write declaration to stream (name and type)
+std::ostream &
+StaticDeclaration::writeXmlDeclaration (std::ostream & str, const declaration_t *decl) const
+{
+ string ns;
+
+ const declaration_t *d = decl;
+ while( d->name_space != 0 )
+ {
+ d = d->name_space;
+ if (!ns.empty()) ns += "::";
+ ns = std::string(d->name);
+ }
+
+ if (!ns.empty()) str << " ns=\"" << ns << "\"";
+ str << " name=\"" << Xmlcode::xmlify( decl->name ) << "\"";
+ decl->type->toXml( str, 0 );
+ return str;
+}
+
+
// read declaration from stream (return declaration matching name and type _exactly_)
declaration_t *
StaticDeclaration::readDeclaration (bytecodeistream & str) const
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/SymbolTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/SymbolTable.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/SymbolTable.cc Mon Aug 6 13:44:24 2007
@@ -23,6 +23,7 @@
#include "ycp/SymbolTable.h"
#include "y2/SymbolEntry.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/Point.h"
#ifndef DO_DEBUG
@@ -179,6 +180,26 @@
}
+std::ostream &
+TableEntry::toXml (std::ostream & str, int indent ) const
+{
+ str << Xmlcode::spaces( indent ) << "<tableentry>\n";
+ str << Xmlcode::spaces( indent+2 );
+ Xmlcode::writeEntry (str, m_entry);
+ str << endl;
+ m_point->toXml (str, indent+2 );
+ if ((m_entry->category() == SymbolEntry::c_function) // write function prototype if it's global
+ && m_entry->isGlobal())
+ {
+// y2debug ("TableEntry::toStream: write global function prototype");
+
+ // FIXME: why do we this here???
+ ((YFunctionPtr)(((YSymbolEntryPtr)m_entry)->code()))->toXml( str, indent );
+ }
+ return str << endl << Xmlcode::spaces( indent ) << "</tableentry>";
+}
+
+
void
TableEntry::remove ()
{
@@ -478,6 +499,60 @@
return str;
}
+
+std::ostream &
+SymbolTable::writeXmlUsage (std::ostream & str, int indent ) const
+{
+ if (m_used == 0)
+ return str;
+
+ std::vector<TableEntry *> xrefs;
+
+ std::map<const char *, TableEntry *>::iterator it;
+
+ for (it = m_used->begin(); it != m_used->end(); it++)
+ {
+ TableEntry *tentry = it->second;
+ tentry->sentry()->setPosition (xrefs.size());
+#if DO_DEBUG
+ y2debug ("%d -> %s", xrefs.size(), tentry->sentry()->toString().c_str());
+#endif
+ xrefs.push_back (tentry);
+ }
+
+ int rsize = xrefs.size();
+ if (rsize == 0)
+ return str;
+
+ bool xref_debug = (getenv (XREFDEBUG) != 0);
+
+ if (xref_debug) y2milestone ("Need %d symbols from table %p\n", rsize, this);
+#if DO_DEBUG
+ else y2debug ("Need %d symbols from table %p\n", rsize, this);
+#endif
+
+ str << Xmlcode::spaces( indent ) << "<usage>\n";
+
+ int position = 0;
+ while (position < rsize)
+ {
+ SymbolEntryPtr sentry = xrefs[position]->sentry();
+
+ if (xref_debug) y2milestone("XRef %p::%s @ %d\n", this, sentry->toString().c_str(), position);
+#if DO_DEBUG
+ else y2debug("XRef %p::%s @ %d\n", this, sentry->toString().c_str(), position);
+#endif
+ str << Xmlcode::spaces( indent+2 ) << "<name>" << sentry->name() << "</name>";
+ sentry->type()->toXml( str, 0 );
+ str << endl;
+
+ sentry->setPosition (-position - 1); // negative position -> Xref
+ position++;
+ }
+
+ return str << Xmlcode::spaces( indent ) << "</usage>\n";
+}
+
//-------------------------------------------------------------------
int
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Type.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Type.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/Type.cc Mon Aug 6 13:44:24 2007
@@ -20,6 +20,7 @@
#include "ycp/y2log.h"
#include "ycp/Type.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/YCPMap.h" // for YCPMapIterator
#include "ycp/YCPCode.h" // for YT_Code in matchvalue()
@@ -137,7 +138,7 @@
/**
- * write out to stream
+ * write out to bytecode stream
*/
std::ostream &
@@ -152,6 +153,16 @@
return str;
}
+
+std::ostream &
+Type::toXml( std::ostream & str, int indent ) const
+{
+ str << " type=\"" << toXmlString() << "\"";
+ if (m_const) str << " const=\"1\"";
+ if (m_reference) str << " reference=\"1\"";
+ return str;
+}
+
//----------------------------------------------------------------
// Type
@@ -193,6 +204,44 @@
}
+string
+Type::toXmlString () const
+{
+ string ret;
+ switch (m_kind)
+ {
+ case UnspecT: ret = "unspec"; break;
+ case ErrorT: ret = "ERR"; break;
+ case AnyT: ret = "any"; break;
+ case BooleanT: ret = "boolean"; break;
+ case ByteblockT: ret = "byteblock"; break;
+ case FloatT: ret = "float"; break;
+ case IntegerT: ret = "integer"; break;
+ case LocaleT: ret = "locale"; break;
+ case PathT: ret = "path"; break;
+ case StringT: ret = "string"; break;
+ case SymbolT: ret = "symbol"; break;
+ case TermT: ret = "term"; break;
+ case VoidT: ret = "void"; break;
+ case WildcardT: ret = "..."; break;
+
+ case FlexT: ret = "flex"; break;
+ case VariableT: ret = "var"; break;
+ case BlockT: ret = "block"; break;
+ case ListT: ret = "list"; break;
+ case MapT: ret = "map"; break;
+ case TupleT: ret = "tuple"; break;
+ case FunctionT: ret = "function"; break;
+
+ case NilT: ret = "nil"; break;
+ case NFlexT: ret = "nflex"; break;
+ // no default:, let gcc warn
+ }
+ if (ret.empty()) ret = "<UNHANDLED>";
+ return preToString() + ret + postToString();
+}
+
+
// match basic (non-constructed) types
//
// returns 0 if match
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YBlock.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YBlock.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YBlock.cc Mon Aug 6 13:44:24 2007
@@ -36,6 +36,7 @@
#include "ycp/Point.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/Scanner.h"
#include "ycp/y2log.h"
@@ -516,6 +517,51 @@
}
+std::ostream &
+YBlock::toXmlSwitch( map<YCPValue, int, ycpless> cases, int defaultcase, std::ostream & str, int indent ) const
+{
+ // first, create reverse map of cases
+ int statementcount = statementCount ();
+ YCPValue values[statementcount];
+
+ for (int i = 0; i < statementcount; i++)
+ values[i] = YCPNull ();
+
+ for (map<YCPValue, int, ycpless>::iterator it = cases.begin ();
+ it != cases.end (); it++ )
+ {
+ values[ it->second ] = it->first;
+ }
+
+ // s += environmentToString ();
+
+ stmtlist_t *stmt = m_statements;
+ int index = 0;
+ while (stmt)
+ {
+ str << Xmlcode::spaces( indent );
+ if (index == defaultcase)
+ {
+ str << "<default>\n";
+ stmt->stmt->toXml( str, indent+2 );
+ str << endl << "</default>";
+ }
+ else if (! values[index].isNull ())
+ {
+ str << "<case>";
+ values[index]->toXml( str, 0 );
+ str << endl;
+ stmt->stmt->toXml( str, indent+2 );
+ str << endl << "</case>";
+ }
+ stmt = stmt->next;
+ index++;
+ }
+
+ return str;
+}
+
+
YCPValue
YBlock::evaluate (bool cse)
{
@@ -965,6 +1011,92 @@
}
+std::ostream &
+YBlock::toXml( std::ostream & str, int indent ) const
+{
+ str << Xmlcode::spaces( indent ) << "<block kind=\"";
+
+ switch( m_kind ) {
+ case b_unknown: str << "unspec"; break;
+ case b_module: str << "module"; break;
+ case b_file: str << "file"; break;
+ case b_statement: str << "stmt"; break;
+ case b_definition: str << "def"; break;
+ case b_value: str << "value"; break;
+ case b_namespace: str << "namespace"; break;
+ case b_using: str << "using"; break;
+ }
+ str << "\"";
+ if( !m_name.empty() ) {
+ str << " name=\"" << m_name << "\"";
+ }
+ str << ">\n";
+
+ indent += 2;
+
+ Xmlcode::pushNamespace (nameSpace());
+
+ if (symbolCount() > 0)
+ {
+ str << Xmlcode::spaces( indent ) << "<symbols>\n";
+
+ for (unsigned int i = 0; i < symbolCount(); i++)
+ {
+ YSymbolEntryPtr entry = (YSymbolEntryPtr)symbolEntry (i);
+ entry->toXml( str, indent+2 ); // write SymbolEntry
+ str << endl;
+ }
+ str << Xmlcode::spaces( indent ) << "</symbols>\n";
+
+#if 0
+ // if its a module, write the table
+
+ if (isModule())
+ {
+ yTElist_t *tptr = m_tenvironment;
+
+ if (tptr) {
+ str << Xmlcode::spaces( indent ) << "<table>\n";
+
+ while (tptr)
+ {
+ tptr->tentry->toXml( str, indent+2 ); // write the table entries
+ str << endl;
+ tptr = tptr->next;
+ }
+ str << Xmlcode::spaces( indent ) << "</table>\n";
+ }
+ }
+#endif
+ }
+
+#if 0
+ m_point->toXml( str, indent );
+ str << endl;
+#endif
+
+ stmtlist_t *stmt = m_statements;
+ if( stmt ) {
+ str << Xmlcode::spaces( indent ) << "<statements>\n";
+
+ while (stmt) // write statements
+ {
+ str << Xmlcode::spaces( indent+2 ) << "<stmt>";
+ stmt->stmt->toXml (str, 0 ); // YSImport will push it's namespace
+ str << "</stmt>" << endl;
+ stmt = stmt->next;
+ }
+
+ str << Xmlcode::spaces( indent ) << "</statements>\n";
+ }
+ Xmlcode::popUptoNamespace (nameSpace());
+
+ str << Xmlcode::spaces( indent-2 ) << "</block>\n";
+
+ return str;
+}
+
+
bool
YBlock::isIncluded (string includefile) const
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBoolean.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBoolean.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBoolean.cc Mon Aug 6 13:44:24 2007
@@ -20,6 +20,7 @@
#include <ycp/y2log.h>
#include "YCPBoolean.h"
#include "Bytecode.h"
+#include "Xmlcode.h"
// YCPBooleanRep
@@ -58,6 +59,13 @@
}
+std::ostream &
+YCPBooleanRep::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<const type=\"bool\" value=\"" << ( v ? "true" : "false" ) << "\"/>";
+}
+
+
YCPValueType
YCPBooleanRep::valuetype() const
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBuiltinMisc.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBuiltinMisc.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPBuiltinMisc.cc Mon Aug 6 13:44:24 2007
@@ -78,11 +78,11 @@
/**
* @builtin random
* @short Random number generator.
- * @description Returns random integer in the interval (0,MAX).
+ * @description Returns a random integer in the interval [0,MAX).
* <tt>srandom</tt> must be activated to get really random
* numbers.
* @param integer MAX
- * @return integer Returns integer in the interval (0,MAX).
+ * @return integer Returns integer in the interval [0,MAX).
* @usage random(100) -> 82
* @usage random(100) -> 36
*/
@@ -90,6 +90,7 @@
if (max.isNull ())
return YCPNull ();
+ // see NOTES in man 3 rand,
// <1,10> 1+(int) (10.0*rand()/(RAND_MAX+1.0));
int ret = (int) (max->value () * rand () / (RAND_MAX + 1.0));
return YCPInteger (ret);
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPByteblock.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPByteblock.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPByteblock.cc Mon Aug 6 13:44:24 2007
@@ -20,6 +20,7 @@
#include <ycp/y2log.h>
#include "YCPByteblock.h"
#include "Bytecode.h"
+#include "Xmlcode.h"
using std::min;
@@ -136,6 +137,12 @@
return Bytecode::writeBytep (str, bytes, len);
}
+std::ostream &
+YCPByteblockRep::toXml (std::ostream & str, int indent ) const
+{
+ return Xmlcode::writeBytep (str, bytes, len);
+}
+
// --------------------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPCode.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPCode.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPCode.cc Mon Aug 6 13:44:24 2007
@@ -23,6 +23,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPCode.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
//---------------------------------------------------------------------------
// YCPCodeRep
@@ -89,6 +90,14 @@
return m_code->toStream (str);
}
+std::ostream &
+YCPCodeRep::toXml (std::ostream & str, int indent ) const
+{
+ str << "<ycpcode>";
+ m_code->toXml( str, indent );
+ return str << "</ycpcode>";
+}
+
// --------------------------------------------------------
YCPCode::YCPCode (bytecodeistream & str)
@@ -153,6 +162,12 @@
return Bytecode::writeEntry (str, m_entry);
}
+std::ostream &
+YCPEntryRep::toXml( std::ostream & str, int indent ) const
+{
+ return Xmlcode::writeEntry (str, m_entry);
+}
+
//---------------------------------------------------------------------------
@@ -210,6 +225,25 @@
return str;
}
+std::ostream &
+YCPReferenceRep::toXml( std::ostream & str, int indent ) const
+{
+ // this is not used, instead YEVariable is used for xml
+ return str;
+}
+
+
+
+std::ostream &
+YCPBreakRep::toXml( std::ostream & str, int indent ) const
+{
+ return str << "<break/>";
+}
+std::ostream &
+YCPReturnRep::toXml( std::ostream & str, int indent ) const
+{
+ return str << "<return/>";
+}
// EOF
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPExternal.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPExternal.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPExternal.cc Mon Aug 6 13:44:24 2007
@@ -77,6 +77,13 @@
return str;
}
+std::ostream &
+YCPExternalRep::toXml (std::ostream & str, int indent ) const
+{
+ y2error ("Trying to store an external payload in xml");
+ return str;
+}
+
// ----------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPFloat.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPFloat.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPFloat.cc Mon Aug 6 13:44:24 2007
@@ -22,6 +22,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPFloat.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
// YCPFloatRep
@@ -98,6 +99,12 @@
return Bytecode::writeString (str, toString());
}
+std::ostream &
+YCPFloatRep::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<const type=\"float\" value=\"" << toString() << "\"/>";
+}
+
// --------------------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPInteger.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPInteger.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPInteger.cc Mon Aug 6 13:44:24 2007
@@ -111,6 +111,13 @@
}
+std::ostream &
+YCPIntegerRep::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<const type=\"int\" value=\"" << v << "\"/>";
+}
+
+
// ----------------------------------------------
static long long fromStream (bytecodeistream & str)
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPList.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPList.cc Mon Aug 6 13:44:24 2007
@@ -23,6 +23,7 @@
#include "ycp/YCPList.h"
#include <algorithm>
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/YCPCodeCompare.h"
#include "ycp/ExecutionEnvironment.h"
@@ -278,6 +279,20 @@
}
+std::ostream &
+YCPListRep::toXml (std::ostream & str, int indent ) const
+{
+ str << "<list size=\"" << elements.size() << "\">";
+ for (unsigned index = 0; index < elements.size(); index++)
+ {
+ str << "<element>";
+ elements[index]->toXml( str, 0 );
+ str << "</element>";
+ }
+ return str << "</list>";
+}
+
+
// --------------------------------------------------------
YCPList::YCPList(bytecodeistream & str)
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPMap.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPMap.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPMap.cc Mon Aug 6 13:44:24 2007
@@ -20,6 +20,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPMap.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/ExecutionEnvironment.h"
extern ExecutionEnvironment ee;
@@ -220,6 +221,21 @@
}
+std::ostream &
+YCPMapRep::toXml (std::ostream & str, int indent ) const
+{
+ str << "<map size=\"" << stl_map.size() << "\">";
+ for(YCPMapIterator pos = begin(); pos != end(); ++pos )
+ {
+ str << "<element>";
+ str << "<key>"; pos.key()->toXml( str, 0 ); str << "</key>";
+ str << "<value>"; pos.value()->toXml( str, 0 ); str << "</value>";
+ str << "</element>";
+ }
+ return str << "</map>";
+}
+
+
// --------------------------------------------------------
YCPMap::YCPMap(bytecodeistream & str)
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPPath.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPPath.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPPath.cc Mon Aug 6 13:44:24 2007
@@ -20,6 +20,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPPath.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include <ctype.h>
// YCPPathRep
@@ -330,6 +331,16 @@
}
std::ostream &
+YCPPathRep::Component::toXml (std::ostream & str, int indent ) const
+{
+ str << "<component";
+ if (complex) str << " complex";
+ str << ">";
+ str << component.asString();
+ return str << "</component>";
+}
+
+std::ostream &
YCPPathRep::toStream (std::ostream & str) const
{
#if 0
@@ -347,6 +358,26 @@
#endif
}
+std::ostream &
+YCPPathRep::toXml (std::ostream & str, int indent ) const
+{
+ str << "<const type=\"path\" value=\"";
+#if 0
+ if (Xmlcode::writeInt32 (str, components.size()))
+ {
+ for (unsigned c = 0; c < components.size(); c++)
+ {
+ if (!components[c].toStream (str))
+ break;
+ }
+ }
+ return str;
+#else
+ str << Xmlcode::xmlify( toString() );
+#endif
+ return str << "\"/>";
+}
+
// --------------------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPString.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPString.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPString.cc Mon Aug 6 13:44:24 2007
@@ -23,6 +23,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPString.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
// YCPStringRep
@@ -122,6 +123,13 @@
}
+std::ostream &
+YCPStringRep::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<const type=\"string\" value=\"" << Xmlcode::xmlify(v) << "\"/>";
+}
+
+
// --------------------------------------------------------
static string
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPSymbol.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPSymbol.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPSymbol.cc Mon Aug 6 13:44:24 2007
@@ -20,6 +20,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPSymbol.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
// YCPSymbolRep
@@ -81,6 +82,13 @@
return Bytecode::writeUstring (str, v);
}
+std::ostream &
+YCPSymbolRep::toXml (std::ostream & str, int indent ) const
+{
+ str << "<const type=\"symbol\" value=\"" << v.asString() << "\"/>";
+ return str;
+}
+
// --------------------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPTerm.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPTerm.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPTerm.cc Mon Aug 6 13:44:24 2007
@@ -22,6 +22,7 @@
#include "ycp/y2log.h"
#include "ycp/YCPTerm.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
// YCPTermRep
YCPTermRep::YCPTermRep(const string& s)
@@ -163,6 +164,14 @@
return l->toStream (str);
}
+std::ostream &
+YCPTermRep::toXml (std::ostream & str, int indent ) const
+{
+ str << "<const type=\"term\" name=\"" << s << "\">";
+ l->toXml( str, indent );
+ return str << "</const>";
+}
+
// --------------------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPVoid.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPVoid.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCPVoid.cc Mon Aug 6 13:44:24 2007
@@ -58,6 +58,12 @@
return str;
}
+std::ostream &
+YCPVoidRep::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<const type=\"void\"/>";
+}
+
// --------------------------------------------------------
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCode.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCode.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YCode.cc Mon Aug 6 13:44:24 2007
@@ -40,6 +40,7 @@
#include "ycp/YBlock.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/y2log.h"
#include "ycp/ExecutionEnvironment.h"
@@ -196,6 +197,17 @@
}
+std::ostream &
+YCode::toXml (std::ostream & str, int indent ) const
+{
+ ykind k = kind ();
+#if DO_DEBUG
+ y2debug ("YCode::toStream (%d:%s)", (int)k, YCode::toString (k).c_str());
+#endif
+ return str << "<ycode code=" << k << "/>";
+}
+
+
YCPValue
YCode::evaluate (bool /*cse*/)
{
@@ -390,6 +402,18 @@
return m_value->toStream (str);
}
+std::ostream &
+YConst::toXml (std::ostream & str, int indent ) const
+{
+ if (m_kind == ycConstant) {
+ y2error ("Internal error, a constant not supposed to be written to xml");
+ }
+ if (m_value.isNull())
+ return str << "<null/>";
+ m_value->toXml (str, 0 );
+ return str;
+}
+
constTypePtr
YConst::type () const
@@ -483,6 +507,14 @@
return Bytecode::writeCharp (str, m_domain->first);
}
+// see also YELocale::toXml
+std::ostream &
+YLocale::toXml (std::ostream & str, int indent ) const
+{
+ str << "<locale domain=\"" << m_domain->first << "\" text=\"" << Xmlcode::xmlify( m_locale ) << "\"/>";
+ return str;
+}
+
string
YLocale::toString() const
{
@@ -732,6 +764,14 @@
}
+std::ostream &
+YFunction::toXmlDefinition (std::ostream & str, int indent ) const
+{
+ // see toXml(...)
+ return str;
+}
+
+
// writing a function to a stream is done in two (well, in fact three) parts
// 1. the SymbolEntry (done when writing the block this function is defined in)
// 2. the declaration block
@@ -762,6 +802,31 @@
}
+std::ostream &
+YFunction::toXml (std::ostream & str, int indent ) const
+{
+ bool need_declaration = ((m_declaration != 0) && (m_declaration->symbolCount() > 0));
+ bool need_definition = (m_definition != 0);
+
+ if (need_declaration || need_definition) {
+ if (need_declaration)
+ {
+ Xmlcode::pushNamespace (m_declaration->nameSpace()); // keep the declaration accessible during definition write
+ str << Xmlcode::spaces( indent+2 ) << "<declaration>\n";
+ m_declaration->toXml (str, indent+4 );
+ str << Xmlcode::spaces( indent+2 ) << "</declaration>\n";
+ }
+ m_definition->toXml (str, indent+2 );
+ if (need_declaration)
+ {
+ Xmlcode::popNamespace (m_declaration->nameSpace());
+ }
+ }
+
+ return str;
+}
+
+
constTypePtr
YFunction::type () const
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YExpression.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YExpression.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YExpression.cc Mon Aug 6 13:44:24 2007
@@ -37,6 +37,7 @@
#include "ycp/SymbolTable.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#ifndef DO_DEBUG
#define DO_DEBUG 0
@@ -143,6 +144,14 @@
return str;
}
+std::ostream &
+YEVariable::toXml( std::ostream & str, int indent ) const
+{
+ str << "<variable name=\"";
+ str << m_entry->toString (false /*definition*/);
+ return str << "\"/>";
+}
+
// ------------------------------------------------------------------
// reference (-> SymbolEntry)
@@ -207,6 +216,15 @@
}
+std::ostream &
+YEReference::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yereference>";
+ Xmlcode::writeEntry (str, m_entry);
+ return str << "</yereference>";
+}
+
+
constTypePtr
YEReference::type () const
{
@@ -369,6 +387,22 @@
return Bytecode::writeYCodelist (str, m_parameters);
}
+std::ostream &
+YETerm::toXml (std::ostream & str, int indent ) const
+{
+ u_int32_t count = 0;
+ const ycodelist_t *codep = m_parameters;
+
+ while( codep )
+ {
+ count++;
+ codep = codep->next;
+ }
+ str << "<yeterm name=\"" << m_name << "\" args=\"" << count << "\">";
+ Xmlcode::writeYCodelist (str, m_parameters);
+ return str << "</yeterm>";
+}
+
// ------------------------------------------------------------------
@@ -398,23 +432,31 @@
{
}
-
-string
-YECompare::toString () const
+static string
+compare_op_string( YECompare::c_op op )
{
- string s = "(" + m_left->toString();
- switch (m_op)
+ switch (op)
{
- case C_EQ: s += " == "; break;
- case C_NEQ: s += " != "; break;
- case C_LT: s += " < "; break;
- case C_GE: s += " >= "; break;
- case C_LE: s += " <= "; break;
- case C_GT: s += " > "; break;
+ case YECompare::C_EQ: return "=="; break;
+ case YECompare::C_NEQ: return "!="; break;
+ case YECompare::C_LT: return "<"; break;
+ case YECompare::C_GE: return ">="; break;
+ case YECompare::C_LE: return "<="; break;
+ case YECompare::C_GT: return ">"; break;
default:
- s += " ?compare? ";
break;
}
+ return "?compare?";
+}
+
+
+string
+YECompare::toString () const
+{
+ string s = "(" + m_left->toString();
+ s += " ";
+ s += compare_op_string( m_op );
+ s += " ";
s += m_right->toString();
return s + ")";
}
@@ -490,6 +532,16 @@
}
+std::ostream &
+YECompare::toXml (std::ostream & str, int indent ) const
+{
+ str << "<compare op=\"" << Xmlcode::xmlify( compare_op_string( m_op ) ) << "\">";
+ str << "<lhs>"; m_left->toXml( str, 0 ); str << "</lhs>";
+ str << "<rhs>"; m_right->toXml( str, 0 ); str << "</rhs>";
+ return str << "</compare>";
+}
+
+
// ------------------------------------------------------------------
// locale expression (-> singular, plural, count)
@@ -592,6 +644,18 @@
}
+// see also YLocale::toXml
+std::ostream &
+YELocale::toXml (std::ostream & str, int indent ) const
+{
+ str << "<locale domain=\"" << m_domain->first << "\" text=\"" << Xmlcode::xmlify( m_singular )
+ << "\" plural=\"" << Xmlcode::xmlify( m_plural ) << "\">";
+ m_count->toXml( str, 0 );
+ str << "</locale>";
+ return str;
+}
+
+
// ------------------------------------------------------------------
// list expression (-> value, next list value)
@@ -725,6 +789,23 @@
}
+std::ostream &
+YEList::toXml (std::ostream & str, int indent ) const
+{
+ u_int32_t count = 0;
+ const ycodelist_t *codep = m_first;
+
+ while( codep )
+ {
+ count++;
+ codep = codep->next;
+ }
+ str << "<list size=\"" << count << "\">";
+ Xmlcode::writeYCodelist( str, m_first );
+ return str << "</list>";
+}
+
+
constTypePtr
YEList::type () const
{
@@ -883,6 +964,31 @@
}
+std::ostream &
+YEMap::toXml( std::ostream & str, int indent ) const
+{
+ mapval_t *mapp = m_first;
+ u_int32_t count = 0;
+ while( mapp )
+ {
+ count++;
+ mapp = mapp->next;
+ }
+ str << "<map size=\"" << count << "\">";
+
+ mapp = m_first;
+ while (mapp)
+ {
+ str << "<element>";
+ str << "<key>"; mapp->key->toXml( str, 0 ); str << "</key>";
+ str << "<value>"; mapp->value->toXml( str, 0 ); str << "</value>";
+ str << "</element>";
+ mapp = mapp->next;
+ }
+ return str << "</map>";
+}
+
+
constTypePtr
YEMap::type () const
{
@@ -1090,6 +1196,15 @@
return m_value->toStream (str);
}
+std::ostream &
+YEPropagate::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yepropagate from=\"" << Xmlcode::xmlify( m_from->toString() ) << "\" to=\"" << Xmlcode::xmlify( m_to->toString() ) << "\">";
+ m_value->toXml( str, 0 );
+ return str << "</yepropagate>";
+}
+
+
// ------------------------------------------------------------------
// unary expression (-> declaration_t, arg)
@@ -1181,6 +1296,18 @@
}
+std::ostream &
+YEUnary::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yeunary";
+ extern StaticDeclaration static_declarations;
+ static_declarations.writeXmlDeclaration( str, m_decl );
+ str << ">";
+ m_arg->toXml( str, 0 );
+ return str << "</yeunary>";
+}
+
+
// ------------------------------------------------------------------
// binary expression (-> declaration_t, arg1, arg2)
@@ -1284,6 +1411,19 @@
}
+std::ostream &
+YEBinary::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yebinary";
+ extern StaticDeclaration static_declarations;
+ static_declarations.writeXmlDeclaration (str, m_decl);
+ str << ">";
+ m_arg1->toXml( str, 0 );
+ m_arg2->toXml( str, 0 );
+ return str << "</yebinary>";
+}
+
+
constTypePtr
YEBinary::type () const
{
@@ -1390,6 +1530,17 @@
}
+std::ostream &
+YETriple::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yetriple>";
+ str << "<cond>"; m_expr->toXml( str, 0); str << "</cond>";
+ str << "<true>"; m_true->toXml( str, 0 ); str << "</true>";
+ str << "<false>"; m_false->toXml( str, 0); str << "</false>";
+ return str << "</yetriple>";
+}
+
+
// ------------------------------------------------------------------
// is (expression, type)
@@ -1484,6 +1635,15 @@
}
+std::ostream &
+YEIs::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yeis "; m_type->toXml( str, 0); str << ">";
+ str << "<expr>"; m_expr->toXml( str, 0); str << "</expr>";
+ return str << "</yeis>";
+}
+
+
// ------------------------------------------------------------------
// Return (expression)
@@ -1530,6 +1690,14 @@
return m_expr->toStream (str);
}
+std::ostream &
+YEReturn::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yereturn>";
+ m_expr->toXml( str, 0 );
+ return str << "</yereturn>";
+}
+
// ------------------------------------------------------------------
// bracket expression: identifier [ arg, arg, ...] : default
@@ -1693,6 +1861,19 @@
}
+std::ostream &
+YEBracket::toXml (std::ostream & str, int indent ) const
+{
+ str << "<yebracket ";
+ m_resultType->toXml( str, 0);
+ str << ">";
+ m_var->toXml( str, 0 ); // variable
+ m_arg->toXml( str, 0 ); // list
+ m_def->toXml( str, 0 ); // default
+ return str << "</yebracket>";
+}
+
+
// ------------------------------------------------------------------
// builtin function ref (-> declaration_t, type, parameters)
@@ -1759,6 +1940,80 @@
}
+std::ostream &
+YEBuiltin::toXml( std::ostream & str, int indent ) const
+{
+ str << "<builtin name=\"" << m_decl->name << "\"";
+
+ if (m_parameterblock != 0)
+ {
+ Xmlcode::pushNamespace( m_parameterblock->nameSpace() );
+ }
+
+ // check DECL_SYMBOL functions, these are e.g.
+ // list: find, filter, maplist, listmap, sort, foreach
+ // map: mapmap, maplist, filter, foreach
+
+ ycodelist_t *block = NULL;
+ ycodelist_t *value = NULL;
+ ycodelist_t *p = m_parameters;
+ u_int32_t count = 0;
+ while (p) {
+
+ if (m_decl->flags & DECL_SYMBOL)
+ {
+ // we have three types of parameters
+ // 1. symbols (used to assign values for the block)
+ // - symbols always come first
+ // 2. expression (must eval to a enumerable type, list or map
+ // the builtin operates on and assigns values by iterating over the value)
+ // 3. block to call with symbols assigned
+ // - the block always is last
+ //
+ // find symbols (entries into m_parameterblock) first
+ //
+
+ if (p->code->kind() == ycEntry) {
+ str << " sym" << count << "=\"" << Xmlcode::xmlify( p->code->toString() ) << "\"";
+ }
+ else if (p->next) {
+ if (value) cerr << "Value already set!" << endl;
+ value = p;
+ }
+ else {
+ if (block) cerr << "Block already set!" << endl;
+ block = p;
+ }
+ }
+ p = p->next;
+ ++count;
+ }
+
+ if ((m_decl->flags & DECL_SYMBOL) == 0)
+ {
+ str << " args=\"" << count << "\"";
+ }
+ str << ">";
+
+ if (m_decl->flags & DECL_SYMBOL)
+ {
+ str << "<expr>";
+ value->code->toXml( str, indent+2 );
+ str << "</expr>";
+ block->code->toXml( str, indent );
+ }
+ else {
+ Xmlcode::writeYCodelist( str, m_parameters );
+ }
+
+ if (m_parameterblock != 0)
+ {
+ Xmlcode::popNamespace( m_parameterblock->nameSpace() );
+ }
+ return str << "</builtin>";
+}
+
+
YEBuiltin::~YEBuiltin ()
{
ycodelist_t *parm = m_parameters;
@@ -2733,6 +2988,27 @@
}
+std::ostream &
+YECall::toXml (std::ostream & str, int indent ) const
+{
+ str << "<call";
+ if (!m_sentry->nameSpace()->name().empty()) {
+ str << " ns=\"" << m_sentry->nameSpace()->name() << "\"";
+ }
+ str << " name=\"" << m_sentry->name() << "\">";
+ if (m_next_param_id > 0) {
+ str << "<args>";
+
+ for (uint i = 0 ; i < m_next_param_id; i++)
+ {
+ m_parameters[i]->toXml( str, 0 );
+ }
+ str << "</args>";
+ }
+ return str << "</call>";
+}
+
+
constTypePtr
YECall::type () const
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YStatement.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YStatement.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YStatement.cc Mon Aug 6 13:44:24 2007
@@ -31,6 +31,7 @@
#include "ycp/YBlock.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
#include "ycp/y2log.h"
#include "ycp/ExecutionEnvironment.h"
@@ -114,6 +115,12 @@
return Bytecode::writeInt32 (str, m_line);
}
+std::ostream &
+YStatement::toXml( std::ostream & str, int indent ) const
+{
+ return str << "<statement line=" << m_line << "/>";
+}
+
// ------------------------------------------------------------------
// "break"
@@ -152,6 +159,12 @@
return YStatement::toStream (str);
}
+std::ostream &
+YSBreak::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<break/>";
+}
+
// ------------------------------------------------------------------
// "continue"
@@ -190,6 +203,12 @@
return YStatement::toStream (str);
}
+std::ostream &
+YSContinue::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<continue/>";
+}
+
// ------------------------------------------------------------------
// expression as statement
@@ -232,6 +251,15 @@
}
+std::ostream &
+YSExpression::toXml( std::ostream & str, int indent ) const
+{
+ str << "<expr>";
+ m_expr->toXml( str, indent );
+ return str << "</expr>";
+}
+
+
YCPValue
YSExpression::evaluate (bool cse)
{
@@ -282,6 +310,13 @@
}
+std::ostream &
+YSBlock::toXml (std::ostream & str, int indent ) const
+{
+ return m_block->toXml( str, indent );
+}
+
+
YCPValue
YSBlock::evaluate (bool cse)
{
@@ -379,6 +414,16 @@
}
+std::ostream &
+YSReturn::toXml (std::ostream & str, int indent ) const
+{
+ str << Xmlcode::spaces( indent ) << "<return>";
+ if (m_value != 0)
+ m_value->toXml( str, 0 );
+ return str << "</return>";
+}
+
+
YCPValue
YSReturn::evaluate (bool cse)
{
@@ -478,6 +523,17 @@
}
+std::ostream &
+YSFunction::toXml( std::ostream & str, int indent ) const
+{
+ str << "<fun_def name=\"" << m_entry->name() << "\">\n";
+
+ function()->toXml( str, indent+2 );
+
+ return str << Xmlcode::spaces( indent ) << "</fun_def>";
+}
+
+
// ------------------------------------------------------------------
// typedef (-> type string)
@@ -514,6 +570,15 @@
}
+std::ostream &
+YSTypedef::toXml( std::ostream & str, int indent ) const
+{
+ str << "<typedef name=\"" << m_name << "\"";
+ m_type->toXml( str, 0 );
+ return str << "/>";
+}
+
+
// FIXME: needed ?
YCPValue
@@ -569,6 +634,15 @@
}
+std::ostream &
+YSAssign::toXml( std::ostream & str, int indent ) const
+{
+ str << "<assign name=\"" << m_entry->toString (false /*definition*/) << "\">";
+ m_code->toXml( str, 0 );
+ return str << "</assign>";
+}
+
+
YCPValue
YSAssign::evaluate (bool cse)
{
@@ -668,6 +742,20 @@
}
+std::ostream &
+YSBracket::toXml( std::ostream & str, int indent ) const
+{
+ str << "<bracket>";
+ str << "<lhs>";
+ Xmlcode::writeEntry( str, m_entry );
+ str << "<arg>"; m_arg->toXml( str, 0 ); str << "</arg>";
+ str << "</lhs><rhs>";
+ m_code->toXml( str, 0 );
+ str << "</rhs>";
+ return str << "</bracket>";
+}
+
+
// commit bracket assign recursively
YCPValue
@@ -918,6 +1006,31 @@
}
+std::ostream &
+YSIf::toXml (std::ostream & str, int indent ) const
+{
+ str << "<if>";
+
+ m_condition->toXml( str, 0 );
+
+ if (m_true)
+ {
+ str << endl << Xmlcode::spaces( indent+2 ) << "<then>\n";
+ m_true->toXml( str, indent+4 );
+ str << endl << Xmlcode::spaces( indent+2 ) << "</then>\n";
+ str << Xmlcode::spaces( indent );
+ }
+ if (m_false)
+ {
+ str << endl << Xmlcode::spaces( indent+2 ) << "<else>\n";
+ m_false->toXml( str, indent+4 );
+ str << endl << Xmlcode::spaces( indent+2 ) << "</else>\n";
+ str << Xmlcode::spaces( indent );
+ }
+ return str << "</if>";
+}
+
+
YCPValue
YSIf::evaluate (bool cse)
{
@@ -1019,6 +1132,20 @@
}
+std::ostream &
+YSWhile::toXml (std::ostream & str, int indent ) const
+{
+ str << "<while>\n";
+ str << Xmlcode::spaces( indent+2 ) << "<cond>"; m_condition->toXml(str, 0 ); str << "</cond>\n";
+ if (m_loop) {
+ str << Xmlcode::spaces( indent+2 ) << "<do>";
+ m_loop->toXml(str, indent );
+ str << Xmlcode::spaces( indent+2 ) << "</do>\n";
+ }
+ return str << Xmlcode::spaces( indent ) << "</while>";
+}
+
+
YCPValue
YSWhile::evaluate (bool cse)
{
@@ -1150,6 +1277,23 @@
}
+std::ostream &
+YSRepeat::toXml (std::ostream & str, int indent ) const
+{
+ str << "<repeat>\n";
+ if (m_loop != 0)
+ {
+ str << Xmlcode::spaces( indent+2 ) << "<do>\n";
+ m_loop->toXml( str, indent+4 );
+ str << Xmlcode::spaces( indent+2 ) << "</do>\n";
+ }
+ str << Xmlcode::spaces( indent+2 ) << "<until>";
+ m_condition->toXml( str, 0 );
+ str << "</until>\n";
+ return str << Xmlcode::spaces( indent ) << "</repeat>";
+}
+
+
string
YSRepeat::toString () const
{
@@ -1290,6 +1434,21 @@
}
+std::ostream &
+YSDo::toXml( std::ostream & str, int indent ) const
+{
+ str << "<do>";
+ if (m_loop != 0)
+ {
+ m_loop->toXml( str, indent );
+ }
+ str << "<while>";
+ m_condition->toXml( str, indent );
+ str << "</while>";
+ return str << "</do>";
+}
+
+
YCPValue
YSDo::evaluate (bool cse)
{
@@ -1393,6 +1552,13 @@
}
+std::ostream &
+YSTextdomain::toXml (std::ostream & str, int indent ) const
+{
+ return str << "<textdomain name=\"" << m_domain.asString() << "\"/>";
+}
+
+
YCPValue
YSTextdomain::evaluate (bool /*cse*/)
{
@@ -1449,6 +1615,15 @@
}
+std::ostream &
+YSInclude::toXml( std::ostream & str, int indent ) const
+{
+ str << "<include";
+ if (m_skipped) str << " skipped=\"1\"";
+ return str << " name=\"" << m_filename.asString() << "\"/>";
+}
+
+
YCPValue
YSInclude::evaluate (bool cse)
{
@@ -1598,6 +1773,14 @@
}
+std::ostream &
+YSImport::toXml( std::ostream & str, int indent ) const
+{
+ Xmlcode::pushNamespace (nameSpace()); // see YBlock::toXml(str) for popUptoNamespace()
+ return str << "<import name=\"" << m_name.asString() << "\"/>";
+}
+
+
YCPValue
YSImport::evaluate (bool cse)
{
@@ -1654,6 +1837,13 @@
}
+std::ostream &
+YSFilename::toXml(std::ostream & str, int indent ) const
+{
+ return str << "<filename name=\"" << m_filename.asString() << "\"/>";
+}
+
+
YCPValue
YSFilename::evaluate (bool cse)
{
@@ -1750,6 +1940,20 @@
}
+std::ostream &
+YSSwitch::toXml( std::ostream & str, int indent ) const
+{
+ str << "<switch>";
+
+ str << "<cond>";
+ m_condition->toXml( str, 0 );
+ str << "</cond>\n";
+
+ m_block->toXmlSwitch( m_cases, m_defaultcase, str, indent+2 );
+ return str << endl << Xmlcode::spaces( indent ) << "</switch>";
+}
+
+
YCPValue
YSSwitch::evaluate (bool cse)
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YSymbolEntry.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YSymbolEntry.cc (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/YSymbolEntry.cc Mon Aug 6 13:44:24 2007
@@ -32,6 +32,7 @@
#include "ycp/SymbolTable.h"
#include "ycp/StaticDeclaration.h"
#include "ycp/Bytecode.h"
+#include "ycp/Xmlcode.h"
IMPL_DERIVED_POINTER(YSymbolEntry, SymbolEntry);
@@ -261,6 +262,18 @@
}
+std::ostream &
+YSymbolEntry::toXml (std::ostream & str, int indent ) const
+{
+ str << Xmlcode::spaces( indent ) << "<symbol";
+ if (m_global) str << " global=\"1\"";
+ str << " category=\"" << catString(); str << "\"";
+ str << " type=\""; str << m_type->toXmlString(); str << "\"";
+ str << " name=\""; str << m_name.asString(); str << "\"/>";
+ // value is never written
+}
+
+
void
YSymbolEntry::setDeclaration (declaration_t *decl)
{
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Point.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Point.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Point.h Mon Aug 6 13:44:24 2007
@@ -79,5 +79,6 @@
std::string toString (void) const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
};
#endif // Point_h
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/StaticDeclaration.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/StaticDeclaration.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/StaticDeclaration.h Mon Aug 6 13:44:24 2007
@@ -108,6 +108,7 @@
// write declaration to stream (name and type)
std::ostream & writeDeclaration (std::ostream & str, const declaration_t *decl) const;
+ std::ostream & writeXmlDeclaration (std::ostream & str, const declaration_t *decl) const;
// read declaration from stream (return declaration matching name and type _exactly_)
declaration_t *readDeclaration (bytecodeistream & str) const;
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/SymbolTable.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/SymbolTable.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/SymbolTable.h Mon Aug 6 13:44:24 2007
@@ -90,6 +90,7 @@
string toStringSymbols () const;
void makeDefinition (int line); // convert declaration to definition (exchanges m_point)
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
// remove yourself from the SymbolTable.
void remove ();
@@ -195,6 +196,7 @@
// write usage to stream, see YSImport
std::ostream &writeUsage (std::ostream & str) const;
+ std::ostream &writeXmlUsage( std::ostream & str, int indent ) const;
//---------------------------------------------------------------
// string
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Type.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Type.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/Type.h Mon Aug 6 13:44:24 2007
@@ -30,6 +30,7 @@
class FunctionType;
class bytecodeistream;
+class xmlcodeistream;
/// YCP type
class Type : public Rep
@@ -182,12 +183,18 @@
* Converts a type code to its YCP notation.
*/
virtual string toString () const;
+ virtual string toXmlString () const;
/**
- * write out to stream
+ * write bytecode out to stream
*/
virtual std::ostream & toStream (std::ostream & str) const;
+ /**
+ * write xml out to stream
+ */
+ virtual std::ostream & toXml (std::ostream & str, int indent ) const;
+
/*
* is base or constructed type
*/
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YBlock.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YBlock.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YBlock.h Mon Aug 6 13:44:24 2007
@@ -281,6 +281,8 @@
// write block to stream
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml( std::ostream & str, int indent ) const;
+ std::ostream & toXmlSwitch( map<YCPValue, int, ycpless> cases, int defaultcase, std::ostream & str, int indent ) const;
};
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPBoolean.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPBoolean.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPBoolean.h Mon Aug 6 13:44:24 2007
@@ -76,6 +76,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_BOOLEAN. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPByteblock.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPByteblock.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPByteblock.h Mon Aug 6 13:44:24 2007
@@ -85,6 +85,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Compares two bytes blocks.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPCode.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPCode.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPCode.h Mon Aug 6 13:44:24 2007
@@ -73,6 +73,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_CODE. See @ref YCPValueRep#type.
@@ -146,6 +147,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const { return str; };
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_BREAK. See @ref YCPValueRep#type.
@@ -213,6 +215,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const { return str; };
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_BREAK. See @ref YCPValueRep#type.
@@ -279,6 +282,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_ENTRY. See @ref YCPValueRep#type.
@@ -350,6 +354,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_Reference. See @ref YCPValueRep#type.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPElement.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPElement.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPElement.h Mon Aug 6 13:44:24 2007
@@ -115,6 +115,9 @@
std::ostream & toStream (std::ostream & str ) const { \
return element->toStream (str); \
} \
+ std::ostream & toXml (std::ostream & str, int indent ) const { \
+ return element->toXml( str, indent ); \
+ } \
YCPValueType valuetype () const { return (static_cast<const YCP##name##Rep*>(element))->valuetype (); }
@@ -274,6 +277,7 @@
* Writes the value to a stream in bytecode format.
*/
virtual std::ostream & toStream (std::ostream & str) const = 0;
+ virtual std::ostream & toXml (std::ostream & str, int indent ) const = 0;
/**
* Returns a shallow copy of this elementRep. Redefine this method
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPExternal.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPExternal.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPExternal.h Mon Aug 6 13:44:24 2007
@@ -73,6 +73,7 @@
* store the data in persistent stream.
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_EXTERNAL. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPFloat.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPFloat.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPFloat.h Mon Aug 6 13:44:24 2007
@@ -84,6 +84,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_FLOAT. See @ref YCPValueRep#type.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPInteger.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPInteger.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPInteger.h Mon Aug 6 13:44:24 2007
@@ -74,6 +74,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_INTEGER. See @ref YCPValueRep#type.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPList.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPList.h Mon Aug 6 13:44:24 2007
@@ -171,6 +171,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_LIST. See @ref YCPValueRep#type.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPMap.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPMap.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPMap.h Mon Aug 6 13:44:24 2007
@@ -129,6 +129,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_MAP. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPPath.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPPath.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPPath.h Mon Aug 6 13:44:24 2007
@@ -51,6 +51,7 @@
}
string toString() const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
};
vector<Component> components;
@@ -149,6 +150,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_PATH. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPString.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPString.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPString.h Mon Aug 6 13:44:24 2007
@@ -86,6 +86,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_STRING. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPSymbol.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPSymbol.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPSymbol.h Mon Aug 6 13:44:24 2007
@@ -84,6 +84,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_SYMBOL. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPTerm.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPTerm.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPTerm.h Mon Aug 6 13:44:24 2007
@@ -127,6 +127,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Mapping for the term's list isEmpty() function
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPValue.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPValue.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPValue.h Mon Aug 6 13:44:24 2007
@@ -262,6 +262,7 @@
*/
YCPOrder compare(const YCPValue &v, bool rl = false) const;
+ virtual std::ostream & toXml (std::ostream & str, int indent ) const = 0;
};
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPVoid.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPVoid.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCPVoid.h Mon Aug 6 13:44:24 2007
@@ -52,6 +52,7 @@
* Output value as bytecode to stream
*/
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/**
* Returns YT_VOID. See @ref YCPValueRep#valuetype.
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCode.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCode.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YCode.h Mon Aug 6 13:44:24 2007
@@ -152,6 +152,7 @@
* see Bytecode for read
*/
virtual std::ostream & toStream (std::ostream & str) const = 0;
+ virtual std::ostream & toXml (std::ostream & str, int indent ) const = 0;
/**
* returns true if the YCode represents a constant
@@ -211,6 +212,7 @@
virtual ykind kind() const;
string toString() const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/** yes */
virtual bool isConstant () const { return true; }
YCPValue evaluate (bool cse = false);
@@ -257,6 +259,7 @@
const char *domain () const;
string toString() const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type() const { return Type::Locale; }
@@ -312,8 +315,10 @@
string toStringDeclaration () const;
string toString () const;
- std::ostream & toStreamDefinition (std::ostream & str) const;
- std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toStreamDefinition (std::ostream & str ) const;
+ std::ostream & toXmlDefinition (std::ostream & str, int indent ) const;
+ std::ostream & toStream (std::ostream & str ) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
virtual YCPValue evaluate (bool cse = false);
constTypePtr type() const;
};
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YExpression.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YExpression.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YExpression.h Mon Aug 6 13:44:24 2007
@@ -72,6 +72,7 @@
virtual bool isReferenceable () const { return true; }
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return m_entry->type(); }
};
@@ -92,6 +93,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const;
};
@@ -114,6 +116,7 @@
const char *name () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return Type::Term; }
};
@@ -144,6 +147,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return Type::Boolean; }
};
@@ -166,6 +170,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return Type::Locale; }
};
@@ -187,6 +192,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const;
int count () const;
YCodePtr value (int index) const;
@@ -212,6 +218,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const;
};
@@ -234,6 +241,7 @@
bool canPropagate(const YCPValue& value, constTypePtr to_type) const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return m_to; }
};
@@ -256,6 +264,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return ((constFunctionTypePtr)m_decl->type)->returnType (); }
};
@@ -280,6 +289,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const;
};
@@ -304,6 +314,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return m_true->type ()->commontype (m_false->type ()); }
};
@@ -324,6 +335,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return Type::Boolean; }
};
@@ -343,6 +355,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return m_expr->type(); }
};
@@ -365,6 +378,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const { return m_resultType; }
YCodePtr def () const { return m_def; }
};
@@ -407,6 +421,7 @@
string toString () const;
YCPValue evaluate (bool cse = false);
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type () const;
constTypePtr completeType () const;
YBlockPtr parameterBlock () const;
@@ -451,6 +466,7 @@
virtual constTypePtr finalize ();
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
constTypePtr type() const;
string qualifiedName () const;
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YStatement.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YStatement.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YStatement.h Mon Aug 6 13:44:24 2007
@@ -72,6 +72,7 @@
~YStatement () {};
virtual string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
/** yes */
virtual bool isStatement () const { return true; }
int line () const { return m_line; };
@@ -94,6 +95,7 @@
virtual ykind kind () const { return ysBreak; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
};
@@ -112,6 +114,7 @@
virtual ykind kind () const { return ysContinue; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
};
@@ -132,6 +135,7 @@
virtual ykind kind () const { return ysExpression; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -153,6 +157,7 @@
virtual ykind kind () const { return ysBlock; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -177,6 +182,7 @@
void clearValue (); // needed if justReturn triggers
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -199,6 +205,7 @@
virtual ykind kind () const { return ysTypedef; }
string toString() const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -229,6 +236,7 @@
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -253,6 +261,7 @@
virtual ykind kind () const { return ysAssign; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
};
@@ -294,6 +303,7 @@
virtual ykind kind () const { return ysBracket; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
// recursively extract list arg at idx, get value from current at idx
// and replace with value. re-generating the list/map/term during unwind
YCPValue commit (YCPValue current, int idx, YCPList arg, YCPValue value);
@@ -320,6 +330,7 @@
virtual ykind kind () const { return ysIf; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -343,6 +354,7 @@
virtual ykind kind () const { return ysWhile; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -366,6 +378,7 @@
virtual ykind kind () const { return ysRepeat; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -389,6 +402,7 @@
virtual ykind kind () const { return ysDo; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -410,6 +424,7 @@
virtual ykind kind () const { return ysTextdomain; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
const char *domain () const { return m_domain->c_str(); };
@@ -435,6 +450,7 @@
virtual ykind kind () const { return ysInclude; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
string filename () const { return m_filename; };
@@ -458,6 +474,7 @@
string name () const;
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -479,6 +496,7 @@
virtual ykind kind () const { return ysFilename; }
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
};
@@ -508,6 +526,7 @@
string name () const;
string toString () const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
YCPValue evaluate (bool cse = false);
constTypePtr type () const { return Type::Void; };
constTypePtr conditionType () const { return m_condition->type (); };
Modified: branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YSymbolEntry.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YSymbolEntry.h (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/libycp/src/include/ycp/YSymbolEntry.h Mon Aug 6 13:44:24 2007
@@ -103,6 +103,7 @@
virtual string toString (bool with_type = true) const;
std::ostream & toStream (std::ostream & str) const;
+ std::ostream & toXml (std::ostream & str, int indent ) const;
};
#endif // YSymbolEntry_h
Modified: branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/c…
==============================================================================
--- branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes (original)
+++ branches/tmp/mvidner/ui-as-namespace/core/package/yast2-core.changes Mon Aug 6 13:44:24 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Jul 12 11:52:24 CEST 2007 - locilka(a)suse.cz
+
+- Fixed ag_background to always read the process exit status before
+ returning it (#285920).
+
+-------------------------------------------------------------------
Mon Jun 25 18:10:49 CEST 2007 - mvidner(a)suse.cz
- ag_background: added a test suite.
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r39984 - in /trunk/sshd: VERSION package/yast2-sshd.changes src/complex.ycp src/dialogs.ycp src/sshd.desktop src/wizards.ycp
by locilka@svn.opensuse.org 06 Aug '07
by locilka@svn.opensuse.org 06 Aug '07
06 Aug '07
Author: locilka
Date: Mon Aug 6 13:43:36 2007
New Revision: 39984
URL: http://svn.opensuse.org/viewcvs/yast?rev=39984&view=rev
Log:
- New icon: yast2-sshd
- 2.15.2
Modified:
trunk/sshd/VERSION
trunk/sshd/package/yast2-sshd.changes
trunk/sshd/src/complex.ycp
trunk/sshd/src/dialogs.ycp
trunk/sshd/src/sshd.desktop
trunk/sshd/src/wizards.ycp
Modified: trunk/sshd/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sshd/VERSION?rev=39984&r1=39983&…
==============================================================================
--- trunk/sshd/VERSION (original)
+++ trunk/sshd/VERSION Mon Aug 6 13:43:36 2007
@@ -1 +1 @@
-2.15.1
+2.15.2
Modified: trunk/sshd/package/yast2-sshd.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sshd/package/yast2-sshd.changes?…
==============================================================================
--- trunk/sshd/package/yast2-sshd.changes (original)
+++ trunk/sshd/package/yast2-sshd.changes Mon Aug 6 13:43:36 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Aug 6 13:40:57 CEST 2007 - locilka(a)suse.cz
+
+- New icon: yast2-sshd
+- 2.15.2
+
+-------------------------------------------------------------------
Mon Jul 30 22:06:14 CEST 2007 - locilka(a)suse.cz
- Added package description.
Modified: trunk/sshd/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sshd/src/complex.ycp?rev=39984&r…
==============================================================================
--- trunk/sshd/src/complex.ycp (original)
+++ trunk/sshd/src/complex.ycp Mon Aug 6 13:43:36 2007
@@ -22,6 +22,7 @@
*/
symbol ReadDialog() {
Wizard::RestoreHelp(HELPS["read"]:"");
+ Wizard::SetTitleIcon("yast-sshd");
boolean ret = Sshd::Read();
return ret ? `next : `abort;
}
@@ -32,6 +33,7 @@
*/
symbol WriteDialog() {
Wizard::RestoreHelp(HELPS["write"]:"");
+ Wizard::SetTitleIcon("yast-sshd");
boolean ret = Sshd::Write();
return ret ? `next : `abort;
}
Modified: trunk/sshd/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sshd/src/dialogs.ycp?rev=39984&r…
==============================================================================
--- trunk/sshd/src/dialogs.ycp (original)
+++ trunk/sshd/src/dialogs.ycp Mon Aug 6 13:43:36 2007
@@ -64,6 +64,7 @@
Wizard::SetContentsButtons(caption, contents, HELPS["server_configuration"]:"",
Label::BackButton(), Label::NextButton());
Wizard::DisableBackButton();
+ Wizard::SetTitleIcon("yast-sshd");
InitServerConfigurationDialog();
@@ -133,6 +134,7 @@
Wizard::SetContentsButtons(caption, contents, HELPS["login_settings"]:"",
Label::BackButton(), Label::NextButton());
+ Wizard::SetTitleIcon("yast-sshd");
InitLoginSettingsDialog();
@@ -205,6 +207,7 @@
Wizard::SetContentsButtons(caption, contents, HELPS["proto_settings"]:"",
Label::BackButton(), Label::NextButton());
Wizard::SetNextButton(`next, Label::AcceptButton());
+ Wizard::SetTitleIcon("yast-sshd");
InitProtocolVersion();
InitCipherTable();
Modified: trunk/sshd/src/sshd.desktop
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sshd/src/sshd.desktop?rev=39984&…
==============================================================================
--- trunk/sshd/src/sshd.desktop (original)
+++ trunk/sshd/src/sshd.desktop Mon Aug 6 13:43:36 2007
@@ -18,7 +18,7 @@
X-SuSE-YaST-AutoInstClonable=true
X-SuSE-YaST-AutoInstRequires=lan
-Icon=yast-nfs
+Icon=yast-sshd
Exec=/sbin/yast2 sshd
Name=SSHD Configuration
Modified: trunk/sshd/src/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sshd/src/wizards.ycp?rev=39984&r…
==============================================================================
--- trunk/sshd/src/wizards.ycp (original)
+++ trunk/sshd/src/wizards.ycp Mon Aug 6 13:43:36 2007
@@ -22,8 +22,8 @@
any MainSequence() {
map aliases = $[
- "server_configuration" : ``( ServerConfigurationDialog() ),
- "login_settings" : ``( LoginSettingsDialog() ),
+ "server_configuration" : ``( ServerConfigurationDialog() ),
+ "login_settings" : ``( LoginSettingsDialog() ),
"proto_settings" : ``( ProtoAndCipherDialog() ),
];
@@ -102,6 +102,7 @@
];
Wizard::CreateDialog();
+ Wizard::SetTitleIcon("yast-sshd");
any ret = Sequencer::Run(aliases, sequence);
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0