diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 1997-07-28 00:34:29 +0200 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 1997-07-28 00:34:29 +0200 |
commit | 6ce61146edb1c36647b514778c29cdc9beedab6a (patch) | |
tree | 7a2d86739a0f19af5cf42c5d8ef10ac292162b24 /flower | |
parent | 6a0ea5e307744ad53d8b4a7381f2b27c2cfc9c13 (diff) |
release: 0.0.76
Diffstat (limited to 'flower')
-rw-r--r-- | flower/.version | 2 | ||||
-rw-r--r-- | flower/NEWS | 3 | ||||
-rwxr-xr-x | flower/configure | 2 | ||||
-rw-r--r-- | flower/configure.in | 2 | ||||
-rw-r--r-- | flower/include/acursor.hh | 58 | ||||
-rw-r--r-- | flower/test/Makefile | 4 |
6 files changed, 67 insertions, 4 deletions
diff --git a/flower/.version b/flower/.version index 4575a2e82a..a6d093ed41 100644 --- a/flower/.version +++ b/flower/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 21 +PATCH_LEVEL = 22 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/NEWS b/flower/NEWS index 40740f0bb1..e7aaaa390e 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,5 +1,8 @@ version 1.1: +pl 22: + - ACursor and PACursor to give array a List like interface. + pl 21: pl 20.mb - bf: Warning about NPRINT only if debugging requested. diff --git a/flower/configure b/flower/configure index 2a28860b95..5ede2662f7 100755 --- a/flower/configure +++ b/flower/configure @@ -898,7 +898,7 @@ done -CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh +CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh trap '' 1 2 15 cat > confcache <<\EOF diff --git a/flower/configure.in b/flower/configure.in index e58f93f485..cac84bdbb7 100644 --- a/flower/configure.in +++ b/flower/configure.in @@ -35,7 +35,7 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(memmem snprintf ) AC_CONFIG_HEADER(out/config.hh:config.hh.in) -CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh +CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh AC_OUTPUT(out/Flower-flags.make:Flower-flags.make.in) diff --git a/flower/include/acursor.hh b/flower/include/acursor.hh new file mode 100644 index 0000000000..3664b8245f --- /dev/null +++ b/flower/include/acursor.hh @@ -0,0 +1,58 @@ +/* + acursor.hh -- declare ACursor, PACursor + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#ifndef ACURSOR_HH +#define ACURSOR_HH + +template<class T> +class ACursor +{ +protected: + int idx_; + Array<T> &arr_; +public: + ACursor(ACursor const& s) + :arr_(s.arr_) + { + idx_ = s.idx_; + } + ACursor(Array<T> const &arr) + arr_((Array<T>&)arr) + { + idx_ =0; + } + T thing() const { + return arr_[idx_]; + } + T& thing() { return arr_[idx_]; } + T& operator++(int) { + T&t = thing(); + idx_ ++; + return t; + } + bool ok() { return idx_ >=0 && idx_ < arr_.size(); } +}; + + +template<class T> +class PACursor : public ACursor<T*> +{ +public: + PACursor(Link_array<T> l) + : ACursor(l) + { + } + T* ptr() { return arr_[idx_]; } + T *operator->() { + return ptr(); + } + +}; + +#endif // ACURSOR_HH diff --git a/flower/test/Makefile b/flower/test/Makefile index 0cc3bb960c..ec93a1e545 100644 --- a/flower/test/Makefile +++ b/flower/test/Makefile @@ -63,6 +63,8 @@ include ./$(depth)/make/Rules.make # auto dependencies: # --include $(DEPFILES) +ifdef DEPFILES +include $(DEPFILES) +endif # |