Update copyright year

This commit is contained in:
Terence Boldt 2023-01-03 16:39:07 -05:00
parent 299ce37ba4
commit 4e2be7dbb5
18 changed files with 63 additions and 40 deletions

View File

@ -8,11 +8,10 @@ Being a work in progress, be warned that this code is likely to corrupt drive im
There are binaries [here](https://github.com/tjboldt/ProDOS-Utilities/releases/latest)
## Current TODO list
1. Allow > 128 KB file support
2. Create/Delete directories
3. Add file/directory tests
4. Add rename
5. Add in-place file/directory moves
1. Create/Delete directories
2. Add file/directory tests
3. Add rename
4. Add in-place file/directory moves
## Example commands and output

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
@ -17,7 +17,7 @@ import (
"github.com/tjboldt/ProDOS-Utilities/prodos"
)
const version = "0.4.1"
const version = "0.4.2"
func main() {
var fileName string

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,3 +1,9 @@
// Copyright Terence J. Boldt (c)2022-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
// This file provides tests for conversion between BASIC and text
package prodos
import (

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,3 +1,10 @@
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
// This file provides tests for access to volum bitmap on
// a ProDOS drive image
package prodos
import (

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
@ -257,23 +257,21 @@ func getBlocklist(reader io.ReaderAt, fileEntry FileEntry, dataOnly bool) ([]int
return blocks, nil
case StorageTree:
dataBlocks := make([]int, fileEntry.BlocksUsed)
indexBlocks := make([]int, fileEntry.BlocksUsed/256+1)
masterIndex, err := ReadBlock(reader, fileEntry.KeyPointer)
if err != nil {
return nil, err
}
blockOffset := 0
if !dataOnly {
blocks[0] = fileEntry.KeyPointer
blockOffset = 1
}
indexBlocks[0] = fileEntry.KeyPointer
indexBlockCount := 1
for i := 0; i < 128; i++ {
indexBlock := int(masterIndex[i]) + int(masterIndex[i+256])*256
if indexBlock == 0 {
break
}
if !dataOnly {
blockOffset++
}
indexBlocks[indexBlockCount] = indexBlock
indexBlockCount++
index, err := ReadBlock(reader, indexBlock)
if err != nil {
return nil, err
@ -290,7 +288,7 @@ func getBlocklist(reader io.ReaderAt, fileEntry FileEntry, dataOnly bool) ([]int
return dataBlocks, nil
}
blocks = append(blocks[blockOffset:], dataBlocks...)
blocks = append(indexBlocks, dataBlocks...)
return blocks, nil
}

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,3 +1,9 @@
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
// This file provides tests for access to format a ProDOS drive image
package prodos
import (

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2022
// Copyright Terence J. Boldt (c)2022-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
@ -30,7 +30,7 @@ func AddFilesFromHostDirectory(
return err
}
if !file.IsDir() && info.Size() > 0 && info.Size() <= 0x20000 {
if !file.IsDir() && info.Size() > 0 && info.Size() <= 0x1000000 {
err = WriteFileFromFile(readerWriter, "", 0, 0, filepath.Join(directory, file.Name()))
if err != nil {
return err

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
@ -11,19 +11,20 @@ import (
)
// DateTimeToProDOS converts Time to ProDOS date time
// 49041 ($BF91) 49040 ($BF90)
//
// 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
// DATE: | year | month | day |
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
// 49041 ($BF91) 49040 ($BF90)
//
// 49043 ($BF93) 49042 ($BF92)
// 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
// DATE: | year | month | day |
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
//
// 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
// TIME: | hour | | minute |
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
// 49043 ($BF93) 49042 ($BF92)
//
// 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
// TIME: | hour | | minute |
// +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
func DateTimeToProDOS(dateTime time.Time) []byte {
year := dateTime.Year() % 100
month := dateTime.Month()

View File

@ -1,3 +1,9 @@
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
// This file provides tests for conversion to and from ProDOS time format
package prodos
import (

View File

@ -1,4 +1,4 @@
// Copyright Terence J. Boldt (c)2021-2022
// Copyright Terence J. Boldt (c)2021-2023
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
@ -14,7 +14,7 @@ func printReadme() {
fmt.Println(`
MIT License
Copyright (c)2021-2022 Terence Boldt
Copyright (c)2021-2023 Terence Boldt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal