mirror of
https://github.com/rwinkhart/cmutton.git
synced 2026-08-28 21:06:48 -04:00
Sync with latest libmutton development version
This commit is contained in:
@@ -94,8 +94,7 @@ int main() {
|
||||
- [X] DecryptFileToSlice(realPath string) ([]string, error)
|
||||
- [X] EncryptBytes(decBytes []byte) []byte
|
||||
- [X] ~~RCWDArgument()~~ (RCWD not supported)
|
||||
- [ ] global
|
||||
- [ ] Address TODOs
|
||||
- [X] global
|
||||
- [X] ~~VAR (CB func): GetPassword~~ (RCWD not supported)
|
||||
- [X] DirInit(preserveOldCfgDir bool) (string, error)
|
||||
- [X] ~~GenDeviceIDList() ([]fs.DirEntry, error)~~ (not for use outside of libmutton)
|
||||
|
||||
@@ -7,12 +7,10 @@ import (
|
||||
"github.com/rwinkhart/libmutton/global"
|
||||
)
|
||||
|
||||
// TODO Use a nil pointer for blank deviceIDs, not FSMisc (requires changes to libmutton)
|
||||
|
||||
// DirInit returns:
|
||||
// r0: err
|
||||
//
|
||||
// r1: oldDeviceID (FSMisc if none)
|
||||
// r1: oldDeviceID (nil w/-1 length if none present)
|
||||
//
|
||||
//export DirInit
|
||||
func DirInit(preserveOldCfgDir bool) (*C.char, C.PascalString) {
|
||||
@@ -20,13 +18,16 @@ func DirInit(preserveOldCfgDir bool) (*C.char, C.PascalString) {
|
||||
if err != nil {
|
||||
return C.CString(err.Error()), C.PascalString{data: nil, len: 0}
|
||||
}
|
||||
return nil, getPascalString(oldDeviceID)
|
||||
if oldDeviceID != nil {
|
||||
return nil, getPascalString(*oldDeviceID)
|
||||
}
|
||||
return nil, C.PascalString{data: nil, len: -1}
|
||||
}
|
||||
|
||||
// GetCurrentDeviceID returns:
|
||||
// r0: err
|
||||
//
|
||||
// r1: currentDeviceID (FSMisc if none)
|
||||
// r1: currentDeviceID (nil w/-1 length if none present)
|
||||
//
|
||||
//export GetCurrentDeviceID
|
||||
func GetCurrentDeviceID() (*C.char, C.PascalString) {
|
||||
@@ -34,7 +35,10 @@ func GetCurrentDeviceID() (*C.char, C.PascalString) {
|
||||
if err != nil {
|
||||
return C.CString(err.Error()), C.PascalString{data: nil, len: 0}
|
||||
}
|
||||
return nil, getPascalString(currentDeviceID)
|
||||
if currentDeviceID != nil {
|
||||
return nil, getPascalString(*currentDeviceID)
|
||||
}
|
||||
return nil, C.PascalString{data: nil, len: -1}
|
||||
}
|
||||
|
||||
// GetRealAgePath returns:
|
||||
|
||||
@@ -3,7 +3,7 @@ module cmutton
|
||||
go 1.25.6
|
||||
|
||||
require (
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260111043639-f82b35bc4398
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260121234916-409db78d836b
|
||||
github.com/rwinkhart/rcw v0.2.4
|
||||
)
|
||||
|
||||
@@ -14,5 +14,3 @@ require (
|
||||
golang.org/x/crypto v0.46.0 // indirect
|
||||
golang.org/x/sys v0.40.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/rwinkhart/libmutton => ../libmutton
|
||||
|
||||
@@ -2,6 +2,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
github.com/rwinkhart/go-boilerplate v0.1.1 h1:C+yyscGWeqvNpR91iw0i91zqX0LcxnCr1VOyT7iM4JY=
|
||||
github.com/rwinkhart/go-boilerplate v0.1.1/go.mod h1:/NVRKGslU20E5xU5YOgXzWxA6aa94BMtv5MtHRTb5Ek=
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260121234916-409db78d836b h1:aG/6pb3bumQhdAE0oyjlOeiUujMoRq6509HYWmcMBCs=
|
||||
github.com/rwinkhart/libmutton v0.4.3-0.20260121234916-409db78d836b/go.mod h1:++8vRtgE/9oAtYHlMISk6aE9ijzZleiy6d82Z7NhQ/0=
|
||||
github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo=
|
||||
github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c=
|
||||
github.com/rwinkhart/rcw v0.2.4 h1:FrRSsl+ui1WLmDwqjLSROtFPKqSeGLEfF2SPENt4qP0=
|
||||
|
||||
Reference in New Issue
Block a user