From 6ef3b7c79de47a172004add5acdde16cfe7e449e Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 25 May 2009 03:51:29 +0000 Subject: [PATCH] Nuked all occurrences of NIL, replacing them with NULL. git-svn-id: http://openexile.googlecode.com/svn/trunk@72 4ebdad44-0ea0-11de-aab3-ff745001d230 --- osx/Blades of Exile Char Editor/pc.editors.cpp | 2 +- osx/Blades of Exile Char Editor/pc.fileio.cpp | 1 - osx/Blades of Exile Char Editor/pc.global.h | 2 -- osx/Blades of Exile Char Editor/pc.graphics.cpp | 2 +- osx/Blades of Exile Char Editor/pc.main.cpp | 8 ++++---- osx/Scenario Editor/scen.fileio.cpp | 4 ++-- osx/boe.dlgutil.cpp | 2 +- osx/boe.graphics.cpp | 8 ++++---- osx/boe.items.cpp | 4 ++-- osx/boe.main.cpp | 10 +++++----- osx/tools/viewdlog.cpp | 2 +- 11 files changed, 21 insertions(+), 24 deletions(-) diff --git a/osx/Blades of Exile Char Editor/pc.editors.cpp b/osx/Blades of Exile Char Editor/pc.editors.cpp index 530e7c17..87f6c809 100644 --- a/osx/Blades of Exile Char Editor/pc.editors.cpp +++ b/osx/Blades of Exile Char Editor/pc.editors.cpp @@ -258,7 +258,7 @@ short choice_dialog(short pic,short num) //if (pic > 0) // put_dialog_graphic(pic,0,the_rect); - ModalDialog(NIL, &item_hit); + ModalDialog(NULL, &item_hit); DisposeDialog(select_dialog); diff --git a/osx/Blades of Exile Char Editor/pc.fileio.cpp b/osx/Blades of Exile Char Editor/pc.fileio.cpp index f2cc9840..d787706f 100644 --- a/osx/Blades of Exile Char Editor/pc.fileio.cpp +++ b/osx/Blades of Exile Char Editor/pc.fileio.cpp @@ -14,7 +14,6 @@ #define DONE_BUTTON_ITEM 1 #define IN_FRONT (WindowPtr)-1L -#define NIL 0L DialogPtr the_dialog; diff --git a/osx/Blades of Exile Char Editor/pc.global.h b/osx/Blades of Exile Char Editor/pc.global.h index daaa534d..5f765f9e 100644 --- a/osx/Blades of Exile Char Editor/pc.global.h +++ b/osx/Blades of Exile Char Editor/pc.global.h @@ -4,7 +4,6 @@ #define MOUSE_REGION 0L #define DRAG_EDGE 15 #define IN_FRONT (WindowPtr)-1L -#define NIL 0L #define T_M 60 @@ -13,7 +12,6 @@ #define MOUSE_REGION 0L #define DRAG_EDGE 15 #define IN_FRONT (WindowPtr)-1L -#define NIL 0L #define DISPLAY_LEFT 23 #define DISPLAY_TOP 23 diff --git a/osx/Blades of Exile Char Editor/pc.graphics.cpp b/osx/Blades of Exile Char Editor/pc.graphics.cpp index e4701552..2f37b7ef 100644 --- a/osx/Blades of Exile Char Editor/pc.graphics.cpp +++ b/osx/Blades of Exile Char Editor/pc.graphics.cpp @@ -394,7 +394,7 @@ GWorldPtr load_pict(short picture_to_get) char debug[60]; current_pic_handle = GetPicture (picture_to_get); - if (current_pic_handle == NIL) { + if (current_pic_handle == NULL) { SysBeep(2);SysBeep(50);SysBeep(50); ExitToShell(); } diff --git a/osx/Blades of Exile Char Editor/pc.main.cpp b/osx/Blades of Exile Char Editor/pc.main.cpp index f34f02a4..93cc5948 100644 --- a/osx/Blades of Exile Char Editor/pc.main.cpp +++ b/osx/Blades of Exile Char Editor/pc.main.cpp @@ -149,7 +149,7 @@ int main(void) set_up_apple_events(); menu_bar_handle = GetNewMBar(128); - if (menu_bar_handle == NIL) { + if (menu_bar_handle == NULL) { SysBeep(2); ExitToShell(); } @@ -294,7 +294,7 @@ void Initialize(void) //error = CreateWindowFromResource(128, &mainPtr); //Rect winBounds={38,53,478,643}; //error = CreateNewWindow(kDocumentWindowClass, kWindowCloseBoxAttribute, &windRect, &mainPtr); - mainPtr = GetNewCWindow(128,NIL,IN_FRONT); + mainPtr = GetNewCWindow(128,NULL,IN_FRONT); ActivateWindow(mainPtr,true); // DrawGrowIcon(mainPtr); SetPort(GetWindowPort(mainPtr)); /* set window to current graf port */ @@ -302,7 +302,7 @@ void Initialize(void) if (stored_key == -100) { stored_key = open_pref_file(); if (stored_key == -100) { - Alert(983,NIL); + Alert(983,NULL); ExitToShell(); } }*/ @@ -465,7 +465,7 @@ void Mouse_Pressed() break; case inContent: - if ((the_window != NIL) && (FrontWindow() != the_window)) { + if ((the_window != NULL) && (FrontWindow() != the_window)) { SetPort(GetWindowPort(the_window)); SelectWindow(the_window); SetPort(GetWindowPort(the_window)); diff --git a/osx/Scenario Editor/scen.fileio.cpp b/osx/Scenario Editor/scen.fileio.cpp index 52a757cf..341a830e 100644 --- a/osx/Scenario Editor/scen.fileio.cpp +++ b/osx/Scenario Editor/scen.fileio.cpp @@ -61,12 +61,12 @@ void init_directories() { // } // error = HOpenResFile(start_volume,start_dir,"\p::::Blades of Exile Graphics",1); // if (ResError() != 0) { - // Alert(984,NIL); + // Alert(984,NULL); // ExitToShell(); // } // error = HOpenResFile(start_volume,start_dir,"\p::::Blades of Exile Sounds",1); // if (ResError() != 0) { - // Alert(984,NIL); + // Alert(984,NULL); // ExitToShell(); // } diff --git a/osx/boe.dlgutil.cpp b/osx/boe.dlgutil.cpp index fb2b16e6..ac47baa9 100644 --- a/osx/boe.dlgutil.cpp +++ b/osx/boe.dlgutil.cpp @@ -1255,7 +1255,7 @@ void load_prefs(){ // num_tries++; // // if (num_tries == 300) { -// Alert(983,NIL); +// Alert(983,NULL); // ExitToShell(); // } // } diff --git a/osx/boe.graphics.cpp b/osx/boe.graphics.cpp index 7e42e42f..3e9c1d9e 100644 --- a/osx/boe.graphics.cpp +++ b/osx/boe.graphics.cpp @@ -486,7 +486,7 @@ void fancy_startup_delay() // OK try this ... destroy and recreate window. /*DisposeWindow(mainPtr); - mainPtr = GetNewCWindow(128,NIL,IN_FRONT); + mainPtr = GetNewCWindow(128,NULL,IN_FRONT); SetPort(mainPtr); /* set window to current graf port text_sbar = NewControl(mainPtr,&sbar_rect,tit,false,58,0,58,scrollBarProc,1); item_sbar = NewControl(mainPtr,&item_sbar_rect,tit,false,0,0,16,scrollBarProc,2); @@ -1714,10 +1714,10 @@ GWorldPtr load_pict(short picture_to_get) SysBeep(50); print_nums(10,1000,x); } - if (current_pic_handle == NIL) { + if (current_pic_handle == NULL) { sprintf((char *) d_s, "Stuck on %d ",(short) picture_to_get); add_string_to_buf((char *)d_s); - Alert(1076,NIL); + Alert(1076,NULL); return NULL; } QDGetPictureBounds(current_pic_handle, &pic_rect); @@ -1735,7 +1735,7 @@ GWorldPtr load_pict(short picture_to_get) sprintf((char *) d_s, "Stuck on %d error %d ",(short) picture_to_get,check_error); add_string_to_buf((char *)d_s); print_buf(); - Alert(1076,NIL); + Alert(1076,NULL); return NULL; } diff --git a/osx/boe.items.cpp b/osx/boe.items.cpp index 2e5bc3e5..06eeda99 100644 --- a/osx/boe.items.cpp +++ b/osx/boe.items.cpp @@ -1275,7 +1275,7 @@ short choice_dialog(short pic,short num) //if (pic > 0) // put_dialog_graphic(pic,0,the_rect); - ModalDialog(NIL, &item_hit); + ModalDialog(NULL, &item_hit); DisposeDialog(select_dialog); @@ -1349,7 +1349,7 @@ DialogPtr other_make_dialog(short which) { DialogPtr store; - store = GetNewDialog (which, NIL, IN_FRONT); + store = GetNewDialog (which, NULL, IN_FRONT); if (store == NULL) { SysBeep(50); ExitToShell(); diff --git a/osx/boe.main.cpp b/osx/boe.main.cpp index 8b7f8ea0..fea56f91 100644 --- a/osx/boe.main.cpp +++ b/osx/boe.main.cpp @@ -206,7 +206,7 @@ int main(void) menu_bar_handle = GetNewMBar(128); - if (menu_bar_handle == NIL) { + if (menu_bar_handle == NULL) { SysBeep(2); SysBeep(2); SysBeep(2); ExitToShell(); } @@ -310,13 +310,13 @@ void Initialize(void) // if (stored_key == -100) { // stored_key = open_pref_file(); // if (stored_key == -100) { -// Alert(983,NIL); +// Alert(983,NULL); // ExitToShell(); // } // } load_prefs(); set_pixel_depth(); - mainPtr = GetNewCWindow(128,NIL,IN_FRONT); + mainPtr = GetNewCWindow(128,NULL,IN_FRONT); SetPortWindowPort(mainPtr); /* set window to current graf port */ text_sbar = NewControl(mainPtr,&sbar_rect,tit,false,58,0,58,scrollBarProc,1); item_sbar = NewControl(mainPtr,&item_sbar_rect,tit,false,0,0,16,scrollBarProc,2); @@ -440,7 +440,7 @@ bool handle_dialog_event() short i,item_hit; DialogPtr event_d; - if (FrontWindow() != NIL) { + if (FrontWindow() != NULL) { if (IsDialogEvent(&event)) { if (DialogSelect(&event, &event_d, &item_hit)) for (i = 0; i < 18; i++) @@ -667,7 +667,7 @@ void Mouse_Pressed() if (content_part != 0) { switch (content_part) { case kControlIndicatorPart: - content_part = TrackControl(control_hit,event.where,NIL); + content_part = TrackControl(control_hit,event.where,NULL); if (control_hit == text_sbar) if (content_part == kControlIndicatorPart) print_buf(); diff --git a/osx/tools/viewdlog.cpp b/osx/tools/viewdlog.cpp index dada0429..7b4105ab 100644 --- a/osx/tools/viewdlog.cpp +++ b/osx/tools/viewdlog.cpp @@ -35,7 +35,7 @@ int main() init_snd_tool(); // menu_bar_handle = GetNewMBar(128); -// if (menu_bar_handle == NIL) { +// if (menu_bar_handle == NULL) { // SysBeep(2); // ExitToShell(); // }