summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt5
-rw-r--r--CMakeLists.txt2
-rw-r--r--agbsum/include/agbsum.h14
-rw-r--r--agbsum/src/calc.c6
-rw-r--r--agbsum/src/chkparams.c4
-rw-r--r--agbsum/src/exit.c4
-rw-r--r--agbsum/src/help.c4
-rw-r--r--agbsum/src/initdat.c4
-rw-r--r--agbsum/src/main.c4
-rw-r--r--agbsum/src/open.c4
-rw-r--r--agbsum/src/pat.c4
-rw-r--r--agbsum/src/rd.c4
12 files changed, 32 insertions, 27 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f04e537..0f061e7 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,8 @@
+| 2
+
+- Fix indentations;
+- Remove useless constant in calc;
+
| 1
- Use typeof instead of typeof_unqual;
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecf44f9..d335924 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ cmake_minimum_required(
project(
agbsum
VERSION
- 1
+ 2
DESCRIPTION
"GBA ROM header checksum patcher."
HOMEPAGE_URL
diff --git a/agbsum/include/agbsum.h b/agbsum/include/agbsum.h
index bda07c1..368d796 100644
--- a/agbsum/include/agbsum.h
+++ b/agbsum/include/agbsum.h
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(agbsum_hdr)
@@ -19,7 +19,7 @@
#define nullptr NULL
#define typeof __typeof__
-constexpr uint_least64_t agbsum_ver = 0x1u;
+constexpr uint_least64_t agbsum_ver = 0x2u;
constexpr size_t agbsum_romstart = 0xA0u;
@@ -31,10 +31,10 @@ typedef enum {
} agbsum_stat;
extern struct {
- bool dopat;
- char const * pth;
- bool sil;
- FILE * rom;
+ bool dopat;
+ char const * pth;
+ bool sil;
+ FILE * rom;
} agbsum_dat;
unsigned char agbsum_calc( void const * rom);
diff --git a/agbsum/src/calc.c b/agbsum/src/calc.c
index c16682d..439a964 100644
--- a/agbsum/src/calc.c
+++ b/agbsum/src/calc.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
@@ -13,7 +13,7 @@
unsigned char agbsum_calc(void const * const _rom) {
unsigned char const * rom = _rom;
unsigned char chksum = 0x0u;
- for (unsigned char const * pos = rom + 0u;pos != rom + agbsum_chksumoff;++pos) {chksum += *pos;}
+ for (unsigned char const * pos = rom;pos != rom + agbsum_chksumoff;++pos) {chksum += *pos;}
chksum = -(0x19u + chksum);
return chksum;
}
diff --git a/agbsum/src/chkparams.c b/agbsum/src/chkparams.c
index 7b3f371..809616e 100644
--- a/agbsum/src/chkparams.c
+++ b/agbsum/src/chkparams.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/exit.c b/agbsum/src/exit.c
index 5cbd3bc..78a663c 100644
--- a/agbsum/src/exit.c
+++ b/agbsum/src/exit.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/help.c b/agbsum/src/help.c
index 188035d..1de3117 100644
--- a/agbsum/src/help.c
+++ b/agbsum/src/help.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/initdat.c b/agbsum/src/initdat.c
index 50ac5c3..dce165d 100644
--- a/agbsum/src/initdat.c
+++ b/agbsum/src/initdat.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/main.c b/agbsum/src/main.c
index 2398e1d..372a9c1 100644
--- a/agbsum/src/main.c
+++ b/agbsum/src/main.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/open.c b/agbsum/src/open.c
index 276001a..4a0d9d4 100644
--- a/agbsum/src/open.c
+++ b/agbsum/src/open.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/pat.c b/agbsum/src/pat.c
index 76f895d..9a84430 100644
--- a/agbsum/src/pat.c
+++ b/agbsum/src/pat.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>
diff --git a/agbsum/src/rd.c b/agbsum/src/rd.c
index 911d40e..8257e23 100644
--- a/agbsum/src/rd.c
+++ b/agbsum/src/rd.c
@@ -3,9 +3,9 @@
This program 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 of the License, or (at your option) any later version.
- This program 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.
+ This program 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.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <agbsum.h>