update examples and update code style

This commit is contained in:
vcaesar 2018-10-21 13:39:07 -04:00
parent 83845a8488
commit a3aa5c000f
2 changed files with 6 additions and 4 deletions

View File

@ -20,5 +20,7 @@ func colorPicker() {
func main() {
fmt.Println("color picker...")
colorPicker()
for {
colorPicker()
}
}

View File

@ -615,11 +615,11 @@ char* get_title_by_hand(MData m_data){
== kAXErrorSuccess && data != NULL) {
char conv[512];
// Convert result to a C-String
CFStringGetCString(data, conv,
512, kCFStringEncodingUTF8);
CFStringGetCString(data, conv, 512, kCFStringEncodingUTF8);
CFRelease(data);
char* s = (char*)calloc(100, sizeof(char*));
if (s) { strcpy(s,conv); }
if (s) { strcpy(s, conv); }
// return (char *)&conv;
return s;
}