From 4eaf68d414c4adf0c2fd7b8746d9e6c9462d2464 Mon Sep 17 00:00:00 2001 From: David Hogan Date: Sat, 11 Dec 2021 11:30:21 +1100 Subject: [PATCH 01/11] Automated Github pull request build and test --- .github/workflows/build-on-pull-request.yml | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/build-on-pull-request.yml diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml new file mode 100644 index 000000000..53f79fef4 --- /dev/null +++ b/.github/workflows/build-on-pull-request.yml @@ -0,0 +1,56 @@ +name: Build Pull Request +on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_linux: + name: Build and Test (Linux) + runs-on: ubuntu-latest + + steps: + - shell: bash + run: git config --global core.autocrlf input + + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Install Dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass + + - name: Build + id: build + shell: bash + run: | + make -j2 bin USER_CFLAGS=-Werror + make -j2 lib QUIET=1 + make test QUIET=1 + make -j2 samples + make -C src clean + make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- + make -C samples clean + make -j2 doc zip + + build_windows: + name: Build (Windows) + runs-on: windows-latest + + steps: + - shell: bash + run: git config --global core.autocrlf input + + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build app (debug) + run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug + + - name: Build app (release) + run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release From a39c23f7960c1909e452e8f59257c178d93822fb Mon Sep 17 00:00:00 2001 From: David Hogan Date: Sat, 11 Dec 2021 13:53:53 +1100 Subject: [PATCH 02/11] Snapshot build on push master. For now, the snapshot zip can be obtained from the latest successful snapshot build at: https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml TODO: Update docs at https://github.com/cc65/doc TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io --- .github/workflows/snapshot-on-push-master.yml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/snapshot-on-push-master.yml diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml new file mode 100644 index 000000000..aefc7f2f5 --- /dev/null +++ b/.github/workflows/snapshot-on-push-master.yml @@ -0,0 +1,69 @@ +name: Snapshot Build +on: + push: + branches: + master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_windows: + name: Build (Windows) + runs-on: windows-latest + + steps: + - shell: bash + run: git config --global core.autocrlf input + + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build app (debug) + run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug + + - name: Build app (release) + run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release + + build_linux: + name: Build, Test and Snaphot (Linux) + runs-on: ubuntu-latest + needs: build_windows + + steps: + - shell: bash + run: git config --global core.autocrlf input + + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Install Dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass + + - name: Build + id: build + shell: bash + run: | + make -j2 bin USER_CFLAGS=-Werror + make -j2 lib QUIET=1 + make test QUIET=1 + make -j2 samples + make -C src clean + make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- + make -C samples clean + make -j2 doc zip + + - name: Upload Snapshot Zip + uses: actions/upload-artifact@v2 + with: + name: cc65-snapshot-win32.zip + path: cc65.zip + + # TODO: Update docs at https://github.com/cc65/doc + # TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io From bd94879be21719356b4f987c8d9c1dfeccf3bf32 Mon Sep 17 00:00:00 2001 From: dqh-github Date: Sat, 11 Dec 2021 15:28:29 +1100 Subject: [PATCH 03/11] Re-added build status badge (Github Actions is now doing a snapshot build and test for updates to the master branch) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f6142e2c1..33c7d2830 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ [Wiki](https://github.com/cc65/wiki/wiki) +[![Snapshot Build](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml/badge.svg?branch=master)](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml) + cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools. From b35a9d97a6953cb13a7215c369ff3b66ef440287 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 12 Dec 2021 23:41:19 +0100 Subject: [PATCH 04/11] Updated URL and improved consistency. --- doc/apple2.sgml | 4 ++-- doc/apple2enh.sgml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/apple2.sgml b/doc/apple2.sgml index bd01b68dc..cf83dacc9 100644 --- a/doc/apple2.sgml +++ b/doc/apple2.sgml @@ -33,7 +33,7 @@ more information. The standard binary file format generated by the linker for the Apple ][ target is an file. +url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file. The default load address is $803. , but uses the heap either explicitly or implicitly (i.e. by loading a driver) then -the memory from $800 to $2000 can be added to the heap by calling +the memory from $800 to $1FFF can be added to the heap by calling file. +url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file. The default load address is $803. , but uses the heap either explicitly or implicitly (i.e. by loading a driver) then -the memory from $800 to $2000 can be added to the heap by calling +the memory from $800 to $1FFF can be added to the heap by calling Date: Sun, 12 Dec 2021 12:27:55 -0500 Subject: [PATCH 05/11] Changed a big script into separate named steps. It makes the job log easier to navigate. Also, Pull Requests don't need a Zip file. --- .github/workflows/build-on-pull-request.yml | 37 ++++++++------ .github/workflows/snapshot-on-push-master.yml | 48 ++++++++++++------- 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 53f79fef4..da9216a3d 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -1,6 +1,6 @@ name: Build Pull Request on: [pull_request] -concurrency: +concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -8,11 +8,11 @@ jobs: build_linux: name: Build and Test (Linux) runs-on: ubuntu-latest - + steps: - shell: bash run: git config --global core.autocrlf input - + - name: Checkout Source uses: actions/checkout@v2 @@ -21,28 +21,35 @@ jobs: run: | sudo apt-get update sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass - - - name: Build - id: build + + - name: Build the tools. shell: bash + run: make -j2 bin USER_CFLAGS=-Werror + - name: Build the platform libraries. + shell: bash + run: make -j2 lib QUIET=1 + - name: Run the regression tests. + shell: bash + run: make test QUIET=1 + - name: Test that the samples can be built. + shell: bash + run: make -j2 samples + - name: Build the document files. + shell: bash + run: make -j2 doc + - name: Build 32-bit Windows versions of the tools. run: | - make -j2 bin USER_CFLAGS=-Werror - make -j2 lib QUIET=1 - make test QUIET=1 - make -j2 samples make -C src clean make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- - make -C samples clean - make -j2 doc zip build_windows: name: Build (Windows) runs-on: windows-latest - + steps: - shell: bash run: git config --global core.autocrlf input - + - name: Checkout Source uses: actions/checkout@v2 @@ -51,6 +58,6 @@ jobs: - name: Build app (debug) run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug - + - name: Build app (release) run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index aefc7f2f5..e10904357 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -1,9 +1,9 @@ -name: Snapshot Build +name: Snapshot Build on: push: branches: master -concurrency: +concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -11,11 +11,11 @@ jobs: build_windows: name: Build (Windows) runs-on: windows-latest - + steps: - shell: bash run: git config --global core.autocrlf input - + - name: Checkout Source uses: actions/checkout@v2 @@ -24,7 +24,7 @@ jobs: - name: Build app (debug) run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug - + - name: Build app (release) run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release @@ -32,11 +32,11 @@ jobs: name: Build, Test and Snaphot (Linux) runs-on: ubuntu-latest needs: build_windows - + steps: - shell: bash run: git config --global core.autocrlf input - + - name: Checkout Source uses: actions/checkout@v2 @@ -45,25 +45,37 @@ jobs: run: | sudo apt-get update sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass - - - name: Build - id: build + + - name: Build the tools. shell: bash + run: make -j2 bin USER_CFLAGS=-Werror + - name: Build the platform libraries. + shell: bash + run: make -j2 lib QUIET=1 + - name: Run the regression tests. + shell: bash + run: make test QUIET=1 + - name: Test that the samples can be built. + shell: bash + run: make -j2 samples + - name: Remove the output from the samples tests. + shell: bash + run: make -C samples clean + - name: Build the document files. + shell: bash + run: make -j2 doc + - name: Build and package 32-bit Windows versions of the tools. run: | - make -j2 bin USER_CFLAGS=-Werror - make -j2 lib QUIET=1 - make test QUIET=1 - make -j2 samples make -C src clean make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- - make -C samples clean - make -j2 doc zip - + make zip + mv cc65.zip cc65-win32.zip + - name: Upload Snapshot Zip uses: actions/upload-artifact@v2 with: name: cc65-snapshot-win32.zip - path: cc65.zip + path: cc65-win32.zip # TODO: Update docs at https://github.com/cc65/doc # TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io From 33cf8608b752c810d39141bb73373fea7647aeec Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 12 Dec 2021 12:35:27 -0500 Subject: [PATCH 06/11] Removed unneeded package names. sshpass isn't needed because the Windows packages are put on Github. linuxdoc-tools is a dependency of linuxdoc-tools-info. The binutils package is a dependency of the gcc package. --- .github/workflows/build-on-pull-request.yml | 2 +- .github/workflows/snapshot-on-push-master.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index da9216a3d..c3214c308 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -20,7 +20,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass + sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-i686 - name: Build the tools. shell: bash diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index e10904357..3f138e492 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -44,7 +44,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass + sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-i686 - name: Build the tools. shell: bash From 366701e066b17bda85320f8e311f71a8dfad2834 Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 12 Dec 2021 13:42:25 -0500 Subject: [PATCH 07/11] Added a 64-bit Windows cross-compile. That compiler catches pointer-integer width mismatches that other compilers ignore. --- .github/workflows/build-on-pull-request.yml | 6 +++--- .github/workflows/snapshot-on-push-master.yml | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index c3214c308..fe99c4673 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -20,7 +20,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-i686 + sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 - name: Build the tools. shell: bash @@ -37,10 +37,10 @@ jobs: - name: Build the document files. shell: bash run: make -j2 doc - - name: Build 32-bit Windows versions of the tools. + - name: Build 64-bit Windows versions of the tools. run: | make -C src clean - make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- + make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32- build_windows: name: Build (Windows) diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index 3f138e492..c8d36488d 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -44,7 +44,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-i686 + sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 - name: Build the tools. shell: bash @@ -64,6 +64,12 @@ jobs: - name: Build the document files. shell: bash run: make -j2 doc + - name: Build and package 64-bit Windows versions of the tools. + run: | + make -C src clean + make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32- + make zip + mv cc65.zip cc65-win64.zip - name: Build and package 32-bit Windows versions of the tools. run: | make -C src clean @@ -71,11 +77,16 @@ jobs: make zip mv cc65.zip cc65-win32.zip - - name: Upload Snapshot Zip + - name: Upload a 32-bit Snapshot Zip uses: actions/upload-artifact@v2 with: name: cc65-snapshot-win32.zip path: cc65-win32.zip + - name: Upload a 64-bit Snapshot Zip + uses: actions/upload-artifact@v2 + with: + name: cc65-snapshot-win64.zip + path: cc65-win64.zip # TODO: Update docs at https://github.com/cc65/doc # TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io From 325ff9667e924dd80acb24983791d7aa24cd2dad Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 12 Dec 2021 17:36:03 -0500 Subject: [PATCH 08/11] Used (size_t), instead of (long) where converting between pointers and integers. (long) still is 32 bits on 64-bit Windows! --- src/cc65/locals.c | 2 +- src/cc65/symentry.h | 2 +- src/cc65/symtab.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cc65/locals.c b/src/cc65/locals.c index c2e314485..d3902f329 100644 --- a/src/cc65/locals.c +++ b/src/cc65/locals.c @@ -286,7 +286,7 @@ static void ParseAutoDecl (Declaration* Decl) ** We abuse the Collection somewhat by using it to store line ** numbers. */ - CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(long)GetCurrentLine (), + CollReplace (&CurrentFunc->LocalsBlockStack, (void *)(size_t)GetCurrentLine (), CollCount (&CurrentFunc->LocalsBlockStack) - 1); } else { diff --git a/src/cc65/symentry.h b/src/cc65/symentry.h index bb87c7472..bcf586510 100644 --- a/src/cc65/symentry.h +++ b/src/cc65/symentry.h @@ -115,7 +115,7 @@ struct CodeEntry; typedef struct DefOrRef DefOrRef; struct DefOrRef { unsigned Line; - long LocalsBlockId; + size_t LocalsBlockId; unsigned Flags; int StackPtr; unsigned Depth; diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index 5d7bd1436..3de0bb460 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -951,7 +951,7 @@ DefOrRef* AddDefOrRef (SymEntry* E, unsigned Flags) DOR = xmalloc (sizeof (DefOrRef)); CollAppend (E->V.L.DefsOrRefs, DOR); DOR->Line = GetCurrentLine (); - DOR->LocalsBlockId = (long)CollLast (&CurrentFunc->LocalsBlockStack); + DOR->LocalsBlockId = (size_t)CollLast (&CurrentFunc->LocalsBlockStack); DOR->Flags = Flags; DOR->StackPtr = StackPtr; DOR->Depth = CollCount (&CurrentFunc->LocalsBlockStack); @@ -1013,9 +1013,9 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags) /* Are we jumping into a block with initalization of an object that ** has automatic storage duration? Let's emit a warning. */ - if ((long)CollLast (AIC) != DOR->LocalsBlockId && + if ((size_t)CollLast (AIC) != DOR->LocalsBlockId && (CollCount (AIC) < DOR->Depth || - (long)CollAt (AIC, DOR->Depth - 1) != DOR->LocalsBlockId)) { + (size_t)CollAt (AIC, DOR->Depth - 1) != DOR->LocalsBlockId)) { Warning ("Goto at line %d to label %s jumps into a block with " "initialization of an object that has automatic storage duration", GetCurrentLine (), Name); @@ -1044,9 +1044,9 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags) /* Are we jumping into a block with initalization of an object that ** has automatic storage duration? Let's emit a warning. */ - if ((long)CollLast (AIC) != DOR->LocalsBlockId && + if ((size_t)CollLast (AIC) != DOR->LocalsBlockId && (CollCount (AIC) >= DOR->Depth || - (long)CollLast (AIC) >= (long)DOR->Line)) + (size_t)CollLast (AIC) >= (size_t)DOR->Line)) Warning ("Goto at line %d to label %s jumps into a block with " "initialization of an object that has automatic storage duration", DOR->Line, Name); From 230f4d3807a99c6037c73ac7a5cd7e5c8deb8766 Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 12 Dec 2021 23:54:17 -0500 Subject: [PATCH 09/11] Install system packages before checking out the repo. --- .github/workflows/build-on-pull-request.yml | 11 +++++------ .github/workflows/snapshot-on-push-master.yml | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index fe99c4673..f5477d191 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -10,18 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - - shell: bash - run: git config --global core.autocrlf input - - - name: Checkout Source - uses: actions/checkout@v2 - - name: Install Dependencies shell: bash run: | sudo apt-get update sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 + - shell: bash + run: git config --global core.autocrlf input + - name: Checkout Source + uses: actions/checkout@v2 + - name: Build the tools. shell: bash run: make -j2 bin USER_CFLAGS=-Werror diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index c8d36488d..110edbbf0 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -34,18 +34,17 @@ jobs: needs: build_windows steps: - - shell: bash - run: git config --global core.autocrlf input - - - name: Checkout Source - uses: actions/checkout@v2 - - name: Install Dependencies shell: bash run: | sudo apt-get update sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 + - shell: bash + run: git config --global core.autocrlf input + - name: Checkout Source + uses: actions/checkout@v2 + - name: Build the tools. shell: bash run: make -j2 bin USER_CFLAGS=-Werror From 9e9b3dbacad05c1ee39e8246ba7f0cacfc43e4f6 Mon Sep 17 00:00:00 2001 From: polluks2 <74630735+polluks2@users.noreply.github.com> Date: Mon, 13 Dec 2021 17:14:57 +0100 Subject: [PATCH 10/11] Fixed typo --- src/ld65/scanner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ld65/scanner.c b/src/ld65/scanner.c index 256d47f07..718951aa5 100644 --- a/src/ld65/scanner.c +++ b/src/ld65/scanner.c @@ -196,7 +196,7 @@ static void StrVal (void) default: CfgWarning (&CfgErrorPos, - "Unkown escape sequence '%%%c'", C); + "Unknown escape sequence '%%%c'", C); SB_AppendChar (&CfgSVal, '%'); SB_AppendChar (&CfgSVal, C); NextChar (); From 1d3318c2476b99c76a7990fe8ec23438a116c6da Mon Sep 17 00:00:00 2001 From: polluks2 <74630735+polluks2@users.noreply.github.com> Date: Mon, 13 Dec 2021 17:20:56 +0100 Subject: [PATCH 11/11] Fixed many typos --- src/dbginfo/dbginfo.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/dbginfo/dbginfo.c b/src/dbginfo/dbginfo.c index 42001ed07..fdebe6910 100644 --- a/src/dbginfo/dbginfo.c +++ b/src/dbginfo/dbginfo.c @@ -183,7 +183,7 @@ typedef struct DbgInfo DbgInfo; struct DbgInfo { /* First we have all items in collections sorted by id. The ids are - ** continous, so an access by id is almost as cheap as an array access. + ** continuous, so an access by id is almost as cheap as an array access. ** The collections are also used when the objects are deleted, so they're ** actually the ones that "own" the items. */ @@ -680,7 +680,7 @@ static char* SB_StrDup (const StrBuf* B) static Collection* CollInit (Collection* C) /* Initialize a collection and return it. */ { - /* Intialize the fields. */ + /* Initialize the fields. */ C->Count = 0; C->Size = 0; C->Items = 0; @@ -1349,7 +1349,7 @@ static int CompareFileInfoByName (const void* L, const void* R) static LibInfo* NewLibInfo (const StrBuf* Name) -/* Create a new LibInfo struct, intialize and return it */ +/* Create a new LibInfo struct, initialize and return it */ { /* Allocate memory */ LibInfo* L = xmalloc (sizeof (LibInfo) + SB_GetLen (Name)); @@ -1463,7 +1463,7 @@ static int CompareLineInfoByLine (const void* L, const void* R) static ModInfo* NewModInfo (const StrBuf* Name) -/* Create a new ModInfo struct, intialize and return it */ +/* Create a new ModInfo struct, initialize and return it */ { /* Allocate memory */ ModInfo* M = xmalloc (sizeof (ModInfo) + SB_GetLen (Name)); @@ -1536,7 +1536,7 @@ static int CompareModInfoByName (const void* L, const void* R) static ScopeInfo* NewScopeInfo (const StrBuf* Name) -/* Create a new ScopeInfo struct, intialize and return it */ +/* Create a new ScopeInfo struct, initialize and return it */ { /* Allocate memory */ ScopeInfo* S = xmalloc (sizeof (ScopeInfo) + SB_GetLen (Name)); @@ -1697,7 +1697,7 @@ static int CompareSegInfoByName (const void* L, const void* R) static SpanInfo* NewSpanInfo (void) -/* Create a new SpanInfo struct, intialize and return it */ +/* Create a new SpanInfo struct, initialize and return it */ { /* Allocate memory */ SpanInfo* S = xmalloc (sizeof (SpanInfo)); @@ -1779,7 +1779,7 @@ static int CompareSpanInfoByAddr (const void* L, const void* R) static SymInfo* NewSymInfo (const StrBuf* Name) -/* Create a new SymInfo struct, intialize and return it */ +/* Create a new SymInfo struct, initialize and return it */ { /* Allocate memory */ SymInfo* S = xmalloc (sizeof (SymInfo) + SB_GetLen (Name)); @@ -2147,7 +2147,7 @@ static TypeInfo* ParseTypeString (InputData* D, StrBuf* Type) I += GT_GET_SIZE (A[I]) + 1; } else { /* Unknown type in type string */ - ParseError (D, CC65_ERROR, "Unkown type in type value"); + ParseError (D, CC65_ERROR, "Unknown type in type value"); return 0; } break; @@ -2733,7 +2733,7 @@ static int StrConstFollows (InputData* D) static int Consume (InputData* D, Token Tok, const char* Name) -/* Check for a token and consume it. Return true if the token was comsumed, +/* Check for a token and consume it. Return true if the token was consumed, ** return false otherwise. */ { @@ -6936,7 +6936,7 @@ const cc65_scopeinfo* cc65_scope_byspan (cc65_dbginfo Handle, unsigned SpanId) const cc65_scopeinfo* cc65_childscopes_byid (cc65_dbginfo Handle, unsigned Id) /* Return the direct child scopes of a scope with a given id. The function ** returns NULL if no scope with this id was found, otherwise a list of the -** direct childs. +** direct children. */ { const DbgInfo* Info;