...
Is there any reason to don't add it to the directory "bin" together to the Go tools? ...
...
https://github.com/kless/syscall2go
On Friday, 24 August 2012 07:31:51 UTC+10, Archos wrote:...
https://github.com/kless/syscall2go
I knew it should not be hard to write one :-).
There is one problem with your program. I run it like:
./syscall2go $GOROOT/src/pkg/syscall/syscall_windows.go
It display this:
1:164: error condition: expected integer
1:119: parameters: expected type
1:170: parameters: expected type
1:57: out: expected left parenthesis
1:148: error condition: expected integer
1:75: expected to finish
1:165: expected to finish
I do not think it is intended to do that.
I would write a test that input $GOROOT/src/pkg/syscall/syscall_windows.go file into your program and compare its output with the contens of $GOROOT/src/pkg/syscall/zsyscall_windows_386.go. Once this test PASS, I would know that my program works. It would also be helpful next time I need to change my code, because I would re-run this test to make sure it still works.
//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext,
addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStoreAlex
I should not be telling you what to do - it is your project. But, if I would write program like that, I would allow for my program to accept multiple input file names on command line and output to stdout. Just like current perl program does.
Alex
The prototype on the next file [1] to create system calls in Windows, should have a windows API name in tittle case. It has now: "kernel32.getCurrentProcessId" but it should be "kernel32.GetCurrentProcessId" [2]
//sys getCurrentProcessId() (pid uint32) = kernel32.getCurrentProcessId
El viernes, 24 de agosto de 2012 23:19:10 UTC+1, brainman escribió:
..., I would allow for my program to accept multiple input file names on command line and output to stdout. Just like current perl program does.
The program already did that.
To install: go get github.com/kless/cutil/mksyscall
Sorry, but I've several projects related and I prefer have them like sub.projects.On Monday, 27 August 2012 18:26:33 UTC+10, Archos wrote:
>
> And we only have to run:
> $ mksyscall $GOROOT/src/pkg/syscall/syscall_windows.go $GOROOT/src/pkg/syscall/security_windows.go
Yeah, that is what I have tried too. And I expect the output of this command
# diff $GOROOT/src/pkg/syscall/zsyscall_windows_386.go <(./mksyscall $GOROOT/src/pkg/syscall/syscall_windows.go $GOROOT/src/pkg/syscall/security_windows.go)
to be empty. But it is not. So, whatever your program does, it is different to what mksyscall_windows.pl does.
and wouldn't even worry about any flags, options, features and such until test passes.
I would also use templates to write the output. It would be simpler, and would make it easier to change things quickly when I need to.
I would also avoid using any "flags" unless I am really, really need them. Simplicity is important.