diff --git a/include/xo/object2/DList.hpp b/include/xo/object2/DList.hpp index f629693..dc0729b 100644 --- a/include/xo/object2/DList.hpp +++ b/include/xo/object2/DList.hpp @@ -8,6 +8,7 @@ #include //#include "xo/alloc2/gcobject/RGCObject.hpp" #include +#include namespace xo { namespace scm { @@ -16,6 +17,7 @@ namespace xo { using size_type = std::size_t; using AGCObject = xo::mm::AGCObject; using AAllocator = xo::mm::AAllocator; + using ppindentinfo = xo::print::ppindentinfo; DList(xo::obj h, DList * r) : head_{h}, rest_{r} {} diff --git a/src/object2/DList.cpp b/src/object2/DList.cpp index ea72577..65b18a6 100644 --- a/src/object2/DList.cpp +++ b/src/object2/DList.cpp @@ -4,6 +4,7 @@ **/ #include "DList.hpp" +#include #include namespace xo { @@ -84,7 +85,6 @@ namespace xo { return l->head_; } -#ifdef NOT_YET bool DList::pretty(const ppindentinfo & ppii) const { @@ -95,19 +95,24 @@ namespace xo { ppstate * pps = ppii.pps(); if (ppii.upto()) { -/* perhaps print on one line */ - if (!pps->print_upto("(") + /* perhaps print on one line */ + if (!pps->print_upto("(...)")) return false; +#ifdef NOT_YET /* TODO: probably use iterators here, when available */ const DList * l = this; while (!l->is_empty()) { obj(l->head_.data()); } +#endif + return true; + } else { + pps->write("(...)"); + return false; } } -#endif } /*namespace scm*/ } /*namespace xo*/ diff --git a/utest/X1Collector.test.cpp b/utest/X1Collector.test.cpp index 1174635..8b37c8a 100644 --- a/utest/X1Collector.test.cpp +++ b/utest/X1Collector.test.cpp @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include #include