diff --git a/add-ons/dosfs/inc/fsproto.h b/add-ons/dosfs/inc/fsproto.h index 0a8b165..2834ba2 100644 --- a/add-ons/dosfs/inc/fsproto.h +++ b/add-ons/dosfs/inc/fsproto.h @@ -6,7 +6,7 @@ #ifndef _FSPROTO_H #define _FSPROTO_H -#include +#include #include #include #include diff --git a/add-ons/makefile.all b/add-ons/makefile similarity index 100% rename from add-ons/makefile.all rename to add-ons/makefile diff --git a/intro/QSort/makefile b/intro/QSort/makefile index 5043ea1..d07cf10 100644 --- a/intro/QSort/makefile +++ b/intro/QSort/makefile @@ -86,7 +86,7 @@ SYMBOLS = DEBUGGER = # specify additional compiler flags for all files -COMPILER_FLAGS = +COMPILER_FLAGS = -fpermissive # specify additional linker flags LINKER_FLAGS = diff --git a/intro/QSort/qsort.cpp b/intro/QSort/qsort.cpp index 090fcc5..59c57a5 100644 --- a/intro/QSort/qsort.cpp +++ b/intro/QSort/qsort.cpp @@ -10,6 +10,8 @@ #include #include +long Partition(void *castToWorkUnit); + /* for experimentation purposes, these are global */ int32 SIZE; int32 THREADS; @@ -326,4 +328,4 @@ main(int argc, char** argv) printf("proper sort: %s\n", v ? "true" : "false"); return 0; -} \ No newline at end of file +} diff --git a/intro/TextEditor/textwindow.cpp b/intro/TextEditor/textwindow.cpp index 03f9c09..ba304dc 100644 --- a/intro/TextEditor/textwindow.cpp +++ b/intro/TextEditor/textwindow.cpp @@ -11,6 +11,7 @@ This file may be used under the terms of the Be Sample Code License. */ +#include #include #include #include diff --git a/intro/doodle/algobase.h b/intro/doodle/algobase.h new file mode 100644 index 0000000..0bc25a6 --- /dev/null +++ b/intro/doodle/algobase.h @@ -0,0 +1,476 @@ +// -*- C++ -*- + +// Copyright (C) 2007-2023 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file parallel/algobase.h + * @brief Parallel STL function calls corresponding to the + * stl_algobase.h header. The functions defined here mainly do case + * switches and call the actual parallelized versions in other files. + * Inlining policy: Functions that basically only contain one + * function call, are declared inline. + * This file is a GNU parallel extension to the Standard C++ Library. + */ + +// Written by Johannes Singler and Felix Putze. + +#ifndef _GLIBCXX_PARALLEL_ALGOBASE_H +#define _GLIBCXX_PARALLEL_ALGOBASE_H 1 + +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace __parallel +{ + // NB: equal and lexicographical_compare require mismatch. + + // Sequential fallback + template + inline pair<_IIter1, _IIter2> + mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2); } + + // Sequential fallback + template + inline pair<_IIter1, _IIter2> + mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _Predicate __pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2, __pred); } + + // Sequential fallback for input iterator case + template + inline pair<_IIter1, _IIter2> + __mismatch_switch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _Predicate __pred, _IteratorTag1, _IteratorTag2) + { return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2, __pred); } + + // Parallel mismatch for random access iterators + template + pair<_RAIter1, _RAIter2> + __mismatch_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _Predicate __pred, + random_access_iterator_tag, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION(true)) + { + _RAIter1 __res = + __gnu_parallel::__find_template(__begin1, __end1, __begin2, __pred, + __gnu_parallel:: + __mismatch_selector()).first; + return make_pair(__res , __begin2 + (__res - __begin1)); + } + else + return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2, __pred); + } + + // Public interface + template + inline pair<_IIter1, _IIter2> + mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2) + { + typedef __gnu_parallel::_EqualTo< + typename std::iterator_traits<_IIter1>::value_type, + typename std::iterator_traits<_IIter2>::value_type> _EqualTo; + + return __mismatch_switch(__begin1, __end1, __begin2, _EqualTo(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + + // Public interface + template + inline pair<_IIter1, _IIter2> + mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _Predicate __pred) + { + return __mismatch_switch(__begin1, __end1, __begin2, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + +#if __cplusplus > 201103L + // Sequential fallback. + template + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::mismatch(__first1, __last1, __first2, __last2); } + + // Sequential fallback. + template + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _BinaryPredicate __binary_pred, + __gnu_parallel::sequential_tag) + { + return _GLIBCXX_STD_A::mismatch(__first1, __last1, __first2, __last2, + __binary_pred); + } + + // Sequential fallback for input iterator case + template + inline pair<_IIter1, _IIter2> + __mismatch_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, _Predicate __pred, + _IteratorTag1, _IteratorTag2) + { + return _GLIBCXX_STD_A::mismatch(__begin1, __end1, + __begin2, __end2, __pred); + } + + // Parallel mismatch for random access iterators + template + pair<_RAIter1, _RAIter2> + __mismatch_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _RAIter2 __end2, _Predicate __pred, + random_access_iterator_tag, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION(true)) + { + if ((__end2 - __begin2) < (__end1 - __begin1)) + __end1 = __begin1 + (__end2 - __begin2); + + _RAIter1 __res = + __gnu_parallel::__find_template(__begin1, __end1, __begin2, __pred, + __gnu_parallel:: + __mismatch_selector()).first; + return make_pair(__res , __begin2 + (__res - __begin1)); + } + else + return _GLIBCXX_STD_A::mismatch(__begin1, __end1, + __begin2, __end2, __pred); + } + + template + inline pair<_IIter1, _IIter2> + mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2) + { + typedef __gnu_parallel::_EqualTo< + typename std::iterator_traits<_IIter1>::value_type, + typename std::iterator_traits<_IIter2>::value_type> _EqualTo; + + return __mismatch_switch(__begin1, __end1, __begin2, __end2, _EqualTo(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + + template + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __begin1, _InputIterator1 __end1, + _InputIterator2 __begin2, _InputIterator2 __end2, + _BinaryPredicate __binary_pred) + { + return __mismatch_switch(__begin1, __end1, __begin2, __end2, + __binary_pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } +#endif + + // Sequential fallback + template + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2); } + + // Sequential fallback + template + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _Predicate __pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __pred); } + + // Public interface + template + _GLIBCXX20_CONSTEXPR + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2) + { +#if __cplusplus > 201703L + if (std::is_constant_evaluated()) + return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2); +#endif + + return __gnu_parallel::mismatch(__begin1, __end1, __begin2).first + == __end1; + } + + // Public interface + template + _GLIBCXX20_CONSTEXPR + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _Predicate __pred) + { +#if __cplusplus > 201703L + if (std::is_constant_evaluated()) + return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __pred); +#endif + + return __gnu_parallel::mismatch(__begin1, __end1, __begin2, __pred).first + == __end1; + } + +#if __cplusplus > 201103L + // Sequential fallback + template + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, + __gnu_parallel::sequential_tag) + { + return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __end2); + } + + // Sequential fallback + template + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, _BinaryPredicate __binary_pred, + __gnu_parallel::sequential_tag) + { + return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __end2, + __binary_pred); + } + + // Sequential fallback for input iterator case + template + inline bool + __equal_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, _Predicate __pred, + _IteratorTag1, _IteratorTag2) + { + return _GLIBCXX_STD_A::equal(__begin1, __end1, + __begin2, __end2, __pred); + } + + // Parallel equal for random access iterators + template + inline bool + __equal_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _RAIter2 __end2, _Predicate __pred, + random_access_iterator_tag, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION(true)) + { + if (std::distance(__begin1, __end1) + != std::distance(__begin2, __end2)) + return false; + + return __gnu_parallel::mismatch(__begin1, __end1, __begin2, __end2, + __pred).first == __end1; + } + else + return _GLIBCXX_STD_A::equal(__begin1, __end1, + __begin2, __end2, __pred); + } + + template + _GLIBCXX20_CONSTEXPR + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2) + { +#if __cplusplus > 201703L + if (std::is_constant_evaluated()) + return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __end2); +#endif + + typedef __gnu_parallel::_EqualTo< + typename std::iterator_traits<_IIter1>::value_type, + typename std::iterator_traits<_IIter2>::value_type> _EqualTo; + + return __equal_switch(__begin1, __end1, __begin2, __end2, _EqualTo(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + + template + _GLIBCXX20_CONSTEXPR + inline bool + equal(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, _BinaryPredicate __binary_pred) + { +#if __cplusplus > 201703L + if (std::is_constant_evaluated()) + return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __end2, + __binary_pred); +#endif + + return __equal_switch(__begin1, __end1, __begin2, __end2, __binary_pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } +#endif // C++14 + + // Sequential fallback + template + inline bool + lexicographical_compare(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::lexicographical_compare(__begin1, __end1, + __begin2, __end2); } + + // Sequential fallback + template + inline bool + lexicographical_compare(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _Predicate __pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::lexicographical_compare( + __begin1, __end1, __begin2, __end2, __pred); } + + // Sequential fallback for input iterator case + template + inline bool + __lexicographical_compare_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _Predicate __pred, + _IteratorTag1, _IteratorTag2) + { return _GLIBCXX_STD_A::lexicographical_compare( + __begin1, __end1, __begin2, __end2, __pred); } + + // Parallel lexicographical_compare for random access iterators + // Limitation: Both valuetypes must be the same + template + bool + __lexicographical_compare_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _RAIter2 __end2, + _Predicate __pred, + random_access_iterator_tag, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION(true)) + { + typedef iterator_traits<_RAIter1> _TraitsType1; + typedef typename _TraitsType1::value_type _ValueType1; + + typedef iterator_traits<_RAIter2> _TraitsType2; + typedef typename _TraitsType2::value_type _ValueType2; + + typedef __gnu_parallel:: + _EqualFromLess<_ValueType1, _ValueType2, _Predicate> + _EqualFromLessCompare; + + // Longer sequence in first place. + if ((__end1 - __begin1) < (__end2 - __begin2)) + { + typedef pair<_RAIter1, _RAIter2> _SpotType; + _SpotType __mm = __mismatch_switch(__begin1, __end1, __begin2, + _EqualFromLessCompare(__pred), + random_access_iterator_tag(), + random_access_iterator_tag()); + + return (__mm.first == __end1) + || bool(__pred(*__mm.first, *__mm.second)); + } + else + { + typedef pair<_RAIter2, _RAIter1> _SpotType; + _SpotType __mm = __mismatch_switch(__begin2, __end2, __begin1, + _EqualFromLessCompare(__pred), + random_access_iterator_tag(), + random_access_iterator_tag()); + + return (__mm.first != __end2) + && bool(__pred(*__mm.second, *__mm.first)); + } + } + else + return _GLIBCXX_STD_A::lexicographical_compare( + __begin1, __end1, __begin2, __end2, __pred); + } + + // Public interface + template + _GLIBCXX20_CONSTEXPR + inline bool + lexicographical_compare(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2) + { +#if __cplusplus > 201703L + if (std::is_constant_evaluated()) + return _GLIBCXX_STD_A::lexicographical_compare(__begin1, __end1, + __begin2, __end2); +#endif + + typedef iterator_traits<_IIter1> _TraitsType1; + typedef typename _TraitsType1::value_type _ValueType1; + typedef typename _TraitsType1::iterator_category _IteratorCategory1; + + typedef iterator_traits<_IIter2> _TraitsType2; + typedef typename _TraitsType2::value_type _ValueType2; + typedef typename _TraitsType2::iterator_category _IteratorCategory2; + typedef __gnu_parallel::_Less<_ValueType1, _ValueType2> _LessType; + + return __lexicographical_compare_switch( + __begin1, __end1, __begin2, __end2, _LessType(), + _IteratorCategory1(), _IteratorCategory2()); + } + + // Public interface + template + _GLIBCXX20_CONSTEXPR + inline bool + lexicographical_compare(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _Predicate __pred) + { +#if __cplusplus > 201703L + if (std::is_constant_evaluated()) + return _GLIBCXX_STD_A::lexicographical_compare(__begin1, __end1, + __begin2, __end2, + __pred); +#endif + + typedef iterator_traits<_IIter1> _TraitsType1; + typedef typename _TraitsType1::iterator_category _IteratorCategory1; + + typedef iterator_traits<_IIter2> _TraitsType2; + typedef typename _TraitsType2::iterator_category _IteratorCategory2; + + return __lexicographical_compare_switch( + __begin1, __end1, __begin2, __end2, __pred, + _IteratorCategory1(), _IteratorCategory2()); + } + +#if __cpp_lib_three_way_comparison + using _GLIBCXX_STD_A::lexicographical_compare_three_way; +#endif +} // end namespace +} // end namespace + +#endif /* _GLIBCXX_PARALLEL_ALGOBASE_H */ diff --git a/intro/doodle/cmdtool.h b/intro/doodle/cmdtool.h index 965deaf..6c3f390 100644 --- a/intro/doodle/cmdtool.h +++ b/intro/doodle/cmdtool.h @@ -16,6 +16,7 @@ // of forcing the application to manage the toolbar, it's more convenient // to make this toolbar a global singleton object. +#include #include "toolbar.h" class CmdToolbar : public Toolbar diff --git a/intro/doodle/doodle.h b/intro/doodle/doodle.h index 6894423..6f94d1a 100644 --- a/intro/doodle/doodle.h +++ b/intro/doodle/doodle.h @@ -15,6 +15,7 @@ // frame window would in MFC, i.e. cascade/tiled window arrangement. #include +#include class DudePrefs; diff --git a/intro/doodle/dudedoc.h b/intro/doodle/dudedoc.h index 2008c98..1aabdfd 100644 --- a/intro/doodle/dudedoc.h +++ b/intro/doodle/dudedoc.h @@ -18,6 +18,9 @@ // serialization. Also note that this class contains the stuff which would, // in MFC, be provided by a document template. +#include +#include +#include #include #include #include "MultiLocker.h" @@ -170,4 +173,4 @@ class DudeDoc : public BLooper }; -#endif /* _dudedoc_h */ \ No newline at end of file +#endif /* _dudedoc_h */ diff --git a/intro/doodle/dudeview.h b/intro/doodle/dudeview.h index 4385595..7be1dda 100644 --- a/intro/doodle/dudeview.h +++ b/intro/doodle/dudeview.h @@ -13,6 +13,7 @@ // // MFC NOTE: This class is directly analagous to CView. +#include #include class DudeDoc; diff --git a/intro/doodle/dudewin.cpp b/intro/doodle/dudewin.cpp index ec016d9..a94e2e5 100644 --- a/intro/doodle/dudewin.cpp +++ b/intro/doodle/dudewin.cpp @@ -3,7 +3,7 @@ This file may be used under the terms of the Be Sample Code License. */ -#include +#include "algobase.h" #include #include #include @@ -11,6 +11,7 @@ #include #include #include +#include #include "cmdtool.h" #include "constants.h" #include "doodle.h" @@ -213,8 +214,8 @@ status_t DudeWin::Init(DudeDoc* pDoc) float maxHeight = m_pDocument->Bounds().Height() + m_pMenuBar->Frame().Height() + B_H_SCROLL_BAR_HEIGHT + 1; - float minWidth = min(maxWidth, 100.0f); - float minHeight = min(maxHeight, 100.0f); + float minWidth = min_c(maxWidth, 100.0f); + float minHeight = min_c(maxHeight, 100.0f); // adjust the window's current size based on new min/max values float curWidth = Bounds().Width(); diff --git a/intro/doodle/makefile b/intro/doodle/makefile index be90af1..6261320 100644 --- a/intro/doodle/makefile +++ b/intro/doodle/makefile @@ -51,7 +51,7 @@ RSRCS= doodle.rsrc # naming scheme you need to specify the path to the library # and it's name # library: my_lib.a entry: my_lib.a or path/my_lib.a -LIBS= be tracker +LIBS= be tracker stdc++ # specify additional paths to directories following the standard # libXXX.so or libXXX.a naming scheme. You can specify full paths @@ -97,7 +97,7 @@ SYMBOLS = DEBUGGER = # specify additional compiler flags for all files -COMPILER_FLAGS = +COMPILER_FLAGS = -fpermissive # specify additional linker flags LINKER_FLAGS = diff --git a/intro/doodle/pendlg.h b/intro/doodle/pendlg.h index 86f321c..f41f479 100644 --- a/intro/doodle/pendlg.h +++ b/intro/doodle/pendlg.h @@ -6,6 +6,7 @@ #ifndef _pendlg_h #define _pendlg_h +#include #include ///////////////////////////////////////////////////////////////////////////// @@ -59,4 +60,4 @@ class PenWidthsDlg : public BWindow sem_id m_modalSem; }; -#endif /* _pendlg_h */ \ No newline at end of file +#endif /* _pendlg_h */ diff --git a/intro/doodle/stroke.cpp b/intro/doodle/stroke.cpp index 48bab50..e9571d2 100644 --- a/intro/doodle/stroke.cpp +++ b/intro/doodle/stroke.cpp @@ -3,7 +3,8 @@ This file may be used under the terms of the Be Sample Code License. */ -#include +#include "algobase.h" +#include #include #include #include "stroke.h" @@ -177,10 +178,10 @@ void PenStroke::Fix() // MFC NOTE: note that bottom > top in the default // BeOS view coordinates, since the y axis points downwards. pt = PointAt(i); - m_rectBounds.left = min(m_rectBounds.left, pt.x); - m_rectBounds.right = max(m_rectBounds.right, pt.x); - m_rectBounds.top = min(m_rectBounds.top, pt.y); - m_rectBounds.bottom = max(m_rectBounds.bottom, pt.y); + m_rectBounds.left = min_c(m_rectBounds.left, pt.x); + m_rectBounds.right = max_c(m_rectBounds.right, pt.x); + m_rectBounds.top = min_c(m_rectBounds.top, pt.y); + m_rectBounds.bottom = max_c(m_rectBounds.bottom, pt.y); } // Add the pen width to the bounding rectangle. This is necessary diff --git a/intro/doodle/toolbar.cpp b/intro/doodle/toolbar.cpp index 0cc4230..5ad802a 100644 --- a/intro/doodle/toolbar.cpp +++ b/intro/doodle/toolbar.cpp @@ -3,7 +3,8 @@ This file may be used under the terms of the Be Sample Code License. */ -#include +#include "algobase.h" +#include #include #include #include @@ -232,7 +233,7 @@ void Toolbar::CalcLayout() pItem->MoveTo(loc); BRect frame = pItem->Frame(); maxRight = loc.x = frame.right + 1; - maxBottom = max(maxBottom, frame.bottom); + maxBottom = max_c(maxBottom, frame.bottom); } // resize the toolbar to fully encompass the layout + margin diff --git a/intro/doodle/toolbaritem.h b/intro/doodle/toolbaritem.h index c4a0c35..11768c0 100644 --- a/intro/doodle/toolbaritem.h +++ b/intro/doodle/toolbaritem.h @@ -18,6 +18,7 @@ #include #include +#include class ToolbarItem : public BView, public BInvoker { @@ -72,4 +73,4 @@ class ToolbarButton : public ToolbarItem BBitmap* m_pMarkedBitmap; }; -#endif /* _toolbaritem_h */ \ No newline at end of file +#endif /* _toolbaritem_h */ diff --git a/intro/makefile.all b/intro/makefile similarity index 100% rename from intro/makefile.all rename to intro/makefile diff --git a/intro/prefs_article/README.txt b/intro/prefs_article/README.txt index bd857b9..1cd8c24 100644 --- a/intro/prefs_article/README.txt +++ b/intro/prefs_article/README.txt @@ -1,10 +1,10 @@ prefs_article: README.txt -Last modified: 11/9/98 +Last modified: 15/9/23 To build and run this code: -1. Go to the directory prefslib/ and build prefslib.so by either running make from the command line or building one of the BeIDE projects. +1. Go to the directory prefslib/ and build prefslib.so by running make from the command line. 2. Copy libprefs.so to sample/lib. This is the place that the sample application will look for prefslib.so when it builds and launches. -3. Go to the directory sample/ and build sample, again by either running make from the command line or building one of the BeIDE projects. +3. Go to the directory sample/ and build sample, again by either running make from the command line. 4. Run sample from the command line. Note that sample will only find prefslib.so if the application is in the same place as the lib/ directory. \ No newline at end of file diff --git a/intro/prefs_article/makefile.all b/intro/prefs_article/makefile similarity index 100% rename from intro/prefs_article/makefile.all rename to intro/prefs_article/makefile diff --git a/intro/prefs_article/prefslib/TPreferences.cpp b/intro/prefs_article/prefslib/TPreferences.cpp index 84d108a..67b1558 100644 --- a/intro/prefs_article/prefslib/TPreferences.cpp +++ b/intro/prefs_article/prefslib/TPreferences.cpp @@ -28,7 +28,7 @@ TPreferences::TPreferences(char *filename) : BMessage('pref') { BFile file; - status = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path); + status = find_directory(B_USER_SETTINGS_DIRECTORY, &path); if (status != B_OK) { return; } diff --git a/modules/makefile.all b/modules/makefile similarity index 100% rename from modules/makefile.all rename to modules/makefile diff --git a/portability/makefile.all b/portability/makefile similarity index 100% rename from portability/makefile.all rename to portability/makefile diff --git a/storage_kit/FolderWatcher/FolderWatcher.h b/storage_kit/FolderWatcher/FolderWatcher.h index 231e6dc..29f8645 100644 --- a/storage_kit/FolderWatcher/FolderWatcher.h +++ b/storage_kit/FolderWatcher/FolderWatcher.h @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -88,4 +89,4 @@ static FolderWatcher* FindFolderWatcher(const node_ref& nodeRef, static BList mFolderWatcherList; static BList mMessageFilterList; static BLocker mListLocker; -}; \ No newline at end of file +}; diff --git a/storage_kit/LiveQueryApp/LiveQueryWindow.h b/storage_kit/LiveQueryApp/LiveQueryWindow.h index 0555451..5ffbdc2 100644 --- a/storage_kit/LiveQueryApp/LiveQueryWindow.h +++ b/storage_kit/LiveQueryApp/LiveQueryWindow.h @@ -9,11 +9,14 @@ #include #include #include +#include +#include class BList; class BLocker; class BListView; +class BStringItem; class BStringView; class BTextControl; diff --git a/storage_kit/People/PeopleApp.h b/storage_kit/People/PeopleApp.h index ce40cc7..131e2eb 100644 --- a/storage_kit/People/PeopleApp.h +++ b/storage_kit/People/PeopleApp.h @@ -13,6 +13,8 @@ #ifndef PEOPLEAPP_H #define PEOPLEAPP_H +#include + #define B_PERSON_MIMETYPE "application/x-person" #define APP_SIG "application/x-vnd.Be-PEPL" diff --git a/storage_kit/People/PeopleView.h b/storage_kit/People/PeopleView.h index 01261aa..5c6d7ac 100644 --- a/storage_kit/People/PeopleView.h +++ b/storage_kit/People/PeopleView.h @@ -13,6 +13,8 @@ #ifndef PEOPLEVIEW_H #define PEOPLEVIEW_H +#include + #include "PeopleApp.h" #define TEXT_HEIGHT 16 @@ -103,4 +105,4 @@ class TPeopleView : public BView { bool TextSelected(void); }; -#endif /* PEOPLEVIEW_H */ \ No newline at end of file +#endif /* PEOPLEVIEW_H */ diff --git a/storage_kit/QueryApp/QueryWindow.h b/storage_kit/QueryApp/QueryWindow.h index 786fba7..25b1163 100644 --- a/storage_kit/QueryApp/QueryWindow.h +++ b/storage_kit/QueryApp/QueryWindow.h @@ -9,6 +9,7 @@ #include #include +#include class BQuery; class BMenuControl; diff --git a/storage_kit/makefile.all b/storage_kit/makefile similarity index 100% rename from storage_kit/makefile.all rename to storage_kit/makefile