diff --git a/Common/Support/BarberPole.cpp b/Common/Support/BarberPole.cpp new file mode 100644 index 0000000..473945d --- /dev/null +++ b/Common/Support/BarberPole.cpp @@ -0,0 +1,64 @@ +#include "BarberPole.h" + + +BarberPole::BarberPole(BRect pRect, const char *pName, uint32 resizingMode, uint32 flags, int pDirection) + : BView(pRect, pName, resizingMode, flags) { + + spinning_thread_id = spawn_thread(spinningThread, pName, B_DISPLAY_PRIORITY, this); + is_running = false; + direction = pDirection; +}; + +BarberPole::~BarberPole(){ + kill_thread(spinning_thread_id); +} + +void BarberPole::Start(){ + resume_thread(spinning_thread_id); + is_running = true; +} + +void BarberPole::Stop(){ + suspend_thread(spinning_thread_id); + is_running = false; +} + +bool BarberPole::IsRunning(){ + return is_running; +} + +int32 BarberPole::spinningThread(void *data){ + BarberPole *lBarberPole = (BarberPole*)data; + pattern lStripes; + + lStripes.data[0] = 0x0f; + lStripes.data[1] = 0x1e; + lStripes.data[2] = 0x3c; + lStripes.data[3] = 0x78; + lStripes.data[4] = 0xf0; + lStripes.data[5] = 0xe1; + lStripes.data[6] = 0xc3; + lStripes.data[7] = 0x87; + + while(1==1){ + lBarberPole->LockLooper(); + lBarberPole->FillRect(lBarberPole->Bounds(), lStripes); + lBarberPole->UnlockLooper(); + + if(lBarberPole->direction == FROM_RIGHT_TO_LEFT){ + uchar tmp = lStripes.data[0]; + for (int j = 0; j < 7; ++j) { + lStripes.data[j] = lStripes.data[j+1]; + } + lStripes.data[7] = tmp; + } else { + uchar tmp = lStripes.data[7]; + for (int j = 7; j > 0; --j) { + lStripes.data[j] = lStripes.data[j-1]; + } + lStripes.data[0] = tmp; + + } + snooze(25000); + } +}; \ No newline at end of file diff --git a/Common/Support/BarberPole.h b/Common/Support/BarberPole.h new file mode 100644 index 0000000..b8f219d --- /dev/null +++ b/Common/Support/BarberPole.h @@ -0,0 +1,28 @@ +#ifndef _BARBERPOLE_H_ +#define _BARBERPOLE_H_ + +#include + +const int FROM_RIGHT_TO_LEFT = 0; +const int FROM_LEFT_TO_RIGHT = 1; + +class BarberPole : public BView { +public: + BarberPole(BRect pRect, const char *pName, uint32 resizingMode, uint32 flags = 0, int pDirection = FROM_LEFT_TO_RIGHT); + ~BarberPole(); + + void Start(); + void Stop(); + + bool IsRunning(); + +protected: + thread_id spinning_thread_id; + bool is_running; + +private: + int direction; + static int32 spinningThread(void *data); +}; + +#endif \ No newline at end of file diff --git a/Common/Support/BarberPole.txt b/Common/Support/BarberPole.txt new file mode 100644 index 0000000..46797b0 --- /dev/null +++ b/Common/Support/BarberPole.txt @@ -0,0 +1,15 @@ +Dortmund, Germany. +December, 12th 1998 + +BarberPole is a little class, that shows this little spinning barber pole, you probably know from Net+ or the Tracker. + +This is V1.0 and should compile on both x86 and PPC, although I currently haven't tested it on PPC. If you want to set the color of the pole, do it by using + +myBarberPol->SetHighColor(...) + and +myBarberPole->SetLowColor(...) + +BarberPole is Freeware. If you made any changes, please report it to me, so I could update it. + +dirk116@wallace.free.de // Member of DeBUG - German Be User Group + // http://www.BeUserGroup.de diff --git a/Common/Support/DragNDrop.h b/Common/Support/DragNDrop.h index 3555ed1..f227156 100644 --- a/Common/Support/DragNDrop.h +++ b/Common/Support/DragNDrop.h @@ -3,6 +3,7 @@ #include #include +#include /* * Class: RefDragMessage diff --git a/Common/Support/Scripter.cpp b/Common/Support/Scripter.cpp index 4c4c071..3116b15 100644 --- a/Common/Support/Scripter.cpp +++ b/Common/Support/Scripter.cpp @@ -40,7 +40,7 @@ Scripter :: Scripter( const char * s, property_info* pi ) fprintf( stderr, "Created Scripter (%p) as\n\ Suite: %s\n\ property_info *: %p\n\ -Default Options: %lu\n", this, fSuite, pi, fOptions ) ; +Default Options: %" B_PRIu32 "\n", this, fSuite, pi, fOptions ) ; } } @@ -55,7 +55,7 @@ Scripter :: Scripter( const char * s, property_info* pi, uint32 opt ) fprintf( stderr, "Created Scripter (%p) as\n\ Suite: %s\n\ property_info *: %p\n\ -Set Options: %lu\n", this, fSuite, pi, fOptions ) ; +Set Options: %" B_PRIu32 "\n", this, fSuite, pi, fOptions ) ; } } @@ -138,7 +138,7 @@ int32 Scripter :: FindMatch( BMessage * m, int32 i, int32 idx = fPropInfo.FindMatch( m, i, s, w, prop) ; if( fOptions & PrintDebug ) - fprintf( stderr, "Match for %s is %ld (%p)\n", prop, idx, this ) ; + fprintf( stderr, "Match for %s is %" B_PRId32 " (%p)\n", prop, idx, this ) ; // clean up delete[] buff ; diff --git a/Common/Support/Support.cpp b/Common/Support/Support.cpp index 5e86dbd..ba708fe 100644 --- a/Common/Support/Support.cpp +++ b/Common/Support/Support.cpp @@ -251,10 +251,6 @@ char * StringUtils:: VerboseErrorString( status_t e , char * str ) strcpy( str, "B_FILE_ERROR " ) ; break ; - case B_FILE_NOT_FOUND: - strcpy( str, "B_FILE_NOT_FOUND " ) ; - break ; - case B_FILE_EXISTS: strcpy( str, "B_FILE_EXISTS " ) ; break ; diff --git a/Common/Support/Support.h b/Common/Support/Support.h index f6dc83f..933e5db 100644 --- a/Common/Support/Support.h +++ b/Common/Support/Support.h @@ -60,13 +60,13 @@ namespace ObjectUtils { // Duplicates an object from another pointer template - inline T* Dup( T* ) + inline T* Dup( T* t ) { return new T( *t ) ; } template - inline void Swap( T& , T& ) + inline void Swap( T& a, T& b ) { T c = a ; a = b ; diff --git a/Common/Support/WindowList.cpp b/Common/Support/WindowList.cpp index da84531..2cc25b9 100644 --- a/Common/Support/WindowList.cpp +++ b/Common/Support/WindowList.cpp @@ -93,7 +93,7 @@ void WindowList :: CloseAll( void ) { Lock() ; void * v ; - while( (v = fList.RemoveItem( 0L )) != NULL ) + while( (v = fList.RemoveItem( (int32)0L )) != NULL ) { reinterpret_cast( v )->Quit() ; } diff --git a/Common/Support/WindowList.h b/Common/Support/WindowList.h index 5d0874e..232c1ce 100644 --- a/Common/Support/WindowList.h +++ b/Common/Support/WindowList.h @@ -17,6 +17,7 @@ *******************************************************/ #include +#include class BWindow ; diff --git a/Common/UI/EditBox.cpp b/Common/UI/EditBox.cpp index 4d219c5..f7e1848 100644 --- a/Common/UI/EditBox.cpp +++ b/Common/UI/EditBox.cpp @@ -126,28 +126,28 @@ void EditBox :: SetFloat( float f , const char * fmt ) void EditBox :: SetInt( int32 i ) { char str[64] ; - sprintf( str, "%ld", i ) ; + sprintf( str, "%" B_PRId32, i ) ; fpTextView->SetText( str ) ; } void EditBox :: SetIntOct( int32 i ) { char str[64] ; - sprintf( str, "%lo", i ) ; + sprintf( str, "%" B_PRIo32, (uint32) i ) ; fpTextView->SetText( str ) ; } void EditBox :: SetIntHex( int32 i ) { char str[64] ; - sprintf( str, "%lx", i ) ; + sprintf( str, "%" B_PRIx32, (uint32) i ) ; fpTextView->SetText( str ) ; } void EditBox :: SetIntHEX( int32 i ) { char str[64] ; - sprintf( str, "%lX", i ) ; + sprintf( str, "%" B_PRIX32, (uint32) i ) ; fpTextView->SetText( str ) ; } diff --git a/Common/UI/Globals.h b/Common/UI/Globals.h new file mode 100644 index 0000000..517f88b --- /dev/null +++ b/Common/UI/Globals.h @@ -0,0 +1,10 @@ +// Stubbed out Globals.h for Tim Vernum's TraX. + +#ifndef GLOBALS_H +#define GLOBALS_H + +#include "ResultsHandler.h" + +static ResultsHandler gResults; + +#endif diff --git a/Common/UI/Joins.h b/Common/UI/Joins.h new file mode 100644 index 0000000..3ae5d8d --- /dev/null +++ b/Common/UI/Joins.h @@ -0,0 +1,17 @@ +// Stubbed out Joins.h for Tim Vernum's TraX. + +#ifndef JOINS_H +#define JOINS_H + +static const char* const kOpenStrings[] = { "", "(" }; +static const char* const kCloseStrings[] = { "", ")" }; +static const char* const kNotStrings[] = { "", "not" }; +static const char* const kConjunctionStrings[] = { "", "and" }; + +// Fixme: these are just wild guesses for now: +static const char* const kOpenValues[] = { "", "(" }; +static const char* const kCloseValues[] = { "", ")" }; +static const char* const kNotValues[] = { "", "!" }; +static const char* const kConjunctionValues[] = { "", "&&" }; + +#endif diff --git a/Common/UI/ResultsHandler.cpp b/Common/UI/ResultsHandler.cpp new file mode 100644 index 0000000..e0d8939 --- /dev/null +++ b/Common/UI/ResultsHandler.cpp @@ -0,0 +1,34 @@ +// Stubbed out ResultsHandler.{h,cpp} for Tim Vernum's TraX. + +#include "ResultsHandler.h" +#include "ResultsWindow.h" + + +ResultsHandler::ResultsHandler() +{ +} + + +void +ResultsHandler::Init() +{ +} + + +int +ResultsHandler::AddResult(const char* foobar) +{ + return ResultsWindow::AddResult(foobar); +} + + +void +ResultsHandler::NewSearch() +{ +} + + +void +ResultsHandler::EndSearch() +{ +} diff --git a/Common/UI/ResultsHandler.h b/Common/UI/ResultsHandler.h new file mode 100644 index 0000000..15bbcfe --- /dev/null +++ b/Common/UI/ResultsHandler.h @@ -0,0 +1,20 @@ +// Stubbed out ResultsHandler.{h,cpp} for Tim Vernum's TraX. + +#ifndef RESULTSHANDLER_H +#define RESULTSHANDLER_H + + +class ResultsHandler { +public: + ResultsHandler(); + + void Init(); + + void NewSearch(); + void EndSearch(); + + static int AddResult(const char*); +}; + + +#endif diff --git a/Common/UI/ResultsWindow.cpp b/Common/UI/ResultsWindow.cpp index b5f530b..05aad28 100644 --- a/Common/UI/ResultsWindow.cpp +++ b/Common/UI/ResultsWindow.cpp @@ -89,7 +89,7 @@ ResultsWindow :: ResultsWindow( void ) ResultsWindow :: ~ResultsWindow( void ) { BListItem * bli ; - while( (bli = fpList->RemoveItem(0L)) != NULL ) + while ((bli = fpList->RemoveItem(static_cast(0L))) != NULL) delete bli ; } @@ -132,7 +132,7 @@ bool ResultsWindow :: QuitRequested( void ) } } - return inherited::QuitRequested() ; + return BWindow::QuitRequested() ; } void ResultsWindow :: MessageReceived( BMessage * msg ) @@ -153,7 +153,7 @@ void ResultsWindow :: MessageReceived( BMessage * msg ) default: { - inherited::MessageReceived( msg ) ; + BWindow::MessageReceived( msg ) ; break ; } } diff --git a/Common/UI/ResultsWindow.h b/Common/UI/ResultsWindow.h index 5fd2ea0..c86b375 100644 --- a/Common/UI/ResultsWindow.h +++ b/Common/UI/ResultsWindow.h @@ -43,4 +43,4 @@ class ResultsWindow : public BWindow } ; -#endif \ No newline at end of file +#endif diff --git a/Common/UI/Settings.cpp b/Common/UI/Settings.cpp new file mode 100644 index 0000000..80b6920 --- /dev/null +++ b/Common/UI/Settings.cpp @@ -0,0 +1,5 @@ +// Stubbed out Settings.cpp for Tim Vernum's TraX. + +#include "Settings.h" + +TraxSettings gSettings; diff --git a/Common/UI/Settings.h b/Common/UI/Settings.h new file mode 100644 index 0000000..8554190 --- /dev/null +++ b/Common/UI/Settings.h @@ -0,0 +1,23 @@ +// Stubbed out Settings.h for Tim Vernum's TraX. + +#ifndef SETTINGS_H +#define SETTINGS_H + + +typedef struct settings { + enum { + eShowBrackets, + eShowJoinPanel, + eShowNot + }; + + int fConjunction; + const char* fDefaultFolder; + bool fUseTracker; + int fShow; +} TraxSettings; + + +extern TraxSettings gSettings; + +#endif diff --git a/Common/UI/SettingsWindow.cpp b/Common/UI/SettingsWindow.cpp new file mode 100644 index 0000000..19572f2 --- /dev/null +++ b/Common/UI/SettingsWindow.cpp @@ -0,0 +1,10 @@ +// Stubbed out SettingsWindow.{h,cpp} for Tim Vernum's TraX. + +#include "SettingsWindow.h" + + +SettingsWindow::SettingsWindow() + : BWindow(BRect( 100, 100, 400, 250 ) , "Settings", B_DOCUMENT_WINDOW, B_NOT_CLOSABLE | B_NOT_RESIZABLE) +{ + +} diff --git a/Common/UI/SettingsWindow.h b/Common/UI/SettingsWindow.h new file mode 100644 index 0000000..e6be427 --- /dev/null +++ b/Common/UI/SettingsWindow.h @@ -0,0 +1,25 @@ +// Stubbed out SettingsWindow.{h,cpp} for Tim Vernum's TraX. + +#ifndef SETTINGSWINDOW_H +#define SETTINGSWINDOW_H + +#include + + +class SettingsWindow : public BWindow +{ + public: + SettingsWindow(); + +// These methods are present in the TraX BeOS binaries: +// void LoadSettings(); +// void SaveSettings(); + +// void GetSettings(FastTraxSetting*); +// void DefaultSettings(); + +// void BroadcaseSettings(); +// virtual void MessageReceived(BMessage* msg); +}; + +#endif diff --git a/Common/etc/makefile.rules b/Common/etc/makefile.rules index cd12528..5a71b41 100644 --- a/Common/etc/makefile.rules +++ b/Common/etc/makefile.rules @@ -1,5 +1,6 @@ $(COMMON_TGT): $(COMMON_OBJ_DIR) $(COMMON_OB2) + @[ -d $(COMMON_OUT_DIR) ] || mkdir $(COMMON_OUT_DIR) > /dev/null 2>&1 $(ECHO_TGT) $(MAKE_TRACKERLIB) $(COMMON_OB2) $(MIMESET) diff --git a/FRegex/lib/fast_regex.h b/FRegex/lib/fast_regex.h index 8445d91..996c8d8 100644 --- a/FRegex/lib/fast_regex.h +++ b/FRegex/lib/fast_regex.h @@ -34,7 +34,7 @@ struct fast_regex typedef struct fast_regex fast_regex_t ; -int (*fast_regex_subsys_error)( const char * sys, const char * msg ) ; +//int (*fast_regex_subsys_error)( const char * sys, const char * msg ) ; int allocate_fast_regex ( fast_regex_t * ) ; int compile_fast_regex ( fast_regex_t *, const char *, size_t ) ; diff --git a/FRegex/source/dfa.c b/FRegex/source/dfa.c index 15f8ed6..49bd3a6 100644 --- a/FRegex/source/dfa.c +++ b/FRegex/source/dfa.c @@ -69,7 +69,7 @@ extern void free(); #endif #include "dfa.h" -#include "regex.h" +#include #if __STDC__ typedef void *ptr_t; @@ -281,7 +281,7 @@ int fold; static char *lexstart; /* Pointer to beginning of input string. */ static char *lexptr; /* Pointer to next input character. */ -static lexleft; /* Number of characters remaining. */ +static int lexleft; /* Number of characters remaining. */ static token lasttok; /* Previous token returned; initially END. */ static int laststart; /* True if we're separated from beginning or (, | only by zero-width characters. */ @@ -626,10 +626,12 @@ lex() { setbit(c, ccl); if (case_fold) + { if (ISUPPER(c)) setbit(tolower(c), ccl); else if (ISLOWER(c)) setbit(toupper(c), ccl); + } ++c; } skip: @@ -670,7 +672,7 @@ lex() /* Recursive descent parser for regular expressions. */ static token tok; /* Lookahead token. */ -static depth; /* Current depth of a hypothetical stack +static int depth; /* Current depth of a hypothetical stack holding deferred productions. This is used to determine the depth that will be required of the real stack later on in @@ -1461,7 +1463,7 @@ int trans[]; int state_newline; /* New state on a newline transition. */ int wants_letter; /* New state wants to know letter context. */ int state_letter; /* New state on a letter transition. */ - static initialized; /* Flag for static initialization. */ + static int initialized; /* Flag for static initialization. */ int i, j, k; /* Initialize the set of letters, if necessary. */ @@ -1799,12 +1801,12 @@ int newline; int *count; int *backref; { - register s, s1, tmp; /* Current state. */ + register int s, s1, tmp; /* Current state. */ register unsigned char *p; /* Current input character. */ - register **trans, *t; /* Copy of d->trans so it can be optimized + register int **trans, *t; /* Copy of d->trans so it can be optimized into a register. */ - static sbit[NOTCHAR]; /* Table for anding with d->success. */ - static sbit_init; + static int sbit[NOTCHAR]; /* Table for anding with d->success. */ + static int sbit_init; if (! sbit_init) { @@ -1850,10 +1852,12 @@ int *backref; if (d->success[s] & sbit[*p]) { if (backref) + { if (d->states[s].backref) *backref = 1; else *backref = 0; + } return (char *) p; } diff --git a/FRegex/source/fast_regex.c b/FRegex/source/fast_regex.c index 8a0a194..7e9d67b 100644 --- a/FRegex/source/fast_regex.c +++ b/FRegex/source/fast_regex.c @@ -1,11 +1,9 @@ #include "defs.h" +#include #include -#include - -#include +#include #include -#include int (*fast_regex_subsys_error)( const char * ,const char * ) ; int fprintf_error( const char * sys, const char * error ) diff --git a/FRegex/source/obstack.c b/FRegex/source/obstack.c index 6ff04a8..3530d73 100644 --- a/FRegex/source/obstack.c +++ b/FRegex/source/obstack.c @@ -17,6 +17,9 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "obstack.h" +/* For abort() */ +#include + /* This is just to get __GNU_LIBRARY__ defined. */ #include diff --git a/FastTrax/UIMain/FastTraxWindow.cpp b/FastTrax/UIMain/FastTraxWindow.cpp index 9a41000..cc286cd 100644 --- a/FastTrax/UIMain/FastTraxWindow.cpp +++ b/FastTrax/UIMain/FastTraxWindow.cpp @@ -140,11 +140,13 @@ FastTraxWindow :: FastTraxWindow( entry_ref * ref ) r = button->Frame() ; r.OffsetTo( r.left, r.bottom + 7 ) ; +/** Disable for now, until we reimplement the missing SettingsWindow functionality. button = new BButton( r , "settings", "Settings", new BMessage( Messages::SettingsRequested ) ) ; rightView->AddChild( button ) ; button->ResizeToPreferred() ; r = button->Frame() ; +*/ r.OffsetTo( r.left, r.bottom + 7 ) ; rightView->ResizeTo( r.right + 7 , r.bottom + 7 ) ; @@ -419,7 +421,7 @@ bool FastTraxWindow::QuitRequested( void ) msgr.SendMessage( &msg , &reply ) ; } } - return inherited :: QuitRequested( ) ; + return BWindow::QuitRequested( ) ; } // -1 Kill @@ -625,7 +627,7 @@ void FastTraxWindow :: MessageReceived( BMessage * msg ) } default: { - inherited::MessageReceived( msg ) ; + BWindow::MessageReceived( msg ) ; } } } diff --git a/FindLib/findlib/config.h b/FindLib/findlib/config.h index 30a26ac..47f6a0e 100644 --- a/FindLib/findlib/config.h +++ b/FindLib/findlib/config.h @@ -28,7 +28,7 @@ #define HAVE_VPRINTF 1 /* Define if major, minor, and makedev are declared in . */ -#define MAJOR_IN_SYSMACROS 1 +#undef MAJOR_IN_SYSMACROS /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -69,12 +69,16 @@ /* For 64bit filesystems, we need to put 'L' in printf, rather than a 'l' */ #undef FS_IS_64BIT -#if __BEOS__ +#if __BEOS__ || __HAIKU__ #define FS_IS_64BIT 1 #else #define FS_IS_64BIT 0 #endif +/* Needed to get the proper code paths */ +#if __HAIKU__ + #define _POSIX_SOURCE +#endif #endif /* CONFIG_H */ diff --git a/FindLib/findlib/express.c b/FindLib/findlib/express.c index 9138710..98c7d91 100644 --- a/FindLib/findlib/express.c +++ b/FindLib/findlib/express.c @@ -19,13 +19,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "config.h" + #include #include #include #include #include +#include +#include -#include "config.h" #include "modechange.h" #include "defs.h" #include "modetype.h" @@ -39,7 +42,7 @@ static int insert_fprintf_main ( FILE * fp, boolean ( *func ) () , char * fmt ) static int insert_days ( enum comparison_type c_type , unsigned long num_days, PFB pred ) ; static int insert_time ( enum comparison_type c_type , time_t t , PFB pred ) ; -int ( *xstat ) () = lstat ; +//int ( *xstat ) () = lstat ; #define ISDIGIT(c) (isascii (c) && isdigit (c)) #define ISUPPER(c) (isascii (c) && isupper (c)) diff --git a/FindLib/findlib/pred.c b/FindLib/findlib/pred.c index 014b5eb..051c10f 100644 --- a/FindLib/findlib/pred.c +++ b/FindLib/findlib/pred.c @@ -29,7 +29,7 @@ include directory. */ #include "fnmatch.h" #include "modetype.h" -#include "wait.h" +#include #ifndef HAVE_VFORK #define vfork fork @@ -1373,7 +1373,7 @@ struct predicate *pred_ptr ; if ( first_time ) { first_time = 0 ; -#ifndef __BEOS__ +#if !defined(__BEOS__) && !defined(__HAIKU__) /* GG-local: Current behavior under BeOS seems to be different than what SIG_DFL should imply, which would be to ignore SIGCHLD. Instead it seems to cause the parent to be terminated when SIGCHLD is received. */ diff --git a/FindLib/findutils/listfile.c b/FindLib/findutils/listfile.c index 7a1c717..c8b80a8 100644 --- a/FindLib/findutils/listfile.c +++ b/FindLib/findutils/listfile.c @@ -67,7 +67,7 @@ extern int errno; #endif #if defined(S_ISLNK) -#ifndef __BEOS__ +#if !defined(__BEOS__) && !defined(__HAIKU__) int readlink (); #endif #endif @@ -159,7 +159,7 @@ list_file (name, relname, statp, stream) } timebuf[16] = 0; -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) fprintf (stream, "%6Lu ", statp->st_ino); fprintf (stream, "%4Lu ", convert_blocks (ST_NBLOCKS (statp),kilobytes)); #else @@ -183,7 +183,7 @@ list_file (name, relname, statp, stream) fprintf (stream, " "); #endif else -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) fprintf (stream, "%8Lu ", statp->st_size); #else fprintf (stream, "%8lu ", statp->st_size); diff --git a/TraxSource/UIMain/OptionsPanel.cpp b/TraxSource/UIMain/OptionsPanel.cpp index edf107d..fab6a5b 100644 --- a/TraxSource/UIMain/OptionsPanel.cpp +++ b/TraxSource/UIMain/OptionsPanel.cpp @@ -133,6 +133,7 @@ void OptionsPanel :: AttachedToWindow( void ) r.left = 10 ; r.right = r.left + 50 ; +/** Disable for now, until we reimplement the missing SettingsWindow functionality. BButton * settingsButton = new BButton( r, "settings", "Settings" B_UTF8_ELLIPSIS, new BMessage( Messages::Settings ) , B_FOLLOW_LEFT | B_FOLLOW_TOP ) ; @@ -142,7 +143,7 @@ void OptionsPanel :: AttachedToWindow( void ) r.right = fr.Width() - 25 ; r.left = r.right - 50 ; - +*/ fpFindButton = new BButton( r, "go", "Find", new BMessage( Messages::StartFind ) , B_FOLLOW_RIGHT | B_FOLLOW_TOP ) ; @@ -245,7 +246,7 @@ void OptionsPanel :: StartFind( void ) if( fpMaxDepthCheck->Value() ) { int32 i = fpMaxDepthEdit->GetInt() ; - printf("MaxDepth: %ld\n", i ) ; + printf("MaxDepth: %" B_PRId32 "\n", i ) ; /* Add 1. Because maxdepth 0 => folder only * We want 0 => folder contents only diff --git a/TraxSource/UIMain/OptionsPanel.h b/TraxSource/UIMain/OptionsPanel.h index 841a71c..6bd7eda 100644 --- a/TraxSource/UIMain/OptionsPanel.h +++ b/TraxSource/UIMain/OptionsPanel.h @@ -15,6 +15,7 @@ #include "Panel.h" #endif +class BButton; class BCheckBox ; class BarberPole ; class ColouredView ; diff --git a/bin/SearchHeaders.sh b/bin/SearchHeaders.sh old mode 100644 new mode 100755 diff --git a/etc/MakeDepend.sh b/etc/MakeDepend.sh old mode 100644 new mode 100755 diff --git a/etc/TrimLog.sh b/etc/TrimLog.sh old mode 100644 new mode 100755 diff --git a/etc/makefile.main b/etc/makefile.main index b551037..a026b47 100644 --- a/etc/makefile.main +++ b/etc/makefile.main @@ -19,11 +19,23 @@ FASTTRAX_DIR := FastTrax OPTIMIZER = -O3 CC := gcc -CFLAGS = $(OPTIMIZER) -Wall -Wno-multichar -Wno-ctor-dtor-privacy + +# This is needed to be able to compile on either nightlies, or beta4. +# See https://dev.haiku-os.org/ticket/11818 (fixed for good in hrev57497). +# We can simplify this once the haikuports buildmasters switch to beta5. + +HAIKU_HREV_NUM = $(shell uname -v | cut -d " " -f 1 | cut -d "+" -f 1 | sed s/hrev//) +HAS_FIXED_FEATURES_H = $(shell if [ $(strip $(HAIKU_HREV_NUM)) -ge 57497 ]; then echo "YES"; else echo "NO"; fi) + +ifeq ($(strip $(HAS_FIXED_FEATURES_H)), YES) + CFLAGS = $(OPTIMIZER) -Wall -Wno-multichar -Wno-ctor-dtor-privacy -D_DEFAULT_SOURCE -DSTDC_HEADERS +else + CFLAGS = $(OPTIMIZER) -Wall -Wno-multichar -Wno-ctor-dtor-privacy -D__USE_GNU -DSTDC_HEADERS +endif LD := gcc LDFLAGS := -SHAREDLIB_FLAGS = -nostart -Xlinker -soname=$(notdir $@) +SHAREDLIB_FLAGS = -shared -Xlinker -soname=$(notdir $@) APP_FLAGS = -Xlinker -soname=_APP_ XRES := xres