diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-10 09:46:00 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-10 09:46:00 -0400 |
| commit | 7b2e6b7fa3799ce686dd7509cf9cf6d9b94c2835 (patch) | |
| tree | 44482c1eab182b383b75c40faee26102bf2de5c3 | |
| parent | e432e6fecff4554ceccb0e9dbc7a8b915fc90d2b (diff) | |
Made adjustments to the output of windowsconstgen to please go fmt.
| -rw-r--r-- | tools/windowsconstgen.go | 7 | ||||
| -rw-r--r-- | zconstants_windows_386.go | 2 | ||||
| -rw-r--r-- | zconstants_windows_amd64.go | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/tools/windowsconstgen.go b/tools/windowsconstgen.go index 777324d..37cdd22 100644 --- a/tools/windowsconstgen.go +++ b/tools/windowsconstgen.go @@ -104,7 +104,7 @@ func hacknamesPreamble() string { func preamble(pkg string) string { return "// autogenerated by windowsconstgen; do not edit\n" + - "package " + pkg + "\n" + "package " + pkg + "\n\n" // two newlines to please go fmt } // for backwards compatibiilty reasons, Windows defines GetWindowLongPtr()/SetWindowLongPtr() as a macro which expands to GetWindowLong()/SetWindowLong() on 32-bit systems @@ -118,6 +118,10 @@ func printConst(f *os.File, goconst string, winconst string) { fmt.Fprintf(f, " fmt.Println(\"const %s =\", C.%s)\n", goconst, winconst) } +func printBlankLine(f *os.File) { + fmt.Fprintf(f, " fmt.Println()\n") +} + func printGWLPName(f *os.File, which string, char string, targetarch string) { fmt.Fprintf(f, " fmt.Println(\"var %s = user32.NewProc(\\\"%s\\\")\")\n", which, char + gwlpNames[targetarch]) @@ -188,6 +192,7 @@ func main() { // not a hack name; strip the leading _ from the value name but keep the constant name unchanged printConst(f, ident, ident[1:]) } + printBlankLine(f) // to please go fmt // and now for _getWindowLongPtr/_setWindowLongPtr printGWLPName(f, "_getWindowLongPtr", "G", targetarch) printGWLPName(f, "_setWindowLongPtr", "S", targetarch) diff --git a/zconstants_windows_386.go b/zconstants_windows_386.go index eb24354..0dfbf22 100644 --- a/zconstants_windows_386.go +++ b/zconstants_windows_386.go @@ -1,5 +1,6 @@ // autogenerated by windowsconstgen; do not edit package ui + const _ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 const _AC_SRC_ALPHA = 1 const _AC_SRC_OVER = 0 @@ -172,5 +173,6 @@ const _IDC_ARROW = 32512 const _IDI_APPLICATION = 32512 const _INVALID_HANDLE_VALUE = 4294967295 const _NULL = 0 + var _getWindowLongPtr = user32.NewProc("GetWindowLongW") var _setWindowLongPtr = user32.NewProc("SetWindowLongW") diff --git a/zconstants_windows_amd64.go b/zconstants_windows_amd64.go index 95c07a7..de3a31e 100644 --- a/zconstants_windows_amd64.go +++ b/zconstants_windows_amd64.go @@ -1,5 +1,6 @@ // autogenerated by windowsconstgen; do not edit package ui + const _ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 const _AC_SRC_ALPHA = 1 const _AC_SRC_OVER = 0 @@ -172,5 +173,6 @@ const _IDC_ARROW = 32512 const _IDI_APPLICATION = 32512 const _INVALID_HANDLE_VALUE = 18446744073709551615 const _NULL = 0 + var _getWindowLongPtr = user32.NewProc("GetWindowLongPtrW") var _setWindowLongPtr = user32.NewProc("SetWindowLongPtrW") |
