Skip to content

Commit

Permalink
chg: Code refactor - replace uint by unsigned int !minor
Browse files Browse the repository at this point in the history
  • Loading branch information
lcgamboa committed Feb 10, 2024
1 parent 1232db5 commit 6a9360f
Show file tree
Hide file tree
Showing 126 changed files with 662 additions and 428 deletions.
8 changes: 4 additions & 4 deletions src/boards/board_Arduino_Uno.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ void cboard_Arduino_Uno::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_Arduino_Uno::EvKeyPress(uint key, uint mask) {}
void cboard_Arduino_Uno::EvKeyPress(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_Arduino_Uno::EvKeyRelease(uint key, uint mask) {}
void cboard_Arduino_Uno::EvKeyRelease(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_Arduino_Uno::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_Arduino_Uno::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -273,7 +273,7 @@ void cboard_Arduino_Uno::EvMouseButtonPress(uint button, uint x, uint y, uint st

// Event on the board

void cboard_Arduino_Uno::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_Arduino_Uno::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down
8 changes: 4 additions & 4 deletions src/boards/board_Arduino_Uno.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ class cboard_Arduino_Uno : public bsim_simavr {
// Reset board status
void Reset(void) override;
// Event on the board
void EvMouseButtonPress(uint button, uint x, uint y, uint state) override;
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override;
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvKeyPress(uint key, uint mask) override;
void EvKeyPress(unsigned int key, unsigned int mask) override;
// Event on the board
void EvKeyRelease(uint key, uint mask) override;
void EvKeyRelease(unsigned int key, unsigned int mask) override;
// Called ever 1s to refresh status
void RefreshStatus(void) override;
// Called to save board preferences in configuration file
Expand Down
8 changes: 4 additions & 4 deletions src/boards/board_Blue_Pill.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,15 +333,15 @@ void cboard_Blue_Pill::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_Blue_Pill::EvKeyPress(uint key, uint mask) {}
void cboard_Blue_Pill::EvKeyPress(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_Blue_Pill::EvKeyRelease(uint key, uint mask) {}
void cboard_Blue_Pill::EvKeyRelease(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_Blue_Pill::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_Blue_Pill::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -383,7 +383,7 @@ void cboard_Blue_Pill::EvMouseButtonPress(uint button, uint x, uint y, uint stat

// Event on the board

void cboard_Blue_Pill::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_Blue_Pill::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down
8 changes: 4 additions & 4 deletions src/boards/board_Blue_Pill.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ class cboard_Blue_Pill : public bsim_qemu {
// Reset board status
void Reset(void) override;
// Event on the board
void EvMouseButtonPress(uint button, uint x, uint y, uint state) override;
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override;
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvKeyPress(uint key, uint mask) override;
void EvKeyPress(unsigned int key, unsigned int mask) override;
// Event on the board
void EvKeyRelease(uint key, uint mask) override;
void EvKeyRelease(unsigned int key, unsigned int mask) override;
// Called ever 1s to refresh status
void RefreshStatus(void) override;
// Called to save board preferences in configuration file
Expand Down
8 changes: 4 additions & 4 deletions src/boards/board_Breadboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@ void cboard_Breadboard::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_Breadboard::EvKeyPress(uint key, uint mask) {}
void cboard_Breadboard::EvKeyPress(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_Breadboard::EvKeyRelease(uint key, uint mask) {}
void cboard_Breadboard::EvKeyRelease(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_Breadboard::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_Breadboard::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -296,7 +296,7 @@ void cboard_Breadboard::EvMouseButtonPress(uint button, uint x, uint y, uint sta

// Event on the board

void cboard_Breadboard::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_Breadboard::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down
8 changes: 4 additions & 4 deletions src/boards/board_Breadboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ class cboard_Breadboard : public bsim_picsim, public bsim_simavr {
// Reset board status
void Reset(void) override;
// Event on the board
void EvMouseButtonPress(uint button, uint x, uint y, uint state) override;
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override;
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvKeyPress(uint key, uint mask) override;
void EvKeyPress(unsigned int key, unsigned int mask) override;
// Event on the board
void EvKeyRelease(uint key, uint mask) override;
void EvKeyRelease(unsigned int key, unsigned int mask) override;
// Called ever 1s to refresh status
void RefreshStatus(void) override;
// Called to save board preferences in configuration file
Expand Down
11 changes: 6 additions & 5 deletions src/boards/board_C3_DevKitC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,15 @@ void cboard_C3_DevKitC::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_C3_DevKitC::EvKeyPress(uint key, uint mask) {}
void cboard_C3_DevKitC::EvKeyPress(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_C3_DevKitC::EvKeyRelease(uint key, uint mask) {}
void cboard_C3_DevKitC::EvKeyRelease(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_C3_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_C3_DevKitC::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -427,7 +427,7 @@ void cboard_C3_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint sta

// Event on the board

void cboard_C3_DevKitC::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_C3_DevKitC::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -662,7 +662,8 @@ void cboard_C3_DevKitC::BoardOptions(int* argc, char** argv) {
}
}

void cboard_C3_DevKitC::board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) {
void cboard_C3_DevKitC::board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y,
unsigned int state) {
if (!strcmp(controlname, "b_button2")) {
std::string fname = PICSimLab.GetSharePath() +
"boards"
Expand Down
11 changes: 6 additions & 5 deletions src/boards/board_C3_DevKitC.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class cboard_C3_DevKitC : public bsim_qemu {
// Reset board status
void Reset(void) override;
// Event on the board
void EvMouseButtonPress(uint button, uint x, uint y, uint state) override;
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override;
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvKeyPress(uint key, uint mask) override;
void EvKeyPress(unsigned int key, unsigned int mask) override;
// Event on the board
void EvKeyRelease(uint key, uint mask) override;
void EvKeyRelease(unsigned int key, unsigned int mask) override;
// Called ever 1s to refresh status
void RefreshStatus(void) override;
// Called to save board preferences in configuration file
Expand All @@ -80,7 +80,8 @@ class cboard_C3_DevKitC : public bsim_qemu {
unsigned short GetOutputId(char* name) override;
// board combo events
void board_Event(const char* controlname) override;
void board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) override;
void board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y,
unsigned int state) override;
void MSetAPin(int pin, float value) override;
std::string MGetPinName(int pin) override;
int MGetPinCount(void) override;
Expand Down
10 changes: 5 additions & 5 deletions src/boards/board_Curiosity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void cboard_Curiosity::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_Curiosity::EvKeyPress(uint key, uint mask) {
void cboard_Curiosity::EvKeyPress(unsigned int key, unsigned int mask) {
// if keyboard key 1 is pressed then activate button (state=0)
if (key == '1') {
p_BT1 = 0;
Expand All @@ -247,7 +247,7 @@ void cboard_Curiosity::EvKeyPress(uint key, uint mask) {

// Event on the board

void cboard_Curiosity::EvKeyRelease(uint key, uint mask) {
void cboard_Curiosity::EvKeyRelease(unsigned int key, unsigned int mask) {
// if keyboard key 1 is pressed then deactivate button (state=1)
if (key == '1') {
p_BT1 = 1;
Expand All @@ -256,7 +256,7 @@ void cboard_Curiosity::EvKeyRelease(uint key, uint mask) {

// Event on the board

void cboard_Curiosity::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_Curiosity::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -307,7 +307,7 @@ void cboard_Curiosity::EvMouseButtonPress(uint button, uint x, uint y, uint stat
}
}

void cboard_Curiosity::EvMouseMove(uint button, uint x, uint y, uint state) {
void cboard_Curiosity::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

for (i = 0; i < inputc; i++) {
Expand All @@ -327,7 +327,7 @@ void cboard_Curiosity::EvMouseMove(uint button, uint x, uint y, uint state) {

// Event on the board

void cboard_Curiosity::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_Curiosity::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down
10 changes: 5 additions & 5 deletions src/boards/board_Curiosity.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ class cboard_Curiosity : public bsim_picsim {
// Reset board status
void Reset(void) override;
// Event on the board
void EvMouseButtonPress(uint button, uint x, uint y, uint state) override;
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override;
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseMove(uint button, uint x, uint y, uint state) override;
void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvKeyPress(uint key, uint mask) override;
void EvKeyPress(unsigned int key, unsigned int mask) override;
// Event on the board
void EvKeyRelease(uint key, uint mask) override;
void EvKeyRelease(unsigned int key, unsigned int mask) override;
// Called ever 1s to refresh status
void RefreshStatus(void) override;
// Called to save board preferences in configuration file
Expand Down
11 changes: 6 additions & 5 deletions src/boards/board_Curiosity_HPC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void cboard_Curiosity_HPC::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_Curiosity_HPC::EvKeyPress(uint key, uint mask) {
void cboard_Curiosity_HPC::EvKeyPress(unsigned int key, unsigned int mask) {
// if keyboard key 1 is pressed then activate button (state=0)
if (key == '1') {
p_BT[0] = 0;
Expand All @@ -315,7 +315,7 @@ void cboard_Curiosity_HPC::EvKeyPress(uint key, uint mask) {

// Event on the board

void cboard_Curiosity_HPC::EvKeyRelease(uint key, uint mask) {
void cboard_Curiosity_HPC::EvKeyRelease(unsigned int key, unsigned int mask) {
// if keyboard key 1 is pressed then desactivate button (state=1)
if (key == '1') {
p_BT[0] = 1;
Expand All @@ -327,7 +327,7 @@ void cboard_Curiosity_HPC::EvKeyRelease(uint key, uint mask) {

// Event on the board

void cboard_Curiosity_HPC::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_Curiosity_HPC::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -383,7 +383,7 @@ void cboard_Curiosity_HPC::EvMouseButtonPress(uint button, uint x, uint y, uint
}
}

void cboard_Curiosity_HPC::EvMouseMove(uint button, uint x, uint y, uint state) {
void cboard_Curiosity_HPC::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

for (i = 0; i < inputc; i++) {
Expand All @@ -403,7 +403,8 @@ void cboard_Curiosity_HPC::EvMouseMove(uint button, uint x, uint y, uint state)

// Event on the board

void cboard_Curiosity_HPC::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_Curiosity_HPC::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y,
unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down
10 changes: 5 additions & 5 deletions src/boards/board_Curiosity_HPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ class cboard_Curiosity_HPC : public bsim_picsim {
// Reset board status
void Reset(void) override;
// Event on the board
void EvMouseButtonPress(uint button, uint x, uint y, uint state) override;
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override;
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvMouseMove(uint button, uint x, uint y, uint state) override;
void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
// Event on the board
void EvKeyPress(uint key, uint mask) override;
void EvKeyPress(unsigned int key, unsigned int mask) override;
// Event on the board
void EvKeyRelease(uint key, uint mask) override;
void EvKeyRelease(unsigned int key, unsigned int mask) override;
// Called ever 1s to refresh status
void RefreshStatus(void) override;
// Called to save board preferences in configuration file
Expand Down
11 changes: 6 additions & 5 deletions src/boards/board_DevKitC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,15 @@ void cboard_DevKitC::ReadPreferences(char* name, char* value) {

// Event on the board

void cboard_DevKitC::EvKeyPress(uint key, uint mask) {}
void cboard_DevKitC::EvKeyPress(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_DevKitC::EvKeyRelease(uint key, uint mask) {}
void cboard_DevKitC::EvKeyRelease(unsigned int key, unsigned int mask) {}

// Event on the board

void cboard_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint state) {
void cboard_DevKitC::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -486,7 +486,7 @@ void cboard_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint state)

// Event on the board

void cboard_DevKitC::EvMouseButtonRelease(uint button, uint x, uint y, uint state) {
void cboard_DevKitC::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) {
int i;

// search for the input area which owner the event
Expand Down Expand Up @@ -720,7 +720,8 @@ void cboard_DevKitC::BoardOptions(int* argc, char** argv) {
}
}

void cboard_DevKitC::board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) {
void cboard_DevKitC::board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y,
unsigned int state) {
if (!strcmp(controlname, "b_button2")) {
std::string fname = PICSimLab.GetSharePath() +
"boards"
Expand Down
Loading

0 comments on commit 6a9360f

Please sign in to comment.